Sanitize codebase, reorganize docs, and add missing deploy files

Remove dead code identified in docs/SANITIZATION-REVIEW.md:
- app/blueprints/content_old.py and app/blueprints/playlist.py
- app/models/group.py, app/utils/nginx_config_reader.py
- orphaned templates (content_list, edit_content, upload_content,
  player_page) and the related group/Template references

Result: 6 blueprints, 82 routes, no dead modules or orphan templates.

Add files that deploy.sh and docker-entrypoint.sh already require but
which were never tracked:
- https_manager.py       (referenced by deploy.sh, migrate_network.sh,
                          docker-entrypoint.sh)
- Caddyfile.example      (seeded by deploy.sh; its absence aborts deploy)

Relocate generated Graphify artifacts from graphify-out/ to
docs/graphify-out/ (110 files, no content change) and archive the
superseded docs under docs/.

Ignore hygiene:
- ignore ad-hoc .env backups (.env.bak*) — they contain live secrets
- keep the pre-sanitization snapshots (docs/legacy code/,
  docs/old_code_documentation/) on disk but out of the repo

Fix .env.example: drop a duplicated config block, genericize the
hardcoded host IP, and document HOSTNAME_INTERNAL.
This commit is contained in:
2026-09-11 12:18:34 +03:00
parent 1c5186463a
commit 46602f1933
226 changed files with 3999 additions and 15737 deletions
+118
View File
@@ -0,0 +1,118 @@
# create_app()
> God node · 13 connections · [/home/scheianu/digiserver-v2/app/app.py](file:///home/scheianu/digiserver-v2/app/app.py#L17)
## Call Trace Diagram
```mermaid
sequenceDiagram
participant P0 as create_app()
participant P1 as ScriptNameFix
participant P2 as DigiServer v2 - Application Factory Modern Flask application with blueprint arch
participant P3 as User
participant P4 as DevelopmentConfig
participant P5 as ProductionConfig
participant P6 as TestingConfig
participant P7 as Application factory pattern Args: config_name: Configuration en
participant P8 as Register application blueprints
participant P9 as Configure Flask-Login
participant P10 as Register error handlers
participant P11 as Register CLI commands
participant P12 as Register context processors for templates
participant P13 as Register custom Jinja2 template filters
participant P14 as configure_login_manager()
participant P15 as register_blueprints()
participant P16 as register_error_handlers()
participant P17 as register_commands()
participant P18 as register_context_processors()
participant P19 as register_template_filters()
participant P20 as init_portal_sso()
participant P21 as test_edit_media_endpoint()
participant P22 as add_muted_column()
participant P23 as main()
P0->>+ P1: calls
P1-->>- P0: return
P1->>+ P0: calls
P0-->>- P1: return
P1->>+ P2: uses
P2-->>- P1: return
P2->>+ P3: uses
P3-->>- P2: return
P2->>+ P1: uses
P1-->>- P2: return
P2->>+ P4: uses
P4-->>- P2: return
P2->>+ P5: uses
P5-->>- P2: return
P2->>+ P6: uses
P6-->>- P2: return
P1->>+ P7: uses
P7-->>- P1: return
P7->>+ P3: uses
P3-->>- P7: return
P7->>+ P1: uses
P1-->>- P7: return
P7->>+ P4: uses
P4-->>- P7: return
P7->>+ P5: uses
P5-->>- P7: return
P7->>+ P6: uses
P6-->>- P7: return
P1->>+ P8: uses
P8-->>- P1: return
P1->>+ P9: uses
P9-->>- P1: return
P1->>+ P10: uses
P10-->>- P1: return
P1->>+ P11: uses
P11-->>- P1: return
P1->>+ P12: uses
P12-->>- P1: return
P1->>+ P13: uses
P13-->>- P1: return
P0->>+ P14: calls
P14-->>- P0: return
P0->>+ P15: calls
P15-->>- P0: return
P0->>+ P16: calls
P16-->>- P0: return
P0->>+ P17: calls
P17-->>- P0: return
P0->>+ P18: calls
P18-->>- P0: return
P0->>+ P19: calls
P19-->>- P0: return
P0->>+ P20: calls
P20-->>- P0: return
P0->>+ P21: calls
P21-->>- P0: return
P0->>+ P22: calls
P22-->>- P0: return
P0->>+ P23: calls
P23-->>- P0: return
```
## Connections by Relation
### calls
- [[ScriptNameFix]] `INFERRED`
- [[configure_login_manager()]] `EXTRACTED`
- [[register_blueprints()]] `EXTRACTED`
- [[register_error_handlers()]] `EXTRACTED`
- [[register_commands()]] `EXTRACTED`
- [[register_context_processors()]] `EXTRACTED`
- [[register_template_filters()]] `EXTRACTED`
- [[init_portal_sso()]] `INFERRED`
- [[test_edit_media_endpoint()]] `INFERRED`
- [[add_muted_column()]] `INFERRED`
- [[main()]] `INFERRED`
### contains
- [[app.py]] `EXTRACTED`
### rationale_for
- [[Application factory pattern Args: config_name: Configuration en]] `EXTRACTED`
---
*Part of the graphify knowledge wiki. See [[index]] to navigate.*