File Structure

Overview

apps/monolith/

Main application entry point. Wires together:
  • Hono server setup
  • Middleware registration
  • Route mounting
  • DI container setup

packages/

There is no packages/domain/ and no packages/application/. This page used to describe both, with a User entity and a CreateUserUseCase. Neither exists. users-domain did grow entities, a repository and use cases; nothing ever called them and they were deleted (ADR-0053). The real list is below.

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

Key Files