# synakr/shiny-robot architecture

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

- Interactive diagram: https://gitdiagram.com/synakr/shiny-robot
- Repository: https://github.com/synakr/shiny-robot

## Overview

Teacher App is a coaching-institute management app with teacher and student portals. Students apply for admission, then access batch-targeted learning materials, assignments, announcements, and tests; teachers manage admissions, batches, students, and learning content. The sampled task screen calls the student-task service, which queries Supabase; the admission form calls its service. README-documented capabilities are included, but most routes and service implementations were not sampled, so their internal links are shown as unverified where needed.

Main entry points: [`src/app/student/(tabs)/tasks.tsx`](https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/tasks.tsx) (Assigned Tasks), [`src/app/student/videos.tsx`](https://github.com/synakr/shiny-robot/blob/main/src/app/student/videos.tsx) (Video Playlists), [`src/app/auth`](https://github.com/synakr/shiny-robot/tree/main/src/app/auth) (Sign-in and Roles), [`src/lib/supabase.ts`](https://github.com/synakr/shiny-robot/blob/main/src/lib/supabase.ts) (Supabase Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Admissions"]
  node_admission_form["Admission Application<br/>[admission.tsx]"]
  node_auth_routes["Sign-in and Roles"]
  node_auth_state["Session State<br/>[authStore.ts]"]
end

subgraph group_teacher["Teacher Management"]
  node_admissions["Admission Review<br/>[admissions.tsx]"]
  node_students["Student Records<br/>[students.tsx]"]
  node_batches["Batch Management<br/>[batches.tsx]"]
  node_teacher_tasks["Task Creation<br/>[create-task.tsx]"]
  node_teacher_announcements["Announcements"]
  node_teacher_notes["Notes Sharing<br/>[create-notes.tsx]"]
  node_teacher_tests["Test Management<br/>[create-test.tsx]"]
end

subgraph group_learning["Student Learning"]
  node_student_home["Student Home<br/>[home.tsx]"]
  node_student_announcements["Announcement Feed"]
  node_student_notes["Notes and Materials<br/>[notes.tsx]"]
  node_student_tasks["Assigned Tasks<br/>[tasks.tsx]"]
  node_task_card["Task Card<br/>[TaskCard.tsx]"]
  node_task_details["Task Details<br/>[task-details.tsx]"]
  node_student_tests["Test Taking<br/>[attempt-test.tsx]"]
  node_test_review["Test Review<br/>[test-review.tsx]"]
  node_videos["Video Playlists<br/>[videos.tsx]"]
  node_video_player["Video Playback<br/>[video-player.tsx]"]
end

subgraph group_platform["Data and Integrations"]
  node_student_task_service["Student Task Queries<br/>[student-tasks.ts]"]
  node_admission_service["Admission Service<br/>[admissions.ts]"]
  node_supabase_client["Supabase Client<br/>[supabase.ts]"]
  node_supabase[("Supabase")]
  node_cloud_storage[("Cloud Storage")]
  node_youtube["YouTube"]
end

node_student(("Student"))
node_teacher_actor(("Teacher"))

node_student -->|"signs in"| node_auth_routes
node_teacher_actor -->|"signs in"| node_auth_routes
node_student -->|"applies"| node_admission_form
node_admission_form -->|"submits request"| node_admission_service
node_admission_service -.->|"uses client"| node_supabase_client
node_auth_routes -.->|"stores session"| node_auth_state
node_teacher_actor -->|"reviews requests"| node_admissions
node_admissions -->|"enrolls approved"| node_students
node_teacher_actor -->|"manages"| node_students
node_teacher_actor -->|"manages"| node_batches
node_teacher_actor -->|"creates assignments"| node_teacher_tasks
node_teacher_actor -->|"broadcasts"| node_teacher_announcements
node_teacher_actor -->|"shares materials"| node_teacher_notes
node_teacher_actor -.->|"creates tests"| node_teacher_tests
node_student -->|"views portal"| node_student_home
node_student -->|"views updates"| node_student_announcements
node_student -->|"accesses notes"| node_student_notes
node_student -->|"views assignments"| node_student_tasks
node_student_tasks -->|"loads tasks"| node_student_task_service
node_student_tasks -->|"renders"| node_task_card
node_student_tasks -->|"opens details"| node_task_details
node_student_task_service -->|"queries tasks"| node_supabase_client
node_supabase_client -.->|"connects"| node_supabase
node_student -.->|"takes tests"| node_student_tests
node_student -.->|"reviews results"| node_test_review
node_student -.->|"views playlists"| node_videos
node_videos -.->|"opens video"| node_video_player
node_teacher_notes -.->|"stores materials"| node_cloud_storage
node_videos -.->|"plays videos"| node_youtube

click node_admission_form "https://github.com/synakr/shiny-robot/blob/main/src/app/auth/admission.tsx"
click node_auth_routes "https://github.com/synakr/shiny-robot/tree/main/src/app/auth"
click node_auth_state "https://github.com/synakr/shiny-robot/blob/main/src/store/authStore.ts"
click node_admissions "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/admissions.tsx"
click node_students "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/(tabs)/students.tsx"
click node_batches "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/(tabs)/batches.tsx"
click node_teacher_tasks "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-task.tsx"
click node_teacher_announcements "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-announcement.tsx"
click node_teacher_notes "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-notes.tsx"
click node_teacher_tests "https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-test.tsx"
click node_student_home "https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/home.tsx"
click node_student_announcements "https://github.com/synakr/shiny-robot/blob/main/src/app/student/announcement-details.tsx"
click node_student_notes "https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/notes.tsx"
click node_student_tasks "https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/tasks.tsx"
click node_task_card "https://github.com/synakr/shiny-robot/blob/main/src/components/TaskCard.tsx"
click node_task_details "https://github.com/synakr/shiny-robot/blob/main/src/app/student/task-details.tsx"
click node_student_tests "https://github.com/synakr/shiny-robot/blob/main/src/app/student/attempt-test.tsx"
click node_test_review "https://github.com/synakr/shiny-robot/blob/main/src/app/student/test-review.tsx"
click node_videos "https://github.com/synakr/shiny-robot/blob/main/src/app/student/videos.tsx"
click node_video_player "https://github.com/synakr/shiny-robot/blob/main/src/app/student/video-player.tsx"
click node_student_task_service "https://github.com/synakr/shiny-robot/blob/main/src/services/student-tasks.ts"
click node_admission_service "https://github.com/synakr/shiny-robot/blob/main/src/services/admissions.ts"
click node_supabase_client "https://github.com/synakr/shiny-robot/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_admission_form,node_auth_routes,node_auth_state toneBlue
class node_admissions,node_students,node_batches,node_teacher_tasks,node_teacher_announcements,node_teacher_notes,node_teacher_tests toneAmber
class node_student_home,node_student_announcements,node_student_notes,node_student_tasks,node_task_card,node_task_details,node_student_tests,node_test_review,node_videos,node_video_player toneMint
class node_student_task_service,node_admission_service,node_supabase_client,node_supabase,node_cloud_storage,node_youtube toneRose
class node_student,node_teacher_actor toneIndigo
```

## Components

### Access and Admissions

- [Admission Application](https://github.com/synakr/shiny-robot/blob/main/src/app/auth/admission.tsx): `src/app/auth/admission.tsx`
- [Sign-in and Roles](https://github.com/synakr/shiny-robot/tree/main/src/app/auth): `src/app/auth`
- [Session State](https://github.com/synakr/shiny-robot/blob/main/src/store/authStore.ts): `src/store/authStore.ts`

### Teacher Management

- [Admission Review](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/admissions.tsx): `src/app/teacher/admissions.tsx`
- [Student Records](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/(tabs)/students.tsx): `src/app/teacher/(tabs)/students.tsx`
- [Batch Management](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/(tabs)/batches.tsx): `src/app/teacher/(tabs)/batches.tsx`
- [Task Creation](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-task.tsx): `src/app/teacher/create-task.tsx`
- [Announcements](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-announcement.tsx): `src/app/teacher/create-announcement.tsx`
- [Notes Sharing](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-notes.tsx): `src/app/teacher/create-notes.tsx`
- [Test Management](https://github.com/synakr/shiny-robot/blob/main/src/app/teacher/create-test.tsx): `src/app/teacher/create-test.tsx`

### Student Learning

- [Student Home](https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/home.tsx): `src/app/student/(tabs)/home.tsx`
- [Announcement Feed](https://github.com/synakr/shiny-robot/blob/main/src/app/student/announcement-details.tsx): `src/app/student/announcement-details.tsx`
- [Notes and Materials](https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/notes.tsx): `src/app/student/(tabs)/notes.tsx`
- [Assigned Tasks](https://github.com/synakr/shiny-robot/blob/main/src/app/student/(tabs)/tasks.tsx): `src/app/student/(tabs)/tasks.tsx`
- [Task Card](https://github.com/synakr/shiny-robot/blob/main/src/components/TaskCard.tsx): `src/components/TaskCard.tsx`
- [Task Details](https://github.com/synakr/shiny-robot/blob/main/src/app/student/task-details.tsx): `src/app/student/task-details.tsx`
- [Test Taking](https://github.com/synakr/shiny-robot/blob/main/src/app/student/attempt-test.tsx): `src/app/student/attempt-test.tsx`
- [Test Review](https://github.com/synakr/shiny-robot/blob/main/src/app/student/test-review.tsx): `src/app/student/test-review.tsx`
- [Video Playlists](https://github.com/synakr/shiny-robot/blob/main/src/app/student/videos.tsx): `src/app/student/videos.tsx`
- [Video Playback](https://github.com/synakr/shiny-robot/blob/main/src/app/student/video-player.tsx): `src/app/student/video-player.tsx`

### Data and Integrations

- [Student Task Queries](https://github.com/synakr/shiny-robot/blob/main/src/services/student-tasks.ts): `src/services/student-tasks.ts`
- [Admission Service](https://github.com/synakr/shiny-robot/blob/main/src/services/admissions.ts): `src/services/admissions.ts`
- [Supabase Client](https://github.com/synakr/shiny-robot/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase**
- **Cloud Storage**
- **YouTube**

### Other components

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

## Connections

- Student → Sign-in and Roles: signs in
- Teacher → Sign-in and Roles: signs in
- Student → Admission Application: applies
- Admission Application → Admission Service: submits request (evidence: `src/app/auth/admission.tsx`)
- Admission Service → Supabase Client: uses client
- Sign-in and Roles → Session State: stores session
- Teacher → Admission Review: reviews requests
- Admission Review → Student Records: enrolls approved
- Teacher → Student Records: manages
- Teacher → Batch Management: manages
- Teacher → Task Creation: creates assignments
- Teacher → Announcements: broadcasts
- Teacher → Notes Sharing: shares materials
- Teacher → Test Management: creates tests
- Student → Student Home: views portal
- Student → Announcement Feed: views updates
- Student → Notes and Materials: accesses notes
- Student → Assigned Tasks: views assignments
- Assigned Tasks → Student Task Queries: loads tasks (evidence: `src/app/student/(tabs)/tasks.tsx`)
- Assigned Tasks → Task Card: renders (evidence: `src/app/student/(tabs)/tasks.tsx`)
- Assigned Tasks → Task Details: opens details (evidence: `src/app/student/(tabs)/tasks.tsx`)
- Student Task Queries → Supabase Client: queries tasks (evidence: `src/services/student-tasks.ts`)
- Supabase Client → Supabase: connects
- Student → Test Taking: takes tests
- Student → Test Review: reviews results
- Student → Video Playlists: views playlists
- Video Playlists → Video Playback: opens video
- Notes Sharing → Cloud Storage: stores materials
- Video Playlists → YouTube: plays videos
