This folder documents the important runtime architecture for epicflare.
- Request Lifecycle: how requests are routed in the Worker.
- Authentication: app session auth and OAuth-protected MCP auth.
- Data Storage: what is stored in D1, KV, and Durable Objects.
- Worker entrypoint:
worker/index.ts - Server request handler:
server/handler.ts - Router and HTTP route mapping:
server/router.tsandserver/routes.ts - OAuth handlers:
worker/oauth-handlers.ts - MCP auth checks:
worker/mcp-auth.ts