Random quote generator with a custom Stoicism quote library
Self-contained Stoic quote generator deployed on Netlify, with zero external runtime dependencies after migrating from a Heroku-hosted API to local JSON.
Architecture
Data flow from user interface through API layer to persistence and cloud deployment
The problem
The original app fetched quotes from a custom REST API hosted on Heroku's free tier. When Heroku ended free dynos in November 2022, the API went offline taking the app with it. This was a useful failure: it exposed a fragile architectural decision I had made early on.
The migration
The fix was straightforward: the API existed to serve static data that never changed. I migrated the full quote library to a local JSON file and replaced the fetch call with a static import.
- Removed axios dependency entirely
- Migrated 30+ quotes across 3 themes to quotes.json
- Replaced async fetch() with synchronous import
- Eliminated cold-start latency quotes load instantly
What I learned
Every external runtime dependency is a potential failure point. Static data should be static. Colocated with the code that uses it, versioned together, deployed together.
