# jahirpendhari09/leetcode architecture

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

- Interactive diagram: https://gitdiagram.com/jahirpendhari09/leetcode
- Repository: https://github.com/jahirpendhari09/leetcode

## Overview

This React frontend is a LeetCode-style practice platform. Users browse a problem set, open a problem workspace, edit code, run it against test cases, and see judged results. Login and signup use authentication actions; the header also supports email OTP verification. The README additionally documents JavaScript, Java, and Python execution, themes, and responsive layouts. The backend is a separately hosted service, not implemented in this repository; connections to it are based on the frontend service URLs. Unsampled capabilities are retained where documented, but their internal wiring is not inferred.

Main entry points: [`src/Allroutes/Allroutes.js`](https://github.com/jahirpendhari09/leetcode/blob/main/src/Allroutes/Allroutes.js) (Route views), [`src/views/Workspace/Playground.js`](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/Playground.js) (Code playground), [`src/redux/action.js`](https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/action.js) (Auth actions), [`src/views/Workspace/Workspace.js`](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/Workspace.js) (Problem workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_application["Application shell<br/>[App.js]"]
  node_routes["Route views<br/>[Allroutes.js]"]
  node_homepage["Homepage<br/>[index.js]"]
  node_header["Navigation header<br/>[Header.js]"]
end

subgraph group_identity["Account and session"]
  node_login["Login form<br/>[index.js]"]
  node_signup["Signup form<br/>[index.js]"]
  node_auth_actions["Auth actions<br/>[action.js]"]
  node_auth_service["Auth API client<br/>[auth.js]"]
  node_session_state["Session state<br/>[reducer.js]"]
  node_otp["Email OTP verification<br/>[Header.js]"]
  node_redux_store[("Redux store<br/>[store.js]")]
end

subgraph group_problem_browsing["Problem browsing"]
  node_problems["Problem catalog<br/>[index.js]"]
  node_problem_content["Problem data and cards<br/>[static.js]"]
  node_problem_card["Problem card<br/>[ProblemCard.js]"]
end

subgraph group_practice["Coding practice"]
  node_workspace["Problem workspace<br/>[Workspace.js]"]
  node_description["Problem description"]
  node_playground["Code playground<br/>[Playground.js]"]
  node_editor_options["Language and theme options<br/>[editor.js]"]
  node_playground_header["Editor controls"]
  node_language_select["Language selector<br/>[Select.js]"]
  node_run_controls["Run and submit controls<br/>[EditorFooter.js]"]
  node_platform_service["Problem and code API<br/>[platform.js]"]
end

node_user(("Learner"))
node_backend["Hosted backend"]

node_user -->|"uses"| node_application
node_application -->|"renders"| node_routes
node_routes -->|"renders"| node_header
node_routes -->|"routes to"| node_homepage
node_routes -->|"routes to"| node_problems
node_routes -->|"routes to"| node_workspace
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_signup
node_login -->|"dispatches"| node_auth_actions
node_signup -->|"dispatches"| node_auth_actions
node_auth_actions -->|"calls"| node_auth_service
node_auth_service -->|"sends auth requests"| node_backend
node_header -->|"hosts"| node_otp
node_otp -->|"requests OTP"| node_auth_service
node_header -->|"dispatches session actions"| node_auth_actions
node_auth_actions -->|"updates"| node_session_state
node_redux_store -->|"uses reducer"| node_session_state
node_problems -->|"reads"| node_problem_content
node_problems -->|"renders"| node_problem_card
node_workspace -->|"renders"| node_description
node_workspace -->|"renders"| node_playground
node_workspace -->|"fetches problem"| node_platform_service
node_playground -->|"submits code"| node_platform_service
node_platform_service -->|"sends problem and code requests"| node_backend
node_playground -->|"uses language and theme data"| node_editor_options
node_playground -->|"renders"| node_playground_header
node_playground_header -->|"uses"| node_language_select
node_playground -->|"renders"| node_run_controls

click node_application "https://github.com/jahirpendhari09/leetcode/blob/main/src/App.js"
click node_routes "https://github.com/jahirpendhari09/leetcode/blob/main/src/Allroutes/Allroutes.js"
click node_homepage "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Homepage/index.js"
click node_header "https://github.com/jahirpendhari09/leetcode/blob/main/src/components/common/Header/Header.js"
click node_login "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Login/index.js"
click node_signup "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Signup/index.js"
click node_auth_actions "https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/action.js"
click node_auth_service "https://github.com/jahirpendhari09/leetcode/blob/main/src/services/auth.js"
click node_session_state "https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/reducer.js"
click node_otp "https://github.com/jahirpendhari09/leetcode/blob/main/src/components/common/Header/Header.js"
click node_problems "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Problems/index.js"
click node_problem_content "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Problems/static.js"
click node_problem_card "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Problems/ProblemCard.js"
click node_workspace "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/Workspace.js"
click node_description "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/ProblemDescription.js"
click node_playground "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/Playground.js"
click node_editor_options "https://github.com/jahirpendhari09/leetcode/blob/main/src/static/editor.js"
click node_playground_header "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/PlaygroundHeader.js"
click node_language_select "https://github.com/jahirpendhari09/leetcode/blob/main/src/components/common/Select/Select.js"
click node_run_controls "https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/EditorFooter.js"
click node_platform_service "https://github.com/jahirpendhari09/leetcode/blob/main/src/services/platform.js"
click node_redux_store "https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/store.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_application,node_routes,node_homepage,node_header toneBlue
class node_login,node_signup,node_auth_actions,node_auth_service,node_session_state,node_otp,node_redux_store toneAmber
class node_problems,node_problem_content,node_problem_card toneMint
class node_workspace,node_description,node_playground,node_editor_options,node_playground_header,node_language_select,node_run_controls,node_platform_service toneRose
class node_user,node_backend toneIndigo
```

## Components

### App and navigation

- [Application shell](https://github.com/jahirpendhari09/leetcode/blob/main/src/App.js): `src/App.js`
- [Route views](https://github.com/jahirpendhari09/leetcode/blob/main/src/Allroutes/Allroutes.js): `src/Allroutes/Allroutes.js`
- [Homepage](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Homepage/index.js): `src/views/Homepage/index.js`
- [Navigation header](https://github.com/jahirpendhari09/leetcode/blob/main/src/components/common/Header/Header.js): `src/components/common/Header/Header.js`

### Account and session

- [Login form](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Login/index.js): `src/views/Login/index.js`
- [Signup form](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Signup/index.js): `src/views/Signup/index.js`
- [Auth actions](https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/action.js): `src/redux/action.js`
- [Auth API client](https://github.com/jahirpendhari09/leetcode/blob/main/src/services/auth.js): `src/services/auth.js`
- [Session state](https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/reducer.js): `src/redux/reducer.js`
- [Email OTP verification](https://github.com/jahirpendhari09/leetcode/blob/main/src/components/common/Header/Header.js): `src/components/common/Header/Header.js`
- [Redux store](https://github.com/jahirpendhari09/leetcode/blob/main/src/redux/store.js): `src/redux/store.js`

### Problem browsing

- [Problem catalog](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Problems/index.js): `src/views/Problems/index.js`
- [Problem data and cards](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Problems/static.js): `src/views/Problems/static.js`
- [Problem card](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Problems/ProblemCard.js): `src/views/Problems/ProblemCard.js`

### Coding practice

- [Problem workspace](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/Workspace.js): `src/views/Workspace/Workspace.js`
- [Problem description](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/ProblemDescription.js): `src/views/Workspace/ProblemDescription.js`
- [Code playground](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/Playground.js): `src/views/Workspace/Playground.js`
- [Language and theme options](https://github.com/jahirpendhari09/leetcode/blob/main/src/static/editor.js): `src/static/editor.js`
- [Editor controls](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/PlaygroundHeader.js): `src/views/Workspace/PlaygroundHeader.js`
- [Language selector](https://github.com/jahirpendhari09/leetcode/blob/main/src/components/common/Select/Select.js): `src/components/common/Select/Select.js`
- [Run and submit controls](https://github.com/jahirpendhari09/leetcode/blob/main/src/views/Workspace/EditorFooter.js): `src/views/Workspace/EditorFooter.js`
- [Problem and code API](https://github.com/jahirpendhari09/leetcode/blob/main/src/services/platform.js): `src/services/platform.js`

### Other components

- **Learner**
- **Hosted backend**

## Connections

- Learner → Application shell: uses (evidence: `README.md`)
- Application shell → Route views: renders (evidence: `src/App.js`)
- Route views → Navigation header: renders (evidence: `src/Allroutes/Allroutes.js`)
- Route views → Homepage: routes to (evidence: `src/Allroutes/Allroutes.js`)
- Route views → Problem catalog: routes to (evidence: `src/Allroutes/Allroutes.js`)
- Route views → Problem workspace: routes to (evidence: `src/Allroutes/Allroutes.js`)
- Route views → Login form: routes to (evidence: `src/Allroutes/Allroutes.js`)
- Route views → Signup form: routes to (evidence: `src/Allroutes/Allroutes.js`)
- Login form → Auth actions: dispatches (evidence: `src/views/Login/index.js`)
- Signup form → Auth actions: dispatches (evidence: `src/views/Signup/index.js`)
- Auth actions → Auth API client: calls (evidence: `src/redux/action.js`)
- Auth API client → Hosted backend: sends auth requests (evidence: `src/services/auth.js`)
- Navigation header → Email OTP verification: hosts (evidence: `src/components/common/Header/Header.js`)
- Email OTP verification → Auth API client: requests OTP (evidence: `src/components/common/Header/Header.js`)
- Navigation header → Auth actions: dispatches session actions (evidence: `src/components/common/Header/Header.js`)
- Auth actions → Session state: updates (evidence: `src/redux/action.js`)
- Redux store → Session state: uses reducer (evidence: `src/redux/store.js`)
- Problem catalog → Problem data and cards: reads (evidence: `src/views/Problems/index.js`)
- Problem catalog → Problem card: renders (evidence: `src/views/Problems/index.js`)
- Problem workspace → Problem description: renders (evidence: `src/views/Workspace/Workspace.js`)
- Problem workspace → Code playground: renders (evidence: `src/views/Workspace/Workspace.js`)
- Problem workspace → Problem and code API: fetches problem (evidence: `src/views/Workspace/Workspace.js`)
- Code playground → Problem and code API: submits code (evidence: `src/views/Workspace/Playground.js`)
- Problem and code API → Hosted backend: sends problem and code requests (evidence: `src/services/platform.js`)
- Code playground → Language and theme options: uses language and theme data (evidence: `src/views/Workspace/Playground.js`)
- Code playground → Editor controls: renders (evidence: `src/views/Workspace/Playground.js`)
- Editor controls → Language selector: uses (evidence: `src/views/Workspace/PlaygroundHeader.js`)
- Code playground → Run and submit controls: renders (evidence: `src/views/Workspace/Playground.js`)
