ASafarIMShowcase
04 /Case study

From a tutoring marketplace to an explainable matching benchmark

The insight worth keeping was never the payments stack — it was how the ranking is built and explained.

Synthetic data, safe demo mode. Every tutor and student here is invented for this benchmark — no real people, no real bookings, no real payments, no external side effects. Ranking runs entirely in your browser against committed fixtures. The runnable harness lives in benchmarks/edumatch.
01 /Evolution

What was ported, what wasn't

StageStackCore ideaWhere it hit a wall
Personal projectNext.js · Prisma/Postgres · Stripe Connect · geocodingA full tutoring marketplace: intake, tutor discovery, quotes, Stripe-split payments, disputes, verification, notifications.The matching algorithm itself — the actual product insight — was buried inside a large, credentialed, stateful app that can't be shown publicly as-is.
This benchmarkPure JS engine · synthetic fixtures · client-side demoExtract just the matching logic, make it explainable and adjustable, and prove it with deterministic tests instead of a live marketplace.Deliberately no accounts, payments, geocoding, or verification — the Journey page simulates the workflow shape without any of the real infrastructure.
02 /Architecture

How the benchmark is built

Constraints first, scoring second

Hard requirements (subject, level, language, availability, mode/distance) are checked before any scoring happens. A tutor who fails one is never ranked — and the reason is recorded, not discarded.

Explainable by construction

Every ranked result carries a factor-by-factor breakdown (value × weight = contribution) that sums exactly to its composite score — there is no hidden step between 'why' and 'what.'

One engine, two consumers

The engine is a single ESM module imported by the Node test suite, the fixture generator, and the Showcase's client-side Match Explorer — there is no second implementation to drift out of sync.

Damped rating

The legacy algorithm normalised rating as avg / 5, which let a single five-star review outrank a tutor with forty consistently strong ones. This version damps toward a neutral prior so review count matters.

03 /Tradeoffs

What we gave up, and why

No live marketplace in public

The public surface cannot create a real booking or move real money. That rules out 'try it against real tutors' demos, but it's the only honest way to publish a matching demo without a moderated, credentialed backend.

Small, hand-reviewed fixture set

Twelve tutors and six needs are enough to demonstrate the method precisely — a deliberate twin pair, a tight-availability case, a no-qualified-tutor case — but they are not a statistically representative population.

04 /Lessons

Lessons from the legacy system

Explainability is a design decision, not a feature

The legacy scorer produced a single number. Retrofitting an explanation after the fact is much harder than building the factor breakdown as the primary output from day one, which is what this version does.

Fairness needs a provable test, not a policy statement

Saying "the algorithm doesn't use protected attributes" is a claim. A constraint-identical twin pair that must score identically is a test. See the Fairness page.

Toward a real production version
  • Real provider adapters (an LLM for scripts, a render worker for video) implementing the same ScriptProvider/RenderProvider interface, gated behind explicit flags and a cost confirmation step.
  • Real asset storage, licensing, and rights verification for any non-synthetic media.
  • Durable queue/worker infrastructure so a job survives a process restart, with the same state machine and idempotent-retry semantics enforced server-side.
  • Audit logging and access control around who can approve or reject a run at each gate.
evidence-first