Soda documentation
Soda is a class-based web framework for Bun: modules, dependency injection and decorators like Nest, on Bun’s native router, with standard TC39 decorators.
These pages describe the main branch. Soda is 0.x: the API may change between minor versions.
Guide
- Getting started: create a project, run it, the files it contains
- Controllers: routes, paths, arguments, responses, server-sent events
- Validation: schemas, parsers, bodies, forms and uploads, error responses
- Providers and modules:
inject(), providers, tokens, modules, lifecycle - Request pipeline: middleware, guards, interceptors, exception filters, CORS
- Configuration: typed environment, validated at startup
- Authentication: JWT, cookies, the current user
- WebSockets: gateways, messages, rooms
- Rate limiting: limits per client and route
- OpenAPI: the document and Swagger UI from your routes
- CQRS: commands, queries and events, handled across modules
- Logging: the logger, levels, JSON output
- Testing: the application over HTTP, replaced providers
- Production: build, shutdown, proxies, limits, Docker
- Checking and inspecting:
soda check, every startup problem at once;soda inspect, the application as data
Recipes
- Database:
Bun.sql, Drizzle, Prisma - File uploads: forms, files, limits, storage
Coming from Nest
From Nest maps each Nest feature to Soda’s, and says what differs.