# vicharanashala/tenali architecture

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

- Interactive diagram: https://gitdiagram.com/vicharanashala/tenali
- Repository: https://github.com/vicharanashala/tenali

## Overview

Tenali is an adaptive math-learning platform: learners open the home grid, choose a topic or mode, answer generated questions, and receive feedback and rewards. The wider product includes guided learning, daily review, hints and explanations, multiplayer battles, a code playground, and a treasure-hunt mode. The excerpts show the React entry point, selected server behavior, and several backend relationships; other branches are included where the README documents them, without implying unsampled implementation details.

Main entry points: [`server/index.js`](https://github.com/vicharanashala/tenali/blob/main/server/index.js) (Express API server), [`client/src/App.jsx`](https://github.com/vicharanashala/tenali/blob/main/client/src/App.jsx) (Home and modes), [`client/src/main.jsx`](https://github.com/vicharanashala/tenali/blob/main/client/src/main.jsx) (App bootstrap), [`server/hints/index.js`](https://github.com/vicharanashala/tenali/blob/main/server/hints/index.js) (Progressive hints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learning experience"]
  node_app_entry["App bootstrap<br/>[main.jsx]"]
  node_home_app["Home and modes<br/>[App.jsx]"]
  node_learning_content["Interactive learning"]
  node_locale["Localization<br/>[i18n.jsx]"]
end

subgraph group_practice["Practice and activities"]
  node_quiz_routes["Topic question APIs"]
  node_geometry_api["Geometry questions<br/>[geometry.js]"]
  node_algebra_api["Algebra questions<br/>[algebra.js]"]
  node_mission_quiz["Linear algebra mission<br/>[la-mission-quiz.js]"]
  node_daily_review["Daily warmup<br/>[review.js]"]
  node_treasure_hunt["Treasure hunt<br/>[routes.js]"]
  node_battle["Multiplayer battle<br/>[index.js]"]
  node_playground["Code playground<br/>[compiler.js]"]
end

subgraph group_services["Learning services"]
  node_warmup_engine["Warmup generation<br/>[dailyWarmup.js]"]
  node_explanations["Step explanations<br/>[explanations.js]"]
  node_hints["Progressive hints<br/>[index.js]"]
  node_hint_specs["Hint content<br/>[hintSpecs.js]"]
  node_hint_resolvers["Hint resolution<br/>[hintResolvers.js]"]
  node_journey["Guided journey<br/>[controllers.js]"]
  node_journey_data["Journey curriculum<br/>[journeyData.js]"]
  node_mastery["Mastery tracking<br/>[masteryEngine.js]"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication<br/>[auth.js]"]
  node_mongo[("MongoDB")]
  node_server["Express API server<br/>[index.js]"]
  node_proctor["Quiz proctoring<br/>[ProctorContext.jsx]"]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_app_entry
node_app_entry -->|"mounts"| node_home_app
node_learner -->|"picks topic"| node_home_app
node_home_app -.->|"requests questions"| node_quiz_routes
node_quiz_routes -.->|"serves APIs"| node_server
node_server -->|"imports"| node_algebra_api
node_server -.->|"routes to"| node_geometry_api
node_server -.->|"routes to"| node_mission_quiz
node_learner -->|"learns interactively"| node_learning_content
node_home_app -.->|"provides translations"| node_locale
node_learner -->|"practices daily"| node_daily_review
node_daily_review -->|"generates questions"| node_warmup_engine
node_learner -->|"plays activity"| node_treasure_hunt
node_learner -->|"joins duel"| node_battle
node_learner -->|"runs code"| node_playground
node_learner -->|"requests solution"| node_explanations
node_learner -->|"unlocks hint"| node_hints
node_hints -->|"reads hint content"| node_hint_specs
node_hints -->|"resolves hint"| node_hint_resolvers
node_learner -->|"follows curriculum"| node_journey
node_journey -->|"reads curriculum"| node_journey_data
node_journey -->|"stores progress"| node_mongo
node_mastery -->|"reads and writes"| node_mongo
node_learner -->|"optionally logs in"| node_auth
node_auth -->|"persists accounts"| node_mongo
node_server -->|"uses authentication"| node_auth
node_app_entry -->|"provides proctor context"| node_proctor
node_home_app -.->|"uses platform APIs"| node_server

click node_app_entry "https://github.com/vicharanashala/tenali/blob/main/client/src/main.jsx"
click node_home_app "https://github.com/vicharanashala/tenali/blob/main/client/src/App.jsx"
click node_learning_content "https://github.com/vicharanashala/tenali/tree/main/client/src/components/learning"
click node_locale "https://github.com/vicharanashala/tenali/blob/main/client/src/lib/i18n.jsx"
click node_quiz_routes "https://github.com/vicharanashala/tenali/tree/main/server/routes"
click node_geometry_api "https://github.com/vicharanashala/tenali/blob/main/server/routes/geometry.js"
click node_algebra_api "https://github.com/vicharanashala/tenali/blob/main/server/routes/algebra.js"
click node_mission_quiz "https://github.com/vicharanashala/tenali/blob/main/server/routes/la-mission-quiz.js"
click node_daily_review "https://github.com/vicharanashala/tenali/blob/main/server/routes/review.js"
click node_warmup_engine "https://github.com/vicharanashala/tenali/blob/main/server/lib/dailyWarmup.js"
click node_treasure_hunt "https://github.com/vicharanashala/tenali/blob/main/server/treasurehunt/routes.js"
click node_battle "https://github.com/vicharanashala/tenali/blob/main/server/index.js"
click node_playground "https://github.com/vicharanashala/tenali/blob/main/server/compiler.js"
click node_explanations "https://github.com/vicharanashala/tenali/blob/main/server/explanations.js"
click node_hints "https://github.com/vicharanashala/tenali/blob/main/server/hints/index.js"
click node_hint_specs "https://github.com/vicharanashala/tenali/blob/main/server/hints/hintSpecs.js"
click node_hint_resolvers "https://github.com/vicharanashala/tenali/blob/main/server/hints/hintResolvers.js"
click node_journey "https://github.com/vicharanashala/tenali/blob/main/server/lil/learning_journey/controllers.js"
click node_journey_data "https://github.com/vicharanashala/tenali/blob/main/server/lil/learning_journey/journeyData.js"
click node_mastery "https://github.com/vicharanashala/tenali/blob/main/server/lil/masteryEngine.js"
click node_auth "https://github.com/vicharanashala/tenali/blob/main/server/auth.js"
click node_server "https://github.com/vicharanashala/tenali/blob/main/server/index.js"
click node_proctor "https://github.com/vicharanashala/tenali/blob/main/client/src/proctor/ProctorContext.jsx"

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_entry,node_home_app,node_learning_content,node_locale toneBlue
class node_quiz_routes,node_geometry_api,node_algebra_api,node_mission_quiz,node_daily_review,node_treasure_hunt,node_battle,node_playground toneAmber
class node_warmup_engine,node_explanations,node_hints,node_hint_specs,node_hint_resolvers,node_journey,node_journey_data,node_mastery toneMint
class node_auth,node_mongo,node_server,node_proctor toneRose
class node_learner toneIndigo
```

## Components

### Learning experience

- [App bootstrap](https://github.com/vicharanashala/tenali/blob/main/client/src/main.jsx): `client/src/main.jsx`
- [Home and modes](https://github.com/vicharanashala/tenali/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Interactive learning](https://github.com/vicharanashala/tenali/tree/main/client/src/components/learning): `client/src/components/learning`
- [Localization](https://github.com/vicharanashala/tenali/blob/main/client/src/lib/i18n.jsx): `client/src/lib/i18n.jsx`

### Practice and activities

- [Topic question APIs](https://github.com/vicharanashala/tenali/tree/main/server/routes): `server/routes`
- [Geometry questions](https://github.com/vicharanashala/tenali/blob/main/server/routes/geometry.js): `server/routes/geometry.js`
- [Algebra questions](https://github.com/vicharanashala/tenali/blob/main/server/routes/algebra.js): `server/routes/algebra.js`
- [Linear algebra mission](https://github.com/vicharanashala/tenali/blob/main/server/routes/la-mission-quiz.js): `server/routes/la-mission-quiz.js`
- [Daily warmup](https://github.com/vicharanashala/tenali/blob/main/server/routes/review.js): `server/routes/review.js`
- [Treasure hunt](https://github.com/vicharanashala/tenali/blob/main/server/treasurehunt/routes.js): `server/treasurehunt/routes.js`
- [Multiplayer battle](https://github.com/vicharanashala/tenali/blob/main/server/index.js): `server/index.js`
- [Code playground](https://github.com/vicharanashala/tenali/blob/main/server/compiler.js): `server/compiler.js`

### Learning services

- [Warmup generation](https://github.com/vicharanashala/tenali/blob/main/server/lib/dailyWarmup.js): `server/lib/dailyWarmup.js`
- [Step explanations](https://github.com/vicharanashala/tenali/blob/main/server/explanations.js): `server/explanations.js`
- [Progressive hints](https://github.com/vicharanashala/tenali/blob/main/server/hints/index.js): `server/hints/index.js`
- [Hint content](https://github.com/vicharanashala/tenali/blob/main/server/hints/hintSpecs.js): `server/hints/hintSpecs.js`
- [Hint resolution](https://github.com/vicharanashala/tenali/blob/main/server/hints/hintResolvers.js): `server/hints/hintResolvers.js`
- [Guided journey](https://github.com/vicharanashala/tenali/blob/main/server/lil/learning_journey/controllers.js): `server/lil/learning_journey/controllers.js`
- [Journey curriculum](https://github.com/vicharanashala/tenali/blob/main/server/lil/learning_journey/journeyData.js): `server/lil/learning_journey/journeyData.js`
- [Mastery tracking](https://github.com/vicharanashala/tenali/blob/main/server/lil/masteryEngine.js): `server/lil/masteryEngine.js`

### Platform services

- [Authentication](https://github.com/vicharanashala/tenali/blob/main/server/auth.js): `server/auth.js`
- **MongoDB**
- [Express API server](https://github.com/vicharanashala/tenali/blob/main/server/index.js): `server/index.js`
- [Quiz proctoring](https://github.com/vicharanashala/tenali/blob/main/client/src/proctor/ProctorContext.jsx): `client/src/proctor/ProctorContext.jsx`

### Other components

- **Learner**

## Connections

- Learner → App bootstrap: opens (evidence: `README.md`)
- App bootstrap → Home and modes: mounts (evidence: `client/src/main.jsx`)
- Learner → Home and modes: picks topic (evidence: `README.md`)
- Home and modes → Topic question APIs: requests questions
- Topic question APIs → Express API server: serves APIs (evidence: `server/index.js`)
- Express API server → Algebra questions: imports (evidence: `server/index.js`)
- Express API server → Geometry questions: routes to (evidence: `server/index.js`)
- Express API server → Linear algebra mission: routes to (evidence: `server/index.js`)
- Learner → Interactive learning: learns interactively (evidence: `README.md`)
- Home and modes → Localization: provides translations
- Learner → Daily warmup: practices daily (evidence: `README.md`)
- Daily warmup → Warmup generation: generates questions (evidence: `server/routes/review.js`)
- Learner → Treasure hunt: plays activity (evidence: `README.md`)
- Learner → Multiplayer battle: joins duel (evidence: `README.md`)
- Learner → Code playground: runs code (evidence: `README.md`)
- Learner → Step explanations: requests solution (evidence: `README.md`)
- Learner → Progressive hints: unlocks hint (evidence: `server/hints/index.js`)
- Progressive hints → Hint content: reads hint content (evidence: `server/hints/index.js`)
- Progressive hints → Hint resolution: resolves hint (evidence: `server/hints/index.js`)
- Learner → Guided journey: follows curriculum (evidence: `README.md`)
- Guided journey → Journey curriculum: reads curriculum (evidence: `server/lil/learning_journey/controllers.js`)
- Guided journey → MongoDB: stores progress (evidence: `server/lil/learning_journey/controllers.js`)
- Mastery tracking → MongoDB: reads and writes (evidence: `server/lil/masteryEngine.js`)
- Learner → Authentication: optionally logs in (evidence: `README.md`)
- Authentication → MongoDB: persists accounts (evidence: `server/auth.js`)
- Express API server → Authentication: uses authentication (evidence: `server/index.js`)
- App bootstrap → Quiz proctoring: provides proctor context (evidence: `client/src/main.jsx`)
- Home and modes → Express API server: uses platform APIs
