Project Structure¶
Top-level layout:
app/: Django project and domain appsdocs/: MkDocs configuration and documentation pagesscripts/: utility scripts for testing, backups, and checksproxy/: NGINX image and templated configdocker-compose.yml: local development stackdocker-compose-deploy.yml: deployment-oriented stack
Repository orientation
The codebase is organized around domain-oriented Django apps with cross-cutting concerns centralized in core.
Within app/:
app/: Django project package (settings.py,urls.py)core/: shared middleware, utilities, and base behavior*_mgmt/: domain modules (requirements, interfaces, scope, architecture, etc.)
Structure Map¶
flowchart TD
A[Repository Root] --> B[app]
A --> C[docs]
A --> D[scripts]
A --> E[proxy]
A --> F[docker-compose.yml]
A --> G[docker-compose-deploy.yml]
B --> B1[app project package]
B --> B2[core shared module]
B --> B3[domain mgmt apps] Runtime Topology¶
flowchart LR
U[User Browser] --> N[NGINX Proxy deploy stack]
N --> W[Django app service]
W --> P[(PostgreSQL)]
W --> R[(Redis)]
C[Celery Worker] --> R
C --> P Design Intent¶
- Preserve clear separation between domain modules.
- Keep shared behavior and policy enforcement in
core. - Route ownership lives in each domain module.
- Favor explicit service boundaries over cross-app internals.
Architectural Principle¶
Domain apps should depend on shared components in core and avoid importing peer app internals directly.
Collapsed anti-patterns to avoid
- Importing another domain app's private helper modules.
- Embedding cross-domain business rules directly in templates.
- Bypassing shared middleware for authentication or policy concerns.