The problem

Ticket inventory changes constantly across many third-party sites. Operators need current seat data, a way to list seats for resale, and a clear view of what the system is doing. I built one platform that collects inventory on a schedule, stores it, and shows it live.

What I built

The backend is a NestJS 11 monorepo with four services: a REST API, a notifications consumer, an audit-log consumer, and a WebSocket service. Services talk through RabbitMQ and share types from a common library. Login, sessions and roles use SuperTokens.

The scrapers are a Django 5.1 app with Celery and Playwright. It has more than thirty scraper implementations, a proxy layer, circuit breakers, and a pipeline that runs scrape, save, resale sync and delist as separate stages. Scheduling runs on its own queue. Django owns the database schema and its migrations. NestJS reads the same tables through a Prisma mirror.

The portal is a React 19 and Vite app with TanStack Query. It covers events, venues, performances, seat search, a scheduler, scrape jobs, scraper health, risk management, triage, seat mapping and user management.

TicketPro grew out of an earlier version of the same product, with the same three parts. That version is where I first set up the PostgreSQL read replica, daily database backups, and a self-hosted monitoring stack: Prometheus and Grafana with exporters for PostgreSQL, Redis and the host, Loki for logs and Sentry for errors. The current codebase is the rebuild, with cleaner service boundaries.

The hard part

Read load and connection count. The API only reads the core schema, so I pointed Prisma at a PostgreSQL read replica behind PgBouncer. Writes go to the Django service. Connection pool size and timeouts are set in config, and slow paths are tagged in the code so I could find them again.

The second problem was writing the same data over and over. Each scrape hashes its result, and if nothing changed the pipeline skips the database save and records the stage as skipped. My architecture notes put the previous approach at roughly a million snapshot inserts an hour at peak, which is why I added the check and wrote up a redesign.

Real-time updates were the third. The WebSocket service authenticates each socket, puts it in user, role and performance rooms, and tracks connections in Redis. I split one namespace into separate ones for POS events, job status and notifications.

Result

The platform runs as separate services with Docker Compose: PostgreSQL primary and replica, PgBouncer, a separate TimescaleDB instance for audit data, RabbitMQ and Redis. Audit events are sent without blocking the user action.

Stack

NestJS, TypeScript, Prisma, SuperTokens, Django, Celery, Playwright, React, Vite, TanStack Query, Tailwind CSS, Recharts, Socket.io, RabbitMQ, Redis, PostgreSQL, PgBouncer, TimescaleDB and Docker. Monitoring with Prometheus, Grafana, Loki and Sentry.