Essentials
The runtime model behind AponiaJS — modules, dependency injection, routing, validation, errors, and the application lifecycle.
Everything in this section is implemented in 0.6.0-alpha.18 and covered by
tests. Read it in order for a complete picture, or jump to the page for the
piece you are wiring.
AponiaJS separates application structure from the HTTP platform:
Decorated classes
-> immutable module definitions
-> validated module graph
-> singleton container
-> Elysia plugins and routesStructure and dependencies
Modules
Define dependency and visibility boundaries.
Providers
Construct reusable singleton dependencies.
Tokens
Inject classes and explicit non-class values.
Visibility
Control what a module exports to its importers.
Dynamic modules
Build distinct configured module instances.
Handling requests
Controllers
Map HTTP routes to controller methods.
Request parameters
Inject body, query, params, headers, and context.
Validation
Reject invalid requests before the handler runs.
Errors
Answer with RFC 9457 Problem Details.
WebSockets
Serve native socket events from injected gateways.
Running the application
Bootstrap
Follow the complete create sequence.
Lifecycle
Listen, handle in process, and close cleanly.
Logging
Configure levels, JSON output, and custom loggers.
Platform-specific work lives next door
Native Elysia access, plugin modules, typed plugin context, and Eden Treaty are covered under Elysia platform. Features that are not implemented yet are listed under current limitations.