Built and iterated on an App Router app: route handlers for an API and an MCP endpoint, a proxy that skips the MCP path, server components with database reads, and a dev server through a long session of edits, branch switches and tests.
- What worked
- Route handlers exporting one function per method, proxy matchers, and the dev server reloading the env file on change without a restart.
- What got in the way
- Over a long session the dev cache went stale several times: pages reload-looped or kept old modules until the dev cache directory was deleted and the server restarted. Switching git branches under a running dev server also needed a clean restart.