# th30d4y/openlearnx architecture

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

- Interactive diagram: https://gitdiagram.com/th30d4y/openlearnx
- Repository: https://github.com/th30d4y/openlearnx

## Overview

OpenLearnX is a learning and assessment platform: learners authenticate, take adaptive or generated quizzes and coding assessments, track progress, and can receive blockchain-verified certificates. The graph shows the evidenced frontend testing-session component relationships and backend startup wiring, plus README-documented product capabilities. Several feature modules are included from the repository tree and README, but their internal calls were not sampled; those links are left out rather than inferred. The bundled OpenZeppelin repository is dependency tooling, not part of the platform runtime.

Main entry points: [`backend/main.py`](https://github.com/th30d4y/openlearnx/blob/main/backend/main.py) (Flask application), [`frontend/components/testing-session.tsx`](https://github.com/th30d4y/openlearnx/blob/main/frontend/components/testing-session.tsx) (Testing session), [`frontend/lib/api.ts`](https://github.com/th30d4y/openlearnx/blob/main/frontend/lib/api.ts) (API client), [`backend/web3_service.py`](https://github.com/th30d4y/openlearnx/blob/main/backend/web3_service.py) (Ethereum service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Learner experience"]
  node_testing["Testing session"]
  node_question["Question card<br/>[question-card.tsx]"]
  node_feedback["Feedback panel<br/>[feedback-panel.tsx]"]
  node_progress["Progress tracker"]
  node_api_client["API client<br/>[api.ts]"]
  node_auth_ui["Authentication UI<br/>[auth-service.ts]"]
end

subgraph group_api["API and identity"]
  node_flask["Flask application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_activity["Activity logging<br/>[activity_logger.py]"]
  node_admin["Administration routes<br/>[admin.py]"]
end

subgraph group_learning["Learning and assessment"]
  node_adaptive["Adaptive quizzes"]
  node_ai_quiz["AI quiz generation<br/>[ai_quiz_service.py]"]
  node_compiler["Code execution"]
  node_courses["Course content<br/>[modules_public.py]"]
  node_dashboard["Progress dashboards<br/>[dashboard.py]"]
end

subgraph group_platform["Data and certificates"]
  node_mongo[("MongoDB service<br/>[mongo_service.py]")]
  node_cert_routes["Certificate routes<br/>[certificate.py]"]
  node_wallet["Wallet service<br/>[wallet_service.py]"]
  node_web3["Ethereum service<br/>[web3_service.py]"]
end

node_learner(("Learner"))
node_ethereum(("Ethereum network"))

node_learner -->|"starts assessment"| node_testing
node_testing -->|"renders"| node_question
node_testing -->|"renders"| node_feedback
node_testing -->|"renders"| node_progress
node_testing -->|"sends requests"| node_api_client
node_auth_ui -->|"sends auth requests"| node_api_client
node_api_client -->|"calls HTTP API"| node_flask
node_flask -->|"initializes"| node_mongo
node_flask -->|"configures"| node_web3
node_flask -->|"registers route"| node_dashboard
node_flask -->|"registers route"| node_courses
node_flask -->|"registers route"| node_cert_routes
node_flask -->|"uses service"| node_wallet
node_flask -->|"uses service"| node_compiler
node_flask -->|"uses service"| node_ai_quiz
node_auth_routes -->|"logs activity"| node_activity
node_admin -->|"logs activity"| node_activity
node_web3 -->|"submits transactions"| node_ethereum

click node_testing "https://github.com/th30d4y/openlearnx/blob/main/frontend/components/testing-session.tsx"
click node_question "https://github.com/th30d4y/openlearnx/blob/main/frontend/components/question-card.tsx"
click node_feedback "https://github.com/th30d4y/openlearnx/blob/main/frontend/components/feedback-panel.tsx"
click node_progress "https://github.com/th30d4y/openlearnx/blob/main/frontend/components/progress-tracker.tsx"
click node_api_client "https://github.com/th30d4y/openlearnx/blob/main/frontend/lib/api.ts"
click node_auth_ui "https://github.com/th30d4y/openlearnx/blob/main/frontend/lib/auth-service.ts"
click node_flask "https://github.com/th30d4y/openlearnx/blob/main/backend/main.py"
click node_auth_routes "https://github.com/th30d4y/openlearnx/blob/main/backend/routes/auth.py"
click node_activity "https://github.com/th30d4y/openlearnx/blob/main/backend/activity_logger.py"
click node_admin "https://github.com/th30d4y/openlearnx/blob/main/backend/routes/admin.py"
click node_adaptive "https://github.com/th30d4y/openlearnx/blob/main/backend/services/adaptive_quiz_service.py"
click node_ai_quiz "https://github.com/th30d4y/openlearnx/blob/main/backend/services/ai_quiz_service.py"
click node_compiler "https://github.com/th30d4y/openlearnx/blob/main/backend/services/real_compiler_service.py"
click node_courses "https://github.com/th30d4y/openlearnx/blob/main/backend/routes/modules_public.py"
click node_dashboard "https://github.com/th30d4y/openlearnx/blob/main/backend/routes/dashboard.py"
click node_mongo "https://github.com/th30d4y/openlearnx/blob/main/backend/mongo_service.py"
click node_cert_routes "https://github.com/th30d4y/openlearnx/blob/main/backend/routes/certificate.py"
click node_wallet "https://github.com/th30d4y/openlearnx/blob/main/backend/services/wallet_service.py"
click node_web3 "https://github.com/th30d4y/openlearnx/blob/main/backend/web3_service.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_testing,node_question,node_feedback,node_progress,node_api_client,node_auth_ui toneBlue
class node_flask,node_auth_routes,node_activity,node_admin toneAmber
class node_adaptive,node_ai_quiz,node_compiler,node_courses,node_dashboard toneMint
class node_mongo,node_cert_routes,node_wallet,node_web3 toneRose
class node_learner,node_ethereum toneIndigo
```

## Components

### Learner experience

- [Testing session](https://github.com/th30d4y/openlearnx/blob/main/frontend/components/testing-session.tsx): `frontend/components/testing-session.tsx`
- [Question card](https://github.com/th30d4y/openlearnx/blob/main/frontend/components/question-card.tsx): `frontend/components/question-card.tsx`
- [Feedback panel](https://github.com/th30d4y/openlearnx/blob/main/frontend/components/feedback-panel.tsx): `frontend/components/feedback-panel.tsx`
- [Progress tracker](https://github.com/th30d4y/openlearnx/blob/main/frontend/components/progress-tracker.tsx): `frontend/components/progress-tracker.tsx`
- [API client](https://github.com/th30d4y/openlearnx/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Authentication UI](https://github.com/th30d4y/openlearnx/blob/main/frontend/lib/auth-service.ts): `frontend/lib/auth-service.ts`

### API and identity

- [Flask application](https://github.com/th30d4y/openlearnx/blob/main/backend/main.py): `backend/main.py`
- [Authentication routes](https://github.com/th30d4y/openlearnx/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Activity logging](https://github.com/th30d4y/openlearnx/blob/main/backend/activity_logger.py): `backend/activity_logger.py`
- [Administration routes](https://github.com/th30d4y/openlearnx/blob/main/backend/routes/admin.py): `backend/routes/admin.py`

### Learning and assessment

- [Adaptive quizzes](https://github.com/th30d4y/openlearnx/blob/main/backend/services/adaptive_quiz_service.py): `backend/services/adaptive_quiz_service.py`
- [AI quiz generation](https://github.com/th30d4y/openlearnx/blob/main/backend/services/ai_quiz_service.py): `backend/services/ai_quiz_service.py`
- [Code execution](https://github.com/th30d4y/openlearnx/blob/main/backend/services/real_compiler_service.py): `backend/services/real_compiler_service.py`
- [Course content](https://github.com/th30d4y/openlearnx/blob/main/backend/routes/modules_public.py): `backend/routes/modules_public.py`
- [Progress dashboards](https://github.com/th30d4y/openlearnx/blob/main/backend/routes/dashboard.py): `backend/routes/dashboard.py`

### Data and certificates

- [MongoDB service](https://github.com/th30d4y/openlearnx/blob/main/backend/mongo_service.py): `backend/mongo_service.py`
- [Certificate routes](https://github.com/th30d4y/openlearnx/blob/main/backend/routes/certificate.py): `backend/routes/certificate.py`
- [Wallet service](https://github.com/th30d4y/openlearnx/blob/main/backend/services/wallet_service.py): `backend/services/wallet_service.py`
- [Ethereum service](https://github.com/th30d4y/openlearnx/blob/main/backend/web3_service.py): `backend/web3_service.py`

### Other components

- **Learner**
- **Ethereum network**

## Connections

- Learner → Testing session: starts assessment
- Testing session → Question card: renders (evidence: `frontend/components/testing-session.tsx`)
- Testing session → Feedback panel: renders (evidence: `frontend/components/testing-session.tsx`)
- Testing session → Progress tracker: renders (evidence: `frontend/components/testing-session.tsx`)
- Testing session → API client: sends requests (evidence: `frontend/components/testing-session.tsx`)
- Authentication UI → API client: sends auth requests (evidence: `frontend/lib/auth-service.ts`)
- API client → Flask application: calls HTTP API
- Flask application → MongoDB service: initializes (evidence: `backend/main.py`)
- Flask application → Ethereum service: configures (evidence: `backend/main.py`)
- Flask application → Progress dashboards: registers route (evidence: `backend/main.py`)
- Flask application → Course content: registers route (evidence: `backend/main.py`)
- Flask application → Certificate routes: registers route (evidence: `backend/main.py`)
- Flask application → Wallet service: uses service (evidence: `backend/main.py`)
- Flask application → Code execution: uses service (evidence: `backend/main.py`)
- Flask application → AI quiz generation: uses service (evidence: `backend/main.py`)
- Authentication routes → Activity logging: logs activity (evidence: `backend/routes/auth.py`)
- Administration routes → Activity logging: logs activity (evidence: `backend/routes/admin.py`)
- Ethereum service → Ethereum network: submits transactions (evidence: `backend/web3_service.py`)
