# thomas-le-goff/easy-pointer architecture

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

- Interactive diagram: https://gitdiagram.com/thomas-le-goff/easy-pointer
- Repository: https://github.com/thomas-le-goff/easy-pointer

## Overview

Easy Pointer is a web platform for learning C pointers through authenticated, progressive coding exercises. A student enters through the React app, signs in with GitHub, then edits and runs challenge code; the backend provides authentication and editor operations, while the frontend worker and WASM-4 execution layer support in-browser play. The graph combines sampled source references with README-documented capabilities; challenge internals and worker behavior were not sampled, so their detailed links are omitted or marked unverified.

Main entry points: [`frontend/src/App.jsx`](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/App.jsx) (App routing), [`src/auth/actions.py`](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/auth/actions.py) (Auth endpoints), [`src/main.py`](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/main.py) (FastAPI app), [`frontend/src/pages/EditorPage.jsx`](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/EditorPage.jsx) (Editor page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth_context["Auth context<br/>[AuthContext.jsx]"]
  node_local_storage["Local storage<br/>[useLocalStorage.js]"]
  node_oauth_pages["OAuth pages"]
  node_auth_layout["Auth layout"]
  node_editor_page["Editor page<br/>[EditorPage.jsx]"]
  node_api_client["API client<br/>[useApiClient.js]"]
end

subgraph group_identity["Identity"]
  node_auth_actions["Auth endpoints<br/>[actions.py]"]
  node_jwt_auth["JWT handling<br/>[auth.py]"]
  node_github_client["GitHub OAuth client<br/>[client.py]"]
end

subgraph group_backend["Backend services"]
  node_api_server["FastAPI app<br/>[main.py]"]
  node_user_data["User records<br/>[dao.py]"]
  node_user_model["User model<br/>[models.py]"]
  node_database[("SQLite setup<br/>[database.py]")]
end

subgraph group_execution["Code execution"]
  node_worker["Execution worker<br/>[userWorker.js]"]
  node_editor_actions["Editor endpoints<br/>[actions.py]"]
  node_code_manager["Code manager<br/>[editor.py]"]
  node_challenge["Challenges"]
  node_wasm_worker_runtime["WASM sandbox<br/>[userWorker.js]"]
  node_wasm4_main["WASM-4 starter<br/>[main.c]"]
  node_wasm4_header["WASM-4 API<br/>[wasm4.h]"]
end

node_student(("Student"))
node_github["GitHub"]

node_student -->|"uses"| node_app
node_app -->|"provides"| node_auth_context
node_app -->|"routes to"| node_oauth_pages
node_app -->|"routes to"| node_auth_layout
node_app -->|"routes to"| node_editor_page
node_auth_context -->|"persists via"| node_local_storage
node_oauth_pages -.->|"authenticates with"| node_github
node_auth_layout -->|"gates access"| node_editor_page
node_editor_page -->|"requests via"| node_api_client
node_editor_page -->|"starts"| node_worker
node_api_client -->|"invalidates session"| node_auth_context
node_api_client -.->|"sends API requests"| node_api_server
node_api_server -->|"registers router"| node_auth_actions
node_api_server -->|"registers router"| node_editor_actions
node_api_server -->|"initializes"| node_database
node_auth_actions -->|"uses provider"| node_github_client
node_auth_actions -->|"looks up users"| node_user_data
node_auth_actions -.->|"issues tokens"| node_jwt_auth
node_github_client -->|"requests OAuth"| node_github
node_user_data -->|"queries"| node_user_model
node_user_data -.->|"reads records"| node_database
node_editor_actions -->|"delegates to"| node_code_manager
node_code_manager -.->|"loads template"| node_challenge
node_code_manager -.->|"builds challenge"| node_wasm4_main
node_worker -.->|"executes in"| node_wasm_worker_runtime
node_wasm4_main -->|"includes"| node_wasm4_header
node_wasm_worker_runtime -.->|"runs sandboxed code"| node_student

click node_app "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/App.jsx"
click node_auth_context "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/contexts/AuthContext.jsx"
click node_local_storage "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/hooks/useLocalStorage.js"
click node_oauth_pages "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/OAuth2/OAuth2ProviderPage.jsx"
click node_auth_layout "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/AuthenticatedLayout.jsx"
click node_editor_page "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/EditorPage.jsx"
click node_api_client "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/hooks/useApiClient.js"
click node_worker "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/userWorker.js"
click node_api_server "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/main.py"
click node_auth_actions "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/auth/actions.py"
click node_jwt_auth "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/auth/auth.py"
click node_github_client "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/github/client.py"
click node_user_data "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/user/dao.py"
click node_user_model "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/user/models.py"
click node_database "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/database.py"
click node_editor_actions "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/editor/actions.py"
click node_code_manager "https://github.com/thomas-le-goff/easy-pointer/blob/master/src/editor/editor.py"
click node_challenge "https://github.com/thomas-le-goff/easy-pointer/tree/master/src/challenge"
click node_wasm_worker_runtime "https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/userWorker.js"
click node_wasm4_main "https://github.com/thomas-le-goff/easy-pointer/blob/master/templates/w4/hello-world/src/main.c"
click node_wasm4_header "https://github.com/thomas-le-goff/easy-pointer/blob/master/templates/w4/hello-world/src/wasm4.h"

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_auth_context,node_local_storage,node_oauth_pages,node_auth_layout,node_editor_page,node_api_client toneBlue
class node_auth_actions,node_jwt_auth,node_github_client toneAmber
class node_api_server,node_user_data,node_user_model,node_database toneMint
class node_worker,node_editor_actions,node_code_manager,node_challenge,node_wasm_worker_runtime,node_wasm4_main,node_wasm4_header toneRose
class node_student,node_github toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/contexts/AuthContext.jsx): `frontend/src/contexts/AuthContext.jsx`
- [Local storage](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/hooks/useLocalStorage.js): `frontend/src/hooks/useLocalStorage.js`
- [OAuth pages](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/OAuth2/OAuth2ProviderPage.jsx): `frontend/src/pages/OAuth2/OAuth2ProviderPage.jsx`
- [Auth layout](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/AuthenticatedLayout.jsx): `frontend/src/pages/AuthenticatedLayout.jsx`
- [Editor page](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/pages/EditorPage.jsx): `frontend/src/pages/EditorPage.jsx`
- [API client](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/hooks/useApiClient.js): `frontend/src/hooks/useApiClient.js`

