Core Concepts
Learn the fundamental concepts of building APIs with Rapina.
In this section
- Routing
Define routes and handle parameters - Extractors
Parse request data with type safety - Authentication
JWT authentication with protected-by-default routes - Dependency Injection
Rapina AppState and dependency injections methods - Error Handling
Standardized error responses with trace IDs - JWKS Authentication
JWT validation using Json Web Key Sets (JWKS) and OIDC discovery endpoints - Database
Database integration with SeaORM - Migrations
Schema migrations with SeaORM - Validation
Automatic request validation with the Validated extractor - Metrics
Prometheus metrics with the metrics feature flag - Pagination
Built-in pagination for list endpoints - Middleware
Request logging, rate limiting, compression, CORS, timeout, and custom middleware - Caching
Response caching with in-memory and Redis backends - Background Jobs
Persistent job queue backed by PostgreSQL - Testing
Integration testing with TestClient - Cron Scheduler
Run recurring background tasks on a cron schedule - OpenAPI
Auto-generated OpenAPI 3.0 specs from route metadata - WebSockets & Relay
Real-time bidirectional communication with raw WebSockets and the Relay pub/sub system