# soumadip-dev/logiqo architecture

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

- Interactive diagram: https://gitdiagram.com/soumadip-dev/logiqo
- Repository: https://github.com/soumadip-dev/logiqo

## Overview

Logiqo is a coding-practice platform: users authenticate, browse challenges, edit and run code, and review submissions and profile progress; admins can manage problems. Users can also organize challenges into playlists. The graph follows the documented React/Express architecture and sampled problem and authentication flows. Playlist, execution, and submission internals are represented from the README and file tree; their detailed wiring was not sampled.

Main entry points: [`server/src/app.js`](https://github.com/soumadip-dev/logiqo/blob/main/server/src/app.js) (Express app), [`client/src/lib/axiosInstance.js`](https://github.com/soumadip-dev/logiqo/blob/main/client/src/lib/axiosInstance.js) (HTTP client), [`client/src/App.jsx`](https://github.com/soumadip-dev/logiqo/blob/main/client/src/App.jsx) (Client app), [`server/src/config/db.config.js`](https://github.com/soumadip-dev/logiqo/blob/main/server/src/config/db.config.js) (PostgreSQL)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Client app<br/>[App.jsx]"]
  node_problem_ui["Problem pages<br/>[ProblemPage.jsx]"]
  node_home_ui["Challenge browse<br/>[HomePage.jsx]"]
  node_auth_ui["Sign-in pages<br/>[LoginPage.jsx]"]
  node_profile_ui["Profile page<br/>[ProfilePage.jsx]"]
  node_playlist_ui["Playlist UI"]
  node_submission_ui["Submission views<br/>[SubmissionList.jsx]"]
  node_auth_store["Auth state<br/>[useAuthStore.js]"]
  node_problem_store["Problem state<br/>[useProblemStore.js]"]
  node_execution_store["Execution state"]
  node_playlist_store["Playlist state"]
  node_submission_store["Submission state"]
  node_http["HTTP client<br/>[axiosInstance.js]"]
end

subgraph group_api["API and domain"]
  node_server["Express app<br/>[app.js]"]
  node_auth_api["Auth API<br/>[auth.routes.js]"]
  node_problem_api["Problem API<br/>[problem.routes.js]"]
  node_playlist_api["Playlist API<br/>[playlist.routes.js]"]
  node_submission_api["Submission API"]
  node_auth_service["Auth services<br/>[auth.services.js]"]
  node_problem_service["Problem services"]
  node_playlist_service["Playlist services"]
  node_submission_service["Submission services"]
end

subgraph group_execution["Code execution"]
  node_execution_api["Execution API"]
  node_execution_service["Execution services"]
  node_judge["Judge0 adapter<br/>[judge0.utils.js]"]
end

subgraph group_state["Persistence"]
  node_database[("PostgreSQL<br/>[db.config.js]")]
end

node_user(("Developer"))
node_judge0{{"Judge0 API"}}

node_user -->|"uses"| node_app
node_app -->|"routes"| node_auth_ui
node_app -->|"routes"| node_home_ui
node_app -->|"routes"| node_problem_ui
node_app -->|"routes"| node_profile_ui
node_auth_ui -->|"submits credentials"| node_auth_store
node_home_ui -->|"loads challenges"| node_problem_store
node_problem_ui -->|"loads challenge"| node_problem_store
node_problem_ui -->|"runs code"| node_execution_store
node_profile_ui -->|"shows playlists"| node_playlist_ui
node_profile_ui -->|"shows activity"| node_submission_ui
node_playlist_ui -->|"manages playlists"| node_playlist_store
node_submission_ui -->|"loads submissions"| node_submission_store
node_auth_store -->|"sends requests"| node_http
node_problem_store -->|"sends requests"| node_http
node_execution_store -->|"sends requests"| node_http
node_playlist_store -->|"sends requests"| node_http
node_submission_store -->|"sends requests"| node_http
node_http -->|"calls API"| node_server
node_server -->|"mounts routes"| node_auth_api
node_server -->|"mounts routes"| node_problem_api
node_server -->|"mounts routes"| node_playlist_api
node_server -->|"mounts routes"| node_submission_api
node_server -->|"mounts routes"| node_execution_api
node_auth_api -->|"dispatches auth"| node_auth_service
node_problem_api -->|"dispatches problems"| node_problem_service
node_playlist_api -->|"dispatches playlists"| node_playlist_service
node_submission_api -->|"dispatches queries"| node_submission_service
node_execution_api -->|"dispatches runs"| node_execution_service
node_auth_service -->|"reads and writes"| node_database
node_problem_service -->|"reads and writes"| node_database
node_playlist_service -->|"reads and writes"| node_database
node_submission_service -->|"reads submissions"| node_database
node_problem_service -->|"validates solutions"| node_judge
node_execution_service -->|"submits code"| node_judge
node_judge -->|"executes code"| node_judge0

click node_app "https://github.com/soumadip-dev/logiqo/blob/main/client/src/App.jsx"
click node_problem_ui "https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/ProblemPage.jsx"
click node_home_ui "https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/HomePage.jsx"
click node_auth_ui "https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/LoginPage.jsx"
click node_profile_ui "https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/ProfilePage.jsx"
click node_playlist_ui "https://github.com/soumadip-dev/logiqo/blob/main/client/src/components/PlaylistProfile.jsx"
click node_submission_ui "https://github.com/soumadip-dev/logiqo/blob/main/client/src/components/SubmissionList.jsx"
click node_auth_store "https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useAuthStore.js"
click node_problem_store "https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useProblemStore.js"
click node_execution_store "https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useExecutionStore.js"
click node_playlist_store "https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/usePlaylistStore.js"
click node_submission_store "https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useSubmissionStore.js"
click node_http "https://github.com/soumadip-dev/logiqo/blob/main/client/src/lib/axiosInstance.js"
click node_server "https://github.com/soumadip-dev/logiqo/blob/main/server/src/app.js"
click node_auth_api "https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/auth.routes.js"
click node_problem_api "https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/problem.routes.js"
click node_playlist_api "https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/playlist.routes.js"
click node_submission_api "https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/submission.routes.js"
click node_execution_api "https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/executeCode.routes.js"
click node_auth_service "https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/auth.services.js"
click node_problem_service "https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/problem.services.js"
click node_playlist_service "https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/playlist.services.js"
click node_submission_service "https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/submission.services.js"
click node_execution_service "https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/executeCode.services.js"
click node_judge "https://github.com/soumadip-dev/logiqo/blob/main/server/src/utils/judge0.utils.js"
click node_database "https://github.com/soumadip-dev/logiqo/blob/main/server/src/config/db.config.js"

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_app,node_problem_ui,node_home_ui,node_auth_ui,node_profile_ui,node_playlist_ui,node_submission_ui,node_auth_store,node_problem_store,node_execution_store,node_playlist_store,node_submission_store,node_http toneBlue
class node_server,node_auth_api,node_problem_api,node_playlist_api,node_submission_api,node_auth_service,node_problem_service,node_playlist_service,node_submission_service toneAmber
class node_execution_api,node_execution_service,node_judge,node_judge0 toneMint
class node_database toneRose
class node_user toneIndigo
```

## Components

### Web client

- [Client app](https://github.com/soumadip-dev/logiqo/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Problem pages](https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/ProblemPage.jsx): `client/src/pages/ProblemPage.jsx`
- [Challenge browse](https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/HomePage.jsx): `client/src/pages/HomePage.jsx`
- [Sign-in pages](https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/LoginPage.jsx): `client/src/pages/LoginPage.jsx`
- [Profile page](https://github.com/soumadip-dev/logiqo/blob/main/client/src/pages/ProfilePage.jsx): `client/src/pages/ProfilePage.jsx`
- [Playlist UI](https://github.com/soumadip-dev/logiqo/blob/main/client/src/components/PlaylistProfile.jsx): `client/src/components/PlaylistProfile.jsx`
- [Submission views](https://github.com/soumadip-dev/logiqo/blob/main/client/src/components/SubmissionList.jsx): `client/src/components/SubmissionList.jsx`
- [Auth state](https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useAuthStore.js): `client/src/store/useAuthStore.js`
- [Problem state](https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useProblemStore.js): `client/src/store/useProblemStore.js`
- [Execution state](https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useExecutionStore.js): `client/src/store/useExecutionStore.js`
- [Playlist state](https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/usePlaylistStore.js): `client/src/store/usePlaylistStore.js`
- [Submission state](https://github.com/soumadip-dev/logiqo/blob/main/client/src/store/useSubmissionStore.js): `client/src/store/useSubmissionStore.js`
- [HTTP client](https://github.com/soumadip-dev/logiqo/blob/main/client/src/lib/axiosInstance.js): `client/src/lib/axiosInstance.js`

### API and domain

- [Express app](https://github.com/soumadip-dev/logiqo/blob/main/server/src/app.js): `server/src/app.js`
- [Auth API](https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/auth.routes.js): `server/src/routes/auth.routes.js`
- [Problem API](https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/problem.routes.js): `server/src/routes/problem.routes.js`
- [Playlist API](https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/playlist.routes.js): `server/src/routes/playlist.routes.js`
- [Submission API](https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/submission.routes.js): `server/src/routes/submission.routes.js`
- [Auth services](https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/auth.services.js): `server/src/services/auth.services.js`
- [Problem services](https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/problem.services.js): `server/src/services/problem.services.js`
- [Playlist services](https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/playlist.services.js): `server/src/services/playlist.services.js`
- [Submission services](https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/submission.services.js): `server/src/services/submission.services.js`

### Code execution

- [Execution API](https://github.com/soumadip-dev/logiqo/blob/main/server/src/routes/executeCode.routes.js): `server/src/routes/executeCode.routes.js`
- [Execution services](https://github.com/soumadip-dev/logiqo/blob/main/server/src/services/executeCode.services.js): `server/src/services/executeCode.services.js`
- [Judge0 adapter](https://github.com/soumadip-dev/logiqo/blob/main/server/src/utils/judge0.utils.js): `server/src/utils/judge0.utils.js`

### Persistence

- [PostgreSQL](https://github.com/soumadip-dev/logiqo/blob/main/server/src/config/db.config.js): `server/src/config/db.config.js`

### Other components

- **Developer**
- **Judge0 API**

## Connections

- Developer → Client app: uses
- Client app → Sign-in pages: routes
- Client app → Challenge browse: routes
- Client app → Problem pages: routes
- Client app → Profile page: routes
- Sign-in pages → Auth state: submits credentials
- Challenge browse → Problem state: loads challenges
- Problem pages → Problem state: loads challenge
- Problem pages → Execution state: runs code
- Profile page → Playlist UI: shows playlists
- Profile page → Submission views: shows activity
- Playlist UI → Playlist state: manages playlists
- Submission views → Submission state: loads submissions
- Auth state → HTTP client: sends requests
- Problem state → HTTP client: sends requests
- Execution state → HTTP client: sends requests
- Playlist state → HTTP client: sends requests
- Submission state → HTTP client: sends requests
- HTTP client → Express app: calls API
- Express app → Auth API: mounts routes
- Express app → Problem API: mounts routes
- Express app → Playlist API: mounts routes
- Express app → Submission API: mounts routes
- Express app → Execution API: mounts routes
- Auth API → Auth services: dispatches auth
- Problem API → Problem services: dispatches problems
- Playlist API → Playlist services: dispatches playlists
- Submission API → Submission services: dispatches queries
- Execution API → Execution services: dispatches runs
- Auth services → PostgreSQL: reads and writes
- Problem services → PostgreSQL: reads and writes
- Playlist services → PostgreSQL: reads and writes
- Submission services → PostgreSQL: reads submissions
- Problem services → Judge0 adapter: validates solutions
- Execution services → Judge0 adapter: submits code
- Judge0 adapter → Judge0 API: executes code
