Yevgeniy Sorokin

Case study 03 ยท Deterministic product logic

Deals Marketplace

A focused M&A marketplace prototype with one complete loop: buyer mandates and seller assets feed explainable matching, users create persisted inquiries, and a platform manager can moderate marketplace state with visible consequences.

Problem

A match score is only useful if the reviewer can understand why it exists.

The prototype needed to show marketplace fit between buyer acquisition mandates and seller assets, then carry that decision into a real product loop: discovery, explanation, contact, persistence, and moderation.

The engineering risk was making the "smart" part impressive but opaque. For a technical review, reproducibility and inspectability were more valuable than adding a runtime model dependency.

Constraints

Reviewer-visible behavior had to stay deterministic.

  • All people, companies, assets, prices, and inquiries in the deployed reviewer workspace are fictional.
  • Demo persona selection is prototype authentication, not a claim of production identity or invitation flows.
  • Contact is a persisted inquiry, not realtime chat, email delivery, or notifications.
  • The prototype intentionally avoids a runtime LLM dependency for matching and validation.
  • Search remains bounded relational filtering until real volume justifies a dedicated search service.
  • Production concerns such as organization identity, rate limiting, formal retention, and full observability remain explicit future work.

Decisions

Make the product state traceable from input to consequence.

Deterministic Smart MatchThe same buyer mandate and asset facts produce the same score, confidence, and human-readable reasons.
Deterministic validationContradictory acquisition criteria and incomplete asset data are caught before they enter the marketplace flow.
One Next.js application boundaryThe App Router application owns UI, server actions/queries, policy checks, and persistence instead of splitting a prototype across unnecessary services.
PostgreSQL + PrismaRelational state and transactions back the marketplace, inquiry, and moderation loops.
Scoped demo workspaceA signed httpOnly cookie identifies an isolated demo workspace and persona; the server reloads user state and applies role/status/workspace checks to each read and mutation.
Auditable moderationSuspension is soft and visible; a suspended seller's published assets disappear from buyer discovery, making the state transition testable.

Evidence

The reviewer can exercise the loop and inspect the implementation.

VerificationThe repository exposes a consolidated verify gate and Playwright E2E suite covering buyer, seller, manager, recovery, security, creator-signature, and responsive journeys.
AI usage boundaryCodex assisted with analysis, implementation, tests, debugging, and verification. Product scope and accepted changes remain owner decisions, while shipped matching and validation stay deterministic and reviewable.

Outcome

A compact prototype that demonstrates product logic, not just screens.

The resulting reviewer path connects role-aware marketplace discovery, explainable fit, persisted inquiries, and moderation into one inspectable system. The intentionally narrow architecture keeps the interesting decisions visible instead of hiding them behind extra infrastructure.