Project page

Tommy

2025 / Frontend, BackendBack

What is it?

Tommy is a book recommendation application developed at Harvey Mudd using the Open AI Api. I was brought in to fix up the UI and speed up api processing speed.

Contribution

Completely bypassed this runtime bottleneck by implementing a precomputed background workflow. Book recommendations are calculated during off-peak hours and cached in the database. When a user requests a recommendation, it is fetched via a simple, high-speed indexed query, keeping the UI instantly responsive.

Analysis Metrics

To measure the impact of the architecture overhaul, the application's performance was benchmarked before and after the migration to the precomputed caching system.

Performance Metrics

* API Response Time: Reduced from an average of 4.2 seconds (waiting for live LLM generation) to < 80 milliseconds (indexed database fetch)—a 98% decrease in latency.

* Throughput: Increased concurrent user capacity by 5x due to the elimination of synchronous, blocking API calls.

How It Was Analyzed

* Load Testing: Utilized K6 to simulate concurrent user traffic and measure response times under load, identifying the original runtime bottlenecks.

* Database Query Profiling: Used EXPLAIN ANALYZE in PostgreSQL to optimize the indexed queries and ensure fetch times remained sub-100ms.

* Log Analysis: Monitored API gateway response logs via Vercel Analytics to track real-world latency improvements pre- and post-deployment.