# khushi-070906/ravs architecture

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

- Interactive diagram: https://gitdiagram.com/khushi-070906/ravs
- Repository: https://github.com/khushi-070906/ravs

## Overview

Research Connect (RAVS) is a role-based research attendance and verification application. Students authenticate, check in and out of lab sessions, submit work evidence, and faculty review those sessions before approved hours contribute to attendance reports. Administrators manage users and lab configuration; related capabilities include presence checks, events, leave, certificates, and a live roster. Supabase provides authentication, database, and storage services. Several feature modules were not sampled, so their links reflect README-documented behavior rather than inspected implementation.

Main entry points: [`src/routes/auth.tsx`](https://github.com/khushi-070906/ravs/blob/main/src/routes/auth.tsx) (Sign in), [`src/integrations/supabase/client.ts`](https://github.com/khushi-070906/ravs/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/routes/_authenticated/approvals.tsx`](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/approvals.tsx) (Faculty approvals), [`src/lib/auth.tsx`](https://github.com/khushi-070906/ravs/blob/main/src/lib/auth.tsx) (Auth and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_auth_page["Sign in<br/>[auth.tsx]"]
  node_auth_state["Auth and roles<br/>[auth.tsx]"]
  node_protected_route["Protected routes<br/>[route.tsx]"]
  node_app_shell["Application shell<br/>[app-shell.tsx]"]
end

subgraph group_sessions["Sessions and presence"]
  node_project_workspace["Project workspace<br/>[projects.$id.tsx]"]
  node_session_widget["Session timer<br/>[session-widget.tsx]"]
  node_checkin["Lab check-in<br/>[checkin.tsx]"]
  node_presence_code["Lab presence code<br/>[presence.$id.tsx]"]
  node_presence_logic["Presence checks<br/>[presence.ts]"]
end

subgraph group_review["Review and attendance"]
  node_approvals["Faculty approvals<br/>[approvals.tsx]"]
  node_time_correction["Time corrections"]
  node_attendance["Attendance reports<br/>[attendance.tsx]"]
  node_research_ui["Research summaries<br/>[research.tsx]"]
end

subgraph group_operations["Lab operations"]
  node_admin_tools["Administration<br/>[admin.tsx]"]
  node_events["Events and calendar<br/>[calendar.tsx]"]
  node_live_roster["Live roster<br/>[live-roster.tsx]"]
  node_leave["Leave requests<br/>[leave-panel.tsx]"]
  node_certificates["Certificates<br/>[certificates.tsx]"]
  node_certificate_verify["Certificate verification<br/>[verify.$code.tsx]"]
end

subgraph group_platform["Data and services"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase[("Supabase")]
end

node_student(("Student"))
node_faculty(("Faculty"))
node_admin(("Head admin"))

node_student -->|"signs in"| node_auth_page
node_faculty -->|"signs in"| node_auth_page
node_admin -->|"signs in"| node_auth_page
node_auth_page -->|"authenticates with"| node_supabase_client
node_auth_state -->|"loads role and profile"| node_supabase_client
node_student -->|"logs research work"| node_project_workspace
node_project_workspace -.->|"provides session timer"| node_session_widget
node_student -->|"checks in"| node_checkin
node_checkin -->|"uses lab code"| node_presence_code
node_presence_code -.->|"verifies presence"| node_presence_logic
node_faculty -->|"reviews sessions"| node_approvals
node_approvals -->|"reviews corrections"| node_time_correction
node_approvals -->|"approves hours for"| node_attendance
node_attendance -.->|"presents attendance"| node_research_ui
node_admin -->|"manages users and labs"| node_admin_tools
node_faculty -->|"manages events"| node_events
node_faculty -->|"monitors checked-in users"| node_live_roster
node_student -->|"requests leave"| node_leave
node_faculty -->|"issues certificates"| node_certificates
node_certificates -->|"provides verification code"| node_certificate_verify
node_auth_page -->|"uses auth state"| node_auth_state
node_protected_route -->|"renders shell"| node_app_shell
node_admin_tools -->|"accesses application data"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase

click node_auth_page "https://github.com/khushi-070906/ravs/blob/main/src/routes/auth.tsx"
click node_auth_state "https://github.com/khushi-070906/ravs/blob/main/src/lib/auth.tsx"
click node_protected_route "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/route.tsx"
click node_app_shell "https://github.com/khushi-070906/ravs/blob/main/src/components/app-shell.tsx"
click node_project_workspace "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/projects.%24id.tsx"
click node_session_widget "https://github.com/khushi-070906/ravs/blob/main/src/components/session-widget.tsx"
click node_checkin "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/checkin.tsx"
click node_presence_code "https://github.com/khushi-070906/ravs/blob/main/src/routes/presence.%24id.tsx"
click node_presence_logic "https://github.com/khushi-070906/ravs/blob/main/src/lib/presence.ts"
click node_approvals "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/approvals.tsx"
click node_time_correction "https://github.com/khushi-070906/ravs/blob/main/src/components/time-correction.tsx"
click node_attendance "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/attendance.tsx"
click node_research_ui "https://github.com/khushi-070906/ravs/blob/main/src/components/research.tsx"
click node_admin_tools "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/admin.tsx"
click node_events "https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/calendar.tsx"
click node_live_roster "https://github.com/khushi-070906/ravs/blob/main/src/components/live-roster.tsx"
click node_leave "https://github.com/khushi-070906/ravs/blob/main/src/components/leave-panel.tsx"
click node_certificates "https://github.com/khushi-070906/ravs/blob/main/src/components/certificates.tsx"
click node_certificate_verify "https://github.com/khushi-070906/ravs/blob/main/src/routes/verify.%24code.tsx"
click node_supabase_client "https://github.com/khushi-070906/ravs/blob/main/src/integrations/supabase/client.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_auth_page,node_auth_state,node_protected_route,node_app_shell toneBlue
class node_project_workspace,node_session_widget,node_checkin,node_presence_code,node_presence_logic toneAmber
class node_approvals,node_time_correction,node_attendance,node_research_ui toneMint
class node_admin_tools,node_events,node_live_roster,node_leave,node_certificates,node_certificate_verify toneRose
class node_supabase_client,node_supabase,node_student,node_faculty,node_admin toneIndigo
```

## Components

### Access and shell

- [Sign in](https://github.com/khushi-070906/ravs/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Auth and roles](https://github.com/khushi-070906/ravs/blob/main/src/lib/auth.tsx): `src/lib/auth.tsx`
- [Protected routes](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`
- [Application shell](https://github.com/khushi-070906/ravs/blob/main/src/components/app-shell.tsx): `src/components/app-shell.tsx`

### Sessions and presence

- [Project workspace](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/projects.%24id.tsx): `src/routes/_authenticated/projects.$id.tsx`
- [Session timer](https://github.com/khushi-070906/ravs/blob/main/src/components/session-widget.tsx): `src/components/session-widget.tsx`
- [Lab check-in](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/checkin.tsx): `src/routes/_authenticated/checkin.tsx`
- [Lab presence code](https://github.com/khushi-070906/ravs/blob/main/src/routes/presence.%24id.tsx): `src/routes/presence.$id.tsx`
- [Presence checks](https://github.com/khushi-070906/ravs/blob/main/src/lib/presence.ts): `src/lib/presence.ts`

### Review and attendance

- [Faculty approvals](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/approvals.tsx): `src/routes/_authenticated/approvals.tsx`
- [Time corrections](https://github.com/khushi-070906/ravs/blob/main/src/components/time-correction.tsx): `src/components/time-correction.tsx`
- [Attendance reports](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/attendance.tsx): `src/routes/_authenticated/attendance.tsx`
- [Research summaries](https://github.com/khushi-070906/ravs/blob/main/src/components/research.tsx): `src/components/research.tsx`

### Lab operations

- [Administration](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/admin.tsx): `src/routes/_authenticated/admin.tsx`
- [Events and calendar](https://github.com/khushi-070906/ravs/blob/main/src/routes/_authenticated/calendar.tsx): `src/routes/_authenticated/calendar.tsx`
- [Live roster](https://github.com/khushi-070906/ravs/blob/main/src/components/live-roster.tsx): `src/components/live-roster.tsx`
- [Leave requests](https://github.com/khushi-070906/ravs/blob/main/src/components/leave-panel.tsx): `src/components/leave-panel.tsx`
- [Certificates](https://github.com/khushi-070906/ravs/blob/main/src/components/certificates.tsx): `src/components/certificates.tsx`
- [Certificate verification](https://github.com/khushi-070906/ravs/blob/main/src/routes/verify.%24code.tsx): `src/routes/verify.$code.tsx`

### Data and services

- [Supabase client](https://github.com/khushi-070906/ravs/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase**

### Other components

- **Student**
- **Faculty**
- **Head admin**

## Connections

- Student → Sign in: signs in (evidence: `README.md`)
- Faculty → Sign in: signs in (evidence: `README.md`)
- Head admin → Sign in: signs in (evidence: `README.md`)
- Sign in → Supabase client: authenticates with (evidence: `src/routes/auth.tsx`)
- Auth and roles → Supabase client: loads role and profile (evidence: `src/lib/auth.tsx`)
- Student → Project workspace: logs research work (evidence: `README.md`)
- Project workspace → Session timer: provides session timer
- Student → Lab check-in: checks in (evidence: `README.md`)
- Lab check-in → Lab presence code: uses lab code (evidence: `README.md`)
- Lab presence code → Presence checks: verifies presence
- Faculty → Faculty approvals: reviews sessions (evidence: `README.md`)
- Faculty approvals → Time corrections: reviews corrections (evidence: `README.md`)
- Faculty approvals → Attendance reports: approves hours for (evidence: `README.md`)
- Attendance reports → Research summaries: presents attendance
- Head admin → Administration: manages users and labs (evidence: `README.md`)
- Faculty → Events and calendar: manages events (evidence: `README.md`)
- Faculty → Live roster: monitors checked-in users (evidence: `README.md`)
- Student → Leave requests: requests leave (evidence: `README.md`)
- Faculty → Certificates: issues certificates (evidence: `README.md`)
- Certificates → Certificate verification: provides verification code (evidence: `README.md`)
- Sign in → Auth and roles: uses auth state (evidence: `src/routes/auth.tsx`)
- Protected routes → Application shell: renders shell (evidence: `src/routes/_authenticated/route.tsx`)
- Administration → Supabase client: accesses application data (evidence: `src/routes/_authenticated/admin.tsx`)
- Supabase client → Supabase: connects to (evidence: `src/integrations/supabase/client.ts`)
