Developer Documentation
Creating a Module
Add a Kaya module without bypassing migrations, roles, audit or demo safeguards.
Creating a Module
- Define models and relationships in
app/models/models.py. - Add idempotent SQLite migration logic to the runtime path and
scripts/migrate_sqlite.pywhere required. - Create a focused router and service boundary, then include the router in
app/main.py. - Add Jinja templates and only the CSS/JavaScript required for progressive enhancement.
- Add navigation using the exact user-facing module name.
- Apply role dependencies, CSRF, input bounds, safe upload handling and audit events.
- Encrypt secrets, avoid logging protected values and implement clean deletion semantics.
- Add demo restrictions for mutation/network/secret functionality.
- Add tests for permissions, validation, security and failure behaviour.
- Update source docs and the separate
kaya-docsuser/developer guides.
Do not advertise a disabled navigation placeholder as an active module. Prefer additive schema change and preserve existing URLs/data.
