# cosenhub07/timbel architecture

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

- Interactive diagram: https://gitdiagram.com/cosenhub07/timbel
- Repository: https://github.com/cosenhub07/timbel

## Overview

Timbel is a campus-focused student web and mobile application combining timetable and attendance tools with campus discovery, chat, notifications, and SendiYou social features. Users enter through the web routes or mobile navigator; protected experiences are organized around authentication and campus selection. The server exposes corresponding API route families, while Supabase is configured as a client-side data and authentication service. The supplied excerpts establish app routing, provider setup, server route mounting, and selected auth/data access; most feature-page internals and mobile-to-server request relationships were not sampled, so those links are omitted.

Main entry points: [`client/src/App.jsx`](https://github.com/cosenhub07/timbel/blob/main/client/src/App.jsx) (Web app router), [`server/index.js`](https://github.com/cosenhub07/timbel/blob/main/server/index.js) (Express API), [`client/src/context/AuthContext.jsx`](https://github.com/cosenhub07/timbel/blob/main/client/src/context/AuthContext.jsx) (Web identity), [`client/src/main.jsx`](https://github.com/cosenhub07/timbel/blob/main/client/src/main.jsx) (Web entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["Web app router<br/>[App.jsx]"]
  node_webentry["Web entry<br/>[main.jsx]"]
  node_webidentity["Web identity<br/>[AuthContext.jsx]"]
  node_webnotify["Web notifications"]
  node_campuslogin["Campus login"]
  node_finder["Room finder<br/>[FinderPage.jsx]"]
  node_timetable["Class timetable"]
  node_attendance["Attendance planner"]
  node_teacherstatus["Teacher status"]
  node_social["SendiYou social<br/>[SendiYouPage.jsx]"]
  node_chat["Chat<br/>[ChatPage.jsx]"]
  node_adminui["Admin console<br/>[AdminPage.jsx]"]
end

subgraph group_mobile["Mobile application"]
  node_mobileapp["Mobile app<br/>[App.js]"]
  node_mobilenav["Mobile navigation<br/>[MainNavigator.js]"]
  node_mobileidentity["Mobile identity<br/>[AuthContext.js]"]
  node_mobileapi["Mobile API client<br/>[api.js]"]
  node_mobilechat["Mobile chat<br/>[ChatScreen.js]"]
  node_mobilefeatures["Mobile feature screens"]
end

subgraph group_server["API server"]
  node_api["Express API<br/>[index.js]"]
  node_adminroutes["Admin operations<br/>[admin.js]"]
  node_excel["Excel timetable parser<br/>[excelParser.js]"]
  node_attendanceapi["Attendance routes<br/>[attendance.js]"]
  node_timetableapi["Timetable routes<br/>[timetable.js]"]
  node_chatapi["Chat routes<br/>[chat.js]"]
  node_socialapi["SendiYou routes<br/>[sendiyou.js]"]
  node_notifyapi["Notification routes<br/>[notifications.js]"]
  node_campusapi["Campus routes<br/>[campuses.js]"]
end

subgraph group_platform["Data and identity"]
  node_supabase[("Supabase")]
end

node_student(("Student"))

node_student -->|"uses"| node_webapp
node_webentry -->|"renders"| node_webapp
node_webentry -->|"provides"| node_webidentity
node_webentry -->|"provides"| node_webnotify
node_webapp -->|"routes to"| node_finder
node_webapp -->|"routes to"| node_timetable
node_webapp -->|"routes to"| node_attendance
node_webapp -->|"routes to"| node_teacherstatus
node_webapp -->|"routes to"| node_social
node_webapp -->|"routes to"| node_chat
node_webapp -->|"routes to"| node_adminui
node_webidentity -->|"authenticates via"| node_supabase
node_webidentity -->|"fetches campuses"| node_campusapi
node_webnotify -->|"reads user"| node_webidentity
node_webnotify -->|"reads and updates"| node_supabase
node_student -->|"uses"| node_mobileapp
node_mobileapp -->|"provides"| node_mobileidentity
node_mobileapp -->|"renders"| node_mobilenav
node_mobilenav -->|"navigates to"| node_mobilefeatures
node_mobilenav -->|"navigates to"| node_mobilechat
node_mobileidentity -->|"fetches campuses"| node_mobileapi
node_mobileidentity -->|"authenticates via"| node_supabase
node_api -->|"mounts"| node_adminroutes
node_api -->|"mounts"| node_attendanceapi
node_api -->|"mounts"| node_timetableapi
node_api -->|"mounts"| node_chatapi
node_api -->|"mounts"| node_socialapi
node_api -->|"mounts"| node_notifyapi
node_api -->|"mounts"| node_campusapi
node_adminroutes -->|"parses uploads"| node_excel
node_adminroutes -->|"queries data"| node_supabase

click node_webapp "https://github.com/cosenhub07/timbel/blob/main/client/src/App.jsx"
click node_webentry "https://github.com/cosenhub07/timbel/blob/main/client/src/main.jsx"
click node_webidentity "https://github.com/cosenhub07/timbel/blob/main/client/src/context/AuthContext.jsx"
click node_webnotify "https://github.com/cosenhub07/timbel/blob/main/client/src/context/NotificationContext.jsx"
click node_campuslogin "https://github.com/cosenhub07/timbel/blob/main/client/src/components/CampusLoginModal.jsx"
click node_finder "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/FinderPage.jsx"
click node_timetable "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/ClassTimetablePage.jsx"
click node_attendance "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/AttendancePlannerPage.jsx"
click node_teacherstatus "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/TeacherStatusPage.jsx"
click node_social "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/SendiYouPage.jsx"
click node_chat "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/ChatPage.jsx"
click node_adminui "https://github.com/cosenhub07/timbel/blob/main/client/src/pages/AdminPage.jsx"
click node_mobileapp "https://github.com/cosenhub07/timbel/blob/main/mobile/App.js"
click node_mobilenav "https://github.com/cosenhub07/timbel/blob/main/mobile/src/navigation/MainNavigator.js"
click node_mobileidentity "https://github.com/cosenhub07/timbel/blob/main/mobile/src/context/AuthContext.js"
click node_mobileapi "https://github.com/cosenhub07/timbel/blob/main/mobile/src/lib/api.js"
click node_mobilechat "https://github.com/cosenhub07/timbel/blob/main/mobile/src/screens/ChatScreen.js"
click node_mobilefeatures "https://github.com/cosenhub07/timbel/tree/main/mobile/src/screens"
click node_api "https://github.com/cosenhub07/timbel/blob/main/server/index.js"
click node_adminroutes "https://github.com/cosenhub07/timbel/blob/main/server/routes/admin.js"
click node_excel "https://github.com/cosenhub07/timbel/blob/main/server/utils/excelParser.js"
click node_attendanceapi "https://github.com/cosenhub07/timbel/blob/main/server/routes/attendance.js"
click node_timetableapi "https://github.com/cosenhub07/timbel/blob/main/server/routes/timetable.js"
click node_chatapi "https://github.com/cosenhub07/timbel/blob/main/server/routes/chat.js"
click node_socialapi "https://github.com/cosenhub07/timbel/blob/main/server/routes/sendiyou.js"
click node_notifyapi "https://github.com/cosenhub07/timbel/blob/main/server/routes/notifications.js"
click node_campusapi "https://github.com/cosenhub07/timbel/blob/main/server/routes/campuses.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_webapp,node_webentry,node_webidentity,node_webnotify,node_campuslogin,node_finder,node_timetable,node_attendance,node_teacherstatus,node_social,node_chat,node_adminui toneBlue
class node_mobileapp,node_mobilenav,node_mobileidentity,node_mobileapi,node_mobilechat,node_mobilefeatures toneAmber
class node_api,node_adminroutes,node_excel,node_attendanceapi,node_timetableapi,node_chatapi,node_socialapi,node_notifyapi,node_campusapi toneMint
class node_supabase toneRose
class node_student toneIndigo
```

## Components

### Web application

- [Web app router](https://github.com/cosenhub07/timbel/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Web entry](https://github.com/cosenhub07/timbel/blob/main/client/src/main.jsx): `client/src/main.jsx`
- [Web identity](https://github.com/cosenhub07/timbel/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Web notifications](https://github.com/cosenhub07/timbel/blob/main/client/src/context/NotificationContext.jsx): `client/src/context/NotificationContext.jsx`
- [Campus login](https://github.com/cosenhub07/timbel/blob/main/client/src/components/CampusLoginModal.jsx): `client/src/components/CampusLoginModal.jsx`
- [Room finder](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/FinderPage.jsx): `client/src/pages/FinderPage.jsx`
- [Class timetable](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/ClassTimetablePage.jsx): `client/src/pages/ClassTimetablePage.jsx`
- [Attendance planner](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/AttendancePlannerPage.jsx): `client/src/pages/AttendancePlannerPage.jsx`
- [Teacher status](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/TeacherStatusPage.jsx): `client/src/pages/TeacherStatusPage.jsx`
- [SendiYou social](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/SendiYouPage.jsx): `client/src/pages/SendiYouPage.jsx`
- [Chat](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/ChatPage.jsx): `client/src/pages/ChatPage.jsx`
- [Admin console](https://github.com/cosenhub07/timbel/blob/main/client/src/pages/AdminPage.jsx): `client/src/pages/AdminPage.jsx`

### Mobile application

- [Mobile app](https://github.com/cosenhub07/timbel/blob/main/mobile/App.js): `mobile/App.js`
- [Mobile navigation](https://github.com/cosenhub07/timbel/blob/main/mobile/src/navigation/MainNavigator.js): `mobile/src/navigation/MainNavigator.js`
- [Mobile identity](https://github.com/cosenhub07/timbel/blob/main/mobile/src/context/AuthContext.js): `mobile/src/context/AuthContext.js`
- [Mobile API client](https://github.com/cosenhub07/timbel/blob/main/mobile/src/lib/api.js): `mobile/src/lib/api.js`
- [Mobile chat](https://github.com/cosenhub07/timbel/blob/main/mobile/src/screens/ChatScreen.js): `mobile/src/screens/ChatScreen.js`
- [Mobile feature screens](https://github.com/cosenhub07/timbel/tree/main/mobile/src/screens): `mobile/src/screens`

### API server

- [Express API](https://github.com/cosenhub07/timbel/blob/main/server/index.js): `server/index.js`
- [Admin operations](https://github.com/cosenhub07/timbel/blob/main/server/routes/admin.js): `server/routes/admin.js`
- [Excel timetable parser](https://github.com/cosenhub07/timbel/blob/main/server/utils/excelParser.js): `server/utils/excelParser.js`
- [Attendance routes](https://github.com/cosenhub07/timbel/blob/main/server/routes/attendance.js): `server/routes/attendance.js`
- [Timetable routes](https://github.com/cosenhub07/timbel/blob/main/server/routes/timetable.js): `server/routes/timetable.js`
- [Chat routes](https://github.com/cosenhub07/timbel/blob/main/server/routes/chat.js): `server/routes/chat.js`
- [SendiYou routes](https://github.com/cosenhub07/timbel/blob/main/server/routes/sendiyou.js): `server/routes/sendiyou.js`
- [Notification routes](https://github.com/cosenhub07/timbel/blob/main/server/routes/notifications.js): `server/routes/notifications.js`
- [Campus routes](https://github.com/cosenhub07/timbel/blob/main/server/routes/campuses.js): `server/routes/campuses.js`

### Data and identity

- **Supabase**

### Other components

- **Student**

## Connections

- Student → Web app router: uses
- Web entry → Web app router: renders (evidence: `client/src/main.jsx`)
- Web entry → Web identity: provides (evidence: `client/src/main.jsx`)
- Web entry → Web notifications: provides (evidence: `client/src/main.jsx`)
- Web app router → Room finder: routes to (evidence: `client/src/App.jsx`)
- Web app router → Class timetable: routes to (evidence: `client/src/App.jsx`)
- Web app router → Attendance planner: routes to (evidence: `client/src/App.jsx`)
- Web app router → Teacher status: routes to (evidence: `client/src/App.jsx`)
- Web app router → SendiYou social: routes to (evidence: `client/src/App.jsx`)
- Web app router → Chat: routes to (evidence: `client/src/App.jsx`)
- Web app router → Admin console: routes to (evidence: `client/src/App.jsx`)
- Web identity → Supabase: authenticates via (evidence: `client/src/context/AuthContext.jsx`)
- Web identity → Campus routes: fetches campuses (evidence: `client/src/context/AuthContext.jsx`)
- Web notifications → Web identity: reads user (evidence: `client/src/context/NotificationContext.jsx`)
- Web notifications → Supabase: reads and updates (evidence: `client/src/context/NotificationContext.jsx`)
- Student → Mobile app: uses
- Mobile app → Mobile identity: provides (evidence: `mobile/App.js`)
- Mobile app → Mobile navigation: renders (evidence: `mobile/App.js`)
- Mobile navigation → Mobile feature screens: navigates to (evidence: `mobile/src/navigation/MainNavigator.js`)
- Mobile navigation → Mobile chat: navigates to (evidence: `mobile/src/navigation/MainNavigator.js`)
- Mobile identity → Mobile API client: fetches campuses (evidence: `mobile/src/context/AuthContext.js`)
- Mobile identity → Supabase: authenticates via (evidence: `mobile/src/context/AuthContext.js`)
- Express API → Admin operations: mounts (evidence: `server/index.js`)
- Express API → Attendance routes: mounts (evidence: `server/index.js`)
- Express API → Timetable routes: mounts (evidence: `server/index.js`)
- Express API → Chat routes: mounts (evidence: `server/index.js`)
- Express API → SendiYou routes: mounts (evidence: `server/index.js`)
- Express API → Notification routes: mounts (evidence: `server/index.js`)
- Express API → Campus routes: mounts (evidence: `server/index.js`)
- Admin operations → Excel timetable parser: parses uploads (evidence: `server/routes/admin.js`)
- Admin operations → Supabase: queries data (evidence: `server/routes/admin.js`)
