Scaffold production-ready monorepos with hexagonal architecture – opinionated, Bun-native, TypeScript-first.
- Monorepo generator – complete
apps/+packages/workspace with Turborepo - Hexagonal API scaffolding – domain, application, and adapter layers with dependency injection
- Full-stack optional – TanStack Router + React web app with shadcn components
- Infra packages à la carte – pick only what you need
- Polyglot – TypeScript (Hono) and Go (Chi) API support
bun add -g honotan# Generate a full monorepo
honotan generate monorepo
# Add a hexagonal API resource inside your project
honotan generate api
# Generate a standalone client app
honotan generate clienthonotan generate monorepoInteractive prompts let you choose:
- API framework – Hono (default) or Go
- Client – TanStack Router (React)
- Infrastructure packages – any combination of the packages below
| Path | Purpose |
|---|---|
packages/config |
Shared TypeScript base config |
packages/env |
Validated env vars (@t3-oss/env-core + Zod) |
apps/server |
API server with a hello example resource |
| Flag | Package | Stack |
|---|---|---|
db |
packages/db |
PostgreSQL via Bun.sql |
db-turso |
packages/db |
SQLite/Turso via Drizzle + @libsql/client |
cache |
packages/cache |
Redis via Bun.redis |
event-driven |
packages/event-driven |
RabbitMQ via amqplib |
auth |
packages/auth |
better-auth (drizzle adapter when db-turso, native pg otherwise) |
s3 |
packages/s3 |
S3-compatible object storage via aws4fetch (Cloudflare R2, AWS S3, MinIO) |
pwa |
– | vite-plugin-pwa support in the web app |
Generated when TanStack Router is selected:
- Vite + React + TypeScript
- TailwindCSS v4 (
@tailwindcss/vite– no config files needed) - TanStack Router
^1.141.1 - shadcn components (button, dropdown, skeleton, sonner)
- Theme toggle (light / dark)
- Auth-aware header + user menu when
authis enabled
honotan generate apiGenerates a self-contained resource module inside apps/server/src/<name>/:
src/product/
├── domain/
│ ├── entities/ # Business models
│ └── ports/
│ ├── in/ # Use case interfaces
│ └── out/ # Repository interfaces
├── application/
│ └── use-cases/ # Business logic + tests
├── adapters/
│ ├── in/http/ # Routes, controllers, validation
│ └── out/persistence/ # Repository implementations
└── index.ts # Composition root
Supported frameworks: Hono, Go (Chi) Inbound adapters: HTTP, WebSocket Outbound adapters: In-Memory, Database, Cache
honotan generate clientGenerates a standalone TanStack Router + React app (outside the monorepo structure).
Each generated project includes .env.example. Variables added per package:
| Package | Variables |
|---|---|
db |
DATABASE_URL |
db-turso |
DATABASE_URL, DATABASE_AUTH_TOKEN |
cache |
REDIS_URL |
event-driven |
RABBITMQ_URL |
auth |
BETTER_AUTH_SECRET, BETTER_AUTH_URL |
s3 |
S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_BUCKET |
git clone https://github.com/rifkyputra/honotan-cli.git
cd honotan-cli
bun install
# Run tests (generate projects into .generated/ and assert on output files)
bun test
# Type check
bun run check-types
# Build
bun run build
# Link globally for manual testing
bun link- TypeScript + Hono hexagonal templates
- Go + Chi hexagonal templates
- Monorepo structure generation
- TanStack Router client generation
- DB (Postgres), DB-Turso, Cache, Event-Driven, Auth, S3 packages
- Turborepo integration
- GraphQL adapter
- Kafka support
- Express & Fastify support
- Rust support
MIT