# najeeb1106/uos_time_assistant- architecture

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

- Interactive diagram: https://gitdiagram.com/najeeb1106/uos_time_assistant-
- Repository: https://github.com/najeeb1106/uos_time_assistant-

## Overview

UOS Timetable is a scheduling and room-occupancy product: users authenticate, view or upload timetables, and use schedule data to find available rooms. The repository contains an Express/Firebase backend plus web and React Native clients. The README documents PDF parsing, weekly schedules, live room finding, mock/live modes, and Firebase authentication; sampled source confirms selected API, storage, routing, and parsing relationships. Some mobile and web feature implementations were not sampled, so their internal links are limited to documented capabilities.

Main entry points: [`web/src/App.jsx`](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/App.jsx) (Web application), [`backend/src/controllers/scheduleController.js`](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/controllers/scheduleController.js) (Schedule handlers), [`mobile-rn/src/stores/useMobileStore.ts`](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/stores/useMobileStore.ts) (Mobile auth state), [`web/src/store/useStore.js`](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/store/useStore.js) (Web state and API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Backend services"]
  node_backendapp["Express application<br/>[app.js]"]
  node_authroutes["Authentication routes<br/>[auth.js]"]
  node_schedule_routes["Schedule routes<br/>[schedule.js]"]
  node_authcontroller["Authentication handlers<br/>[authController.js]"]
  node_schedulecontroller["Schedule handlers"]
  node_pdfparser["PDF timetable parser<br/>[pdfParser.js]"]
  node_imageparser["Image timetable parser"]
end

subgraph group_web["Web client"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_webstore["Web state and API<br/>[useStore.js]"]
  node_webauth["Web authentication<br/>[Login.jsx]"]
  node_webschedule["Weekly schedule<br/>[WeeklySchedule.jsx]"]
  node_webrooms["Room finder<br/>[FreeRooms.jsx]"]
  node_webupload["Timetable upload<br/>[Upload.jsx]"]
  node_webprofile["User profile<br/>[Profile.jsx]"]
  node_webpdf["Browser PDF parser<br/>[pdfParser.js]"]
end

subgraph group_mobile["Mobile client"]
  node_mobileapp["Mobile application<br/>[App.tsx]"]
  node_mobilenav["Mobile navigation<br/>[RootNavigator.tsx]"]
  node_mobileauth["Mobile sign-in<br/>[RegisterScreen.tsx]"]
  node_mobilestore["Mobile auth state<br/>[useMobileStore.ts]"]
  node_mobileapi["Mobile API client<br/>[client.ts]"]
  node_mobileupload["Mobile timetable upload<br/>[UploadScreen.tsx]"]
  node_mobilestore_sched["Mobile schedule state"]
  node_mobileschedule["Mobile schedule view<br/>[ScheduleScreen.tsx]"]
  node_mobiledashboard["Mobile dashboard"]
  node_mobilerooms["Mobile room finder"]
  node_mobileprofile["Mobile profile<br/>[ProfileScreen.tsx]"]
  node_appstorage["Mobile app storage<br/>[appStorage.ts]"]
end

subgraph group_platform["Shared platform"]
  node_firebase["Firebase configuration<br/>[firebase.js]"]
  node_firebasedb[("Firestore and Auth")]
end

node_user(("Student or faculty"))

node_user -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_webschedule
node_webapp -->|"routes to"| node_webrooms
node_webapp -->|"routes to"| node_webupload
node_webapp -->|"routes to"| node_webprofile
node_webapp -->|"routes to"| node_webauth
node_webapp -->|"loads state"| node_webstore
node_webrooms -->|"uses state"| node_webstore
node_webprofile -->|"uses state"| node_webstore
node_webupload -->|"submits upload"| node_webstore
node_webupload -->|"uses parser"| node_webpdf
node_webstore -->|"calls API"| node_backendapp
node_user -->|"uses"| node_mobileapp
node_mobileapp -->|"starts navigation"| node_mobilenav
node_mobilenav -->|"presents auth"| node_mobileauth
node_mobileauth -->|"uses auth state"| node_mobilestore
node_mobilestore -->|"calls APIs"| node_mobileapi
node_mobilestore -->|"persists profile"| node_appstorage
node_mobileupload -.->|"uses API"| node_mobileapi
node_mobilestore_sched -->|"fetches schedule"| node_mobileapi
node_mobilestore_sched -.->|"syncs user profile"| node_mobilestore
node_mobileschedule -.->|"displays schedule"| node_mobilestore_sched
node_mobiledashboard -.->|"shows schedule"| node_mobilestore_sched
node_mobilerooms -.->|"uses API"| node_mobileapi
node_mobileprofile -.->|"updates profile"| node_mobilestore
node_backendapp -->|"mounts routes"| node_authroutes
node_backendapp -->|"mounts routes"| node_schedule_routes
node_authroutes -->|"dispatches to"| node_authcontroller
node_schedule_routes -->|"dispatches to"| node_schedulecontroller
node_authcontroller -->|"uses services"| node_firebase
node_schedulecontroller -->|"uses services"| node_firebase
node_schedulecontroller -->|"parses PDFs"| node_pdfparser
node_schedulecontroller -->|"parses images"| node_imageparser
node_firebase -->|"configures"| node_firebasedb
node_schedulecontroller -->|"stores schedules"| node_firebasedb
node_authcontroller -->|"reads user data"| node_firebasedb
node_user -.->|"uploads timetable"| node_backendapp

click node_webapp "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/App.jsx"
click node_webstore "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/store/useStore.js"
click node_webauth "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/Login.jsx"
click node_webschedule "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/WeeklySchedule.jsx"
click node_webrooms "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/FreeRooms.jsx"
click node_webupload "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/Upload.jsx"
click node_webprofile "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/Profile.jsx"
click node_webpdf "https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/utils/pdfParser.js"
click node_mobileapp "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/App.tsx"
click node_mobilenav "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/navigation/RootNavigator.tsx"
click node_mobileauth "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/auth/RegisterScreen.tsx"
click node_mobilestore "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/stores/useMobileStore.ts"
click node_mobileapi "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/api/client.ts"
click node_mobileupload "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/UploadScreen.tsx"
click node_mobilestore_sched "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/stores/useScheduleStore.ts"
click node_mobileschedule "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/ScheduleScreen.tsx"
click node_mobiledashboard "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/DashboardScreen.tsx"
click node_mobilerooms "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/FreeRoomsScreen.tsx"
click node_mobileprofile "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/settings/ProfileScreen.tsx"
click node_appstorage "https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/utils/appStorage.ts"
click node_backendapp "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/app.js"
click node_authroutes "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/routes/auth.js"
click node_schedule_routes "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/routes/schedule.js"
click node_authcontroller "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/controllers/authController.js"
click node_schedulecontroller "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/controllers/scheduleController.js"
click node_pdfparser "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/utils/pdfParser.js"
click node_imageparser "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/services/imageParserService.js"
click node_firebase "https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/config/firebase.js"

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_backendapp,node_authroutes,node_schedule_routes,node_authcontroller,node_schedulecontroller,node_pdfparser,node_imageparser toneBlue
class node_webapp,node_webstore,node_webauth,node_webschedule,node_webrooms,node_webupload,node_webprofile,node_webpdf toneAmber
class node_mobileapp,node_mobilenav,node_mobileauth,node_mobilestore,node_mobileapi,node_mobileupload,node_mobilestore_sched,node_mobileschedule,node_mobiledashboard,node_mobilerooms,node_mobileprofile,node_appstorage toneMint
class node_firebase,node_firebasedb toneRose
class node_user toneIndigo
```

## Components

### Backend services

- [Express application](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/app.js): `backend/src/app.js`
- [Authentication routes](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [Schedule routes](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/routes/schedule.js): `backend/src/routes/schedule.js`
- [Authentication handlers](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [Schedule handlers](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/controllers/scheduleController.js): `backend/src/controllers/scheduleController.js`
- [PDF timetable parser](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/utils/pdfParser.js): `backend/src/utils/pdfParser.js`
- [Image timetable parser](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/services/imageParserService.js): `backend/src/services/imageParserService.js`

### Web client

- [Web application](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/App.jsx): `web/src/App.jsx`
- [Web state and API](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/store/useStore.js): `web/src/store/useStore.js`
- [Web authentication](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/Login.jsx): `web/src/pages/Login.jsx`
- [Weekly schedule](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/WeeklySchedule.jsx): `web/src/pages/WeeklySchedule.jsx`
- [Room finder](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/FreeRooms.jsx): `web/src/pages/FreeRooms.jsx`
- [Timetable upload](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/Upload.jsx): `web/src/pages/Upload.jsx`
- [User profile](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/pages/Profile.jsx): `web/src/pages/Profile.jsx`
- [Browser PDF parser](https://github.com/najeeb1106/uos_time_assistant-/blob/main/web/src/utils/pdfParser.js): `web/src/utils/pdfParser.js`

### Mobile client

- [Mobile application](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/App.tsx): `mobile-rn/App.tsx`
- [Mobile navigation](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/navigation/RootNavigator.tsx): `mobile-rn/src/navigation/RootNavigator.tsx`
- [Mobile sign-in](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/auth/RegisterScreen.tsx): `mobile-rn/src/screens/auth/RegisterScreen.tsx`
- [Mobile auth state](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/stores/useMobileStore.ts): `mobile-rn/src/stores/useMobileStore.ts`
- [Mobile API client](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/api/client.ts): `mobile-rn/src/api/client.ts`
- [Mobile timetable upload](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/UploadScreen.tsx): `mobile-rn/src/screens/main/UploadScreen.tsx`
- [Mobile schedule state](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/stores/useScheduleStore.ts): `mobile-rn/src/stores/useScheduleStore.ts`
- [Mobile schedule view](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/ScheduleScreen.tsx): `mobile-rn/src/screens/main/ScheduleScreen.tsx`
- [Mobile dashboard](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/DashboardScreen.tsx): `mobile-rn/src/screens/main/DashboardScreen.tsx`
- [Mobile room finder](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/main/FreeRoomsScreen.tsx): `mobile-rn/src/screens/main/FreeRoomsScreen.tsx`
- [Mobile profile](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/screens/settings/ProfileScreen.tsx): `mobile-rn/src/screens/settings/ProfileScreen.tsx`
- [Mobile app storage](https://github.com/najeeb1106/uos_time_assistant-/blob/main/mobile-rn/src/utils/appStorage.ts): `mobile-rn/src/utils/appStorage.ts`

### Shared platform

- [Firebase configuration](https://github.com/najeeb1106/uos_time_assistant-/blob/main/backend/src/config/firebase.js): `backend/src/config/firebase.js`
- **Firestore and Auth**

### Other components

- **Student or faculty**

## Connections

- Student or faculty → Web application: uses (evidence: `README.md`)
- Web application → Weekly schedule: routes to (evidence: `web/src/App.jsx`)
- Web application → Room finder: routes to (evidence: `web/src/App.jsx`)
- Web application → Timetable upload: routes to (evidence: `web/src/App.jsx`)
- Web application → User profile: routes to (evidence: `web/src/App.jsx`)
- Web application → Web authentication: routes to (evidence: `web/src/App.jsx`)
- Web application → Web state and API: loads state (evidence: `web/src/App.jsx`)
- Room finder → Web state and API: uses state (evidence: `web/src/pages/FreeRooms.jsx`)
- User profile → Web state and API: uses state (evidence: `web/src/pages/Profile.jsx`)
- Timetable upload → Web state and API: submits upload (evidence: `web/src/store/useStore.js`)
- Timetable upload → Browser PDF parser: uses parser (evidence: `web/src/pages/Upload.jsx`)
- Web state and API → Express application: calls API (evidence: `web/src/store/useStore.js`)
- Student or faculty → Mobile application: uses (evidence: `README.md`)
- Mobile application → Mobile navigation: starts navigation (evidence: `mobile-rn/App.tsx`)
- Mobile navigation → Mobile sign-in: presents auth
- Mobile sign-in → Mobile auth state: uses auth state (evidence: `mobile-rn/src/screens/auth/RegisterScreen.tsx`)
- Mobile auth state → Mobile API client: calls APIs (evidence: `mobile-rn/src/stores/useMobileStore.ts`)
- Mobile auth state → Mobile app storage: persists profile (evidence: `mobile-rn/src/stores/useMobileStore.ts`)
- Mobile timetable upload → Mobile API client: uses API
- Mobile schedule state → Mobile API client: fetches schedule (evidence: `mobile-rn/src/stores/useScheduleStore.ts`)
- Mobile schedule state → Mobile auth state: syncs user profile (evidence: `mobile-rn/src/stores/useScheduleStore.ts`)
- Mobile schedule view → Mobile schedule state: displays schedule
- Mobile dashboard → Mobile schedule state: shows schedule
- Mobile room finder → Mobile API client: uses API
- Mobile profile → Mobile auth state: updates profile
- Express application → Authentication routes: mounts routes (evidence: `backend/src/app.js`)
- Express application → Schedule routes: mounts routes (evidence: `backend/src/app.js`)
- Authentication routes → Authentication handlers: dispatches to (evidence: `backend/src/routes/auth.js`)
- Schedule routes → Schedule handlers: dispatches to (evidence: `backend/src/routes/schedule.js`)
- Authentication handlers → Firebase configuration: uses services (evidence: `backend/src/controllers/authController.js`)
- Schedule handlers → Firebase configuration: uses services (evidence: `backend/src/controllers/scheduleController.js`)
- Schedule handlers → PDF timetable parser: parses PDFs (evidence: `backend/src/controllers/scheduleController.js`)
- Schedule handlers → Image timetable parser: parses images (evidence: `backend/src/controllers/scheduleController.js`)
- Firebase configuration → Firestore and Auth: configures (evidence: `README.md`)
- Schedule handlers → Firestore and Auth: stores schedules (evidence: `backend/src/controllers/scheduleController.js`)
- Authentication handlers → Firestore and Auth: reads user data (evidence: `backend/src/controllers/authController.js`)
- Student or faculty → Express application: uploads timetable
