File Structure
Overview
apps/monolith/
Main application entry point. Wires together:
- Hono server setup
- Middleware registration
- Route mounting
- DI container setup
packages/
packages/auth-ports/ and packages/auth-adapter/
The one live hexagon. The port declares what this codebase needs; the adapter implements it with
Better Auth. See Ports & Adapters.
packages/infrastructure/
Adapters and infrastructure services.
MongoDB survives only as a log transport. It is not a persistence layer — PostgreSQL is the
only database, and the Mongo migration system was retired.
Module Rules
shared-kernel/has zero external dependencies- a port names no library; its adapter is the only file that imports one
apps/monolith/orchestrates everything and is the only place ports are wired