### Identity

- [Auth endpoints](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/auth/actions.py): `src/auth/actions.py`
- [JWT handling](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/auth/auth.py): `src/auth/auth.py`
- [GitHub OAuth client](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/github/client.py): `src/github/client.py`

### Backend services

- [FastAPI app](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/main.py): `src/main.py`
- [User records](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/user/dao.py): `src/user/dao.py`
- [User model](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/user/models.py): `src/user/models.py`
- [SQLite setup](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/database.py): `src/database.py`

### Code execution

- [Execution worker](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/userWorker.js): `frontend/src/userWorker.js`
- [Editor endpoints](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/editor/actions.py): `src/editor/actions.py`
- [Code manager](https://github.com/thomas-le-goff/easy-pointer/blob/master/src/editor/editor.py): `src/editor/editor.py`
- [Challenges](https://github.com/thomas-le-goff/easy-pointer/tree/master/src/challenge): `src/challenge`
- [WASM sandbox](https://github.com/thomas-le-goff/easy-pointer/blob/master/frontend/src/userWorker.js): `frontend/src/userWorker.js`
- [WASM-4 starter](https://github.com/thomas-le-goff/easy-pointer/blob/master/templates/w4/hello-world/src/main.c): `templates/w4/hello-world/src/main.c`
- [WASM-4 API](https://github.com/thomas-le-goff/easy-pointer/blob/master/templates/w4/hello-world/src/wasm4.h): `templates/w4/hello-world/src/wasm4.h`

### Other components

- **Student**
- **GitHub**

## Connections

- Student → App routing: uses
- App routing → Auth context: provides (evidence: `frontend/src/App.jsx`)
- App routing → OAuth pages: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Auth layout: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Editor page: routes to (evidence: `frontend/src/App.jsx`)
- Auth context → Local storage: persists via (evidence: `frontend/src/contexts/AuthContext.jsx`)
- OAuth pages → GitHub: authenticates with
- Auth layout → Editor page: gates access (evidence: `frontend/src/App.jsx`)
- Editor page → API client: requests via (evidence: `frontend/src/pages/EditorPage.jsx`)
- Editor page → Execution worker: starts (evidence: `frontend/src/pages/EditorPage.jsx`)
- API client → Auth context: invalidates session (evidence: `frontend/src/hooks/useApiClient.js`)
- API client → FastAPI app: sends API requests
- FastAPI app → Auth endpoints: registers router (evidence: `src/main.py`)
- FastAPI app → Editor endpoints: registers router (evidence: `src/main.py`)
- FastAPI app → SQLite setup: initializes (evidence: `src/main.py`)
- Auth endpoints → GitHub OAuth client: uses provider (evidence: `src/auth/actions.py`)
- Auth endpoints → User records: looks up users (evidence: `src/auth/actions.py`)
- Auth endpoints → JWT handling: issues tokens
- GitHub OAuth client → GitHub: requests OAuth (evidence: `src/github/client.py`)
- User records → User model: queries (evidence: `src/user/dao.py`)
- User records → SQLite setup: reads records
- Editor endpoints → Code manager: delegates to (evidence: `src/editor/actions.py`)
- Code manager → Challenges: loads template
- Code manager → WASM-4 starter: builds challenge
- Execution worker → WASM sandbox: executes in (evidence: `frontend/src/userWorker.js`)
- WASM-4 starter → WASM-4 API: includes (evidence: `templates/w4/hello-world/src/main.c`)
- WASM sandbox → Student: runs sandboxed code
