The BackendThat ShipsWith You
A production-ready Hono + TypeScript foundation, validated config, versioned routes, structured logs, migrations and auth. Wired up. Explicit. Yours to extend.
no install required, runs through npx
$ npx create-hono-forge@latest my-app
▸ Scaffolding My App from Hono Forge...
▸ Installing dependencies...
▸ Creating database... running migrations...
✓ Done!
$ cd my-app
$ pnpm dev
▸ INFO: Server listening {"environment":"development","service":"Hono Forge","host":"0.0.0.0","port":8000} _
Step 01
Scaffold
Deps installed, DB created and migrated
npx create-hono-forge@latest my-appStep 02
Enter
Your new project, ready to go.
cd my-appStep 03
Run
Live on 0.0.0.0:8000.
pnpm devWhat's forged in
#1 Configure
Validated by Default
Zod checks every variable in .env before the server accepts a single request. Bad config never reaches production.
env validation
✗ PORT must be an integer 1–65535
✗ wildcard CORS cannot be combined with credentials
✓ DATABASE_URL resolves to a .db path
src/modules/
├─ article/
└─ <your-feature>/
routes · service · schema
#2 Extend
Feature-First Modules
Business logic lives beside its routes and schema, decoupled from Hono's Context testable on its own terms.
#3 Trace
Every Request, Tagged
Every response carries an X-Request-Id. Error bodies repeat it, so a client report matches a server log in one grep.
{
"error": {
"code": "NOT_FOUND",
"requestId": "01K9X…"
}
}
{"level":30,"reqId":"01K9X…","method":"GET","path":"/api/v1","ms":4}
#4 Observe
Logs That Read Like Data
Newline-delimited JSON in production, pretty-printed in development. Credentials and tokens redacted either way.
#5 Persist
Migrations, Handled
Drizzle migrations and Better Auth are already connected — model your schema and move on.
$ pnpm db:generate
$ pnpm db:migrate
▸ 2 migrations applied
SIGTERM received
▸ draining connections
▸ closed in 340ms
#6 Ship
Shuts Down Clean
SIGINT/SIGTERM stop new connections and close gracefully — no dropped requests mid-deploy.
Chosen tools, not a pile of dependencies
Node.js
Runtime
TypeScript
Type safety
pnpm
Package manager
Hono
Web framework
Zod
Validation
Pino
Logging
Drizzle ORM
ORM
SQLite
Database
Better Auth
Authentication
ESLint
Linting
Prettier
Formatting
Vitest
Testing
A feature-first modular monolith
app.ts is the composition root. server.ts adapts it to Node.js and owns the process lifecycle.
Open, and staying that way
MIT licensed, hosted on Codeberg. Issues and pull requests are welcome. read the README for the full command reference and environment rules.