Sign inSign up

irfanuruchi/promatch

By irfanuruchi

Updated 9 months ago

ProMatch: SWI-Prolog web system for constraint-based event matchmaking (CLPFD), CSV + persistence.

Image
Integration & delivery
Web servers
Web analytics
0

1.4K

irfanuruchi/promatch repository overview

ProMatch (SWI-Prolog) – Docker Overview

ProMatch is a Prolog-based web application for B2B event matchmaking. It manages events, participants, roles, timeslots, per-person availability blocks, and generates conflict-free meeting schedules (Greedy, Optimal CLP(FD), and Stable pairing). It also exports schedules to CSV and includes an “AI assistant” page that generates intro messages (optional Cerebras API + safe fallback template). Done as part of the Logical and Functional Programming course.

In this Docker image you get:

  • Web UI on port 3000
  • Persistent storage: events/participants/meetings are saved to data/promatch_db.pl
  • A simple healthcheck via /
  • Optional Cerebras integration via CEREBRAS_API_KEY (if not set, it falls back to the built-in template)

This image is multi-arch (works on Mac, Linux, and Windows via WSL — both amd64 and arm64).

docker pull irfanuruchi/promatch:latest

docker run --rm -p 3000:3000 \
  -v "$(pwd)/data:/app/data" \
  irfanuruchi/promatch:latest

Then you’ll see: Started server at http://localhost:3000/ And now in your browser open http://localhost:3000/

On first run, if the DB is empty, it seeds demo data automatically.


Persistence (keep your data)

Same command — persistence is handled by mounting ./data:

docker run --rm -p 3000:3000 \
  -v "$(pwd)/data:/app/data" \
  irfanuruchi/promatch:latest

If you want, you can use a named volume instead (cleaner):

docker run --rm -p 3000:3000 \
  -v promatch_data:/app/data \
  irfanuruchi/promatch:latest

Enable Cerebras AI (optional)

docker run --rm -p 3000:3000 \
  -e CEREBRAS_API_KEY="YOUR_KEY_HERE" \
  -e CEREBRAS_MODEL="llama-3.3-70b" \
  -v "$(pwd)/data:/app/data" \
  irfanuruchi/promatch:latest

If CEREBRAS_API_KEY is not set, ProMatch automatically uses the built-in fallback template.


Notes

Healthcheck hits / (so Docker can tell if the server is alive).

DB file lives at: data/promatch_db.pl (inside container: /app/data/promatch_db.pl).

Built as a course project to demonstrate real constraint reasoning in Prolog + a full UI + persistence + Docker packaging.


Note

Build as a course project for Logical and Functional Programming. The topic was chosen to demonstrate real constraint reasoning in Prolog: availability, meeting uniqueness, schedule feasibility, and multi-algorithm scheduling, with a complete web UI + persistence + Docker packaging.


Technical overview (Algorithms + Data Model)

Algorithms used
  • Greedy scheduling (heuristic): builds a feasible schedule by selecting high-scoring pairs while enforcing constraints (no double booking, no unavailable slots, no duplicate active meetings).
  • Optimal scheduling (CLP(FD)): models meeting assignments as finite-domain variables and uses constraint solving + optimization to maximize total match score subject to feasibility constraints.
  • Stable pairing (Gale–Shapley): computes stable Startup ↔ Host pairs based on preference rankings derived from match scores and “wants_to_meet” rules, then schedules only those stable pairs (combined with CLP scheduling).
Data model + persistence
  • Knowledge base facts: event/4, participant/4, participant_event/2, role/2, timeslot/3, meeting/6, unavailable/3, etc.
  • Persistence strategy: dynamic predicates are saved to a Prolog file (data/promatch_db.pl) and reloaded on startup. The Docker setup mounts ./data to /app/data so the state survives container restarts.
  • Safety-by-design updates: meeting creation and regeneration enforce rules like canonical pair ordering, conflict checks, and respecting manual/confirmed meetings.

Tag summary

Content type

Image

Digest

sha256:211523855

Size

95.1 MB

Last updated

9 months ago

docker pull irfanuruchi/promatch