Skip to content
White / YV

Case study

Production Marketplace Platform

2026-present Sole developer

Summary

I designed and delivered a production marketplace platform covering public discovery, protected management workflows, media intake, and asynchronous operational work. Under the hood it is one server-rendered application and API, backed by relational persistence, a cache, object storage, and an isolated worker tier. It has been operating since March 2026.

Context

The product needed public discovery without exposing sensitive account and operational workflows. It also had to accept user-generated media and run recurring work that must not compete with interactive requests. The controls below stay at the level of categories. Configurations, thresholds, providers, and endpoints are private.

Role

Sole developer, working with a co-founder who financed the project. I owned the architecture, the implementation, the delivery, and the production system around it, which includes the request path, the identity integration, the media pipeline, the worker tier, and the observability that keeps all of it legible.

Product decisions

The marketplace operates in a sensitive sector. Before deciding how to build it, we had to decide who could publish, how to check them, and what would happen when something went wrong.

The site is for adults 18 and over, and anyone who promotes themselves on it has to verify their identity. That data is used under a written usage policy, and access to it is restricted. A team of moderators reviews content with internal tools, with the Terms of Service and the User Agreement as the rules. Payments go through an established payment processor, so the platform never handles money on its own. Backups and communication channels outside the platform keep us in contact with users if the site goes down.

Several of the technical pieces in the sections below, such as authorization, server-side validation, and media checks, are what apply those rules on every request.

Architecture

One process runs both the server-rendered frontend and the API. The same runtime serves rendered pages and the routes behind them, which keeps one deployment, one security posture, and one set of shared clients. Behind it are four kinds of state (a relational database, a cache, object storage, and a queue). Each one is reached through services, never straight from a controller.

Process flow Context diagram, anonymized. Providers, hostnames, endpoints, data fields, and topology are left out.

What follows walks the paths that matter in this system, including how a request is hardened, how a session is established, how background work stays off the request path, how media comes in, and how usage is counted without a write per view.

The request path and its hardening

Before a handler runs, the request clears a fixed sequence of gates, all composed at the server’s root. The gates are transport security and response headers, identity, abuse controls, and schema validation. By the time a handler sees input, that input is already authenticated and parsed, and what the handler returns is a projected view of the data, not a raw record.

Process flow The request pipeline, in order. Middleware names, thresholds, and route paths are left out on purpose.

Authentication and session

Identity runs on the OAuth 2.0 authorization-code flow against an external OIDC provider. The redirect carries a state value, checked on return with a constant-time comparison. The token that comes back is verified against the provider’s rotating signing keys, with issuer, audience, and expiry all enforced before anything trusts it. The session lives in a signed, http-only cookie, and the user record behind it resolves cache-first.

Process flow Authentication flow, anonymized. The provider, token contents, and cookie configuration are left out.

Session resolution is where the cache earns its keep. A token maps to a user id, and the user id maps to a cached user record, so a signed-in request seldom has to touch the database just to know who is asking. Logout and account changes flush every token mapped to that user, which keeps a stale session from outliving the record behind it.

Asynchronous work, off the request path

Recurring and deferred work (notifications, content processing, the telemetry flush, and data-retention cleanup) runs in a separate worker process against a dedicated Redis instance, kept apart from the Redis that the request path uses for cache and sessions. This is the platform’s central operational decision.

Process flow Worker topology, anonymized. The queue names shown are categorical; schedules and payloads are left out.

Splitting the broker from the cache means a burst of background jobs cannot evict a hot cache or starve session lookups, and the worker can be restarted, scaled, or die without taking request handling down with it. The cost is real. There are two Redis roles to run, a second process to supervise, and jobs that are consistent eventually rather than immediately. For work no user is blocking on, that is the right trade.

Media intake

Uploads stream through instead of sitting whole in memory, and each file is authenticated inside the upload hook before a single byte is written to disk. After that a file clears type and size checks, gets staged to a temporary location that aborts the moment it exceeds its route’s limit, and only then lands in object storage. Coming back out, images are served through signed, resize-on-read URLs, so the origin object is never exposed.

Process flow Media pipeline, anonymized. Limits, MIME allowlists, storage providers, and signing details are left out.

Telemetry without a write per view

Usage is measured on a hot path, so it cannot afford a database write per view. Views and events increment counters in Redis and mark the touched entities in a dirty set; on each tick a worker reads that set and folds the accumulated counts into the database in one batched transaction.

Process flow Telemetry write path, anonymized. Intervals, event taxonomy, and dedupe keys are left out.

Two details keep the counts honest under concurrency. The flush decrements only what it actually wrote, so a view that lands mid-flush survives to the next pass instead of being lost, and an entity leaves the dirty set only once its counter reaches zero. Platform-wide figures (unique visitors and the like) are snapshotted idempotently, so a retried flush can never double-count, and a per-visitor lock stops one viewer from inflating a counter.

Tradeoffs

The recurring theme is isolation bought with operational surface. A dedicated broker and separate workers keep asynchronous work off the interactive path. A cache-first session keeps identity cheap but adds an invalidation contract to honour. A buffered telemetry path keeps the hot path fast but makes counts eventually consistent. Each one adds something to run and supervise, and each one is deliberate.

Outcome

Operating since March 2026

Production status

Reliability and security

The controls in place include server-side validation and sanitization, OAuth/OIDC with JWT/JWKS validation, authorization guards, secure cookie configuration, bot verification, selected progressive slow-down, media checks, response projection, queue workers, structured logs, telemetry, cache, and CI gates. They are implemented controls, not a claim of coverage, effectiveness, or certification.

What I would improve

I would take ownership of the identity layer earlier, even knowing it increases the operational surface area.


Need one technical owner across product architecture and production operations? Discuss your project.