About
A backend you assemble, not inherit.
Damat is an open-source, MIT-licensed backend framework for TypeScript on Bun. Instead of one monolith's opinions, you compose exactly the backend your app needs from plug-and-play modules.
Why Damat
Damat exists because backend teams keep rebuilding the same features — users, billing, queues, audit logs — inside frameworks that make those features hard to share. A monolithic framework hands you its opinions; a starter template hands you code you now own forever. Neither gives you a unit of reuse.
Damat's answer is the module: a self-contained package with its own models, service, config, and migrations, developed and tested on its own, then installed into an app with one command. The framework's job is composition — at startup it wires every installed module to your PostgreSQL database and your HTTP server and hands you one typed backend.
The whole project is developed in the open: one monorepo holding every package, its docs, and the registry index, released in lockstep so there is a single version to reason about.
What we optimize for
Modules first
A feature is a module: models, service, config, and migrations in one self-contained package you can author, build, and test in isolation — then install into any Damat app.
Composed, not scaffolded
Starters copy code into your repo and leave you to maintain it. Damat wires modules into your database and HTTP server at startup, so an upgrade is a version bump, not a merge.
Typed end to end
TypeScript strict mode everywhere — models to services to routes to workflows. If it compiles, the wiring is right.
Boring where it counts
PostgreSQL for data, Redis for speed, plain HTTP for transport. The novel part is the composition, not the storage engine.
The stack underneath
Damat does not hide its foundations — it arranges them. Every layer is a tool you may already know.
- Bun
- Runtime, package manager, and test runner
- Hono
- HTTP routing and middleware
- Effect-TS
- Typed, composable business logic
- PostgreSQL
- The system of record
- Redis
- Caching and coordination
The concepts guide explains how config, modules, services, and workflows fit together.
Read the concepts guide