Monolithic FastAPI app for a fest portal with SQLite persistence and Tailwind-rendered Jinja templates. Includes Locust scripts to demo load/perf behavior and an intentional crash path to illustrate blast radius.
- User auth (register/login) with SQLite
- Event listing and registration
- My Events + checkout total calculation
- Intentional crash path to show monolith-wide failure
- Locust load tests for /events, /my-events, /checkout
- Install deps:
pip install -r requirements.txt- Seed events (creates fest.db if missing):
python insert_events.pyuvicorn main:app --reload --port 8000Then open http://localhost:8000/login
- GET /login, POST /login
- GET/POST /register
- GET /events?user=
- GET /register_event/{event_id}?user= (intentional crash at 404)
- GET /my-events?user=
- GET /checkout (sums all event fees)
- GET /docs for OpenAPI UI
locust -f locust/events_locustfile.py
# or
locust -f locust/myevents_locustfile.py
locust -f locust/checkout_locustfile.pyAccess the Locust UI at http://localhost:8089 and set host to http://localhost:8000.
- main.py FastAPI app + routes/templates
- database.py SQLite connection helper
- insert_events.py Seeds events table
- checkout/ Checkout logic
- locust/ Load-test scripts
- templates/ Jinja + Tailwind UI
- requirements.txt Dependencies
- The crash link in Events uses event_id=404 to demonstrate monolith failure → rendered via templates/error.html
- Database file fest.db is generated locally; regenerate via insert_events.py when needed