FastAPI app providing local event ingestion, best-effort text filtering, encryption, rules + Ollama LLM classification, and the parent dashboard API.
See ../docs/BACKEND_SETUP.md for setup instructions.
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
uvicorn app.main:app --reloadThen open http://127.0.0.1:8787/setup.
app/main.py— FastAPI app + lifespanapp/settings.py— config via envapp/api/— HTTP endpointsapp/services/— business logic (encryption, redaction, classifier, etc.)app/db/— SQLAlchemy models + sessionapp/workers/— background workersapp/prompts/— LLM prompt templatestests/— pytest suite
The current alpha initializes SQLite with SQLAlchemy Base.metadata.create_all()
and idempotent startup schema patches. Formal Alembic migrations are planned
before stable release; do not run alembic upgrade head in this checkout.
File-backed SQLite installs include a small maintenance command:
guardiannode-db integrity
guardiannode-db backup ~/guardiannode-backup.sqlite
guardiannode-db restore ~/guardiannode-backup.sqlitebackup uses SQLite's online backup API and verifies the generated file before
publishing it. restore verifies the backup first and moves the previous live
database into backups/ instead of deleting it. Stop the backend before running
restore.