# virat991v/devscope architecture

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

- Interactive diagram: https://gitdiagram.com/virat991v/devscope
- Repository: https://github.com/virat991v/devscope

## Overview

DevScope is a student-development platform for faculty, students, and administrators, centered on tracking assignments and GitHub-backed evidence of student work. Users enter through the routed React app, authenticate or use demo personas, then work with academic, review, activity, and integration features. The typed service boundary selects demo data or a Supabase adapter; GitHub OAuth and webhook functions support the documented integration capability. Several feature-to-service links are supported by the SOURCE INDEX; implementation details for unsampled pages and function wiring remain uncertain.

Main entry points: [`src/App.tsx`](https://github.com/virat991v/devscope/blob/main/src/App.tsx) (Router and app), [`src/services/index.ts`](https://github.com/virat991v/devscope/blob/main/src/services/index.ts) (Typed service boundary), [`src/features/students/StudentWorkspace.tsx`](https://github.com/virat991v/devscope/blob/main/src/features/students/StudentWorkspace.tsx) (Student workspace), [`src/app/AuthContext.tsx`](https://github.com/virat991v/devscope/blob/main/src/app/AuthContext.tsx) (Session and profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Router and app<br/>[App.tsx]"]
  node_shell["Workspace shell<br/>[AppShell.tsx]"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
  node_guards["Route authorization<br/>[RouteGuards.tsx]"]
  node_demo["Demo persona switch<br/>[DemoSwitcher.tsx]"]
  node_notifications["Notifications"]
end

subgraph group_academics["Academic workflows"]
  node_students["Student directory and profile"]
  node_assignments["Assignments and evaluation"]
  node_classrooms["Classrooms and batches<br/>[ClassroomsPage.tsx]"]
  node_projects["Projects<br/>[ProjectsPage.tsx]"]
  node_admin["Administration<br/>[AdminPage.tsx]"]
end

subgraph group_insight["Activity and review"]
  node_faculty["Faculty overview"]
  node_workspace["Student workspace"]
  node_activity["Activity and streaks"]
  node_evidence["Submission evidence<br/>[EvidenceRail.tsx]"]
end

subgraph group_integrations["Identity and integrations"]
  node_authpages["Sign-in and enrollment<br/>[SignUpPage.tsx]"]
  node_authcallback["Auth callback"]
  node_auth["Session and profile<br/>[AuthContext.tsx]"]
  node_githubui["GitHub connection and approval"]
  node_githubservice["GitHub integration service<br/>[github.ts]"]
  node_oauthstart["GitHub OAuth start<br/>[index.ts]"]
  node_oauthcallback["GitHub OAuth callback<br/>[index.ts]"]
  node_webhook["Webhook ingestion<br/>[index.ts]"]
  node_jobprocess["Webhook job processing<br/>[index.ts]"]
  node_sync["GitHub sync<br/>[index.ts]"]
end

subgraph group_data["Services and data"]
  node_service["Typed service boundary<br/>[index.ts]"]
  node_adapter["Supabase adapter"]
  node_fixtures["Deterministic demo data<br/>[demo-data.ts]"]
  node_client["Supabase client<br/>[supabase.ts]"]
end

node_users(("Faculty, students, admins"))
node_supabase[("Supabase platform")]
node_github["GitHub"]

node_users -->|"use routes"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_authcallback
node_app -->|"routes to"| node_faculty
node_app -->|"routes to"| node_workspace
node_app -->|"routes to"| node_students
node_app -->|"routes to"| node_assignments
node_app -->|"routes to"| node_classrooms
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_notifications
node_app -->|"routes to"| node_admin
node_app -->|"renders"| node_shell
node_app -->|"provides auth"| node_auth
node_app -->|"guards routes"| node_guards
node_app -->|"renders switch"| node_demo
node_demo -->|"sets persona"| node_service
node_authcallback -->|"observes session"| node_auth
node_auth -->|"reads auth data"| node_client
node_faculty -->|"requests data"| node_service
node_workspace -->|"requests data"| node_service
node_workspace -->|"renders"| node_activity
node_workspace -->|"renders"| node_evidence
node_assignments -->|"requests data"| node_service
node_classrooms -->|"uses services"| node_service
node_projects -->|"requests data"| node_service
node_notifications -->|"requests data"| node_service
node_admin -->|"uses services"| node_service
node_githubui -->|"uses service"| node_githubservice
node_service -->|"serves demo data"| node_fixtures
node_service -->|"selects adapter"| node_adapter
node_adapter -->|"uses client"| node_client
node_auth -->|"authenticates and reads"| node_supabase
node_adapter -.->|"reads and writes"| node_supabase
node_githubservice -->|"uses client"| node_client
node_oauthstart -.->|"starts OAuth"| node_github
node_oauthcallback -.->|"completes OAuth"| node_github
node_webhook -.->|"queues work"| node_jobprocess
node_jobprocess -.->|"dispatches sync"| node_sync
node_sync -.->|"synchronizes repositories"| node_github

click node_app "https://github.com/virat991v/devscope/blob/main/src/App.tsx"
click node_shell "https://github.com/virat991v/devscope/blob/main/src/components/shared/AppShell.tsx"
click node_landing "https://github.com/virat991v/devscope/blob/main/src/features/landing/LandingPage.tsx"
click node_authpages "https://github.com/virat991v/devscope/blob/main/src/features/auth/SignUpPage.tsx"
click node_authcallback "https://github.com/virat991v/devscope/blob/main/src/features/auth/AuthCallbackPage.tsx"
click node_auth "https://github.com/virat991v/devscope/blob/main/src/app/AuthContext.tsx"
click node_guards "https://github.com/virat991v/devscope/blob/main/src/app/RouteGuards.tsx"
click node_demo "https://github.com/virat991v/devscope/blob/main/src/components/shared/DemoSwitcher.tsx"
click node_faculty "https://github.com/virat991v/devscope/blob/main/src/features/faculty/FacultyOverview.tsx"
click node_students "https://github.com/virat991v/devscope/blob/main/src/features/students/StudentDirectoryPage.tsx"
click node_workspace "https://github.com/virat991v/devscope/blob/main/src/features/students/StudentWorkspace.tsx"
click node_activity "https://github.com/virat991v/devscope/blob/main/src/features/activity/ActivityHeatmap.tsx"
click node_evidence "https://github.com/virat991v/devscope/blob/main/src/features/submissions/EvidenceRail.tsx"
click node_assignments "https://github.com/virat991v/devscope/blob/main/src/features/assignments/AssignmentDetailPage.tsx"
click node_classrooms "https://github.com/virat991v/devscope/blob/main/src/features/classrooms/ClassroomsPage.tsx"
click node_projects "https://github.com/virat991v/devscope/blob/main/src/features/projects/ProjectsPage.tsx"
click node_notifications "https://github.com/virat991v/devscope/blob/main/src/features/notifications/NotificationsPage.tsx"
click node_admin "https://github.com/virat991v/devscope/blob/main/src/features/admin/AdminPage.tsx"
click node_githubui "https://github.com/virat991v/devscope/blob/main/src/features/github/RepositoryApprovalPanel.tsx"
click node_githubservice "https://github.com/virat991v/devscope/blob/main/src/services/github.ts"
click node_oauthstart "https://github.com/virat991v/devscope/blob/main/supabase/functions/github-start-oauth/index.ts"
click node_oauthcallback "https://github.com/virat991v/devscope/blob/main/supabase/functions/github-oauth-callback/index.ts"
click node_webhook "https://github.com/virat991v/devscope/blob/main/supabase/functions/github-webhook/index.ts"
click node_jobprocess "https://github.com/virat991v/devscope/blob/main/supabase/functions/process-webhook-jobs/index.ts"
click node_sync "https://github.com/virat991v/devscope/blob/main/supabase/functions/github-sync/index.ts"
click node_service "https://github.com/virat991v/devscope/blob/main/src/services/index.ts"
click node_adapter "https://github.com/virat991v/devscope/blob/main/src/services/supabase-adapter.ts"
click node_fixtures "https://github.com/virat991v/devscope/blob/main/src/lib/demo-data.ts"
click node_client "https://github.com/virat991v/devscope/blob/main/src/lib/supabase.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_shell,node_landing,node_guards,node_demo,node_notifications toneBlue
class node_students,node_assignments,node_classrooms,node_projects,node_admin,node_supabase toneAmber
class node_faculty,node_workspace,node_activity,node_evidence toneMint
class node_authpages,node_authcallback,node_auth,node_githubui,node_githubservice,node_oauthstart,node_oauthcallback,node_webhook,node_jobprocess,node_sync toneRose
class node_service,node_adapter,node_fixtures,node_client,node_users,node_github toneIndigo
```

## Components

### Application shell

- [Router and app](https://github.com/virat991v/devscope/blob/main/src/App.tsx): `src/App.tsx`
- [Workspace shell](https://github.com/virat991v/devscope/blob/main/src/components/shared/AppShell.tsx): `src/components/shared/AppShell.tsx`
- [Landing page](https://github.com/virat991v/devscope/blob/main/src/features/landing/LandingPage.tsx): `src/features/landing/LandingPage.tsx`
- [Route authorization](https://github.com/virat991v/devscope/blob/main/src/app/RouteGuards.tsx): `src/app/RouteGuards.tsx`
- [Demo persona switch](https://github.com/virat991v/devscope/blob/main/src/components/shared/DemoSwitcher.tsx): `src/components/shared/DemoSwitcher.tsx`
- [Notifications](https://github.com/virat991v/devscope/blob/main/src/features/notifications/NotificationsPage.tsx): `src/features/notifications/NotificationsPage.tsx`

### Academic workflows

- [Student directory and profile](https://github.com/virat991v/devscope/blob/main/src/features/students/StudentDirectoryPage.tsx): `src/features/students/StudentDirectoryPage.tsx`
- [Assignments and evaluation](https://github.com/virat991v/devscope/blob/main/src/features/assignments/AssignmentDetailPage.tsx): `src/features/assignments/AssignmentDetailPage.tsx`
- [Classrooms and batches](https://github.com/virat991v/devscope/blob/main/src/features/classrooms/ClassroomsPage.tsx): `src/features/classrooms/ClassroomsPage.tsx`
- [Projects](https://github.com/virat991v/devscope/blob/main/src/features/projects/ProjectsPage.tsx): `src/features/projects/ProjectsPage.tsx`
- [Administration](https://github.com/virat991v/devscope/blob/main/src/features/admin/AdminPage.tsx): `src/features/admin/AdminPage.tsx`

### Activity and review

- [Faculty overview](https://github.com/virat991v/devscope/blob/main/src/features/faculty/FacultyOverview.tsx): `src/features/faculty/FacultyOverview.tsx`
- [Student workspace](https://github.com/virat991v/devscope/blob/main/src/features/students/StudentWorkspace.tsx): `src/features/students/StudentWorkspace.tsx`
- [Activity and streaks](https://github.com/virat991v/devscope/blob/main/src/features/activity/ActivityHeatmap.tsx): `src/features/activity/ActivityHeatmap.tsx`
- [Submission evidence](https://github.com/virat991v/devscope/blob/main/src/features/submissions/EvidenceRail.tsx): `src/features/submissions/EvidenceRail.tsx`

### Identity and integrations

- [Sign-in and enrollment](https://github.com/virat991v/devscope/blob/main/src/features/auth/SignUpPage.tsx): `src/features/auth/SignUpPage.tsx`
- [Auth callback](https://github.com/virat991v/devscope/blob/main/src/features/auth/AuthCallbackPage.tsx): `src/features/auth/AuthCallbackPage.tsx`
- [Session and profile](https://github.com/virat991v/devscope/blob/main/src/app/AuthContext.tsx): `src/app/AuthContext.tsx`
- [GitHub connection and approval](https://github.com/virat991v/devscope/blob/main/src/features/github/RepositoryApprovalPanel.tsx): `src/features/github/RepositoryApprovalPanel.tsx`
- [GitHub integration service](https://github.com/virat991v/devscope/blob/main/src/services/github.ts): `src/services/github.ts`
- [GitHub OAuth start](https://github.com/virat991v/devscope/blob/main/supabase/functions/github-start-oauth/index.ts): `supabase/functions/github-start-oauth/index.ts`
- [GitHub OAuth callback](https://github.com/virat991v/devscope/blob/main/supabase/functions/github-oauth-callback/index.ts): `supabase/functions/github-oauth-callback/index.ts`
- [Webhook ingestion](https://github.com/virat991v/devscope/blob/main/supabase/functions/github-webhook/index.ts): `supabase/functions/github-webhook/index.ts`
- [Webhook job processing](https://github.com/virat991v/devscope/blob/main/supabase/functions/process-webhook-jobs/index.ts): `supabase/functions/process-webhook-jobs/index.ts`
- [GitHub sync](https://github.com/virat991v/devscope/blob/main/supabase/functions/github-sync/index.ts): `supabase/functions/github-sync/index.ts`

### Services and data

- [Typed service boundary](https://github.com/virat991v/devscope/blob/main/src/services/index.ts): `src/services/index.ts`
- [Supabase adapter](https://github.com/virat991v/devscope/blob/main/src/services/supabase-adapter.ts): `src/services/supabase-adapter.ts`
- [Deterministic demo data](https://github.com/virat991v/devscope/blob/main/src/lib/demo-data.ts): `src/lib/demo-data.ts`
- [Supabase client](https://github.com/virat991v/devscope/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **Faculty, students, admins**
- **Supabase platform**
- **GitHub**

## Connections

- Faculty, students, admins → Router and app: use routes (evidence: `src/App.tsx`)
- Router and app → Landing page: routes to (evidence: `src/App.tsx`)
- Router and app → Sign-in and enrollment: routes to (evidence: `src/App.tsx`)
- Router and app → Auth callback: routes to (evidence: `src/App.tsx`)
- Router and app → Faculty overview: routes to (evidence: `src/App.tsx`)
- Router and app → Student workspace: routes to (evidence: `src/App.tsx`)
- Router and app → Student directory and profile: routes to (evidence: `src/App.tsx`)
- Router and app → Assignments and evaluation: routes to (evidence: `src/App.tsx`)
- Router and app → Classrooms and batches: routes to (evidence: `src/App.tsx`)
- Router and app → Projects: routes to (evidence: `src/App.tsx`)
- Router and app → Notifications: routes to (evidence: `src/App.tsx`)
- Router and app → Administration: routes to (evidence: `src/App.tsx`)
- Router and app → Workspace shell: renders (evidence: `src/App.tsx`)
- Router and app → Session and profile: provides auth (evidence: `src/App.tsx`)
- Router and app → Route authorization: guards routes (evidence: `src/App.tsx`)
- Router and app → Demo persona switch: renders switch (evidence: `src/App.tsx`)
- Demo persona switch → Typed service boundary: sets persona (evidence: `src/App.tsx`)
- Auth callback → Session and profile: observes session (evidence: `src/features/auth/AuthCallbackPage.tsx`)
- Session and profile → Supabase client: reads auth data (evidence: `src/app/AuthContext.tsx`)
- Faculty overview → Typed service boundary: requests data (evidence: `src/features/faculty/FacultyOverview.tsx`)
- Student workspace → Typed service boundary: requests data (evidence: `src/features/students/StudentWorkspace.tsx`)
- Student workspace → Activity and streaks: renders (evidence: `src/features/students/StudentWorkspace.tsx`)
- Student workspace → Submission evidence: renders (evidence: `src/features/students/StudentWorkspace.tsx`)
- Assignments and evaluation → Typed service boundary: requests data (evidence: `src/features/assignments/AssignmentDetailPage.tsx`)
- Classrooms and batches → Typed service boundary: uses services
- Projects → Typed service boundary: requests data (evidence: `src/features/projects/ProjectsPage.tsx`)
- Notifications → Typed service boundary: requests data (evidence: `src/features/notifications/NotificationsPage.tsx`)
- Administration → Typed service boundary: uses services (evidence: `src/features/admin/AdminPage.tsx`)
- GitHub connection and approval → GitHub integration service: uses service (evidence: `src/features/github/RepositoryApprovalPanel.tsx`)
- Typed service boundary → Deterministic demo data: serves demo data (evidence: `src/services/index.ts`)
- Typed service boundary → Supabase adapter: selects adapter (evidence: `src/services/index.ts`)
- Supabase adapter → Supabase client: uses client (evidence: `src/services/supabase-adapter.ts`)
- Session and profile → Supabase platform: authenticates and reads (evidence: `src/app/AuthContext.tsx`)
- Supabase adapter → Supabase platform: reads and writes
- GitHub integration service → Supabase client: uses client (evidence: `src/services/github.ts`)
- GitHub OAuth start → GitHub: starts OAuth
- GitHub OAuth callback → GitHub: completes OAuth
- Webhook ingestion → Webhook job processing: queues work
- Webhook job processing → GitHub sync: dispatches sync
- GitHub sync → GitHub: synchronizes repositories
