# saravanasai1435/siddartha-college-of-pharma architecture

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

- Interactive diagram: https://gitdiagram.com/saravanasai1435/siddartha-college-of-pharma
- Repository: https://github.com/saravanasai1435/siddartha-college-of-pharma

## Overview

This is an institutional timetable and student-attendance portal, with admin management and student-facing timetable/attendance views. The main workflow enters through the app, loads and persists institutional state, then presents timetable or admin functions; admins manage schedules and attendance, while students view class attendance. The map includes roster parsing, conflict checking, timetable seed data, and cloud persistence. Edges reflect shown calls or SOURCE INDEX references; unsampled module behavior and unshown wiring are not inferred.

Main entry points: [`App.tsx`](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/App.tsx) (App entry), [`services/dataStore.ts`](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/dataStore.ts) (State store), [`components/Admin/AdminDashboard.tsx`](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/AdminDashboard.tsx) (Admin dashboard), [`services/freshTimetableData.ts`](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/freshTimetableData.ts) (Timetable seed assembly)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App entry<br/>[App.tsx]"]
  node_layout["Portal layout<br/>[Layout.tsx]"]
  node_login["Admin login<br/>[LoginForm.tsx]"]
end

subgraph group_admin["Administration"]
  node_dashboard["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_attendance_manager["Attendance manager"]
  node_attendance_marker["Attendance marking"]
  node_roster["Student roster"]
  node_analytics["Attendance analytics"]
end

subgraph group_academic["Timetable and Attendance"]
  node_timetable["Timetable board<br/>[TimetableBoard.tsx]"]
  node_student_view["Student attendance view"]
  node_attendance_service["Attendance logic"]
  node_conflict_engine["Schedule conflict logic<br/>[coreEngine.ts]"]
  node_time_utils["Time formatting<br/>[timeUtils.ts]"]
end

subgraph group_state["State and Integrations"]
  node_data_store["State store<br/>[dataStore.ts]"]
  node_seed_data["Timetable seed assembly"]
  node_class_data["Class records<br/>[classes.ts]"]
  node_staff_data["Staff records<br/>[staff.ts]"]
  node_subject_data["Subject records<br/>[subjects.ts]"]
  node_bpharm_data["B Pharm schedule<br/>[bpharmEntries.ts]"]
  node_pharmd_data["Pharm D schedule<br/>[pharmdEntries.ts]"]
  node_firebase_service["Firestore adapter<br/>[firebaseService.ts]"]
  node_sheets_service["Sheets adapter"]
end

node_user(("Portal user"))
node_firestore[("Firestore")]
node_sheets[("Google Sheets endpoint")]

node_user -->|"opens"| node_app
node_app -->|"renders"| node_layout
node_app -->|"renders"| node_login
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_timetable
node_app -->|"loads and saves"| node_data_store
node_app -->|"fetches and saves"| node_firebase_service
node_app -->|"fetches fallback"| node_sheets_service
node_dashboard -->|"renders"| node_attendance_manager
node_dashboard -->|"reads and saves"| node_data_store
node_dashboard -->|"checks conflicts"| node_conflict_engine
node_dashboard -->|"syncs state"| node_firebase_service
node_dashboard -->|"syncs state"| node_sheets_service
node_attendance_manager -->|"renders"| node_attendance_marker
node_attendance_manager -->|"renders"| node_roster
node_attendance_manager -->|"renders"| node_analytics
node_roster -->|"parses roster"| node_attendance_service
node_attendance_marker -->|"uses attendance logic"| node_attendance_service
node_analytics -->|"uses calculations"| node_attendance_service
node_student_view -->|"uses attendance logic"| node_attendance_service
node_timetable -->|"renders"| node_student_view
node_timetable -->|"reads state"| node_data_store
node_timetable -->|"formats slots"| node_time_utils
node_conflict_engine -->|"reads state"| node_data_store
node_data_store -->|"backs up state"| node_firebase_service
node_data_store -->|"loads initial state"| node_seed_data
node_data_store -->|"generates defaults"| node_attendance_service
node_data_store -->|"formats times"| node_time_utils
node_seed_data -->|"loads records"| node_class_data
node_seed_data -->|"loads records"| node_staff_data
node_seed_data -->|"loads records"| node_subject_data
node_seed_data -->|"loads entries"| node_bpharm_data
node_seed_data -->|"loads entries"| node_pharmd_data
node_firebase_service -->|"reads and writes"| node_firestore
node_sheets_service -->|"fetches and posts"| node_sheets

click node_app "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/App.tsx"
click node_layout "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Layout.tsx"
click node_login "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/LoginForm.tsx"
click node_dashboard "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/AdminDashboard.tsx"
click node_attendance_manager "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/AttendanceManager.tsx"
click node_attendance_marker "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/AttendanceMarker.tsx"
click node_roster "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/StudentRosterManager.tsx"
click node_analytics "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/SchoolWideAnalytics.tsx"
click node_timetable "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/TimetableBoard.tsx"
click node_student_view "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Student/StudentClassAttendanceView.tsx"
click node_attendance_service "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/attendanceService.ts"
click node_conflict_engine "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/coreEngine.ts"
click node_time_utils "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timeUtils.ts"
click node_data_store "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/dataStore.ts"
click node_seed_data "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/freshTimetableData.ts"
click node_class_data "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/classes.ts"
click node_staff_data "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/staff.ts"
click node_subject_data "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/subjects.ts"
click node_bpharm_data "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/bpharmEntries.ts"
click node_pharmd_data "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/pharmdEntries.ts"
click node_firebase_service "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/firebaseService.ts"
click node_sheets_service "https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/googleSheetsService.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_layout,node_login,node_user toneBlue
class node_dashboard,node_attendance_manager,node_attendance_marker,node_roster,node_analytics,node_firestore,node_sheets toneAmber
class node_timetable,node_student_view,node_attendance_service,node_conflict_engine,node_time_utils toneMint
class node_data_store,node_seed_data,node_class_data,node_staff_data,node_subject_data,node_bpharm_data,node_pharmd_data,node_firebase_service,node_sheets_service toneRose
```

## Components

### Application

- [App entry](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/App.tsx): `App.tsx`
- [Portal layout](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Layout.tsx): `components/Layout.tsx`
- [Admin login](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/LoginForm.tsx): `components/Admin/LoginForm.tsx`

### Administration

- [Admin dashboard](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/AdminDashboard.tsx): `components/Admin/AdminDashboard.tsx`
- [Attendance manager](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/AttendanceManager.tsx): `components/Admin/Attendance/AttendanceManager.tsx`
- [Attendance marking](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/AttendanceMarker.tsx): `components/Admin/Attendance/AttendanceMarker.tsx`
- [Student roster](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/StudentRosterManager.tsx): `components/Admin/Attendance/StudentRosterManager.tsx`
- [Attendance analytics](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Admin/Attendance/SchoolWideAnalytics.tsx): `components/Admin/Attendance/SchoolWideAnalytics.tsx`

### Timetable and Attendance

- [Timetable board](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/TimetableBoard.tsx): `components/TimetableBoard.tsx`
- [Student attendance view](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/components/Student/StudentClassAttendanceView.tsx): `components/Student/StudentClassAttendanceView.tsx`
- [Attendance logic](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/attendanceService.ts): `services/attendanceService.ts`
- [Schedule conflict logic](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/coreEngine.ts): `services/coreEngine.ts`
- [Time formatting](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timeUtils.ts): `services/timeUtils.ts`

### State and Integrations

- [State store](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/dataStore.ts): `services/dataStore.ts`
- [Timetable seed assembly](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/freshTimetableData.ts): `services/freshTimetableData.ts`
- [Class records](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/classes.ts): `services/timetableData/classes.ts`
- [Staff records](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/staff.ts): `services/timetableData/staff.ts`
- [Subject records](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/subjects.ts): `services/timetableData/subjects.ts`
- [B Pharm schedule](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/bpharmEntries.ts): `services/timetableData/bpharmEntries.ts`
- [Pharm D schedule](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/timetableData/pharmdEntries.ts): `services/timetableData/pharmdEntries.ts`
- [Firestore adapter](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/firebaseService.ts): `services/firebaseService.ts`
- [Sheets adapter](https://github.com/saravanasai1435/siddartha-college-of-pharma/blob/main/services/googleSheetsService.ts): `services/googleSheetsService.ts`

### Other components

- **Portal user**
- **Firestore**
- **Google Sheets endpoint**

## Connections

- Portal user → App entry: opens (evidence: `App.tsx`)
- App entry → Portal layout: renders (evidence: `App.tsx`)
- App entry → Admin login: renders (evidence: `App.tsx`)
- App entry → Admin dashboard: renders (evidence: `App.tsx`)
- App entry → Timetable board: renders (evidence: `App.tsx`)
- App entry → State store: loads and saves (evidence: `App.tsx`)
- App entry → Firestore adapter: fetches and saves (evidence: `App.tsx`)
- App entry → Sheets adapter: fetches fallback (evidence: `App.tsx`)
- Admin dashboard → Attendance manager: renders (evidence: `components/Admin/AdminDashboard.tsx`)
- Admin dashboard → State store: reads and saves (evidence: `components/Admin/AdminDashboard.tsx`)
- Admin dashboard → Schedule conflict logic: checks conflicts (evidence: `components/Admin/AdminDashboard.tsx`)
- Admin dashboard → Firestore adapter: syncs state (evidence: `components/Admin/AdminDashboard.tsx`)
- Admin dashboard → Sheets adapter: syncs state (evidence: `components/Admin/AdminDashboard.tsx`)
- Attendance manager → Attendance marking: renders (evidence: `components/Admin/Attendance/AttendanceManager.tsx`)
- Attendance manager → Student roster: renders (evidence: `components/Admin/Attendance/AttendanceManager.tsx`)
- Attendance manager → Attendance analytics: renders (evidence: `components/Admin/Attendance/AttendanceManager.tsx`)
- Student roster → Attendance logic: parses roster (evidence: `components/Admin/Attendance/StudentRosterManager.tsx`)
- Attendance marking → Attendance logic: uses attendance logic (evidence: `components/Admin/Attendance/AttendanceMarker.tsx`)
- Attendance analytics → Attendance logic: uses calculations (evidence: `components/Admin/Attendance/SchoolWideAnalytics.tsx`)
- Student attendance view → Attendance logic: uses attendance logic (evidence: `components/Student/StudentClassAttendanceView.tsx`)
- Timetable board → Student attendance view: renders (evidence: `components/TimetableBoard.tsx`)
- Timetable board → State store: reads state (evidence: `components/TimetableBoard.tsx`)
- Timetable board → Time formatting: formats slots (evidence: `components/TimetableBoard.tsx`)
- Schedule conflict logic → State store: reads state (evidence: `services/coreEngine.ts`)
- State store → Firestore adapter: backs up state (evidence: `services/dataStore.ts`)
- State store → Timetable seed assembly: loads initial state (evidence: `services/dataStore.ts`)
- State store → Attendance logic: generates defaults (evidence: `services/dataStore.ts`)
- State store → Time formatting: formats times (evidence: `services/dataStore.ts`)
- Timetable seed assembly → Class records: loads records (evidence: `services/freshTimetableData.ts`)
- Timetable seed assembly → Staff records: loads records (evidence: `services/freshTimetableData.ts`)
- Timetable seed assembly → Subject records: loads records (evidence: `services/freshTimetableData.ts`)
- Timetable seed assembly → B Pharm schedule: loads entries (evidence: `services/freshTimetableData.ts`)
- Timetable seed assembly → Pharm D schedule: loads entries (evidence: `services/freshTimetableData.ts`)
- Firestore adapter → Firestore: reads and writes (evidence: `services/firebaseService.ts`)
- Sheets adapter → Google Sheets endpoint: fetches and posts (evidence: `services/googleSheetsService.ts`)
