# yaswantpandey/yaswant-code architecture

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

- Interactive diagram: https://gitdiagram.com/yaswantpandey/yaswant-code
- Repository: https://github.com/yaswantpandey/yaswant-code

## Overview

Yaswant Code is an engineering-education platform combining an LMS, developer resources and tools, student collaboration, and Google Workspace services. The main user journey runs from public course discovery through enrollment and lesson progress to assessment and certification; separate branches support administration, notes and projects, and cohort communication. The React app routes views and shares LMS state, while Firebase and PHP-backed APIs provide documented persistence and platform services. Several backend and page implementations are not sampled, so their internal wiring is shown only where the tree or excerpts support it.

Main entry points: [`src/App.tsx`](https://github.com/yaswantpandey/yaswant-code/blob/main/src/App.tsx) (App shell), [`src/context/LmsContext.tsx`](https://github.com/yaswantpandey/yaswant-code/blob/main/src/context/LmsContext.tsx) (LMS state), [`src/views/CourseDiscoveryPage.tsx`](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseDiscoveryPage.tsx) (Course discovery), [`src/views/CourseLearningPage.tsx`](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseLearningPage.tsx) (Lesson player)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning Platform"]
  node_app["App shell<br/>[App.tsx]"]
  node_lms["LMS state<br/>[LmsContext.tsx]"]
  node_catalog["Course discovery"]
  node_course["Course details"]
  node_player["Lesson player"]
  node_assessment["Quizzes<br/>[QuizPage.tsx]"]
  node_certificate["Certificates"]
  node_studentdash["Student dashboard"]
  node_admin["Admin console"]
  node_adminauth["Admin sign-in<br/>[AdminAuthGate.tsx]"]
  node_search["Global search<br/>[SearchModal.tsx]"]
end

subgraph group_engagement["Student Services"]
  node_resources["Learning paths"]
  node_tools["Developer tools<br/>[ToolsPage.tsx]"]
  node_notes["Study notes<br/>[NotesPage.tsx]"]
  node_projects["Capstone projects<br/>[ProjectsPage.tsx]"]
  node_community["Community<br/>[CommunityPage.tsx]"]
end

subgraph group_integrations["Cloud Integrations"]
  node_workspace["Workspace hub"]
  node_workspacecontext["Workspace state"]
  node_googleclient["Google API client<br/>[googleWorkspace.ts]"]
  node_firebaseauth["Firebase auth<br/>[firebaseAuth.ts]"]
  node_firebasedb["Firestore services<br/>[firebaseDb.ts]"]
end

subgraph group_server["Server APIs"]
  node_api["PHP API endpoints"]
  node_api_client["API service<br/>[api.ts]"]
  node_admin_endpoint["Auth endpoint<br/>[auth.php]"]
  node_mysql_backend["Enrollment API<br/>[enrollments.php]"]
end

node_learner(("Learner"))
node_google{{"Google Workspace"}}
node_firestore[("Firestore")]
node_mysql[("MySQL database")]

node_learner -->|"uses"| node_app
node_app -->|"provides state"| node_lms
node_app -->|"renders"| node_catalog
node_app -->|"renders"| node_course
node_app -->|"renders"| node_player
node_app -->|"renders"| node_assessment
node_app -->|"renders"| node_certificate
node_app -->|"renders"| node_studentdash
node_app -->|"renders"| node_admin
node_app -->|"renders"| node_adminauth
node_app -->|"renders"| node_search
node_learner -->|"discovers courses"| node_catalog
node_catalog -->|"opens course"| node_course
node_learner -->|"studies"| node_player
node_lms -->|"tracks progress"| node_player
node_learner -->|"takes quiz"| node_assessment
node_learner -->|"views credentials"| node_certificate
node_learner -->|"checks progress"| node_studentdash
node_learner -->|"explores paths"| node_resources
node_learner -->|"uses tools"| node_tools
node_learner -->|"writes notes"| node_notes
node_learner -->|"submits work"| node_projects
node_learner -->|"joins discussions"| node_community
node_learner -->|"uses workspace"| node_workspace
node_workspace -->|"uses state"| node_workspacecontext
node_workspacecontext -->|"calls"| node_googleclient
node_googleclient -.->|"accesses Drive Calendar Chat Gmail"| node_google
node_lms -->|"syncs enrollment progress"| node_firebaseauth
node_firebaseauth -.->|"persists"| node_firebasedb
node_firebasedb -.->|"reads writes"| node_firestore
node_adminauth -->|"logs in"| node_admin_endpoint
node_api_client -.->|"requests"| node_api
node_mysql_backend -->|"queries"| node_mysql

click node_app "https://github.com/yaswantpandey/yaswant-code/blob/main/src/App.tsx"
click node_lms "https://github.com/yaswantpandey/yaswant-code/blob/main/src/context/LmsContext.tsx"
click node_catalog "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseDiscoveryPage.tsx"
click node_course "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseDetailsPage.tsx"
click node_player "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseLearningPage.tsx"
click node_assessment "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/QuizPage.tsx"
click node_certificate "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CertificatePage.tsx"
click node_studentdash "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/StudentDashboardPage.tsx"
click node_admin "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/AdminDashboardPage.tsx"
click node_adminauth "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/AdminAuthGate.tsx"
click node_search "https://github.com/yaswantpandey/yaswant-code/blob/main/src/components/ui/SearchModal.tsx"
click node_resources "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/LearningPathsPage.tsx"
click node_tools "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/ToolsPage.tsx"
click node_notes "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/NotesPage.tsx"
click node_projects "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/ProjectsPage.tsx"
click node_community "https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CommunityPage.tsx"
click node_workspace "https://github.com/yaswantpandey/yaswant-code/blob/main/src/components/workspace/GoogleWorkspaceHub.tsx"
click node_workspacecontext "https://github.com/yaswantpandey/yaswant-code/blob/main/src/context/WorkspaceContext.tsx"
click node_googleclient "https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/googleWorkspace.ts"
click node_firebaseauth "https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/firebaseAuth.ts"
click node_firebasedb "https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/firebaseDb.ts"
click node_api "https://github.com/yaswantpandey/yaswant-code/tree/main/public/api"
click node_api_client "https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/api.ts"
click node_admin_endpoint "https://github.com/yaswantpandey/yaswant-code/blob/main/public/api/auth.php"
click node_mysql_backend "https://github.com/yaswantpandey/yaswant-code/blob/main/backend/api/enrollments.php"

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_lms,node_catalog,node_course,node_player,node_assessment,node_certificate,node_studentdash,node_admin,node_adminauth,node_search toneBlue
class node_resources,node_tools,node_notes,node_projects,node_community,node_firestore,node_mysql toneAmber
class node_workspace,node_workspacecontext,node_googleclient,node_firebaseauth,node_firebasedb toneMint
class node_api,node_api_client,node_admin_endpoint,node_mysql_backend toneRose
class node_learner,node_google toneIndigo
```

## Components

### Learning Platform

- [App shell](https://github.com/yaswantpandey/yaswant-code/blob/main/src/App.tsx): `src/App.tsx`
- [LMS state](https://github.com/yaswantpandey/yaswant-code/blob/main/src/context/LmsContext.tsx): `src/context/LmsContext.tsx`
- [Course discovery](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseDiscoveryPage.tsx): `src/views/CourseDiscoveryPage.tsx`
- [Course details](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseDetailsPage.tsx): `src/views/CourseDetailsPage.tsx`
- [Lesson player](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CourseLearningPage.tsx): `src/views/CourseLearningPage.tsx`
- [Quizzes](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/QuizPage.tsx): `src/views/QuizPage.tsx`
- [Certificates](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CertificatePage.tsx): `src/views/CertificatePage.tsx`
- [Student dashboard](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/StudentDashboardPage.tsx): `src/views/StudentDashboardPage.tsx`
- [Admin console](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/AdminDashboardPage.tsx): `src/views/AdminDashboardPage.tsx`
- [Admin sign-in](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/AdminAuthGate.tsx): `src/views/AdminAuthGate.tsx`
- [Global search](https://github.com/yaswantpandey/yaswant-code/blob/main/src/components/ui/SearchModal.tsx): `src/components/ui/SearchModal.tsx`

### Student Services

- [Learning paths](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/LearningPathsPage.tsx): `src/views/LearningPathsPage.tsx`
- [Developer tools](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/ToolsPage.tsx): `src/views/ToolsPage.tsx`
- [Study notes](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/NotesPage.tsx): `src/views/NotesPage.tsx`
- [Capstone projects](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/ProjectsPage.tsx): `src/views/ProjectsPage.tsx`
- [Community](https://github.com/yaswantpandey/yaswant-code/blob/main/src/views/CommunityPage.tsx): `src/views/CommunityPage.tsx`

### Cloud Integrations

- [Workspace hub](https://github.com/yaswantpandey/yaswant-code/blob/main/src/components/workspace/GoogleWorkspaceHub.tsx): `src/components/workspace/GoogleWorkspaceHub.tsx`
- [Workspace state](https://github.com/yaswantpandey/yaswant-code/blob/main/src/context/WorkspaceContext.tsx): `src/context/WorkspaceContext.tsx`
- [Google API client](https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/googleWorkspace.ts): `src/services/googleWorkspace.ts`
- [Firebase auth](https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/firebaseAuth.ts): `src/services/firebaseAuth.ts`
- [Firestore services](https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/firebaseDb.ts): `src/services/firebaseDb.ts`

### Server APIs

- [PHP API endpoints](https://github.com/yaswantpandey/yaswant-code/tree/main/public/api): `public/api`
- [API service](https://github.com/yaswantpandey/yaswant-code/blob/main/src/services/api.ts): `src/services/api.ts`
- [Auth endpoint](https://github.com/yaswantpandey/yaswant-code/blob/main/public/api/auth.php): `public/api/auth.php`
- [Enrollment API](https://github.com/yaswantpandey/yaswant-code/blob/main/backend/api/enrollments.php): `backend/api/enrollments.php`

### Other components

- **Learner**
- **Google Workspace**
- **Firestore**
- **MySQL database**

## Connections

- Learner → App shell: uses
- App shell → LMS state: provides state
- App shell → Course discovery: renders
- App shell → Course details: renders
- App shell → Lesson player: renders
- App shell → Quizzes: renders
- App shell → Certificates: renders
- App shell → Student dashboard: renders
- App shell → Admin console: renders
- App shell → Admin sign-in: renders
- App shell → Global search: renders
- Learner → Course discovery: discovers courses
- Course discovery → Course details: opens course
- Learner → Lesson player: studies
- LMS state → Lesson player: tracks progress
- Learner → Quizzes: takes quiz
- Learner → Certificates: views credentials
- Learner → Student dashboard: checks progress
- Learner → Learning paths: explores paths
- Learner → Developer tools: uses tools
- Learner → Study notes: writes notes
- Learner → Capstone projects: submits work
- Learner → Community: joins discussions
- Learner → Workspace hub: uses workspace
- Workspace hub → Workspace state: uses state
- Workspace state → Google API client: calls
- Google API client → Google Workspace: accesses Drive Calendar Chat Gmail
- LMS state → Firebase auth: syncs enrollment progress
- Firebase auth → Firestore services: persists
- Firestore services → Firestore: reads writes
- Admin sign-in → Auth endpoint: logs in
- API service → PHP API endpoints: requests
- Enrollment API → MySQL database: queries
