# mdouglasolivier-design/nextgen_academy architecture

> Architecture diagram of the GitHub repository mdouglasolivier-design/nextgen_academy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mdouglasolivier-design/nextgen_academy
- Repository: https://github.com/mdouglasolivier-design/nextgen_academy

## Overview

This is a Django/DRF and Next.js university learning platform, with Phase 1 focused on free certificates. The apparent learner journey is to discover courses, enroll and learn, complete assessments, then receive or verify a certificate; staff have separate dashboard and activity views. The tree and excerpts establish the domain models and some staff analytics, but do not show most request handlers or certificate-generation logic. Accordingly, cross-layer workflow links are marked unverified rather than presented as observed calls.

Main entry points: [`backend/apps/academics/models.py`](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/academics/models.py) (Courses and lessons), [`frontend/src/lib/api/client.ts`](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/lib/api/client.ts) (API client), [`backend/apps/staff/services.py`](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/staff/services.py) (Staff analytics), [`backend/apps/assessments/models.py`](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/assessments/models.py) (Quizzes and attempts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_public["Public pages<br/>[page.tsx]"]
  node_coursepage["Course catalog<br/>[page.tsx]"]
  node_student["Student dashboard<br/>[page.tsx]"]
  node_verify["Certificate verification<br/>[page.tsx]"]
  node_api["API client<br/>[client.ts]"]
end

subgraph group_identity["Accounts and staff"]
  node_login["Login<br/>[page.tsx]"]
  node_accounts["User accounts<br/>[models.py]"]
  node_staffui["Staff dashboard<br/>[page.tsx]"]
  node_staffanalytics["Staff analytics<br/>[services.py]"]
  node_staffdata["Staff roles and audit<br/>[models.py]"]
end

subgraph group_learning["Learning domain"]
  node_academics["Courses and lessons<br/>[models.py]"]
  node_courseapi["Course serialization<br/>[serializers.py]"]
  node_enrollment["Enrollment and progress<br/>[models.py]"]
  node_assessment["Quizzes and attempts<br/>[models.py]"]
end

subgraph group_credentials["Certificates"]
  node_certificate["Certificate records<br/>[models.py]"]
  node_certservice["Certificate services<br/>[services.py]"]
end

node_learner(("Learner"))
node_database[("PostgreSQL")]

node_learner -.->|"browses"| node_public
node_learner -.->|"discovers courses"| node_coursepage
node_learner -.->|"signs in"| node_login
node_coursepage -.->|"requests data"| node_api
node_student -.->|"requests data"| node_api
node_api -.->|"calls API"| node_courseapi
node_courseapi -->|"serializes"| node_academics
node_academics -->|"referenced by"| node_enrollment
node_assessment -->|"references course"| node_academics
node_staffanalytics -->|"queries courses"| node_academics
node_staffanalytics -->|"queries attempts"| node_assessment
node_staffanalytics -->|"queries enrollments"| node_enrollment
node_staffanalytics -->|"writes audit log"| node_staffdata
node_staffui -.->|"requests data"| node_api
node_assessment -.->|"qualifies for"| node_certificate
node_certificate -.->|"handled by"| node_certservice
node_verify -.->|"checks code"| node_api
node_accounts -.->|"persists to"| node_database
node_academics -.->|"persists to"| node_database
node_enrollment -.->|"persists to"| node_database
node_assessment -.->|"persists to"| node_database
node_certificate -.->|"persists to"| node_database

click node_public "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(public)/page.tsx"
click node_coursepage "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(public)/courses/page.tsx"
click node_student "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(student)/dashboard/page.tsx"
click node_verify "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(public)/verify/%5Bcode%5D/page.tsx"
click node_api "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/lib/api/client.ts"
click node_login "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(auth)/login/page.tsx"
click node_accounts "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/accounts/models.py"
click node_staffui "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(staff)/staff/page.tsx"
click node_staffanalytics "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/staff/services.py"
click node_staffdata "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/staff/models.py"
click node_academics "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/academics/models.py"
click node_courseapi "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/academics/serializers.py"
click node_enrollment "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/learning/models.py"
click node_assessment "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/assessments/models.py"
click node_certificate "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/certificates/models.py"
click node_certservice "https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/certificates/services.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_public,node_coursepage,node_student,node_verify,node_api toneBlue
class node_login,node_accounts,node_staffui,node_staffanalytics,node_staffdata,node_database toneAmber
class node_academics,node_courseapi,node_enrollment,node_assessment toneMint
class node_certificate,node_certservice toneRose
class node_learner toneIndigo
```

## Components

### Web experience

- [Public pages](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(public)/page.tsx): `frontend/src/app/(public)/page.tsx`
- [Course catalog](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(public)/courses/page.tsx): `frontend/src/app/(public)/courses/page.tsx`
- [Student dashboard](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(student)/dashboard/page.tsx): `frontend/src/app/(student)/dashboard/page.tsx`
- [Certificate verification](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(public)/verify/%5Bcode%5D/page.tsx): `frontend/src/app/(public)/verify/[code]/page.tsx`
- [API client](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/lib/api/client.ts): `frontend/src/lib/api/client.ts`

### Accounts and staff

- [Login](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(auth)/login/page.tsx): `frontend/src/app/(auth)/login/page.tsx`
- [User accounts](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/accounts/models.py): `backend/apps/accounts/models.py`
- [Staff dashboard](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/frontend/src/app/(staff)/staff/page.tsx): `frontend/src/app/(staff)/staff/page.tsx`
- [Staff analytics](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/staff/services.py): `backend/apps/staff/services.py`
- [Staff roles and audit](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/staff/models.py): `backend/apps/staff/models.py`

### Learning domain

- [Courses and lessons](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/academics/models.py): `backend/apps/academics/models.py`
- [Course serialization](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/academics/serializers.py): `backend/apps/academics/serializers.py`
- [Enrollment and progress](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/learning/models.py): `backend/apps/learning/models.py`
- [Quizzes and attempts](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/assessments/models.py): `backend/apps/assessments/models.py`

### Certificates

- [Certificate records](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/certificates/models.py): `backend/apps/certificates/models.py`
- [Certificate services](https://github.com/mdouglasolivier-design/nextgen_academy/blob/main/backend/apps/certificates/services.py): `backend/apps/certificates/services.py`

### Other components

- **Learner**
- **PostgreSQL**

## Connections

- Learner → Public pages: browses
- Learner → Course catalog: discovers courses
- Learner → Login: signs in
- Course catalog → API client: requests data
- Student dashboard → API client: requests data
- API client → Course serialization: calls API
- Course serialization → Courses and lessons: serializes (evidence: `backend/apps/academics/serializers.py`)
- Courses and lessons → Enrollment and progress: referenced by (evidence: `backend/apps/learning/models.py`)
- Quizzes and attempts → Courses and lessons: references course (evidence: `backend/apps/assessments/models.py`)
- Staff analytics → Courses and lessons: queries courses (evidence: `backend/apps/staff/services.py`)
- Staff analytics → Quizzes and attempts: queries attempts (evidence: `backend/apps/staff/services.py`)
- Staff analytics → Enrollment and progress: queries enrollments (evidence: `backend/apps/staff/services.py`)
- Staff analytics → Staff roles and audit: writes audit log (evidence: `backend/apps/staff/services.py`)
- Staff dashboard → API client: requests data
- Quizzes and attempts → Certificate records: qualifies for
- Certificate records → Certificate services: handled by
- Certificate verification → API client: checks code
- User accounts → PostgreSQL: persists to
- Courses and lessons → PostgreSQL: persists to
- Enrollment and progress → PostgreSQL: persists to
- Quizzes and attempts → PostgreSQL: persists to
- Certificate records → PostgreSQL: persists to
