Stack
Core Technologies
| Category | Technology | Version | Purpose |
|---|---|---|---|
| Runtime | Bun | 1.x | JavaScript/TypeScript runtime with native support |
| Language | TypeScript | 5.x | Type-safe JavaScript |
| Framework | Hono | 4.x | Lightweight, edge-ready web framework |
| Database | MongoDB | 6.x+ | Document store with MongoOS auto-sharding |
| Cache | BunRedis | native | Bun’s native Redis client |
| Storage | BunSQLite | native | Zero-infrastructure SQLite via Bun |
| i18n | Custom | — | JSON file-based multi-locale support |
Bun Runtime Features
Why Bun?
- Native TypeScript — No
tsc, notsx, no build step - Fast startup — ~10ms cold start vs Node.js ~100ms+
- Native SQLite —
Bun.SQLitefor embedded storage - Native WebSocket — Built-in
new WebSocket()for ACP client - Built-in test runner —
bun test - Auto-install —
bun installis fast and lockfile-based
Bun-Specific Patterns
Hono Framework
Why Hono?
- Edge-ready — Works on Bun, Deno, Cloudflare Workers, Node.js
- Lightweight — < 500KB, no dependencies
- Type-safe — First-class TypeScript support
- Native Bun integration — Zero adapter layer
Key Hono Patterns
Data Layer
MongoDB
Primary data store for persistent entities.BunRedis
In-memory cache with Redis fallback.BunSQLite
Zero-infrastructure session storage.Architecture Pattern
Hexagonal (Ports & Adapters)
Dependency Rule
Development Tools
| Tool | Purpose |
|---|---|
bun run dev | Hot reload dev server |
bun run build | Production build |
bun run test | Test runner |
bun run typecheck | TypeScript checking |
bun run lint | ESLint |