See Billet running
A server-rendered full-stack TypeScript starter on Bun and PostgreSQL. Everything below is running in this app — read the page, then read the code that rendered it.
- Forms · fragments · APITodosA list backed by a service layer: plain forms that work with JavaScript off, in-place fragments when it's on, and the same data over a JSON API.
- Validation · CSRF · PRGFormsOne form, the whole round trip — validation, CSRF, the redirect-and-flash that follows a POST, and what each step is protecting you from.
- ArchitectureThe stackWhat this is built on and how the layers fit: Bun, server-rendered JSX, PostgreSQL, and the small reactive layer that enhances a page without taking it over.
- GET /api/statsJSON APIThe same todo service behind a JSON envelope, with the request guard that keeps a malformed body from becoming an HTML error page.
Works well with
Small packages built alongside Billet. None are bundled — add the ones your product needs.
- billet-cookie-consent A GDPR-friendly consent banner, framework-agnostic and built to slot into a server-rendered template.
- billet-dialog An accessible confirm dialog for destructive actions. Vanilla DOM, zero dependencies, and it gates the form rather than replacing it.
- billet-analytics Privacy-first, self-hosted analytics. Page views land in your own PostgreSQL, and the page needs no tracker script.
- billet-storage File storage behind one interface: an S3-compatible bucket in production, a local directory in development.
- log-digest An in-memory log buffer with a pluggable sink. Batches entries and hands them off to email, Slack, or somewhere of your own.
- Conductor Runs several coding agents in parallel, one git worktree each. Billet ships settings that give every workspace its own port and databases.
Making it yours
These pages are a demo, not a foundation to build on — they exist so the stack is legible before you delete them. START_PROMPT.md walks through renaming the project and stripping the parts you don't want.