docs: migrate module documentation to single source of truth
Move 39 documentation files from top-level docs/ into each module's docs/ folder, accessible via symlinks from docs/modules/. Create data-model.md files for 10 modules with full schema documentation. Replace originals with redirect stubs. Remove empty guide stubs. Modules migrated: tenancy, billing, loyalty, marketplace, orders, messaging, cms, catalog, inventory, hosting, prospecting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ Creating a new module requires **zero changes** to `main.py`, `registry.py`, or
|
||||
# Create module with all directories
|
||||
MODULE_NAME=mymodule
|
||||
|
||||
mkdir -p app/modules/$MODULE_NAME/{routes/{api,pages},services,models,schemas,templates/$MODULE_NAME/store,static/store/js,locales,tasks}
|
||||
mkdir -p app/modules/$MODULE_NAME/{routes/{api,pages},services,models,schemas,templates/$MODULE_NAME/store,static/store/js,locales,tasks,docs}
|
||||
|
||||
# Create required files
|
||||
touch app/modules/$MODULE_NAME/__init__.py
|
||||
@@ -156,6 +156,10 @@ app/modules/mymodule/
|
||||
│ └── js/
|
||||
│ └── mymodule.js
|
||||
│
|
||||
├── docs/ # Module documentation (source of truth)
|
||||
│ ├── index.md # Module overview (REQUIRED)
|
||||
│ └── ... # Additional docs as needed
|
||||
│
|
||||
├── locales/ # Translations (auto-loaded)
|
||||
│ ├── en.json
|
||||
│ ├── de.json
|
||||
@@ -538,6 +542,8 @@ python scripts/validate/validate_architecture.py
|
||||
- [ ] Create locales (en, de, fr, lu)
|
||||
- [ ] Create `config.py` if module needs environment settings (optional)
|
||||
- [ ] Create `migrations/versions/` with `__init__.py` files if module has database tables
|
||||
- [ ] Create `docs/index.md` with module overview (see [Module Documentation](module-documentation.md))
|
||||
- [ ] Create symlink: `ln -s ../../app/modules/$MODULE_NAME/docs docs/modules/$MODULE_NAME`
|
||||
- [ ] Run `python scripts/validate/validate_architecture.py`
|
||||
- [ ] Test routes are accessible
|
||||
|
||||
@@ -555,5 +561,6 @@ The framework discovers everything automatically!
|
||||
## Related Documentation
|
||||
|
||||
- [Module System](../architecture/module-system.md) - Architecture overview
|
||||
- [Module Documentation](module-documentation.md) - Documentation standards
|
||||
- [Menu Management](../architecture/menu-management.md) - Sidebar integration
|
||||
- [Architecture Rules](architecture-rules.md) - Validation rules
|
||||
|
||||
Reference in New Issue
Block a user