Adding a Feature
Use this workflow when adding product functionality.
1) Start with one vertical slice
Define the smallest shippable slice that includes:
- domain logic,
- user/API surface,
- and success/failure states.
Avoid starting with broad refactors.
2) Place code in the right app
- Domain models/services →
apps/core - API routers/schemas →
apps/api - Product pages/templates →
apps/pages+frontend/templates - Async work →
apps/core/tasks.pyqueued through Django Q2
3) Implement in this order
- Model changes and migrations
- Service/business logic
- API/view layer
- Template/UI updates
- Background task wiring (if needed)
- Tests and regression checks
4) Keep operations safe
If the feature changes background processing or billing-like flows:
- add explicit logs for traceability,
- persist failure reasons users can understand,
- keep retry paths available (manual or automated).
5) Ship with docs in the same PR
If behavior, architecture, or setup changed, update docs in the same PR.
At minimum, update:
- the relevant docs page,
- any setup instructions affected,
- and examples/commands users rely on.
Definition of done
A feature is done when:
- users can complete the intended job,
- unhappy paths are handled,
- docs are updated,
- and runtime/config impact is understood.