# the-boring-education/tbe-web architecture

> Architecture diagram of the GitHub repository the-boring-education/tbe-web, 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/the-boring-education/tbe-web
- Repository: https://github.com/the-boring-education/tbe-web

## Overview

TBE Platform is a multi-application learning ecosystem with a centralized API and shared packages. Learners enter through onboarding or a product app, use capabilities such as courses, projects, quizzes, interview preparation, and learning journeys, and interact with centralized services. Administrators manage content and operations through a separate console. The README documents the app-to-API architecture; sampled code confirms admin route composition and payment enrollment dispatch. Many app internals were not sampled, so undocumented internal links are omitted.

Main entry points: [`apps/api/src/pages/api/v1`](https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1) (Central API), [`apps/admin/src/App.tsx`](https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/App.tsx) (Admin console), [`apps/api/src/lib/database`](https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/lib/database) (MongoDB data layer), [`apps/platform`](https://github.com/the-boring-education/tbe-web/tree/development/apps/platform) (Main platform)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learner["Learner products"]
  node_platform["Main platform"]
  node_prep_yatra["Prep Yatra"]
  node_quizzes["Quiz platform"]
  node_onboarding["Onboarding flow<br/>[App.tsx]"]
  node_techyatra["Tech Yatra"]
  node_dsayatra["DSA practice<br/>[revisions.tsx]"]
  node_resume["Resume builder"]
end

subgraph group_operations["Admin operations"]
  node_admin_app["Admin console<br/>[App.tsx]"]
  node_admin_content["Content operations"]
  node_admin_users["User operations<br/>[AdminsPage.tsx]"]
  node_admin_engagement["Engagement operations<br/>[ChallengesPage.tsx]"]
  node_admin_insights["Analytics operations<br/>[QuizzesPage.tsx]"]
end

subgraph group_backend["Central services"]
  node_api["Central API"]
  node_api_admin["Admin endpoints"]
  node_api_learning["Learning endpoints"]
  node_payment_enrollment["Payment enrollment"]
  node_enrollment_handlers["Enrollment handlers"]
  node_database[("MongoDB data layer")]
end

subgraph group_shared["Shared packages"]
  node_shared_auth["Shared authentication<br/>[AuthProvider.tsx]"]
  node_shared_services["Shared API services<br/>[client.ts]"]
  node_shared_components["Shared components"]
  node_shared_gamification["Gamification hooks"]
end

node_learner_actor(("Learner"))
node_mongo[("MongoDB")]

node_learner_actor -->|"uses"| node_platform
node_learner_actor -->|"prepares with"| node_prep_yatra
node_learner_actor -->|"takes quizzes"| node_quizzes
node_learner_actor -->|"registers through"| node_onboarding
node_learner_actor -->|"learns with"| node_techyatra
node_learner_actor -->|"practices with"| node_dsayatra
node_learner_actor -->|"builds resumes"| node_resume
node_admin_app -->|"routes to"| node_admin_content
node_admin_app -->|"routes to"| node_admin_users
node_admin_app -->|"routes to"| node_admin_engagement
node_admin_app -->|"routes to"| node_admin_insights
node_platform -->|"uses API"| node_api
node_prep_yatra -->|"uses API"| node_api
node_quizzes -->|"uses API"| node_api
node_onboarding -->|"uses API"| node_api
node_techyatra -->|"uses API"| node_api
node_dsayatra -->|"uses API"| node_api
node_resume -->|"uses API"| node_api
node_admin_app -->|"uses API"| node_api
node_api -->|"persists data"| node_database
node_database -->|"reads and writes"| node_mongo
node_payment_enrollment -->|"dispatches"| node_enrollment_handlers
node_enrollment_handlers -->|"enrolls and updates"| node_database
node_admin_content -.->|"uses endpoints"| node_api_admin
node_admin_insights -.->|"uses endpoints"| node_api_admin
node_api_learning -.->|"uses data layer"| node_database

click node_platform "https://github.com/the-boring-education/tbe-web/tree/development/apps/platform"
click node_prep_yatra "https://github.com/the-boring-education/tbe-web/tree/development/apps/dsayatra"
click node_quizzes "https://github.com/the-boring-education/tbe-web/tree/development/apps/quizes"
click node_onboarding "https://github.com/the-boring-education/tbe-web/blob/development/apps/onboarding/src/App.tsx"
click node_techyatra "https://github.com/the-boring-education/tbe-web/tree/development/apps/techyatra"
click node_dsayatra "https://github.com/the-boring-education/tbe-web/blob/development/apps/dsayatra/src/pages/revisions.tsx"
click node_resume "https://github.com/the-boring-education/tbe-web/tree/development/apps/resources"
click node_admin_app "https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/App.tsx"
click node_admin_content "https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/InterviewPrepPage.tsx"
click node_admin_users "https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/AdminsPage.tsx"
click node_admin_engagement "https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/ChallengesPage.tsx"
click node_admin_insights "https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/QuizzesPage.tsx"
click node_api "https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1"
click node_api_admin "https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1/admin"
click node_api_learning "https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1/interview-prep"
click node_payment_enrollment "https://github.com/the-boring-education/tbe-web/blob/development/apps/api/src/lib/services/payment/enrollmentService.ts"
click node_enrollment_handlers "https://github.com/the-boring-education/tbe-web/blob/development/apps/api/src/lib/services/payment/enrollmentHandlers.ts"
click node_database "https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/lib/database"
click node_shared_auth "https://github.com/the-boring-education/tbe-web/blob/development/packages/auth/src/components/AuthProvider.tsx"
click node_shared_services "https://github.com/the-boring-education/tbe-web/blob/development/packages/services/src/client.ts"
click node_shared_components "https://github.com/the-boring-education/tbe-web/tree/development/packages/components"
click node_shared_gamification "https://github.com/the-boring-education/tbe-web/blob/development/packages/gamification/src/useGamifiedAction.ts"

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_platform,node_prep_yatra,node_quizzes,node_onboarding,node_techyatra,node_dsayatra,node_resume toneBlue
class node_admin_app,node_admin_content,node_admin_users,node_admin_engagement,node_admin_insights,node_mongo toneAmber
class node_api,node_api_admin,node_api_learning,node_payment_enrollment,node_enrollment_handlers,node_database toneMint
class node_shared_auth,node_shared_services,node_shared_components,node_shared_gamification toneRose
class node_learner_actor toneIndigo
```

## Components

### Learner products

- [Main platform](https://github.com/the-boring-education/tbe-web/tree/development/apps/platform): `apps/platform`
- [Prep Yatra](https://github.com/the-boring-education/tbe-web/tree/development/apps/dsayatra): `apps/dsayatra`
- [Quiz platform](https://github.com/the-boring-education/tbe-web/tree/development/apps/quizes): `apps/quizes`
- [Onboarding flow](https://github.com/the-boring-education/tbe-web/blob/development/apps/onboarding/src/App.tsx): `apps/onboarding/src/App.tsx`
- [Tech Yatra](https://github.com/the-boring-education/tbe-web/tree/development/apps/techyatra): `apps/techyatra`
- [DSA practice](https://github.com/the-boring-education/tbe-web/blob/development/apps/dsayatra/src/pages/revisions.tsx): `apps/dsayatra/src/pages/revisions.tsx`
- [Resume builder](https://github.com/the-boring-education/tbe-web/tree/development/apps/resources): `apps/resources`

### Admin operations

- [Admin console](https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/App.tsx): `apps/admin/src/App.tsx`
- [Content operations](https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/InterviewPrepPage.tsx): `apps/admin/src/pages/InterviewPrepPage.tsx`
- [User operations](https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/AdminsPage.tsx): `apps/admin/src/pages/AdminsPage.tsx`
- [Engagement operations](https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/ChallengesPage.tsx): `apps/admin/src/pages/ChallengesPage.tsx`
- [Analytics operations](https://github.com/the-boring-education/tbe-web/blob/development/apps/admin/src/pages/QuizzesPage.tsx): `apps/admin/src/pages/QuizzesPage.tsx`

### Central services

- [Central API](https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1): `apps/api/src/pages/api/v1`
- [Admin endpoints](https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1/admin): `apps/api/src/pages/api/v1/admin`
- [Learning endpoints](https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/pages/api/v1/interview-prep): `apps/api/src/pages/api/v1/interview-prep`
- [Payment enrollment](https://github.com/the-boring-education/tbe-web/blob/development/apps/api/src/lib/services/payment/enrollmentService.ts): `apps/api/src/lib/services/payment/enrollmentService.ts`
- [Enrollment handlers](https://github.com/the-boring-education/tbe-web/blob/development/apps/api/src/lib/services/payment/enrollmentHandlers.ts): `apps/api/src/lib/services/payment/enrollmentHandlers.ts`
- [MongoDB data layer](https://github.com/the-boring-education/tbe-web/tree/development/apps/api/src/lib/database): `apps/api/src/lib/database`

### Shared packages

- [Shared authentication](https://github.com/the-boring-education/tbe-web/blob/development/packages/auth/src/components/AuthProvider.tsx): `packages/auth/src/components/AuthProvider.tsx`
- [Shared API services](https://github.com/the-boring-education/tbe-web/blob/development/packages/services/src/client.ts): `packages/services/src/client.ts`
- [Shared components](https://github.com/the-boring-education/tbe-web/tree/development/packages/components): `packages/components`
- [Gamification hooks](https://github.com/the-boring-education/tbe-web/blob/development/packages/gamification/src/useGamifiedAction.ts): `packages/gamification/src/useGamifiedAction.ts`

### Other components

- **Learner**
- **MongoDB**

## Connections

- Learner → Main platform: uses (evidence: `README.md`)
- Learner → Prep Yatra: prepares with (evidence: `README.md`)
- Learner → Quiz platform: takes quizzes (evidence: `README.md`)
- Learner → Onboarding flow: registers through (evidence: `README.md`)
- Learner → Tech Yatra: learns with (evidence: `README.md`)
- Learner → DSA practice: practices with (evidence: `README.md`)
- Learner → Resume builder: builds resumes (evidence: `README.md`)
- Admin console → Content operations: routes to (evidence: `apps/admin/src/App.tsx`)
- Admin console → User operations: routes to (evidence: `apps/admin/src/App.tsx`)
- Admin console → Engagement operations: routes to (evidence: `apps/admin/src/App.tsx`)
- Admin console → Analytics operations: routes to (evidence: `apps/admin/src/App.tsx`)
- Main platform → Central API: uses API (evidence: `README.md`)
- Prep Yatra → Central API: uses API (evidence: `README.md`)
- Quiz platform → Central API: uses API (evidence: `README.md`)
- Onboarding flow → Central API: uses API (evidence: `README.md`)
- Tech Yatra → Central API: uses API (evidence: `README.md`)
- DSA practice → Central API: uses API (evidence: `README.md`)
- Resume builder → Central API: uses API (evidence: `README.md`)
- Admin console → Central API: uses API (evidence: `README.md`)
- Central API → MongoDB data layer: persists data (evidence: `README.md`)
- MongoDB data layer → MongoDB: reads and writes (evidence: `README.md`)
- Payment enrollment → Enrollment handlers: dispatches (evidence: `apps/api/src/lib/services/payment/enrollmentService.ts`)
- Enrollment handlers → MongoDB data layer: enrolls and updates (evidence: `apps/api/src/lib/services/payment/enrollmentHandlers.ts`)
- Content operations → Admin endpoints: uses endpoints
- Analytics operations → Admin endpoints: uses endpoints
- Learning endpoints → MongoDB data layer: uses data layer
