Appearance
Plans Module Overview
The Plans module manages the commercial plans shown to end users and the internal CRUD used to curate that catalog. It owns the plan identity metadata, pricing and billing rules, resource limits, and soft-delete lifecycle.
Responsibilities
- Expose a public read-only catalog of active public plans.
- Expose authenticated management endpoints for creating, updating, listing, reading, and soft deleting plans.
- Persist plan identity, pricing, and resource limits in a dedicated PostgreSQL schema.
- Keep the data model extensible so future sections such as modules, cycles, support, or governance can be added without turning the main plan row into a wide table.
Architecture
The module follows the same CQRS + layered module pattern used in the API:
- Presentation:
PublicPlansControllerandManagePlansController - Application: command handlers for create, update, and soft delete plus queries for public and management reads
- Infrastructure: TypeORM persistence entities, repository implementation, and DTO mapper
- Domain:
Planaggregate containing identity, pricing, and resource-limit sections