# vinayshankar121/little-rose-path architecture

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

- Interactive diagram: https://gitdiagram.com/vinayshankar121/little-rose-path
- Repository: https://github.com/vinayshankar121/little-rose-path

## Overview

Little Rose High School is a role-based school portal for administrators, teachers, parents, and drivers. Users sign in, enter an authenticated role-aware workspace, and use its route pages for school administration, teaching, family services, and transport. Supabase supplies application data and authentication; the tree also shows server functions for imports, reminders, messaging, and parent OTP. Most feature routes were not sampled, so their internal calls and data flows are not asserted here; route registration and the sampled authentication/layout integrations are shown where evidenced.

Main entry points: [`src/routeTree.gen.ts`](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routeTree.gen.ts) (Route registry), [`src/integrations/supabase/client.ts`](https://github.com/vinayshankar121/little-rose-path/blob/main/src/integrations/supabase/client.ts) (Browser Supabase client), [`src/routes/_authenticated/route.tsx`](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/route.tsx) (Authenticated workspace), [`src/lib/auth-context.tsx`](https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/auth-context.tsx) (Session and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_signin["Sign-in<br/>[auth.tsx]"]
  node_authctx["Session and roles<br/>[auth-context.tsx]"]
  node_workspace["Authenticated workspace<br/>[route.tsx]"]
  node_sidebar["Role navigation<br/>[AppSidebar.tsx]"]
  node_routeindex["Route registry<br/>[routeTree.gen.ts]"]
end

subgraph group_school["School operations"]
  node_admin["Admin management<br/>[admin.students.tsx]"]
  node_teachers["Teacher administration<br/>[admin.teachers.tsx]"]
  node_attendance["Attendance<br/>[attendance.tsx]"]
  node_classes["Classes and timetable<br/>[admin.classes.tsx]"]
  node_fees["Fees and reminders<br/>[admin.fees.tsx]"]
  node_reports["Reports<br/>[admin.reports.tsx]"]
end

subgraph group_community["Family and communications"]
  node_calendar["Calendar and notices<br/>[calendar.tsx]"]
  node_messages["Messages<br/>[messages.tsx]"]
  node_parent["Parent services<br/>[parent.index.tsx]"]
  node_transport["Transport management"]
  node_tracking["Live bus tracking<br/>[transport.live.tsx]"]
  node_driver["Driver tracker<br/>[driver.track.tsx]"]
end

subgraph group_platform["Data and services"]
  node_otp["Parent OTP"]
  node_push["Push notifications"]
  node_supabaseclient["Browser Supabase client<br/>[client.ts]"]
  node_adminclient["Server Supabase client<br/>[client.server.ts]"]
  node_supabase[("Supabase service")]
  node_importfn["Student import"]
  node_sms["SMS services<br/>[sms.functions.ts]"]
end

node_user(("Portal user"))

node_user -->|"signs in"| node_signin
node_signin -->|"reads session"| node_authctx
node_authctx -->|"queries auth"| node_supabaseclient
node_workspace -->|"checks access"| node_authctx
node_workspace -->|"renders navigation"| node_sidebar
node_workspace -->|"enables notifications"| node_push
node_sidebar -->|"reads role"| node_authctx
node_routeindex -->|"registers layout"| node_workspace
node_routeindex -->|"registers routes"| node_admin
node_routeindex -->|"registers routes"| node_teachers
node_routeindex -->|"registers routes"| node_attendance
node_routeindex -->|"registers routes"| node_classes
node_routeindex -->|"registers routes"| node_fees
node_routeindex -->|"registers routes"| node_reports
node_routeindex -->|"registers routes"| node_calendar
node_routeindex -->|"registers routes"| node_messages
node_routeindex -->|"registers routes"| node_parent
node_routeindex -->|"registers routes"| node_transport
node_routeindex -->|"registers routes"| node_tracking
node_routeindex -->|"registers routes"| node_driver
node_signin -->|"requests verification"| node_otp
node_teachers -->|"calls admin functions"| node_adminclient
node_fees -->|"queries fees"| node_supabaseclient
node_teachers -->|"queries records"| node_supabaseclient
node_transport -->|"queries transport"| node_supabaseclient
node_calendar -->|"queries calendar"| node_supabaseclient
node_supabaseclient -->|"connects"| node_supabase
node_adminclient -->|"connects"| node_supabase
node_push -->|"uses client"| node_supabaseclient

click node_signin "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/auth.tsx"
click node_authctx "https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/auth-context.tsx"
click node_workspace "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/route.tsx"
click node_sidebar "https://github.com/vinayshankar121/little-rose-path/blob/main/src/components/AppSidebar.tsx"
click node_routeindex "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routeTree.gen.ts"
click node_admin "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.students.tsx"
click node_teachers "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.teachers.tsx"
click node_attendance "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/attendance.tsx"
click node_classes "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.classes.tsx"
click node_fees "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.fees.tsx"
click node_reports "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.reports.tsx"
click node_calendar "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/calendar.tsx"
click node_messages "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/messages.tsx"
click node_parent "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/parent.index.tsx"
click node_otp "https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/parent-otp.functions.ts"
click node_transport "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.transport.tsx"
click node_tracking "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/transport.live.tsx"
click node_driver "https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/driver.track.tsx"
click node_push "https://github.com/vinayshankar121/little-rose-path/blob/main/src/hooks/usePushNotifications.ts"
click node_supabaseclient "https://github.com/vinayshankar121/little-rose-path/blob/main/src/integrations/supabase/client.ts"
click node_adminclient "https://github.com/vinayshankar121/little-rose-path/blob/main/src/integrations/supabase/client.server.ts"
click node_importfn "https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/students-import.functions.ts"
click node_sms "https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/sms.functions.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_signin,node_authctx,node_workspace,node_sidebar,node_routeindex,node_user toneBlue
class node_admin,node_teachers,node_attendance,node_classes,node_fees,node_reports toneAmber
class node_calendar,node_messages,node_parent,node_transport,node_tracking,node_driver toneMint
class node_otp,node_push,node_supabaseclient,node_adminclient,node_supabase,node_importfn,node_sms toneRose
```

## Components

### Access and navigation

- [Sign-in](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Session and roles](https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/auth-context.tsx): `src/lib/auth-context.tsx`
- [Authenticated workspace](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [Role navigation](https://github.com/vinayshankar121/little-rose-path/blob/main/src/components/AppSidebar.tsx): `src/components/AppSidebar.tsx`
- [Route registry](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`

### School operations

- [Admin management](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.students.tsx): `src/routes/_authenticated/admin.students.tsx`
- [Teacher administration](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.teachers.tsx): `src/routes/_authenticated/admin.teachers.tsx`
- [Attendance](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/attendance.tsx): `src/routes/_authenticated/attendance.tsx`
- [Classes and timetable](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.classes.tsx): `src/routes/_authenticated/admin.classes.tsx`
- [Fees and reminders](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.fees.tsx): `src/routes/_authenticated/admin.fees.tsx`
- [Reports](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.reports.tsx): `src/routes/_authenticated/admin.reports.tsx`

### Family and communications

- [Calendar and notices](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/calendar.tsx): `src/routes/_authenticated/calendar.tsx`
- [Messages](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/messages.tsx): `src/routes/_authenticated/messages.tsx`
- [Parent services](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/parent.index.tsx): `src/routes/_authenticated/parent.index.tsx`
- [Transport management](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/admin.transport.tsx): `src/routes/_authenticated/admin.transport.tsx`
- [Live bus tracking](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/transport.live.tsx): `src/routes/_authenticated/transport.live.tsx`
- [Driver tracker](https://github.com/vinayshankar121/little-rose-path/blob/main/src/routes/_authenticated/driver.track.tsx): `src/routes/_authenticated/driver.track.tsx`

### Data and services

- [Parent OTP](https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/parent-otp.functions.ts): `src/lib/parent-otp.functions.ts`
- [Push notifications](https://github.com/vinayshankar121/little-rose-path/blob/main/src/hooks/usePushNotifications.ts): `src/hooks/usePushNotifications.ts`
- [Browser Supabase client](https://github.com/vinayshankar121/little-rose-path/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Server Supabase client](https://github.com/vinayshankar121/little-rose-path/blob/main/src/integrations/supabase/client.server.ts): `src/integrations/supabase/client.server.ts`
- **Supabase service**
- [Student import](https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/students-import.functions.ts): `src/lib/students-import.functions.ts`
- [SMS services](https://github.com/vinayshankar121/little-rose-path/blob/main/src/lib/sms.functions.ts): `src/lib/sms.functions.ts`

### Other components

- **Portal user**

## Connections

- Portal user → Sign-in: signs in (evidence: `src/routes/auth.tsx`)
- Sign-in → Session and roles: reads session (evidence: `src/routes/auth.tsx`)
- Session and roles → Browser Supabase client: queries auth (evidence: `src/lib/auth-context.tsx`)
- Authenticated workspace → Session and roles: checks access (evidence: `src/routes/_authenticated/route.tsx`)
- Authenticated workspace → Role navigation: renders navigation (evidence: `src/routes/_authenticated/route.tsx`)
- Authenticated workspace → Push notifications: enables notifications (evidence: `src/routes/_authenticated/route.tsx`)
- Role navigation → Session and roles: reads role (evidence: `src/components/AppSidebar.tsx`)
- Route registry → Authenticated workspace: registers layout (evidence: `src/routeTree.gen.ts`)
- Route registry → Admin management: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Teacher administration: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Attendance: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Classes and timetable: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Fees and reminders: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Reports: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Calendar and notices: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Messages: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Parent services: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Transport management: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Live bus tracking: registers routes (evidence: `src/routeTree.gen.ts`)
- Route registry → Driver tracker: registers routes (evidence: `src/routeTree.gen.ts`)
- Sign-in → Parent OTP: requests verification (evidence: `src/routes/auth.tsx`)
- Teacher administration → Server Supabase client: calls admin functions (evidence: `src/routes/_authenticated/admin.teachers.tsx`)
- Fees and reminders → Browser Supabase client: queries fees (evidence: `src/routes/_authenticated/admin.fees.tsx`)
- Teacher administration → Browser Supabase client: queries records (evidence: `src/routes/_authenticated/admin.teachers.tsx`)
- Transport management → Browser Supabase client: queries transport (evidence: `src/routes/_authenticated/admin.transport.tsx`)
- Calendar and notices → Browser Supabase client: queries calendar (evidence: `src/routes/_authenticated/calendar.tsx`)
- Browser Supabase client → Supabase service: connects (evidence: `src/integrations/supabase/client.ts`)
- Server Supabase client → Supabase service: connects (evidence: `src/integrations/supabase/client.server.ts`)
- Push notifications → Browser Supabase client: uses client (evidence: `src/hooks/usePushNotifications.ts`)
