Demo — not a real ticket shop. Test payments only.

How it’s built

What is real, what is simulated, and where the prototype ends

The prototype was made for the EPS practical test. Everything runs on one VPS: a host Caddy for TLS, in front of a Docker Compose stack with the app, the worker, the simulator, Postgres and Redis.

Architecture

EPS Next architectureBrowsers and AI agents reach Caddy on the host, which passes requests to the Next.js app in Docker Compose. The app uses Redis and Postgres; the worker and the simulator work on the same data. Payments go to the mock providers A and B; the AI goes through a local bridge, with scripted replies as the fallback.Browserfans, phonesAI agentssigned (Web Bot Auth)Caddyon the host · TLS, reverse proxyDocker Compose (same VPS)app · Next.jspages, API, queue, checkoutRedisqueue, holds, limitsPostgresorders, tickets, paymentsworkeradmission, reconcilersimsimulated crowd (arena)Provider AmockProvider BmockClaude bridge (host)owner’s subscription · fallback: scripted

What is real and what is simulated

PartRealSimulated
Queue, holds, inventoryThe full code: the lottery, the Redis Lua scripts, the Postgres orders, the limits.Nothing.
The arena crowdEvery request goes through the app’s queue, agent gate and checkout.The people: 100,000 arrivals played by the simulator on the same VPS.
HTTP loadk6 runs against the VPS, recorded in docs/load-results.md.The clients: one k6 machine plays thousands of distinct clients.
PaymentsThe state machine, the failover from A to B, reconciliation and refunds.Providers A and B are mocks: no money, no card network.
AI (assistant, engine explanations)A real model, through the local bridge to the owner’s Claude subscription.When the bridge does not answer: scripted replies from templates.
AI agentsWeb Bot Auth signatures are verified.The agents in the arena are signed by the simulator.

What was measured

Load tests (k6)

Read now from docs/load-results.md, one row per run.

RunDateServerk6 machineArrivals/s peakArrivals/s meanQueue wait p50 msQueue wait p95 msPurchases/sPayment recovery p50 msPayment recovery p95 msPayment recovery max msOversoldDouble charges
Run 1: CI-sized, local (load.js), 2026-11-292026-11-29none. Local stack in a 4 vCPU (Intel Xeon @ 2.10 GHz) / 15 GB container. next start + worker + Postgres 16 + Redis on the same box. For comparison, the production target is the shared 4 vCPU / 7.8 GB VPS.the same container (k6 v2.4.0), so k6 competed with the app for the 4 vCPUs206.3518,01521,0225.075271,0371,05200

Latest arena run (simulated crowd)

Finished 29 Nov 2026, 15:25. Simulated crowd, real code paths. HTTP capacity is measured separately with k6.

Oversold
0
Duplicate charges
0
Arrived
100,000
Tickets sold
39,019
Revenue
16,937,486 lei
Bots blocked
22,539
Checkout p95
2,437 ms
Arrivals per second (peak / mean)
556 / 166.67
Wait in the line (p50 / p95)
268.1 s / 469.9 s
Purchases per second
28.08
Payment recovery (p50 / p95)
3.2 s / 6.9 s

The full report of this run

Known limits

This is where the prototype ends. Nothing below is solved.

What changes for production