A marketplace lives or dies on two things: how easy it is to post, and whether people can find what was posted.
Brigoš is a Czech marketplace for part-time jobs (brigády), small tasks, neighbourhood help and simple services. Think of a lightweight Facebook Marketplace for gigs. People browse listings, filter by category, location and radius, post and edit ads, build a public profile and leave reviews. I built it alone and took it from an MVP to a production website.
Posting without an account
Asking for registration before someone has posted anything kills supply. On Brigoš, an employer can publish a job as a guest. The server gives them an HttpOnly capability cookie, and if they create an account later, the cookie plus a signed-in session lets them claim the job.
Accounts are requested at moments of intent instead. Contact details are never part of the listing page: they load only after someone clicks “contact”, through an endpoint that checks the session and returns only what the owner chose to share. After signing in or verifying an e-mail, the user lands back where they were and the contact opens without another click.
Paid TOP listings
Listings can be promoted to the top of the marketplace through Stripe Checkout. Because this field changes ranking and is paid for, it is server-authoritative. A single field, topUntil, controls promotion. Clients can read it but never write it: the create APIs always initialise it empty, owner edits preserve it, and Firestore security rules reject any client change. Only the Stripe finalizer, after validating the paid session and its server record inside a transaction, or an admin can set it. Webhook events and checkouts are locked and recorded so a retried payment cannot activate twice.
Being found
Curated city pages at /brigady/[city] cover Prague, Brno, Plzeň, Ostrava, Liberec and Ústí nad Labem. They are stricter than the interactive search: a job appears only if it is in that city, not merely nearby. The pages stay indexable even when empty, with a local explanation, a posting action and links to the other cities, so they never turn into thin dead ends.
The scaling incident
Brigoš once hit Firestore’s daily read quota while the marketplace was still small. The cause was read amplification: pages read large collections to show a handful of jobs, and sitemap generation repeated the same scans for every crawler visit.
I bounded the queries first, then moved public search to a PostgreSQL projection while Firestore stayed the source of truth. A durable journal written in the same Firestore transaction as each change keeps the projection in sync, and revisions plus tombstones make replays and late events safe. The rollout was gated by full reconciliation and survived a synchronization bug thanks to a legacy read mode I could switch back to.
I wrote the full story, with the read paths, the migration sequence and the benchmark table, in a separate note: Scaling Brigoš: fixing Firestore read amplification with a PostgreSQL search projection.
Smaller pieces that mattered
- Photos. Listings support several photos. Uploads stream to disk and are processed one at a time with Sharp into 1600 px WebP, and edits check ownership both before the upload and again when committing. Moving old listings to the new format used an idempotent migration that runs as a dry run by default.
- Mobile readiness. I prepared a documented read API with an OpenAPI contract, security hardening and a staging environment so a mobile app can be built on top of the same backend.
- Operations. Each larger change has a written phase document with performance budgets, a release checklist and a rollback path.
What I learned
- Reduce friction where supply comes from, and ask for commitment only when the user wants something.
- Anything that costs money or changes ranking belongs to the server, enforced in more than one layer.
- Crawlers and sitemaps are production traffic.
- A safe rollback path is what makes ambitious changes possible on a live product.