Making a slow API feel instant
A small side project about caching. The idea is simple: take NASA's Astronomy Picture of the Day, a lovely but slow and rate-limited API, and see how instant it can feel with a couple of caches in front of it.
The browser never calls NASA directly. Requests flow through a chain of caches (Vue Query in the browser, a Nitro stale-while-revalidate cache and Redis on the server), each asking the next only when it is empty, and filling itself on the way back. Clear or invalidate any layer from the footer and watch where the next request really goes.
- Framework
- Nuxt 4 · Vue 3.5 (SSR)
- Language
- TypeScript, strict
- Server caches
- Nitro SWR → Redis
- Client cache
- TanStack Vue Query
- Validation
- Zod
- Images
- @nuxt/image · Netlify Image CDN
- Hosting
- Netlify (SSR)
Built by Melanie Stief, who has always dreamed of flying to space, or at least working at NASA (which, sadly, will probably never happen in this lifetime). · viridis.de
A sibling to the RAG demo ↗, the same editorial style, applied to retrieval-augmented generation.
This page's copy was served from Redis.