Documentation
Asena is an IoC web framework for Bun: decorate a class, and the container finds it, wires its dependencies and serves its routes. Start with the first section, or jump to what you need.
Start
Install the CLI, create a project and serve your first route.
OverviewThe container, field injection, scopes, bootstrap, adapters and context.
StructureFeature folders, thin controllers, repository ownership and the silent traps.
ReferenceComplete, runnable example projects.
Concepts
Routes, parameters and responses.
IoC@Inject, @Strategy, @Value and scopes.
@OnStart, @OnStop, shutdown and health probes.
Global, controller and route middleware, CORS and rate limiting.
Type SafetyRoute context contracts and validator classes.
Real-timeNamespaces, rooms and multi-pod broadcasting.
MessagingRequest/response and events over a broker.
In-processDecoupled reactions inside one application.
BackgroundCron jobs as components.
Per requestReading the request, writing the response, sharing state.
See the sidebar for the rest: static files, Ulak, frontend controllers, post-processors and inheritance.
Migrate
Adapters
How the core and the HTTP layer fit together, and which to pick.
Native BunZero runtime dependencies, Bun's own router.
HonoThe Hono middleware ecosystem behind the same decorators.
Packages
Repositories and declarative transactions.
API DocsAn OpenAPI 3.1 spec generated from your routes.
ObservabilityTraces and metrics for every request.
Caching and TransportCache decorators, WebSocket and microservice transports.
StreamingA Kafka client and microservice transport.
LoggingThe official logger.
Testing
Which tool to use at which level.
UnitOne class, every dependency mocked automatically.
Web layerReal controllers and validation, mocked services.
Full appThe whole container behind a real HTTP server.
AI
Teach your coding agent Asena. The skill works with Claude Code, Cursor, Copilot, Windsurf and any other tool that supports Agent Skills:
npx skills add asenajs/skillsEvery docs page also has buttons to copy it as Markdown or open it in Claude or ChatGPT, and the whole site is published for language models: