# g-ganesh83/si-sheet architecture

> Architecture diagram of the GitHub repository g-ganesh83/si-sheet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/g-ganesh83/si-sheet
- Repository: https://github.com/g-ganesh83/si-sheet

## Overview

SI Sheet is a cloud-synchronized DSA problem tracker. Users browse a shared, topic- and lab-organized catalog, inspect problems, and—when signed in—record status, revision flags, and notes that synchronize through Supabase. The graph follows App’s documented view dispatch and the sampled tracker-to-progress-service persistence path. README capabilities include administrative catalog editing/import and engagement analytics; some backend links are documented but their client invocation paths were not sampled.

Main entry points: [`src/App.tsx`](https://github.com/g-ganesh83/si-sheet/blob/main/src/App.tsx) (App Router), [`src/context/TrackerContext.tsx`](https://github.com/g-ganesh83/si-sheet/blob/main/src/context/TrackerContext.tsx) (Progress State), [`src/services/adminService.ts`](https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminService.ts) (Admin Service), [`src/services/progressService.ts`](https://github.com/g-ganesh83/si-sheet/blob/main/src/services/progressService.ts) (Progress Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Practice Workspaces"]
  node_app["App Router<br/>[App.tsx]"]
  node_layout["App Layout<br/>[AppLayout.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardView.tsx]"]
  node_problems["Problem Catalog View<br/>[ProblemsView.tsx]"]
  node_topics["Topic Workspace<br/>[TopicsView.tsx]"]
  node_labs["Lab Schedule<br/>[LabsView.tsx]"]
  node_revision["Revision Queue<br/>[RevisionView.tsx]"]
  node_drawer["Problem Details<br/>[ProblemDrawer.tsx]"]
end

subgraph group_state["Identity and State"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_tracker["Progress State<br/>[TrackerContext.tsx]"]
end

subgraph group_data["Catalog and Persistence"]
  node_problem_data["Problem Dataset<br/>[problems.ts]"]
  node_progress["Progress Service<br/>[progressService.ts]"]
  node_supabase[("Supabase")]
end

subgraph group_admin["Administration"]
  node_import_view["Catalog Import<br/>[ImportView.tsx]"]
  node_import_parser["Import Validation<br/>[importer.ts]"]
  node_import_service["Import Service"]
  node_edit_service["Problem Editing"]
  node_users["User Administration<br/>[UsersView.tsx]"]
  node_admin_service["Admin Service<br/>[adminService.ts]"]
  node_footer["Click Analytics"]
  node_admin_functions["Admin Edge Functions<br/>[index.ts]"]
  node_edit_function["Edit Edge Function<br/>[index.ts]"]
  node_users_function["Users Edge Function<br/>[index.ts]"]
  node_click_function["Click Edge Functions<br/>[index.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"provides tracking"| node_tracker
node_app -->|"renders"| node_layout
node_app -->|"dispatches"| node_dashboard
node_app -->|"dispatches"| node_problems
node_app -->|"dispatches"| node_topics
node_app -->|"dispatches"| node_labs
node_app -->|"dispatches"| node_revision
node_app -->|"dispatches"| node_import_view
node_app -->|"dispatches"| node_users
node_app -->|"dispatches"| node_footer
node_layout -->|"renders"| node_drawer
node_dashboard -->|"reads state"| node_tracker
node_problems -->|"reads state"| node_tracker
node_topics -->|"reads state"| node_tracker
node_labs -->|"reads state"| node_tracker
node_revision -->|"reads state"| node_tracker
node_drawer -->|"updates progress"| node_tracker
node_auth -->|"authenticates"| node_supabase
node_tracker -->|"loads and saves"| node_progress
node_progress -->|"reads and writes"| node_supabase
node_progress -->|"resolves catalog entries"| node_problem_data
node_tracker -->|"uses catalog"| node_problem_data
node_import_view -->|"validates entries"| node_import_parser
node_import_view -->|"submits import"| node_import_service
node_import_service -->|"invokes backend"| node_supabase
node_edit_service -->|"invokes backend"| node_supabase
node_users -->|"loads accounts"| node_admin_service
node_footer -->|"loads analytics"| node_admin_service
node_admin_service -->|"queries and invokes"| node_supabase
node_import_service -.->|"routes import"| node_admin_functions
node_edit_service -.->|"routes edits"| node_edit_function
node_admin_service -->|"routes user requests"| node_users_function
node_admin_service -->|"records clicks"| node_click_function

click node_app "https://github.com/g-ganesh83/si-sheet/blob/main/src/App.tsx"
click node_layout "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/layout/AppLayout.tsx"
click node_dashboard "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/dashboard/DashboardView.tsx"
click node_problems "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/problems/ProblemsView.tsx"
click node_topics "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/topics/TopicsView.tsx"
click node_labs "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/labs/LabsView.tsx"
click node_revision "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/revision/RevisionView.tsx"
click node_drawer "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/common/ProblemDrawer.tsx"
click node_auth "https://github.com/g-ganesh83/si-sheet/blob/main/src/context/AuthContext.tsx"
click node_tracker "https://github.com/g-ganesh83/si-sheet/blob/main/src/context/TrackerContext.tsx"
click node_problem_data "https://github.com/g-ganesh83/si-sheet/blob/main/src/data/problems.ts"
click node_progress "https://github.com/g-ganesh83/si-sheet/blob/main/src/services/progressService.ts"
click node_import_view "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/import/ImportView.tsx"
click node_import_parser "https://github.com/g-ganesh83/si-sheet/blob/main/src/data/importer.ts"
click node_import_service "https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminImportService.ts"
click node_edit_service "https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminEditService.ts"
click node_users "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/admin/UsersView.tsx"
click node_admin_service "https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminService.ts"
click node_footer "https://github.com/g-ganesh83/si-sheet/blob/main/src/components/admin/FooterClicksView.tsx"
click node_admin_functions "https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/admin-import/index.ts"
click node_edit_function "https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/admin-edit-problem/index.ts"
click node_users_function "https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/admin-users/index.ts"
click node_click_function "https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/record-footer-click/index.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_app,node_layout,node_dashboard,node_problems,node_topics,node_labs,node_revision,node_drawer toneBlue
class node_auth,node_tracker toneAmber
class node_problem_data,node_progress,node_supabase toneMint
class node_import_view,node_import_parser,node_import_service,node_edit_service,node_users,node_admin_service,node_footer,node_admin_functions,node_edit_function,node_users_function,node_click_function toneRose
class node_learner toneIndigo
```

## Components

### Practice Workspaces

- [App Router](https://github.com/g-ganesh83/si-sheet/blob/main/src/App.tsx): `src/App.tsx`
- [App Layout](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/layout/AppLayout.tsx): `src/components/layout/AppLayout.tsx`
- [Dashboard](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/dashboard/DashboardView.tsx): `src/components/dashboard/DashboardView.tsx`
- [Problem Catalog View](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/problems/ProblemsView.tsx): `src/components/problems/ProblemsView.tsx`
- [Topic Workspace](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/topics/TopicsView.tsx): `src/components/topics/TopicsView.tsx`
- [Lab Schedule](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/labs/LabsView.tsx): `src/components/labs/LabsView.tsx`
- [Revision Queue](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/revision/RevisionView.tsx): `src/components/revision/RevisionView.tsx`
- [Problem Details](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/common/ProblemDrawer.tsx): `src/components/common/ProblemDrawer.tsx`

### Identity and State

- [Authentication](https://github.com/g-ganesh83/si-sheet/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Progress State](https://github.com/g-ganesh83/si-sheet/blob/main/src/context/TrackerContext.tsx): `src/context/TrackerContext.tsx`

### Catalog and Persistence

- [Problem Dataset](https://github.com/g-ganesh83/si-sheet/blob/main/src/data/problems.ts): `src/data/problems.ts`
- [Progress Service](https://github.com/g-ganesh83/si-sheet/blob/main/src/services/progressService.ts): `src/services/progressService.ts`
- **Supabase**

### Administration

- [Catalog Import](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/import/ImportView.tsx): `src/components/import/ImportView.tsx`
- [Import Validation](https://github.com/g-ganesh83/si-sheet/blob/main/src/data/importer.ts): `src/data/importer.ts`
- [Import Service](https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminImportService.ts): `src/services/adminImportService.ts`
- [Problem Editing](https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminEditService.ts): `src/services/adminEditService.ts`
- [User Administration](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/admin/UsersView.tsx): `src/components/admin/UsersView.tsx`
- [Admin Service](https://github.com/g-ganesh83/si-sheet/blob/main/src/services/adminService.ts): `src/services/adminService.ts`
- [Click Analytics](https://github.com/g-ganesh83/si-sheet/blob/main/src/components/admin/FooterClicksView.tsx): `src/components/admin/FooterClicksView.tsx`
- [Admin Edge Functions](https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/admin-import/index.ts): `supabase/functions/admin-import/index.ts`
- [Edit Edge Function](https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/admin-edit-problem/index.ts): `supabase/functions/admin-edit-problem/index.ts`
- [Users Edge Function](https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/admin-users/index.ts): `supabase/functions/admin-users/index.ts`
- [Click Edge Functions](https://github.com/g-ganesh83/si-sheet/blob/main/supabase/functions/record-footer-click/index.ts): `supabase/functions/record-footer-click/index.ts`

### Other components

- **Learner**

## Connections

- Learner → App Router: uses
- App Router → Authentication: provides auth (evidence: `src/App.tsx`)
- App Router → Progress State: provides tracking (evidence: `src/App.tsx`)
- App Router → App Layout: renders (evidence: `src/App.tsx`)
- App Router → Dashboard: dispatches (evidence: `src/App.tsx`)
- App Router → Problem Catalog View: dispatches (evidence: `src/App.tsx`)
- App Router → Topic Workspace: dispatches (evidence: `src/App.tsx`)
- App Router → Lab Schedule: dispatches (evidence: `src/App.tsx`)
- App Router → Revision Queue: dispatches (evidence: `src/App.tsx`)
- App Router → Catalog Import: dispatches (evidence: `src/App.tsx`)
- App Router → User Administration: dispatches (evidence: `src/App.tsx`)
- App Router → Click Analytics: dispatches (evidence: `src/App.tsx`)
- App Layout → Problem Details: renders (evidence: `src/components/layout/AppLayout.tsx`)
- Dashboard → Progress State: reads state (evidence: `src/components/dashboard/DashboardView.tsx`)
- Problem Catalog View → Progress State: reads state (evidence: `src/components/problems/ProblemsView.tsx`)
- Topic Workspace → Progress State: reads state (evidence: `src/components/topics/TopicsView.tsx`)
- Lab Schedule → Progress State: reads state (evidence: `src/components/labs/LabsView.tsx`)
- Revision Queue → Progress State: reads state (evidence: `src/components/revision/RevisionView.tsx`)
- Problem Details → Progress State: updates progress (evidence: `src/components/common/ProblemDrawer.tsx`)
- Authentication → Supabase: authenticates (evidence: `src/context/AuthContext.tsx`)
- Progress State → Progress Service: loads and saves (evidence: `src/context/TrackerContext.tsx`)
- Progress Service → Supabase: reads and writes (evidence: `src/services/progressService.ts`)
- Progress Service → Problem Dataset: resolves catalog entries (evidence: `src/services/progressService.ts`)
- Progress State → Problem Dataset: uses catalog (evidence: `src/context/TrackerContext.tsx`)
- Catalog Import → Import Validation: validates entries (evidence: `src/components/import/ImportView.tsx`)
- Catalog Import → Import Service: submits import (evidence: `src/components/import/ImportView.tsx`)
- Import Service → Supabase: invokes backend (evidence: `src/services/adminImportService.ts`)
- Problem Editing → Supabase: invokes backend (evidence: `src/services/adminEditService.ts`)
- User Administration → Admin Service: loads accounts (evidence: `src/components/admin/UsersView.tsx`)
- Click Analytics → Admin Service: loads analytics (evidence: `src/components/admin/FooterClicksView.tsx`)
- Admin Service → Supabase: queries and invokes (evidence: `src/services/adminService.ts`)
- Import Service → Admin Edge Functions: routes import
- Problem Editing → Edit Edge Function: routes edits
- Admin Service → Users Edge Function: routes user requests (evidence: `src/services/adminService.ts`)
- Admin Service → Click Edge Functions: records clicks (evidence: `src/services/adminService.ts`)
