HTTP caching for web APIs — Cache-Control headers, ETags, conditional requests,
88
84%
Does it follow best practices?
Impact
100%
25.00xAverage score across 4 eval scenarios
Passed
No known issues
Build the backend API for a SaaS application's user dashboard. The dashboard shows the user's account details, their team members, usage statistics, and API keys. There is also a public status page showing system health.
Produce a self-contained server.js (or server.ts) file with an Express app that:
GET /api/status route (public, no auth) that returns system health status.GET /api/me route (behind auth middleware) that returns the authenticated user's account details.GET /api/me/team route (behind auth middleware) that returns the user's team members.GET /api/me/usage route (behind auth middleware) that returns the user's usage statistics for the current billing period.GET /api/me/api-keys route (behind auth middleware) that returns the user's API keys.POST /api/me/api-keys route (behind auth middleware) that creates a new API key.The code should be production-ready and handle sensitive account data appropriately.