# yeshwanthinis/portal architecture

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

- Interactive diagram: https://gitdiagram.com/yeshwanthinis/portal
- Repository: https://github.com/yeshwanthinis/portal

## Overview

LearnCert is a role-based learning and certification application for participants, trainers, and administrators. Participants browse learning content, track progress, take assessments or scheduled exams, and review results and certificates. Trainers manage learning topics, slides, question banks, and examinations, then review results and analytics; administrators oversee users, roles, activity, and audit records. The app routes these workflows through a shared React interface and Zustand store. The sampled code shows in-memory state and prototype OTP/AI behavior; no persistent backend or external service is evidenced.

Main entry points: [`src/App.tsx`](https://github.com/yeshwanthinis/portal/blob/main/src/App.tsx) (Route application), [`src/store/useStore.ts`](https://github.com/yeshwanthinis/portal/blob/main/src/store/useStore.ts) (Application state), [`src/pages/participant/Exam.tsx`](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Exam.tsx) (Assessments and exams), [`src/pages/auth/Login.tsx`](https://github.com/yeshwanthinis/portal/blob/main/src/pages/auth/Login.tsx) (Sign-in and OTP)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Route application<br/>[App.tsx]"]
  node_auth["Sign-in and OTP<br/>[Login.tsx]"]
  node_shell["Role workspace<br/>[AppShell.tsx]"]
end

subgraph group_participant["Participant learning"]
  node_p_learn["Learning and progress<br/>[LearningPortal.tsx]"]
  node_p_view["Topic viewer<br/>[Viewer.tsx]"]
  node_p_assess["Assessments and exams<br/>[Exam.tsx]"]
  node_p_results["Results and history<br/>[Result.tsx]"]
  node_p_events["Events and leaderboard<br/>[Events.tsx]"]
  node_p_certs["Certificates<br/>[Certs.tsx]"]
end

subgraph group_trainer["Trainer operations"]
  node_trainer_content["Topics and content<br/>[Builder.tsx]"]
  node_trainer_questions["Question bank<br/>[Bank.tsx]"]
  node_trainer_exams["Exam management<br/>[Exams.tsx]"]
  node_trainer_live["Live examination<br/>[Live.tsx]"]
  node_trainer_insights["Results and analytics<br/>[Analytics.tsx]"]
end

subgraph group_admin["Administration"]
  node_admin_users["Users and roles<br/>[Users.tsx]"]
  node_admin_audit["Audit and activity<br/>[Audit.tsx]"]
end

subgraph group_core["Shared runtime"]
  node_store["Application state<br/>[useStore.ts]"]
  node_engine["Exam grading engine<br/>[examEngine.ts]"]
  node_catalog["Learning catalogs<br/>[catalog.ts]"]
  node_questions["Question content<br/>[questions.ts]"]
  node_ai["AI learning panel<br/>[AIPanel.tsx]"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"routes sign-in"| node_auth
node_app -->|"routes workspace"| node_shell
node_app -->|"routes participant"| node_p_learn
node_app -->|"routes participant"| node_p_view
node_app -->|"routes participant"| node_p_assess
node_app -->|"routes participant"| node_p_results
node_app -->|"routes participant"| node_p_events
node_app -->|"routes participant"| node_p_certs
node_app -->|"routes trainer"| node_trainer_content
node_app -->|"routes trainer"| node_trainer_questions
node_app -->|"routes trainer"| node_trainer_exams
node_app -->|"routes trainer"| node_trainer_live
node_app -->|"routes trainer"| node_trainer_insights
node_app -->|"routes admin"| node_admin_users
node_app -->|"routes admin"| node_admin_audit
node_auth -->|"sets session"| node_store
node_shell -->|"reads state"| node_store
node_p_learn -->|"reads progress"| node_store
node_p_view -->|"updates progress"| node_store
node_p_assess -->|"manages attempt"| node_store
node_p_results -->|"reads attempts"| node_store
node_p_events -->|"joins events"| node_store
node_p_certs -->|"reads certificates"| node_store
node_trainer_content -->|"edits slides"| node_store
node_trainer_questions -->|"manages questions"| node_store
node_trainer_exams -->|"manages events"| node_store
node_trainer_live -->|"controls events"| node_store
node_trainer_insights -->|"reads outcomes"| node_store
node_admin_users -->|"manages users"| node_store
node_admin_audit -->|"reads audit"| node_store
node_store -->|"loads catalog"| node_catalog
node_store -->|"loads questions"| node_questions
node_p_assess -->|"grades answers"| node_engine
node_app -->|"mounts panel"| node_ai
node_ai -->|"sends queries"| node_store

click node_app "https://github.com/yeshwanthinis/portal/blob/main/src/App.tsx"
click node_auth "https://github.com/yeshwanthinis/portal/blob/main/src/pages/auth/Login.tsx"
click node_shell "https://github.com/yeshwanthinis/portal/blob/main/src/components/layout/AppShell.tsx"
click node_p_learn "https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/LearningPortal.tsx"
click node_p_view "https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Viewer.tsx"
click node_p_assess "https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Exam.tsx"
click node_p_results "https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Result.tsx"
click node_p_events "https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Events.tsx"
click node_p_certs "https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Certs.tsx"
click node_trainer_content "https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Builder.tsx"
click node_trainer_questions "https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Bank.tsx"
click node_trainer_exams "https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Exams.tsx"
click node_trainer_live "https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Live.tsx"
click node_trainer_insights "https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Analytics.tsx"
click node_admin_users "https://github.com/yeshwanthinis/portal/blob/main/src/pages/admin/Users.tsx"
click node_admin_audit "https://github.com/yeshwanthinis/portal/blob/main/src/pages/admin/Audit.tsx"
click node_store "https://github.com/yeshwanthinis/portal/blob/main/src/store/useStore.ts"
click node_engine "https://github.com/yeshwanthinis/portal/blob/main/src/lib/examEngine.ts"
click node_catalog "https://github.com/yeshwanthinis/portal/blob/main/src/data/catalog.ts"
click node_questions "https://github.com/yeshwanthinis/portal/blob/main/src/data/questions.ts"
click node_ai "https://github.com/yeshwanthinis/portal/blob/main/src/components/AIPanel.tsx"

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,node_shell,node_user toneBlue
class node_p_learn,node_p_view,node_p_assess,node_p_results,node_p_events,node_p_certs toneAmber
class node_trainer_content,node_trainer_questions,node_trainer_exams,node_trainer_live,node_trainer_insights toneMint
class node_admin_users,node_admin_audit toneRose
class node_store,node_engine,node_catalog,node_questions,node_ai toneIndigo
```

## Components

### Application entry

- [Route application](https://github.com/yeshwanthinis/portal/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in and OTP](https://github.com/yeshwanthinis/portal/blob/main/src/pages/auth/Login.tsx): `src/pages/auth/Login.tsx`
- [Role workspace](https://github.com/yeshwanthinis/portal/blob/main/src/components/layout/AppShell.tsx): `src/components/layout/AppShell.tsx`

### Participant learning

- [Learning and progress](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/LearningPortal.tsx): `src/pages/participant/LearningPortal.tsx`
- [Topic viewer](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Viewer.tsx): `src/pages/participant/Viewer.tsx`
- [Assessments and exams](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Exam.tsx): `src/pages/participant/Exam.tsx`
- [Results and history](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Result.tsx): `src/pages/participant/Result.tsx`
- [Events and leaderboard](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Events.tsx): `src/pages/participant/Events.tsx`
- [Certificates](https://github.com/yeshwanthinis/portal/blob/main/src/pages/participant/Certs.tsx): `src/pages/participant/Certs.tsx`

### Trainer operations

- [Topics and content](https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Builder.tsx): `src/pages/trainer/Builder.tsx`
- [Question bank](https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Bank.tsx): `src/pages/trainer/Bank.tsx`
- [Exam management](https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Exams.tsx): `src/pages/trainer/Exams.tsx`
- [Live examination](https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Live.tsx): `src/pages/trainer/Live.tsx`
- [Results and analytics](https://github.com/yeshwanthinis/portal/blob/main/src/pages/trainer/Analytics.tsx): `src/pages/trainer/Analytics.tsx`

### Administration

- [Users and roles](https://github.com/yeshwanthinis/portal/blob/main/src/pages/admin/Users.tsx): `src/pages/admin/Users.tsx`
- [Audit and activity](https://github.com/yeshwanthinis/portal/blob/main/src/pages/admin/Audit.tsx): `src/pages/admin/Audit.tsx`

### Shared runtime

- [Application state](https://github.com/yeshwanthinis/portal/blob/main/src/store/useStore.ts): `src/store/useStore.ts`
- [Exam grading engine](https://github.com/yeshwanthinis/portal/blob/main/src/lib/examEngine.ts): `src/lib/examEngine.ts`
- [Learning catalogs](https://github.com/yeshwanthinis/portal/blob/main/src/data/catalog.ts): `src/data/catalog.ts`
- [Question content](https://github.com/yeshwanthinis/portal/blob/main/src/data/questions.ts): `src/data/questions.ts`
- [AI learning panel](https://github.com/yeshwanthinis/portal/blob/main/src/components/AIPanel.tsx): `src/components/AIPanel.tsx`

### Other components

- **User**

## Connections

- User → Route application: opens
- Route application → Sign-in and OTP: routes sign-in
- Route application → Role workspace: routes workspace
- Route application → Learning and progress: routes participant
- Route application → Topic viewer: routes participant
- Route application → Assessments and exams: routes participant
- Route application → Results and history: routes participant
- Route application → Events and leaderboard: routes participant
- Route application → Certificates: routes participant
- Route application → Topics and content: routes trainer
- Route application → Question bank: routes trainer
- Route application → Exam management: routes trainer
- Route application → Live examination: routes trainer
- Route application → Results and analytics: routes trainer
- Route application → Users and roles: routes admin
- Route application → Audit and activity: routes admin
- Sign-in and OTP → Application state: sets session
- Role workspace → Application state: reads state
- Learning and progress → Application state: reads progress
- Topic viewer → Application state: updates progress
- Assessments and exams → Application state: manages attempt
- Results and history → Application state: reads attempts
- Events and leaderboard → Application state: joins events
- Certificates → Application state: reads certificates
- Topics and content → Application state: edits slides
- Question bank → Application state: manages questions
- Exam management → Application state: manages events
- Live examination → Application state: controls events
- Results and analytics → Application state: reads outcomes
- Users and roles → Application state: manages users
- Audit and activity → Application state: reads audit
- Application state → Learning catalogs: loads catalog
- Application state → Question content: loads questions
- Assessments and exams → Exam grading engine: grades answers
- Route application → AI learning panel: mounts panel
- AI learning panel → Application state: sends queries
