Zum Hauptinhalt springen

REST API patterns (pagination, envelopes, rate limits)

Generated from mcp/patterns.registry.json — do not edit by hand; change the registry and run bun run patterns:build.

Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.

Category: Architecture & Request Pipeline · Tier: light · Risk: low — structural pattern, no external services

Defines the file-based +server.ts convention for REST endpoints, covering Valibot validation, error() status codes, pagination, and response envelopes.

When to use: Reach for it when building a new REST or SSE endpoint under src/routes/api/.

Docs

Code


Machine-readable record: architecture-rest-api in mcp/patterns.registry.json.

← Back to Pattern Library

Geht dieses Pattern noch besser? Sag uns, wie.

Feedback geben