# anishadhikari7/gyan-garage architecture

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

- Interactive diagram: https://gitdiagram.com/anishadhikari7/gyan-garage
- Repository: https://github.com/anishadhikari7/gyan-garage

## Overview

Gyan Garage is a student-and-teacher learning workspace. Users enter through the Next.js pages, select role-aware learning areas, and manage homework, resources, quizzes, and study targets; quiz attempts have a dedicated runner. The sampled managers show Supabase-backed records and filtering, while role and onboarding state are stored in browser localStorage. The README is only a stock Next.js template, so it does not document product capabilities. Some feature routes and integrations are represented from the source index; unsampled behavior and links are omitted where evidence is limited.

Main entry points: [`src/lib/supabase.ts`](https://github.com/anishadhikari7/gyan-garage/blob/main/src/lib/supabase.ts) (Supabase client), [`src/app/dashboard/page.tsx`](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/page.tsx) (Role dashboard), [`src/components/quiz/quiz-manager.tsx`](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/quiz/quiz-manager.tsx) (Quiz manager), [`src/components/tools/study-tools-manager.tsx`](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/tools/study-tools-manager.tsx) (Study tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_home["Home<br/>[page.tsx]"]
  node_dashboard["Role dashboard<br/>[page.tsx]"]
  node_studentdash["Student dashboard<br/>[page.tsx]"]
  node_teacherdash["Teacher dashboard<br/>[page.tsx]"]
  node_profile["Profile<br/>[page.tsx]"]
  node_onboarding["Onboarding dialog"]
end

subgraph group_learning["Learning workflows"]
  node_homework["Homework manager"]
  node_resources["Resource library"]
  node_quizzes["Quiz manager<br/>[quiz-manager.tsx]"]
  node_attempt["Quiz attempt runner"]
  node_papers["Question papers<br/>[page.tsx]"]
end

subgraph group_planning["Planning and tools"]
  node_planner["Study planner"]
  node_tools["Study tools"]
  node_timer["Stopwatch and timer"]
end

subgraph group_shared["Shared services"]
  node_roles["Role and profile state<br/>[role-context.tsx]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
  node_database[("Supabase data store")]
  node_domain["Learning data types<br/>[database.ts]"]
  node_ui["Shared UI primitives"]
end

node_learner(("Learner or teacher"))

node_learner -->|"opens"| node_home
node_learner -->|"opens"| node_dashboard
node_dashboard -->|"routes to"| node_studentdash
node_dashboard -->|"routes to"| node_teacherdash
node_learner -->|"opens"| node_profile
node_roles -->|"controls"| node_onboarding
node_homework -->|"deletes records"| node_supabase
node_resources -->|"deletes records"| node_supabase
node_planner -->|"deletes tasks"| node_supabase
node_quizzes -->|"deletes quizzes"| node_supabase
node_supabase -->|"connects"| node_database
node_tools -->|"renders targets"| node_planner
node_tools -->|"renders tools"| node_timer
node_learner -.->|"manages work"| node_homework
node_learner -.->|"browses resources"| node_resources
node_learner -.->|"browses quizzes"| node_quizzes
node_quizzes -.->|"opens attempt"| node_attempt
node_learner -->|"opens papers"| node_papers

click node_home "https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/page.tsx"
click node_dashboard "https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/page.tsx"
click node_studentdash "https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/student/page.tsx"
click node_teacherdash "https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/teacher/page.tsx"
click node_profile "https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/profile/page.tsx"
click node_onboarding "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/onboarding/onboarding-dialog.tsx"
click node_roles "https://github.com/anishadhikari7/gyan-garage/blob/main/src/context/role-context.tsx"
click node_homework "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/homework/homework-manager.tsx"
click node_resources "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/resources/resource-manager.tsx"
click node_quizzes "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/quiz/quiz-manager.tsx"
click node_attempt "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/quiz/quiz-attempt-runner.tsx"
click node_papers "https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/question-papers/page.tsx"
click node_planner "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/planner/planner-manager.tsx"
click node_tools "https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/tools/study-tools-manager.tsx"
click node_timer "https://github.com/anishadhikari7/gyan-garage/tree/main/src/components/tools"
click node_supabase "https://github.com/anishadhikari7/gyan-garage/blob/main/src/lib/supabase.ts"
click node_domain "https://github.com/anishadhikari7/gyan-garage/blob/main/src/types/database.ts"
click node_ui "https://github.com/anishadhikari7/gyan-garage/tree/main/src/components/ui"

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_home,node_dashboard,node_studentdash,node_teacherdash,node_profile,node_onboarding toneBlue
class node_homework,node_resources,node_quizzes,node_attempt,node_papers toneAmber
class node_planner,node_tools,node_timer toneMint
class node_roles,node_supabase,node_database,node_domain,node_ui toneRose
class node_learner toneIndigo
```

## Components

### App entry

- [Home](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Role dashboard](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Student dashboard](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/student/page.tsx): `src/app/dashboard/student/page.tsx`
- [Teacher dashboard](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/dashboard/teacher/page.tsx): `src/app/dashboard/teacher/page.tsx`
- [Profile](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/profile/page.tsx): `src/app/profile/page.tsx`
- [Onboarding dialog](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/onboarding/onboarding-dialog.tsx): `src/components/onboarding/onboarding-dialog.tsx`

### Learning workflows

- [Homework manager](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/homework/homework-manager.tsx): `src/components/homework/homework-manager.tsx`
- [Resource library](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/resources/resource-manager.tsx): `src/components/resources/resource-manager.tsx`
- [Quiz manager](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/quiz/quiz-manager.tsx): `src/components/quiz/quiz-manager.tsx`
- [Quiz attempt runner](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/quiz/quiz-attempt-runner.tsx): `src/components/quiz/quiz-attempt-runner.tsx`
- [Question papers](https://github.com/anishadhikari7/gyan-garage/blob/main/src/app/question-papers/page.tsx): `src/app/question-papers/page.tsx`

### Planning and tools

- [Study planner](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/planner/planner-manager.tsx): `src/components/planner/planner-manager.tsx`
- [Study tools](https://github.com/anishadhikari7/gyan-garage/blob/main/src/components/tools/study-tools-manager.tsx): `src/components/tools/study-tools-manager.tsx`
- [Stopwatch and timer](https://github.com/anishadhikari7/gyan-garage/tree/main/src/components/tools): `src/components/tools`

### Shared services

- [Role and profile state](https://github.com/anishadhikari7/gyan-garage/blob/main/src/context/role-context.tsx): `src/context/role-context.tsx`
- [Supabase client](https://github.com/anishadhikari7/gyan-garage/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase data store**
- [Learning data types](https://github.com/anishadhikari7/gyan-garage/blob/main/src/types/database.ts): `src/types/database.ts`
- [Shared UI primitives](https://github.com/anishadhikari7/gyan-garage/tree/main/src/components/ui): `src/components/ui`

### Other components

- **Learner or teacher**

## Connections

- Learner or teacher → Home: opens (evidence: `src/app/page.tsx`)
- Learner or teacher → Role dashboard: opens (evidence: `src/app/dashboard/page.tsx`)
- Role dashboard → Student dashboard: routes to (evidence: `src/app/dashboard/page.tsx`)
- Role dashboard → Teacher dashboard: routes to (evidence: `src/app/dashboard/page.tsx`)
- Learner or teacher → Profile: opens (evidence: `src/app/profile/page.tsx`)
- Role and profile state → Onboarding dialog: controls (evidence: `src/components/onboarding/onboarding-dialog.tsx`)
- Homework manager → Supabase client: deletes records (evidence: `src/components/homework/homework-manager.tsx`)
- Resource library → Supabase client: deletes records (evidence: `src/components/resources/resource-manager.tsx`)
- Study planner → Supabase client: deletes tasks (evidence: `src/components/planner/planner-manager.tsx`)
- Quiz manager → Supabase client: deletes quizzes (evidence: `src/components/quiz/quiz-manager.tsx`)
- Supabase client → Supabase data store: connects (evidence: `src/lib/supabase.ts`)
- Study tools → Study planner: renders targets (evidence: `src/components/tools/study-tools-manager.tsx`)
- Study tools → Stopwatch and timer: renders tools (evidence: `src/components/tools/study-tools-manager.tsx`)
- Learner or teacher → Homework manager: manages work
- Learner or teacher → Resource library: browses resources
- Learner or teacher → Quiz manager: browses quizzes
- Quiz manager → Quiz attempt runner: opens attempt
- Learner or teacher → Question papers: opens papers (evidence: `src/app/question-papers/page.tsx`)
