Components
Self-contained feature modules you register with this.component(SomeComponent).
Built-in components
| Component | What it does | When you reach for it |
|---|---|---|
| Authentication | JWT and Basic auth - token generation, protected routes, multi-strategy | A route needs to know who the caller is |
| Authorization Experimental | Enforcer-based RBAC/ABAC, voters, Casbin integration | A route needs a permission check beyond authentication |
| Health Check | /health endpoint, ping/pong | A load balancer or Kubernetes needs a liveness probe |
| Email sending - multiple transports, templating, queue-based | The app sends transactional or templated email | |
| Request Tracker | Request ID, timing, structured request logging | Always on - registered automatically, nothing to configure |
| Socket.IO | Real-time over Socket.IO - Redis adapter, event-based | Clients need rooms or Socket.IO-specific features |
| WebSocket | Native Bun WebSocket, Redis pub/sub, heartbeat | Clients need a raw WebSocket without Socket.IO |
| Static Asset | Upload/download files - MinIO, Bun S3, local disk | The app stores or serves user-uploaded files |
| API Reference | OpenAPI generation, Scalar UI by default, Swagger UI optional | You want a browsable UI for your REST routes |
| gRPC | ConnectRPC transport, unary RPC, decorator-based | The app serves gRPC alongside or instead of REST |
See also
- Components Overview - What components are
- Creating Components - Build your own
- BaseComponent API - Component base class
- Application - Registering components
- Architectural Patterns - Component design patterns