# ishitapathunda/dsa-learning-web architecture

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

- Interactive diagram: https://gitdiagram.com/ishitapathunda/dsa-learning-web
- Repository: https://github.com/ishitapathunda/dsa-learning-web

## Overview

DSA Learning Web combines topic-based DSA study, browser-based C++ practice, and user progress features. The main flow is browsing learning material and problems, running or submitting code, receiving an evaluation, and using successful submissions to update progress and achievements. The graph includes the client, REST API, evaluation, and progress/gamification stages. Some feature links are documented in the README; unsampled implementation details are not asserted beyond those documented relationships.

Main entry points: [`src/App.jsx`](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/App.jsx) (App routing), [`server/src/app.ts`](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/app.ts) (REST application), [`server/src/services/submissions.service.ts`](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/submissions.service.ts) (Submission workflow), [`src/api/client.js`](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/client.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_topic_pages["Topic learning<br/>[DataStructures.jsx]"]
  node_algorithm_page["Algorithm lessons<br/>[Algorithms.jsx]"]
  node_problem_browse["Problem browser<br/>[Problems.jsx]"]
  node_problem_detail["Problem workspace<br/>[ProblemDetail.jsx]"]
end

subgraph group_client["Web client"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth_context["Session state<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[client.js]"]
  node_problem_api["Problem API<br/>[problems.js]"]
  node_submission_api["Submission API<br/>[submissions.js]"]
end

subgraph group_backend["API and domain"]
  node_express_app["REST application<br/>[app.ts]"]
  node_auth_routes["Authentication routes<br/>[auth.routes.ts]"]
  node_auth_controller["Authentication handler<br/>[auth.controller.ts]"]
  node_auth_service["Account operations<br/>[auth.service.ts]"]
  node_problem_routes["Problem routes<br/>[problems.routes.ts]"]
  node_problem_controller["Problem handler"]
  node_problem_service["Problem catalog"]
  node_submission_routes["Submission routes"]
  node_submission_controller["Submission handler"]
  node_submission_service["Submission workflow"]
  node_database[("SQLite database")]
end

subgraph group_execution["Code evaluation"]
  node_judge["C++ judge<br/>[judge.ts]"]
  node_docker_runner["Docker runner<br/>[dockerRunner.ts]"]
end

subgraph group_progress["Progress and rewards"]
  node_progress_service["Progress tracking"]
  node_badges_service["Achievement badges<br/>[badges.service.ts]"]
  node_leaderboard_service["Leaderboard"]
  node_analytics_service["Progress analytics"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"routes to"| node_topic_pages
node_app -->|"routes to"| node_algorithm_page
node_app -->|"routes to"| node_problem_browse
node_app -->|"routes to"| node_problem_detail
node_problem_browse -->|"requests problems"| node_problem_api
node_problem_detail -->|"requests problems"| node_problem_api
node_problem_detail -->|"sends code"| node_submission_api
node_app -->|"provides session"| node_auth_context
node_auth_context -->|"calls"| node_api_client
node_problem_api -->|"uses"| node_api_client
node_submission_api -->|"uses"| node_api_client
node_api_client -->|"sends REST requests"| node_express_app
node_express_app -->|"mounts"| node_auth_routes
node_express_app -->|"mounts"| node_problem_routes
node_express_app -->|"mounts"| node_submission_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_controller -->|"calls"| node_auth_service
node_problem_routes -->|"dispatches"| node_problem_controller
node_problem_controller -->|"calls"| node_problem_service
node_submission_routes -->|"dispatches"| node_submission_controller
node_submission_controller -->|"calls"| node_submission_service
node_submission_service -->|"evaluates code"| node_judge
node_judge -.->|"runs in container"| node_docker_runner
node_submission_service -->|"updates progress"| node_progress_service
node_submission_service -->|"checks badges"| node_badges_service
node_auth_service -->|"reads and writes users"| node_database
node_problem_service -->|"reads problems"| node_database
node_learner -.->|"views rankings"| node_leaderboard_service
node_learner -.->|"views activity"| node_analytics_service

click node_app "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/App.jsx"
click node_topic_pages "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/DataStructures.jsx"
click node_algorithm_page "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/Algorithms.jsx"
click node_problem_browse "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/Problems.jsx"
click node_problem_detail "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/ProblemDetail.jsx"
click node_auth_context "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/context/AuthContext.jsx"
click node_api_client "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/client.js"
click node_problem_api "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/problems.js"
click node_submission_api "https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/submissions.js"
click node_express_app "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/app.ts"
click node_auth_routes "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/routes/auth.routes.ts"
click node_auth_controller "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/controllers/auth.controller.ts"
click node_auth_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/auth.service.ts"
click node_problem_routes "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/routes/problems.routes.ts"
click node_problem_controller "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/controllers/problems.controller.ts"
click node_problem_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/problems.service.ts"
click node_submission_routes "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/routes/submissions.routes.ts"
click node_submission_controller "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/controllers/submissions.controller.ts"
click node_submission_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/submissions.service.ts"
click node_judge "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/execution/judge.ts"
click node_docker_runner "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/execution/dockerRunner.ts"
click node_progress_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/progress.service.ts"
click node_badges_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/badges.service.ts"
click node_leaderboard_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/leaderboard.service.ts"
click node_analytics_service "https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/analytics.service.ts"

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_topic_pages,node_algorithm_page,node_problem_browse,node_problem_detail toneBlue
class node_app,node_auth_context,node_api_client,node_problem_api,node_submission_api toneAmber
class node_express_app,node_auth_routes,node_auth_controller,node_auth_service,node_problem_routes,node_problem_controller,node_problem_service,node_submission_routes,node_submission_controller,node_submission_service,node_database toneMint
class node_judge,node_docker_runner toneRose
class node_progress_service,node_badges_service,node_leaderboard_service,node_analytics_service,node_learner toneIndigo
```

## Components

### Learning experience

- [Topic learning](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/DataStructures.jsx): `src/pages/DataStructures.jsx`
- [Algorithm lessons](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/Algorithms.jsx): `src/pages/Algorithms.jsx`
- [Problem browser](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/Problems.jsx): `src/pages/Problems.jsx`
- [Problem workspace](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/pages/ProblemDetail.jsx): `src/pages/ProblemDetail.jsx`

### Web client

- [App routing](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/App.jsx): `src/App.jsx`
- [Session state](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [API client](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/client.js): `src/api/client.js`
- [Problem API](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/problems.js): `src/api/problems.js`
- [Submission API](https://github.com/ishitapathunda/dsa-learning-web/blob/main/src/api/submissions.js): `src/api/submissions.js`

### API and domain

- [REST application](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/app.ts): `server/src/app.ts`
- [Authentication routes](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/routes/auth.routes.ts): `server/src/routes/auth.routes.ts`
- [Authentication handler](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/controllers/auth.controller.ts): `server/src/controllers/auth.controller.ts`
- [Account operations](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/auth.service.ts): `server/src/services/auth.service.ts`
- [Problem routes](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/routes/problems.routes.ts): `server/src/routes/problems.routes.ts`
- [Problem handler](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/controllers/problems.controller.ts): `server/src/controllers/problems.controller.ts`
- [Problem catalog](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/problems.service.ts): `server/src/services/problems.service.ts`
- [Submission routes](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/routes/submissions.routes.ts): `server/src/routes/submissions.routes.ts`
- [Submission handler](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/controllers/submissions.controller.ts): `server/src/controllers/submissions.controller.ts`
- [Submission workflow](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/submissions.service.ts): `server/src/services/submissions.service.ts`
- **SQLite database**

### Code evaluation

- [C++ judge](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/execution/judge.ts): `server/src/execution/judge.ts`
- [Docker runner](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/execution/dockerRunner.ts): `server/src/execution/dockerRunner.ts`

### Progress and rewards

- [Progress tracking](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/progress.service.ts): `server/src/services/progress.service.ts`
- [Achievement badges](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/badges.service.ts): `server/src/services/badges.service.ts`
- [Leaderboard](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/leaderboard.service.ts): `server/src/services/leaderboard.service.ts`
- [Progress analytics](https://github.com/ishitapathunda/dsa-learning-web/blob/main/server/src/services/analytics.service.ts): `server/src/services/analytics.service.ts`

### Other components

- **Learner**

## Connections

- Learner → App routing: uses (evidence: `README.md`)
- App routing → Topic learning: routes to (evidence: `src/App.jsx`)
- App routing → Algorithm lessons: routes to (evidence: `src/App.jsx`)
- App routing → Problem browser: routes to (evidence: `src/App.jsx`)
- App routing → Problem workspace: routes to (evidence: `src/App.jsx`)
- Problem browser → Problem API: requests problems (evidence: `src/pages/Problems.jsx`)
- Problem workspace → Problem API: requests problems (evidence: `src/pages/ProblemDetail.jsx`)
- Problem workspace → Submission API: sends code (evidence: `src/pages/ProblemDetail.jsx`)
- App routing → Session state: provides session (evidence: `src/App.jsx`)
- Session state → API client: calls (evidence: `src/context/AuthContext.jsx`)
- Problem API → API client: uses (evidence: `src/api/problems.js`)
- Submission API → API client: uses (evidence: `src/api/submissions.js`)
- API client → REST application: sends REST requests (evidence: `src/api/client.js`)
- REST application → Authentication routes: mounts (evidence: `server/src/app.ts`)
- REST application → Problem routes: mounts (evidence: `server/src/app.ts`)
- REST application → Submission routes: mounts (evidence: `server/src/app.ts`)
- Authentication routes → Authentication handler: dispatches (evidence: `server/src/routes/auth.routes.ts`)
- Authentication handler → Account operations: calls (evidence: `server/src/controllers/auth.controller.ts`)
- Problem routes → Problem handler: dispatches (evidence: `server/src/routes/problems.routes.ts`)
- Problem handler → Problem catalog: calls (evidence: `server/src/controllers/problems.controller.ts`)
- Submission routes → Submission handler: dispatches (evidence: `server/src/routes/submissions.routes.ts`)
- Submission handler → Submission workflow: calls (evidence: `server/src/controllers/submissions.controller.ts`)
- Submission workflow → C++ judge: evaluates code (evidence: `server/src/services/submissions.service.ts`)
- C++ judge → Docker runner: runs in container
- Submission workflow → Progress tracking: updates progress (evidence: `server/src/services/submissions.service.ts`)
- Submission workflow → Achievement badges: checks badges (evidence: `server/src/services/submissions.service.ts`)
- Account operations → SQLite database: reads and writes users (evidence: `server/src/services/auth.service.ts`)
- Problem catalog → SQLite database: reads problems
- Learner → Leaderboard: views rankings (evidence: `README.md`)
- Learner → Progress analytics: views activity (evidence: `README.md`)
