Personal project · Aug 2026
Local Events
Find live events near you and reserve a spot with Stripe, without overselling.
- Python
- FastAPI
- SQLAlchemy
- PostgreSQL
- Stripe
- JavaScript
Overview
A FastAPI service that searches live music events through the JamBase API, adds decision signals like distance, showtime and venue size, and handles paid reservations with Stripe Checkout and signed webhooks.
The problem
Event listings show a title and a date, which is not enough to decide whether to go. Reservations add a harder problem: payments arrive asynchronously, webhooks are retried, and concurrent buyers race for the last spots.
Architecture
- Vanilla JS client (no build step)
- FastAPI routes: parse, delegate, serialize
- Discovery service: fan-out, dedupe, rank, TTL cache
- Provider interface with JamBase client, mapper and retries
- Reservations: Postgres + Stripe Checkout + signed webhooks
Key engineering decisions
Provider seam
Nothing above the providers package knows JamBase exists. Adding a second source is one line in the registry, and each provider's failure is reported per source instead of becoming a 500.
Retries only where they help
429s, 5xx and timeouts get exponential backoff. Other 4xx responses fail fast, and auth errors raise a distinct error because they are an operator problem.
A small reservation state machine
Only pending moves: to confirmed on checkout completion, to expired or canceled with capacity released. A late expiry on a confirmed row changes nothing.
A live key cannot charge cards
The process refuses to start if the Stripe key is not a test key, so a misconfigured deploy cannot take real payments.
Results
- 31 offline tests covering oversell under parallel holds, duplicate webhooks, bad signatures and retry policy
- Interactive OpenAPI docs generated from the same Pydantic models that validate requests
What I would do next
- Shared cache with stale-while-revalidate for multi-instance deploys
- Map view and a real geocoder for postal codes and neighborhoods