CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/http-caching-strategy

HTTP caching for web APIs — Cache-Control headers, ETags, conditional requests,

88

25.00x
Quality

84%

Does it follow best practices?

Impact

100%

25.00x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-4/

User Dashboard API for a SaaS Application

Problem Description

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.

Output Specification

Produce a self-contained server.js (or server.ts) file with an Express app that:

  1. Has a GET /api/status route (public, no auth) that returns system health status.
  2. Has a GET /api/me route (behind auth middleware) that returns the authenticated user's account details.
  3. Has a GET /api/me/team route (behind auth middleware) that returns the user's team members.
  4. Has a GET /api/me/usage route (behind auth middleware) that returns the user's usage statistics for the current billing period.
  5. Has a GET /api/me/api-keys route (behind auth middleware) that returns the user's API keys.
  6. Has a POST /api/me/api-keys route (behind auth middleware) that creates a new API key.
  7. Stores data in memory (arrays or Maps are fine).
  8. Returns JSON responses with appropriate HTTP status codes.
  9. Listens on port 3000.

The code should be production-ready and handle sensitive account data appropriately.

evals

tile.json