# samkwibe/wordrush_ai-integrated-full-stack-web-application architecture

> Architecture diagram of the GitHub repository samkwibe/wordrush_ai-integrated-full-stack-web-application, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samkwibe/wordrush_ai-integrated-full-stack-web-application
- Repository: https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application

## Overview

WordRush is a React learning app backed by a FastAPI REST service: users practice with vocabulary, reading, memory, or coding activities, then track progress and compete. The frontend also supports sign-in, AI-generated learning content, and local/cloud data. The README documents MongoDB and OpenRouter integrations, but backend internals were not excerpted, so backend relationships are shown only where the README explicitly describes them; individual page-to-page navigation and unsampled implementation details are omitted.

Main entry points: [`frontend/src/App.js`](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/App.js) (React application), [`backend/server.py`](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py) (FastAPI service), [`frontend/src/lib/api.js`](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/api.js) (API client), [`frontend/src/pages/FlashMode.jsx`](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/FlashMode.jsx) (Flash practice)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning activities"]
  node_app["React application<br/>[App.js]"]
  node_flash["Flash practice<br/>[FlashMode.jsx]"]
  node_reading["Speed reading<br/>[SpeedRead.jsx]"]
  node_memory["Memory match<br/>[MemoryMatch.jsx]"]
  node_code["Code practice<br/>[CodeLesson.jsx]"]
  node_wordlists["Word lists<br/>[WordLists.jsx]"]
end

subgraph group_frontend["Frontend services"]
  node_authui["Sign-in<br/>[LoginPage.jsx]"]
  node_authstate["Session state<br/>[AuthContext.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_localdata[("Local progress<br/>[storage.js]")]
  node_achievements["Achievements<br/>[achievements.js]"]
  node_worddata["Built-in vocabulary<br/>[wordLists.js]"]
end

subgraph group_backend["Backend services"]
  node_backend["FastAPI service<br/>[server.py]"]
  node_ai["AI generation<br/>[server.py]"]
  node_leaderboard["Leaderboard<br/>[server.py]"]
  node_stats["User statistics<br/>[server.py]"]
end

subgraph group_external["External systems"]
  node_userdata[("User data")]
end

node_learner(("Learner"))
node_openrouter["OpenRouter"]

node_learner -->|"uses"| node_app
node_app -.->|"offers"| node_flash
node_app -.->|"offers"| node_reading
node_app -.->|"offers"| node_memory
node_app -.->|"offers"| node_code
node_app -.->|"offers"| node_wordlists
node_learner -->|"signs in"| node_authui
node_authui -->|"uses session"| node_authstate
node_authstate -->|"calls"| node_api
node_flash -->|"requests content"| node_api
node_reading -->|"requests content"| node_api
node_code -->|"generates lessons"| node_api
node_flash -->|"records progress"| node_localdata
node_reading -->|"records progress"| node_localdata
node_localdata -->|"evaluates"| node_achievements
node_wordlists -->|"uses lists"| node_worddata
node_api -->|"sends REST requests"| node_backend
node_backend -->|"generates content"| node_ai
node_ai -->|"routes models"| node_openrouter
node_backend -->|"stores profiles and activity"| node_userdata
node_backend -->|"serves rankings"| node_leaderboard
node_backend -->|"tracks performance"| node_stats

click node_app "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/App.js"
click node_flash "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/FlashMode.jsx"
click node_reading "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/SpeedRead.jsx"
click node_memory "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/MemoryMatch.jsx"
click node_code "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/components/code/CodeLesson.jsx"
click node_wordlists "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/WordLists.jsx"
click node_authui "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/LoginPage.jsx"
click node_authstate "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/context/AuthContext.jsx"
click node_api "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/api.js"
click node_localdata "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/storage.js"
click node_achievements "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/achievements.js"
click node_worddata "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/wordLists.js"
click node_backend "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py"
click node_ai "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py"
click node_leaderboard "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py"
click node_stats "https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.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_app,node_flash,node_reading,node_memory,node_code,node_wordlists toneBlue
class node_authui,node_authstate,node_api,node_localdata,node_achievements,node_worddata toneAmber
class node_backend,node_ai,node_leaderboard,node_stats,node_openrouter toneMint
class node_userdata toneRose
class node_learner toneIndigo
```

## Components

### Learning activities

- [React application](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Flash practice](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/FlashMode.jsx): `frontend/src/pages/FlashMode.jsx`
- [Speed reading](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/SpeedRead.jsx): `frontend/src/pages/SpeedRead.jsx`
- [Memory match](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/MemoryMatch.jsx): `frontend/src/pages/MemoryMatch.jsx`
- [Code practice](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/components/code/CodeLesson.jsx): `frontend/src/components/code/CodeLesson.jsx`
- [Word lists](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/WordLists.jsx): `frontend/src/pages/WordLists.jsx`

### Frontend services

- [Sign-in](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/pages/LoginPage.jsx): `frontend/src/pages/LoginPage.jsx`
- [Session state](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`
- [Local progress](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/storage.js): `frontend/src/lib/storage.js`
- [Achievements](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/achievements.js): `frontend/src/lib/achievements.js`
- [Built-in vocabulary](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/frontend/src/lib/wordLists.js): `frontend/src/lib/wordLists.js`

### Backend services

- [FastAPI service](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py): `backend/server.py`
- [AI generation](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py): `backend/server.py`
- [Leaderboard](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py): `backend/server.py`
- [User statistics](https://github.com/samkwibe/wordrush_ai-integrated-full-stack-web-application/blob/main/backend/server.py): `backend/server.py`

### External systems

- **User data**

### Other components

- **Learner**
- **OpenRouter**

## Connections

- Learner → React application: uses
- React application → Flash practice: offers
- React application → Speed reading: offers
- React application → Memory match: offers
- React application → Code practice: offers
- React application → Word lists: offers
- Learner → Sign-in: signs in
- Sign-in → Session state: uses session (evidence: `frontend/src/pages/LoginPage.jsx`)
- Session state → API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Flash practice → API client: requests content (evidence: `frontend/src/pages/FlashMode.jsx`)
- Speed reading → API client: requests content (evidence: `frontend/src/pages/SpeedRead.jsx`)
- Code practice → API client: generates lessons (evidence: `frontend/src/components/code/CodeLesson.jsx`)
- Flash practice → Local progress: records progress (evidence: `frontend/src/pages/FlashMode.jsx`)
- Speed reading → Local progress: records progress (evidence: `frontend/src/pages/SpeedRead.jsx`)
- Local progress → Achievements: evaluates (evidence: `frontend/src/lib/storage.js`)
- Word lists → Built-in vocabulary: uses lists (evidence: `frontend/src/pages/WordLists.jsx`)
- API client → FastAPI service: sends REST requests
- FastAPI service → AI generation: generates content (evidence: `backend/server.py`)
- AI generation → OpenRouter: routes models
- FastAPI service → User data: stores profiles and activity
- FastAPI service → Leaderboard: serves rankings (evidence: `backend/server.py`)
- FastAPI service → User statistics: tracks performance (evidence: `backend/server.py`)
