Add comprehensive comments to all source files and expand documentation

This commit is contained in:
Troll (Hermes Agent) 2026-07-31 22:23:40 +00:00
parent 9e532a1920
commit b4f0222bd5
16 changed files with 1230 additions and 552 deletions

View file

@ -1,12 +1,25 @@
"""
init_db.py
==========
Standalone script to create the SQLite database tables.
Run this once inside the container after deployment:
python init_db.py
Or use the Flask CLI command:
flask --app app init-db
"""
import os
import sys
# Ensure project root is importable
# Ensure the project root is on sys.path so `from app import app` works.
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from app import app
from models import init_db
# Use the configured database path and create tables.
with app.app_context():
init_db()
print(f"Database initialized at {app.config['DATABASE']}")