System Architecture¶
High-Level Overview¶
Client (Frontend / Mobile)
│
│ HTTPS / REST API
▼
┌─────────────────────────┐
│ Django (Gunicorn) │ ← indox/config/wsgi.py
│ DRF Views & Serializers│
└────────┬────────────────┘
│
┌────┴─────────────────────────┐
│ │
▼ ▼
PostgreSQL Redis
(primary data store) (cache + Celery broker)
│
▼
Celery Workers
(async tasks: conversion,
notifications, sync jobs)
Request Lifecycle¶
- Request hits Django →
config/urls.pyroutes to the correct app - DRF handles auth (JWT / OIDC token validation)
- View calls service/model layer
- Long-running work (file conversion, cloud sync) dispatched to Celery
- Response returned; notification triggered if needed
Auth Flow¶
User → POST /auth/login/ → JWT access + refresh tokens
User → GET /auth/social/google/ → redirect to Google → callback → JWT
OIDC clients → OIDC discovery endpoint → token exchange
File Conversion Pipeline¶
Upload → media_core stores raw file
→ Celery task dispatched (image_converter / pdf_handler / video_converter)
→ Converted file saved back to media_core
→ media_notifications fires event
→ Client polls or receives WebSocket push
Cloud Sync Flow¶
User connects provider (OAuth callback stored in integration app)
→ User triggers sync OR scheduled Celery beat task runs
→ Integration app fetches file list from provider API
→ New/changed files downloaded → stored in media_core
→ Deletions reconciled
Key Django Settings Modules¶
| File | Used when |
|---|---|
config/settings/base.py |
All environments |
config/settings/development.py |
DEBUG=True local dev |
config/settings/production.py |
Deployed instances |
Select with DJANGO_SETTINGS_MODULE env var.