# praveenkumar1819/soc_c_2 architecture

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

- Interactive diagram: https://gitdiagram.com/praveenkumar1819/soc_c_2
- Repository: https://github.com/praveenkumar1819/soc_c_2

## Overview

SOC Analyst L1 is an interactive certification-learning platform: learners browse modules and topics, study lessons and visual stories, complete checks and investigation labs, and earn tracked progress and XP. Administrators manage users, curriculum, badges, and analytics. The map includes the V2 content engines, SOC dashboard lab, admin and persistence branches, and a smaller authentication layer. Edges are limited to relationships visible in excerpts or README statements; unsampled feature wiring is not inferred.

Main entry points: [`src/lib/db.ts`](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/db.ts) (Application database), [`src/app/(dashboard)/modules/page.tsx`](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(dashboard)/modules/page.tsx) (Module browsing), [`src/components/learning/topic-learning.tsx`](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/topic-learning.tsx) (Unit learning), [`src/components/labs/CourseLabLauncher.tsx`](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/labs/CourseLabLauncher.tsx) (Lab launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_module_browse["Module browsing<br/>[page.tsx]"]
  node_curriculum["Curriculum content"]
  node_course_units["Course units<br/>[module-04-units.ts]"]
  node_unit_learning["Unit learning<br/>[topic-learning.tsx]"]
  node_visual_stories["Visual story engine"]
  node_animated_lessons["Animated lessons"]
  node_knowledge_checks["Knowledge checks"]
  node_drag_check["Sequencing check"]
end

subgraph group_labs["Investigation labs"]
  node_lab_launcher["Lab launcher"]
  node_soc_lab["SOC dashboard lab"]
  node_lab_state["Lab state and scoring"]
end

subgraph group_accounts["Accounts and progress"]
  node_progress_page["Progress views<br/>[page.tsx]"]
  node_progress_api["Progress API<br/>[route.ts]"]
  node_xp_api["XP and badges<br/>[route.ts]"]
  node_auth_pages["Login and registration<br/>[page.tsx]"]
  node_register_api["Registration API<br/>[route.ts]"]
  node_auth_layer["Credentials authentication<br/>[auth.ts]"]
  node_database[("Application database<br/>[db.ts]")]
end

subgraph group_admin["Administration"]
  node_admin_pages["Admin dashboard<br/>[page.tsx]"]
  node_admin_api["Admin metrics API<br/>[route.ts]"]
  node_curriculum_admin["Curriculum editing API<br/>[route.ts]"]
  node_curriculum_store["Curriculum store"]
end

node_learner(("Learner"))
node_admin_user(("Administrator"))

node_learner -->|"browses modules"| node_module_browse
node_module_browse -.->|"presents curriculum"| node_curriculum
node_learner -->|"studies lessons"| node_unit_learning
node_unit_learning -.->|"uses unit content"| node_course_units
node_learner -->|"views diagrams"| node_visual_stories
node_learner -->|"views lessons"| node_animated_lessons
node_learner -->|"answers checks"| node_knowledge_checks
node_drag_check -->|"awards local XP"| node_learner
node_learner -->|"opens labs"| node_lab_launcher
node_lab_launcher -.->|"launches lab"| node_soc_lab
node_soc_lab -.->|"uses state hook"| node_lab_state
node_lab_state -.->|"reports result"| node_learner
node_learner -->|"views progress"| node_progress_page
node_progress_api -->|"reads and writes"| node_database
node_xp_api -->|"records XP and badges"| node_database
node_auth_pages -.->|"registers account"| node_register_api
node_register_api -->|"creates user"| node_database
node_auth_layer -->|"checks credentials"| node_database
node_admin_user -->|"manages platform"| node_admin_pages
node_admin_pages -.->|"loads metrics"| node_admin_api
node_admin_api -->|"queries metrics"| node_database
node_admin_user -->|"edits curriculum"| node_curriculum_admin
node_curriculum_admin -->|"delegates storage"| node_curriculum_store

click node_module_browse "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(dashboard)/modules/page.tsx"
click node_curriculum "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/data/curriculum-v2-data.ts"
click node_course_units "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/data/modules/module-04-units.ts"
click node_unit_learning "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/topic-learning.tsx"
click node_visual_stories "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/v2/interactive-visual-story-engine.tsx"
click node_animated_lessons "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/v2/chapter-animated-video-engine.tsx"
click node_knowledge_checks "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/knowledge-check.tsx"
click node_drag_check "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/drag-drop-check.tsx"
click node_lab_launcher "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/labs/CourseLabLauncher.tsx"
click node_soc_lab "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/labs/soc-dashboard/components/SocDashboardContainer.tsx"
click node_lab_state "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/labs/soc-dashboard/hooks/useSocDashboardState.ts"
click node_progress_page "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(dashboard)/progress/page.tsx"
click node_progress_api "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/progress/route.ts"
click node_xp_api "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/progress/xp/route.ts"
click node_auth_pages "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(auth)/login/page.tsx"
click node_register_api "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/auth/register/route.ts"
click node_auth_layer "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/auth.ts"
click node_database "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/db.ts"
click node_admin_pages "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(admin)/admin/page.tsx"
click node_admin_api "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/admin/route.ts"
click node_curriculum_admin "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/admin/curriculum/chapter/route.ts"
click node_curriculum_store "https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/curriculum-store.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_module_browse,node_curriculum,node_course_units,node_unit_learning,node_visual_stories,node_animated_lessons,node_knowledge_checks,node_drag_check toneBlue
class node_lab_launcher,node_soc_lab,node_lab_state toneAmber
class node_progress_page,node_progress_api,node_xp_api,node_auth_pages,node_register_api,node_auth_layer,node_database toneMint
class node_admin_pages,node_admin_api,node_curriculum_admin,node_curriculum_store toneRose
class node_learner,node_admin_user toneIndigo
```

## Components

### Learning experience

- [Module browsing](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(dashboard)/modules/page.tsx): `src/app/(dashboard)/modules/page.tsx`
- [Curriculum content](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/data/curriculum-v2-data.ts): `src/data/curriculum-v2-data.ts`
- [Course units](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/data/modules/module-04-units.ts): `src/data/modules/module-04-units.ts`
- [Unit learning](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/topic-learning.tsx): `src/components/learning/topic-learning.tsx`
- [Visual story engine](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/v2/interactive-visual-story-engine.tsx): `src/components/learning/v2/interactive-visual-story-engine.tsx`
- [Animated lessons](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/v2/chapter-animated-video-engine.tsx): `src/components/learning/v2/chapter-animated-video-engine.tsx`
- [Knowledge checks](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/knowledge-check.tsx): `src/components/learning/knowledge-check.tsx`
- [Sequencing check](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/learning/drag-drop-check.tsx): `src/components/learning/drag-drop-check.tsx`

### Investigation labs

- [Lab launcher](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/components/labs/CourseLabLauncher.tsx): `src/components/labs/CourseLabLauncher.tsx`
- [SOC dashboard lab](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/labs/soc-dashboard/components/SocDashboardContainer.tsx): `src/labs/soc-dashboard/components/SocDashboardContainer.tsx`
- [Lab state and scoring](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/labs/soc-dashboard/hooks/useSocDashboardState.ts): `src/labs/soc-dashboard/hooks/useSocDashboardState.ts`

### Accounts and progress

- [Progress views](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(dashboard)/progress/page.tsx): `src/app/(dashboard)/progress/page.tsx`
- [Progress API](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/progress/route.ts): `src/app/api/progress/route.ts`
- [XP and badges](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/progress/xp/route.ts): `src/app/api/progress/xp/route.ts`
- [Login and registration](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [Registration API](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/auth/register/route.ts): `src/app/api/auth/register/route.ts`
- [Credentials authentication](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Application database](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/db.ts): `src/lib/db.ts`

### Administration

- [Admin dashboard](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/(admin)/admin/page.tsx): `src/app/(admin)/admin/page.tsx`
- [Admin metrics API](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/admin/route.ts): `src/app/api/admin/route.ts`
- [Curriculum editing API](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/app/api/admin/curriculum/chapter/route.ts): `src/app/api/admin/curriculum/chapter/route.ts`
- [Curriculum store](https://github.com/praveenkumar1819/soc_c_2/blob/main/src/lib/curriculum-store.ts): `src/lib/curriculum-store.ts`

### Other components

- **Learner**
- **Administrator**

## Connections

- Learner → Module browsing: browses modules
- Module browsing → Curriculum content: presents curriculum
- Learner → Unit learning: studies lessons
- Unit learning → Course units: uses unit content
- Learner → Visual story engine: views diagrams
- Learner → Animated lessons: views lessons
- Learner → Knowledge checks: answers checks
- Sequencing check → Learner: awards local XP (evidence: `src/components/learning/drag-drop-check.tsx`)
- Learner → Lab launcher: opens labs
- Lab launcher → SOC dashboard lab: launches lab
- SOC dashboard lab → Lab state and scoring: uses state hook
- Lab state and scoring → Learner: reports result
- Learner → Progress views: views progress
- Progress API → Application database: reads and writes (evidence: `src/app/api/progress/route.ts`)
- XP and badges → Application database: records XP and badges (evidence: `src/app/api/progress/xp/route.ts`)
- Login and registration → Registration API: registers account
- Registration API → Application database: creates user (evidence: `src/app/api/auth/register/route.ts`)
- Credentials authentication → Application database: checks credentials (evidence: `src/lib/auth.ts`)
- Administrator → Admin dashboard: manages platform
- Admin dashboard → Admin metrics API: loads metrics
- Admin metrics API → Application database: queries metrics (evidence: `src/app/api/admin/route.ts`)
- Administrator → Curriculum editing API: edits curriculum
- Curriculum editing API → Curriculum store: delegates storage (evidence: `src/app/api/admin/curriculum/chapter/route.ts`)
