Atlas Market
Built a two-sided marketplace for a GTA roleplay community. Buyers browse listings and services, place orders, and negotiate; suppliers manage what they offer; staff moderate from an admin dashboard. The order lifecycle runs as a state machine on a Hono API mounted inside Next.js, backed by Neon Postgres, with live messaging over Ably and image uploads to Cloudflare R2. Access is gated by Clerk auth and a Discord-guild allowlist. The backend has 97 endpoints covered by 377 tests.
Case study: How to Fix a SQL Injection Vulnerability Without Breaking Productionread →Case study: Building a two-sided marketplace with an order state machineread →01 — PROBLEM
A GTA roleplay economy needed a real marketplace — not just listings, but the full loop of ordering, negotiating, and messaging between buyers and suppliers, with staff able to moderate it.
02 — APPROACH
Built a Next.js app with role-based dashboards for clients, operators, and admins. A Hono API runs the order lifecycle as a state machine, Neon Postgres stores it, Ably powers live messaging, and Clerk plus a Discord allowlist controls who gets in.
03 — OUTCOME
A working two-sided marketplace where an order moves through defined states, both sides message in real time, and an illegal transition is rejected rather than silently accepted. The test suite covers that at the unit, integration, and end-to-end level.
