How nagarehazh/skeleton-ddd-bun-hono-typescript works
Project type and purpose
• This is a backend API service written in TypeScript (running on Bun) that exposes at least a health-check endpoint (HealthCheckController).
• It follows a domain-driven, layered architecture (layers: infrastructure, application, domain).
File structure
• Top-level files:
• bun.lockb, package.json, tsconfig.json, CI config, .gitignore
• migrations/ for database schema management
• src/ splits into three layers:
• infrastructure/: HTTP controllers, routes, DI container, database config
• application/: orchestration of use cases
• domain/: core business entities and logic
• src/utils: environment variable loader
README for additional insights
• Run with bun run dev on port 3000
• No front-end; this is a pure backend service
Relationships and interactions
• Client → HTTP Server/Router
• Router → Controller
• Controller → Application service
• Application service → Domain (calls domain methods)
• Application service → Infrastructure (via injected repository or DB config)
• Infrastructure → Database
Architectural patterns and design principles
• Layered architecture (Presentation → Application → Domain → Infrastructure)
• Dependency Injection (via Inversify): Controllers and services receive dependencies by interface types
• Separation of concerns: migrations separate from runtime DB config; env vars in utils
Relevant technologies and frameworks
• Bun (runtime & package manager)
• TypeScript
• Inversify for DI
• Some ORM or query builder implied by migrations/db.ts
• Node-style HTTP server (imported in src/index.ts)
• Clear labels on all components (e.g., “HealthCheckController”)