How italo0072/misago works
Project type and purpose
• Misago is a full-stack, containerized forum application.
• Backend: Django (multiple reusable apps, REST & GraphQL APIs, OAuth2 client, admin panel).
• Frontend: React.js SPA (webpack-built assets under frontend/).
• Asynchronous tasks: Celery.
• Persistence: PostgreSQL (ORM), Redis (cache, broker).
• Features: user accounts, content threads, categories, notifications, search, attachments, theming.
File structure
• Top level:
• docker-compose.yaml, Dockerfile → container definitions (web, worker, db, cache).
• dev/ → dev helper script for local setup.
• frontend/ → React source, components, webpack config.
• devproject/ & misago/ → Django project config and apps.
• manage.py → Django entrypoint.
• Django code organized into apps: acl, users, threads, notifications, etc.
• Celery config in devproject/celery.py and misago/notifications/tasks.py.
• API endpoints under misago/apiv2/, misago/graphql/, plus Django templated admin under misago/admin.
README for insights
• Backend serves both HTML (admin, public pages) and JSON endpoints for SPA.
• Docker‐based development: web container + db + redis + optional mail / search services.
• Frontend built and deployed into Django’s static/ directory.
Main components
a. Browser (User & Admin)
b. React SPA (frontend assets served as static)
c. Django WSGI server (gunicorn/uWSGI)
d. REST/GraphQL API layer
e. Celery Worker(s)
f. Redis (cache + broker)
g. PostgreSQL
h. External services: OAuth providers, SMTP/email, third-party search or analytics.
Relationships & interactions
• Browser → HTTP(S) → Django (serves HTML pages & initial index.html + static JS/CSS).
• React app in browser → AJAX/GraphQL → Django API.
• Django API → ORM → PostgreSQL (reads & writes).
• Django → Redis (caching, session storage, real-time pub/sub if used).
• Django → Celery (enqueue jobs for email, notifications, read-tracking).
• Celery → Redis (broker) and Celery → PostgreSQL (job results if configured).
• Celery → external SMTP or notification services.
• OAuth flows: Browser ↔ OAuth provider ↔ Django OAuth2 client.
Architectural patterns & design principles
• Layered architecture (Presentation / API / Business logic / Data).
• Modular Django apps (plugin-like separation of concerns).
• SPA decoupled from backend.
• Asynchronous “fire-and-forget” via Celery tasks.
• Configuration via 12-factor (docker + environment variables).
• Docker Compose orchestrates multi-container setup.
Technologies & frameworks
• Backend: Python 3.11, Django, DRF, Graphene (GraphQL), Celery.
• Broker & Cache: Redis.
• Database: PostgreSQL.
• Frontend: React.js, Babel, webpack, ESLint, Prettier.
• Containerization: Docker, Docker Compose.
• CI: GitHub Actions (tests.yml, publish.yml).
Final remarks
• Be detailed: include key Django apps if needed (e.g., notifications, threads).
• Don’t overthink: more components = better clarity.
• Essential elements: build pipeline (npm → webpack → static), API, data stores, task queue.
• Review against README and file structure to verify no major component is omitted.