Django REST API for journal submission, anonymization, crisis detection, vector retrieval, and asynchronous AI insight generation.
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
test -f .env || cp .env.example .env
.venv/bin/python -m spacy download en_core_web_sm
.venv/bin/python manage.py migrate
.venv/bin/python manage.py runserverBy default, debug mode uses SQLite and an in-memory cache so the project can run without PostgreSQL or Valkey. Set DATABASE_ENGINE=postgres and configure the POSTGRES_* variables when you want pgvector-backed semantic retrieval.
To serve the Expo app on a device or emulator, run Django on all interfaces:
.venv/bin/python manage.py runserver 0.0.0.0:8000For Expo web, keep CORS_ALLOWED_ORIGINS aligned with the app dev server
origin. The default includes common Expo local origins.
For local development, debug mode runs Celery tasks eagerly by default so insight records can be created without a Redis worker. For production-like async behavior, set CELERY_TASK_ALWAYS_EAGER=false, run Redis/Valkey, and start a worker:
.venv/bin/celery -A InnerVoice worker -l infoJournal insight tasks are fire-and-forget by default, so CELERY_RESULT_BACKEND can stay blank unless you intentionally need to inspect task return values.
.venv/bin/python manage.py check
.venv/bin/python manage.py test
.venv/bin/python -m pip check