# foundation50/classroom50 architecture

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

- Interactive diagram: https://gitdiagram.com/foundation50/classroom50
- Repository: https://github.com/foundation50/classroom50

## Overview

Classroom 50 manages GitHub-backed programming classrooms through teacher and student CLI extensions and a web frontend. The user workflow spans sign-in, classroom and roster setup, assignment creation, student acceptance and submission, then grading and feedback; teacher tools also support teams, organization policy, downloads, and teardown. The graph preserves these documented capabilities, while grouping unsampled CLI and web subsystems at their listed directories. Source evidence is sparse for many runtime links, so only relationships visible in excerpts or the README are drawn.

Main entry points: [`web/src/main.tsx`](https://github.com/foundation50/classroom50/blob/main/web/src/main.tsx) (Web application), [`web/src/auth/useGithubAuth.tsx`](https://github.com/foundation50/classroom50/blob/main/web/src/auth/useGithubAuth.tsx) (GitHub sign-in), [`cli/gh-teacher/main.go`](https://github.com/foundation50/classroom50/blob/main/cli/gh-teacher/main.go) (Teacher CLI), [`cli/gh-student/main.go`](https://github.com/foundation50/classroom50/blob/main/cli/gh-student/main.go) (Student CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI extensions"]
  node_teacher["Teacher CLI<br/>[main.go]"]
  node_student["Student CLI<br/>[main.go]"]
  node_shared["CLI shared services<br/>[contract.go]"]
end

subgraph group_web["Web application"]
  node_webapp["Web application<br/>[main.tsx]"]
  node_auth["GitHub sign-in<br/>[useGithubAuth.tsx]"]
  node_authstore[("Auth session storage<br/>[storage.ts]")]
  node_githubprovider["GitHub client context"]
  node_classrooms["Classroom management"]
  node_roster["Roster and enrollment"]
  node_assignments["Assignment lifecycle"]
  node_groups["Group management<br/>[GroupsManager.tsx]"]
  node_submissions["Submissions and scores"]
  node_orgadmin["Organization administration"]
  node_activity["Action activity tracking"]
  node_configrepo["Classroom config data<br/>[configRepoWrite.ts]"]
end

subgraph group_core["GitHub integration"]
  node_userapi["User validation<br/>[github-user-api.ts]"]
  node_githubcore["GitHub API operations<br/>[client.ts]"]
end

node_teacher_user(("Teacher"))
node_student_user(("Student"))
node_github[("GitHub")]

node_teacher_user -->|"runs commands"| node_teacher
node_student_user -->|"runs commands"| node_student
node_teacher_user -->|"manages classroom"| node_webapp
node_student_user -->|"uses classroom"| node_webapp
node_webapp -->|"provides sign-in"| node_auth
node_auth -->|"validates user"| node_userapi
node_auth -->|"persists token"| node_authstore
node_webapp -->|"provides client"| node_githubprovider
node_githubprovider -->|"reads auth state"| node_auth
node_teacher -.->|"manages assignments"| node_github
node_student -.->|"submits work"| node_github
node_webapp -.->|"manages via GitHub"| node_github
node_webapp -->|"tracks actions"| node_activity
node_groups -.->|"records actions"| node_activity

click node_teacher "https://github.com/foundation50/classroom50/blob/main/cli/gh-teacher/main.go"
click node_student "https://github.com/foundation50/classroom50/blob/main/cli/gh-student/main.go"
click node_shared "https://github.com/foundation50/classroom50/blob/main/cli/shared/contract/contract.go"
click node_webapp "https://github.com/foundation50/classroom50/blob/main/web/src/main.tsx"
click node_auth "https://github.com/foundation50/classroom50/blob/main/web/src/auth/useGithubAuth.tsx"
click node_userapi "https://github.com/foundation50/classroom50/blob/main/web/src/auth/github-user-api.ts"
click node_authstore "https://github.com/foundation50/classroom50/blob/main/web/src/auth/storage.ts"
click node_githubprovider "https://github.com/foundation50/classroom50/blob/main/web/src/context/github/GitHubClientProviderFromAuth.tsx"
click node_classrooms "https://github.com/foundation50/classroom50/tree/main/web/src/domain/classrooms"
click node_roster "https://github.com/foundation50/classroom50/tree/main/web/src/domain/students"
click node_assignments "https://github.com/foundation50/classroom50/tree/main/web/src/domain/assignments"
click node_groups "https://github.com/foundation50/classroom50/blob/main/web/src/pages/manageGroups/GroupsManager.tsx"
click node_submissions "https://github.com/foundation50/classroom50/tree/main/web/src/domain/submissions"
click node_orgadmin "https://github.com/foundation50/classroom50/tree/main/web/src/domain/orgMembers"
click node_activity "https://github.com/foundation50/classroom50/blob/main/web/src/context/actions/ActionActivityProvider.tsx"
click node_githubcore "https://github.com/foundation50/classroom50/blob/main/web/src/github-core/client.ts"
click node_configrepo "https://github.com/foundation50/classroom50/blob/main/web/src/domain/configRepoWrite.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_teacher,node_student,node_shared toneBlue
class node_webapp,node_auth,node_authstore,node_githubprovider,node_classrooms,node_roster,node_assignments,node_groups,node_submissions,node_orgadmin,node_activity,node_configrepo,node_github toneAmber
class node_userapi,node_githubcore toneMint
class node_teacher_user,node_student_user toneIndigo
```

## Components

### CLI extensions

- [Teacher CLI](https://github.com/foundation50/classroom50/blob/main/cli/gh-teacher/main.go): `cli/gh-teacher/main.go`
- [Student CLI](https://github.com/foundation50/classroom50/blob/main/cli/gh-student/main.go): `cli/gh-student/main.go`
- [CLI shared services](https://github.com/foundation50/classroom50/blob/main/cli/shared/contract/contract.go): `cli/shared/contract/contract.go`

### Web application

- [Web application](https://github.com/foundation50/classroom50/blob/main/web/src/main.tsx): `web/src/main.tsx`
- [GitHub sign-in](https://github.com/foundation50/classroom50/blob/main/web/src/auth/useGithubAuth.tsx): `web/src/auth/useGithubAuth.tsx`
- [Auth session storage](https://github.com/foundation50/classroom50/blob/main/web/src/auth/storage.ts): `web/src/auth/storage.ts`
- [GitHub client context](https://github.com/foundation50/classroom50/blob/main/web/src/context/github/GitHubClientProviderFromAuth.tsx): `web/src/context/github/GitHubClientProviderFromAuth.tsx`
- [Classroom management](https://github.com/foundation50/classroom50/tree/main/web/src/domain/classrooms): `web/src/domain/classrooms`
- [Roster and enrollment](https://github.com/foundation50/classroom50/tree/main/web/src/domain/students): `web/src/domain/students`
- [Assignment lifecycle](https://github.com/foundation50/classroom50/tree/main/web/src/domain/assignments): `web/src/domain/assignments`
- [Group management](https://github.com/foundation50/classroom50/blob/main/web/src/pages/manageGroups/GroupsManager.tsx): `web/src/pages/manageGroups/GroupsManager.tsx`
- [Submissions and scores](https://github.com/foundation50/classroom50/tree/main/web/src/domain/submissions): `web/src/domain/submissions`
- [Organization administration](https://github.com/foundation50/classroom50/tree/main/web/src/domain/orgMembers): `web/src/domain/orgMembers`
- [Action activity tracking](https://github.com/foundation50/classroom50/blob/main/web/src/context/actions/ActionActivityProvider.tsx): `web/src/context/actions/ActionActivityProvider.tsx`
- [Classroom config data](https://github.com/foundation50/classroom50/blob/main/web/src/domain/configRepoWrite.ts): `web/src/domain/configRepoWrite.ts`

### GitHub integration

- [User validation](https://github.com/foundation50/classroom50/blob/main/web/src/auth/github-user-api.ts): `web/src/auth/github-user-api.ts`
- [GitHub API operations](https://github.com/foundation50/classroom50/blob/main/web/src/github-core/client.ts): `web/src/github-core/client.ts`

### Other components

- **Teacher**
- **Student**
- **GitHub**

## Connections

- Teacher → Teacher CLI: runs commands
- Student → Student CLI: runs commands
- Teacher → Web application: manages classroom
- Student → Web application: uses classroom
- Web application → GitHub sign-in: provides sign-in (evidence: `web/src/main.tsx`)
- GitHub sign-in → User validation: validates user (evidence: `web/src/auth/useGithubAuth.tsx`)
- GitHub sign-in → Auth session storage: persists token (evidence: `web/src/auth/useGithubAuth.tsx`)
- Web application → GitHub client context: provides client (evidence: `web/src/main.tsx`)
- GitHub client context → GitHub sign-in: reads auth state (evidence: `web/src/context/github/GitHubClientProviderFromAuth.tsx`)
- Teacher CLI → GitHub: manages assignments
- Student CLI → GitHub: submits work
- Web application → GitHub: manages via GitHub
- Web application → Action activity tracking: tracks actions (evidence: `web/src/main.tsx`)
- Group management → Action activity tracking: records actions
