ServiceFlow - API Troubleshooting Lab
A FastAPI application for practising SQL diagnostics, payment failure handling, and API regression testing.
- Problem
- The order report runs repeated queries, failed payments can leave orders marked paid, and invalid items can produce incorrect totals.
- Approach
- I inspected the request logs, service code, and SQL query plans, then added an indexed aggregation and corrected payment and validation handling. Pytest checks the fixes.
- Result
- An indexed aggregation reduced local median service-layer time from 90.26 ms to 2.11 ms (42.8×) on a generated SQLite dataset: 500 customers, 2,000 orders, and 5,966 items.
- Python
- FastAPI
- SQLAlchemy
- SQLite
- SQL diagnostics
- pytest
- GitHub Actions
Generated local dataset · simulated faults · no hosted demo.