Architecture
Architecture
Colonel follows a simple flow:
- Bun receives the request.
- Kernel builds an HttpRequest object.
- Kernel runs middleware pipeline.
- Router matches route and resolves handler.
- Kernel resolves controller through the container.
- Controller returns a Response, JSON object, or view payload.
- Kernel normalizes output to a Response.
- Session state is committed and Set-Cookie is emitted when needed.
Core Packages
- packages/framework: reusable runtime (Kernel, Router, HttpRequest, Session, Container)
- packages/create-colonel: CLI scaffolder that pulls template content from repository tarball
- examples/web: canonical app implementation
Design Principles
- Explicit wiring over hidden magic
- Request-scoped state over shared mutable state
- Extend by composition first, then framework internals
- Keep generated apps close to framework conventions