FIVEM COMMUNITY / MARKETPLACE ENGINEERING
Atlas
Market.
Three roles.
One order to agree on.
Buyers, suppliers, and staff working around one order lifecycle in a FiveM marketplace.
- My contribution
- Marketplace, API, realtime
& deployment
- Context
- FiveM community marketplace
June 2026 account
- Built with
- Next.js · Hono · Neon
Clerk · Ably · R2
02 / THE BUILDAn order needs a defined next step
The implementation account describes an order state machine rather than independent status flags. It names PENDING → ACCEPTED → … and says illegal transitions return a 400 response.
That is enough to explain the design choice, but not enough to reconstruct every state or permission. A complete diagram would need the actual transition definition. Instead, the interactive explanation below focuses on a sequence the source does show: creating an order and publishing its notification.
03 / THE BUILDSave the work before announcing it
Creating an order writes the order itself, its items, and a message thread. Those writes belong to one database transaction. If an insert fails, they do not become a partially created order.
The notification happens afterward. A messaging failure should not undo a transaction that already committed.
ATLAS / TRANSACTION EXPLORER
One commit. Then the message.
Choose a failure case, or step through the boundary between records and notifications.
DATABASE RECORDS
AFTER COMMIT
waitingNotification outcomeValidate the request.
The complete sequence is visible. Writes become durable together at commit; notification failure afterward does not roll them back.
The distinction is useful to inspect rather than merely describe. Try the item-write failure, then the notification failure. The outcomes differ because the failures occur on different sides of the commit.
04 / THE BUILDThe application behind the workflow
Next.js handles the pages and bridges API requests to a standalone Hono app. Neon provides Postgres storage; Clerk handles authentication with a Discord-guild allowlist gate; Ably supplies realtime messaging; R2 holds images.
ATLAS / RESPONSIBILITIES
The system, with the boundaries left in.
Select a component to read what the supplied account says it does.
Pages & API bridge
Next.js
Next.js handles pages. A catch-all route bridges /api/* to the standalone Hono app.
Next.js: Next.js handles pages. A catch-all route bridges /api/* to the standalone Hono app.
Hono: Owns the API routes and documented order operations; it is mounted inside Next.js, not described as a separate Worker deployment.
Clerk + allowlist: The account names Clerk authentication with a Discord-guild allowlist gate. A complete permission matrix is not supplied.
Neon / Postgres: Order, item, and thread writes share a transaction. Prices use the documented integer-math approach.
Ably: Publishes the notifications after database commit. The excerpt does not establish guaranteed retry or delivery.
R2: Stores images in the documented architecture. The complete upload and delivery pipeline is not included here.
The pricing calculations also have a defined boundary. The account describes totals rounded to cents with integer math, rather than allowing floating-point drift to decide the amount displayed to a buyer. The precise calculation is not reproduced in the supplied excerpt.
05 / THE BUILDWhat was checked, and what remains
The June 2026 write-up reports 377 tests across unit, integration, and Playwright end-to-end checks, covering an API with 97 endpoints. It specifically describes coverage of the order lifecycle and illegal transitions. These are historical reported figures, not tests rerun for this portfolio update.
The same account leaves several improvements open: shared validation at the API boundary, clearer alignment between realtime event names and REST operations, and a package name left over from the scaffold.
The related security articles describe a search-query remediation. Their code uses an Express-style handler while the architecture article describes Hono. The supplied files do not establish how those revisions fit together, so that connection needs a repository check before publication.
06 / THE BUILDWhat to inspect next
The order-lifecycle article examines the transaction boundary in code. The testing essay explains the regression-first approach. The search-query case study separates the injection fix from a second change that also needs review: a new result limit.
Source, dates, and what this page verifies
This rewrite is grounded in the supplied project account and complete related articles. Publication dates describe those accounts, not a new release. The original application, its permissions, screenshots, test results, and deployment have not been re-audited.
The diagrams are local explanations with no API calls, database operations, test execution, or saved input. Source conflicts and unsupported outcomes are identified in the reading copy and the handoff. No production deployment occurred.