# cumulusclad-developer/edtech-platform-django- architecture

> Architecture diagram of the GitHub repository cumulusclad-developer/edtech-platform-django-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cumulusclad-developer/edtech-platform-django-
- Repository: https://github.com/cumulusclad-developer/edtech-platform-django-

## Overview

##### Project type and purpose
- This is a Django-and-DRF monolithic backend API for an educational platform (“EdTech Platform”).
- It exposes REST endpoints for users, assessments, curricula, billing, current affairs, gamification, push notifications, OAuth, sessions, audit & activity tracking, etc.
- It supports JWT auth, OpenAPI docs (Swagger/Redoc), push via Firebase Cloud Messaging, Redis caching, and security hardening.

##### File structure
Top-level folders & files:
- edtech_platform/          ← Django project settings, ASGI/WSGI, URL routing
- manage.py, .env, .env.example, requirements.txt
- apps/ (monorepo style – each app is a Django “bounded context”):
– accounts, api, assessments, audit, billing, current_affairs, curriculum, devices, gamification, notifications_app, oauth_app, sessions_app, useractivity_tracking
- core/                     ← shared filters & utilities
- migrations/tests/serializers/views in each app
- api/auth_views.py, api/health_views.py, api/urls.py handle global auth & health endpoints
- devices/fcm_service.py and notifications_app/push_api.py encapsulate FCM integration

##### README for additional insights
- Services: PostgreSQL (via DATABASE_URL), Redis (cache, session backend, brute-force lockouts), Firebase for push
- Auth: JWT with short access, rotating refresh, blacklist
- Docs: OpenAPI schema + SwaggerUI/Redoc
- Security: HTTPS, HSTS, secure cookies, CSP, CORS, django-axes, throttling

## Diagram (Mermaid)

```mermaid
graph TB
    Clients["Web/Mobile Clients"]:::external
    LB["Load Balancer / Reverse Proxy"]:::infra
    Server["WSGI/ASGI Server\n(Gunicorn/Uvicorn)"]:::infra

    Clients -->|"HTTPS"| LB --> Server

    subgraph "Django REST API" 
        direction TB
        subgraph "Core API Layer" 
            direction TB
            AuthViews["Auth Views"]:::app
            HealthViews["Health Views"]:::app
            APIRouting["API Routing"]:::app
        end

        subgraph "User & Auth Services"
            direction TB
            ACCT_M["Accounts Models"]:::app
            ACCT_S["Accounts Serializers"]:::app
            ACCT_V["Accounts Views"]:::app
            OA_M["OAuth Models"]:::app
            OA_S["OAuth Serializers"]:::app
            OA_V["OAuth Views"]:::app
        end

        subgraph "Assessment & Curriculum Services"
            direction TB
            ASM_M["Assessments Models"]:::app
            ASM_S["Assessments Serializers"]:::app
            ASM_V["Assessments Views"]:::app
            CUR_M["Curriculum Models"]:::app
            CUR_S["Curriculum Serializers"]:::app
            CUR_V["Curriculum Views"]:::app
        end

        subgraph "Current Affairs Service"
            direction TB
            CAF_M["Current Affairs Models"]:::app
            CAF_S["Current Affairs Serializers"]:::app
            CAF_V["Current Affairs Views"]:::app
            CAF_R["Current Affairs Routing"]:::app
        end

        subgraph "Billing Service"
            direction TB
            BILL_M["Billing Models"]:::app
            BILL_S["Billing Serializers"]:::app
            BILL_V["Billing Views"]:::app
        end

        subgraph "Audit Logging Service"
            direction TB
            AUD_M["Audit Models"]:::app
            AUD_S["Audit Serializers"]:::app
            AUD_V["Audit Views"]:::app
        end

        subgraph "User Activity Tracking"
            direction TB
            UAT_MW["Tracking Middleware"]:::app
            UAT_M["Tracking Models"]:::app
            UAT_S["Tracking Serializers"]:::app
            UAT_V["Tracking Views"]:::app
        end

        subgraph "Session Management"
            direction TB
            SESS_M["Sessions Models"]:::app
            SESS_S["Sessions Serializers"]:::app
            SESS_V["Sessions Views"]:::app
        end

        subgraph "Gamification Service"
            direction TB
            GAM_M["Gamification Models"]:::app
            GAM_S["Gamification Serializers"]:::app
            GAM_V["Gamification Views"]:::app
        end

        subgraph "Notifications & Push"
            direction TB
            FCM["FCM Service"]:::app
            PUSH_API["Push API"]:::app
            NOTIF_V["Notifications Views"]:::app
        end

        subgraph "Shared Utilities & Filters"
            direction TB
            UTIL_F["Filters & Utils"]:::app
        end
    end

    Server -->|"WSGI/ASGI"| DjangoRESTAPI["Django REST API"]:::app

    DjangoRESTAPI -->|ORM| Postgres["PostgreSQL"]:::backing
    DjangoRESTAPI -->|Cache/Session| Redis["Redis"]:::backing
    DjangoRESTAPI -->|Push| Firebase["Firebase FCM"]:::external

    classDef app fill:#b2f5b6,stroke:#333,stroke-width:1px
    classDef infra fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef backing fill:#add8e6,stroke:#333,stroke-width:1px
    classDef external fill:#ffcc99,stroke:#333,stroke-width:1px

    click AuthViews "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/api/auth_views.py"
    click HealthViews "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/api/health_views.py"
    click APIRouting "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/api/urls.py"
    click ACCT_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/accounts/models.py"
    click ACCT_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/accounts/serializers.py"
    click ACCT_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/accounts/views.py"
    click OA_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/oauth_app/models.py"
    click OA_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/oauth_app/serializers.py"
    click OA_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/oauth_app/views.py"
    click ASM_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/assessments/models.py"
    click ASM_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/assessments/serializers.py"
    click ASM_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/assessments/views.py"
    click CUR_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/curriculum/models.py"
    click CUR_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/curriculum/serializers.py"
    click CUR_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/curriculum/views.py"
    click CAF_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/current_affairs/models.py"
    click CAF_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/current_affairs/serializers.py"
    click CAF_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/current_affairs/views.py"
    click CAF_R "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/current_affairs/urls.py"
    click BILL_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/billing/models.py"
    click BILL_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/billing/serializers.py"
    click BILL_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/billing/views.py"
    click AUD_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/audit/models.py"
    click AUD_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/audit/serializers.py"
    click AUD_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/audit/views.py"
    click UAT_MW "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/useractivity_tracking/middleware.py"
    click UAT_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/useractivity_tracking/models.py"
    click UAT_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/useractivity_tracking/serializers.py"
    click UAT_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/useractivity_tracking/views.py"
    click SESS_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/sessions_app/models.py"
    click SESS_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/sessions_app/serializers.py"
    click SESS_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/sessions_app/views.py"
    click GAM_M "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/gamification/models.py"
    click GAM_S "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/gamification/serializers.py"
    click GAM_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/gamification/views.py"
    click FCM "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/devices/fcm_service.py"
    click PUSH_API "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/notifications_app/push_api.py"
    click NOTIF_V "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/notifications_app/views.py"
    click UTIL_F "https://github.com/cumulusclad-developer/edtech-platform-django-/blob/main/core/filters.py"
```
