# nooparnjang/bodinclassmap architecture

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

- Interactive diagram: https://gitdiagram.com/nooparnjang/bodinclassmap
- Repository: https://github.com/nooparnjang/bodinclassmap

## Overview

Classmap is a classroom-seat reservation app. A student signs in with Google, the app tracks the authenticated session, and the dashboard lets an eligible user reserve or cancel a table while viewing classroom reservations. Dashboard-to-Firestore calls and authentication wiring are visible in the excerpts; other UI details are summarized at the page level. The README describes only a starter template, so product capabilities are inferred from the sampled application code rather than documented README features.

Main entry points: [`src/App.tsx`](https://github.com/nooparnjang/bodinclassmap/blob/main/src/App.tsx) (App routes), [`src/firebase/firebase.ts`](https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/firebase.ts) (Firebase initialization), [`src/pages/Dashboard/DashboardPage.tsx`](https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/Dashboard/DashboardPage.tsx) (Reservation dashboard), [`src/firebase/auth.ts`](https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/auth.ts) (Google sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_entry["React entry<br/>[main.tsx]"]
  node_router["App routes<br/>[App.tsx]"]
  node_login["Login page<br/>[LoginPage.tsx]"]
  node_notfound["Not-found page<br/>[NotFoundPage.tsx]"]
end

subgraph group_identity["Identity and session"]
  node_authcontext["Auth provider<br/>[AuthContext.tsx]"]
  node_authhook["Auth hook<br/>[useAuthHook.ts]"]
  node_authops["Google sign-in<br/>[auth.ts]"]
end

subgraph group_booking["Seat reservations"]
  node_dashboard["Reservation dashboard<br/>[DashboardPage.tsx]"]
  node_reservationops["Reservation operations<br/>[firestore.ts]"]
end

subgraph group_backend["Firebase services"]
  node_firebaseinit["Firebase initialization<br/>[firebase.ts]"]
end

node_student(("Student"))
node_authservice(("Firebase Auth"))
node_firestore[("Cloud Firestore")]

node_student -->|"opens app"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"provides session"| node_authcontext
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_notfound
node_login -->|"reads session"| node_authhook
node_login -->|"starts sign-in"| node_authops
node_authhook -->|"reads context"| node_authcontext
node_authcontext -->|"observes auth"| node_firebaseinit
node_authops -->|"uses auth client"| node_firebaseinit
node_firebaseinit -->|"initializes client"| node_authservice
node_authops -->|"signs in or out"| node_authservice
node_dashboard -->|"reads session"| node_authhook
node_dashboard -->|"signs out"| node_authops
node_dashboard -->|"loads and changes bookings"| node_reservationops
node_reservationops -->|"uses database client"| node_firebaseinit
node_firebaseinit -->|"initializes client"| node_firestore
node_reservationops -->|"reads and writes"| node_firestore

click node_entry "https://github.com/nooparnjang/bodinclassmap/blob/main/src/main.tsx"
click node_router "https://github.com/nooparnjang/bodinclassmap/blob/main/src/App.tsx"
click node_login "https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/Login/LoginPage.tsx"
click node_dashboard "https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/Dashboard/DashboardPage.tsx"
click node_notfound "https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/NotFound/NotFoundPage.tsx"
click node_authcontext "https://github.com/nooparnjang/bodinclassmap/blob/main/src/contexts/AuthContext.tsx"
click node_authhook "https://github.com/nooparnjang/bodinclassmap/blob/main/src/hooks/useAuthHook.ts"
click node_authops "https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/auth.ts"
click node_firebaseinit "https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/firebase.ts"
click node_reservationops "https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/firestore.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_entry,node_router,node_login,node_notfound toneBlue
class node_authcontext,node_authhook,node_authops,node_firestore toneAmber
class node_dashboard,node_reservationops toneMint
class node_firebaseinit toneRose
class node_student,node_authservice toneIndigo
```

## Components

### Application flow

- [React entry](https://github.com/nooparnjang/bodinclassmap/blob/main/src/main.tsx): `src/main.tsx`
- [App routes](https://github.com/nooparnjang/bodinclassmap/blob/main/src/App.tsx): `src/App.tsx`
- [Login page](https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/Login/LoginPage.tsx): `src/pages/Login/LoginPage.tsx`
- [Not-found page](https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/NotFound/NotFoundPage.tsx): `src/pages/NotFound/NotFoundPage.tsx`

### Identity and session

- [Auth provider](https://github.com/nooparnjang/bodinclassmap/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Auth hook](https://github.com/nooparnjang/bodinclassmap/blob/main/src/hooks/useAuthHook.ts): `src/hooks/useAuthHook.ts`
- [Google sign-in](https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/auth.ts): `src/firebase/auth.ts`

### Seat reservations

- [Reservation dashboard](https://github.com/nooparnjang/bodinclassmap/blob/main/src/pages/Dashboard/DashboardPage.tsx): `src/pages/Dashboard/DashboardPage.tsx`
- [Reservation operations](https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/firestore.ts): `src/firebase/firestore.ts`

### Firebase services

- [Firebase initialization](https://github.com/nooparnjang/bodinclassmap/blob/main/src/firebase/firebase.ts): `src/firebase/firebase.ts`

### Other components

- **Student**
- **Firebase Auth**
- **Cloud Firestore**

## Connections

- Student → React entry: opens app (evidence: `src/main.tsx`)
- React entry → App routes: renders (evidence: `src/main.tsx`)
- App routes → Auth provider: provides session (evidence: `src/App.tsx`)
- App routes → Login page: routes to (evidence: `src/App.tsx`)
- App routes → Reservation dashboard: routes to (evidence: `src/App.tsx`)
- App routes → Not-found page: routes to (evidence: `src/App.tsx`)
- Login page → Auth hook: reads session (evidence: `src/pages/Login/LoginPage.tsx`)
- Login page → Google sign-in: starts sign-in (evidence: `src/pages/Login/LoginPage.tsx`)
- Auth hook → Auth provider: reads context (evidence: `src/hooks/useAuthHook.ts`)
- Auth provider → Firebase initialization: observes auth (evidence: `src/contexts/AuthContext.tsx`)
- Google sign-in → Firebase initialization: uses auth client (evidence: `src/firebase/auth.ts`)
- Firebase initialization → Firebase Auth: initializes client (evidence: `src/firebase/firebase.ts`)
- Google sign-in → Firebase Auth: signs in or out (evidence: `src/firebase/auth.ts`)
- Reservation dashboard → Auth hook: reads session (evidence: `src/pages/Dashboard/DashboardPage.tsx`)
- Reservation dashboard → Google sign-in: signs out (evidence: `src/pages/Dashboard/DashboardPage.tsx`)
- Reservation dashboard → Reservation operations: loads and changes bookings (evidence: `src/pages/Dashboard/DashboardPage.tsx`)
- Reservation operations → Firebase initialization: uses database client (evidence: `src/firebase/firestore.ts`)
- Firebase initialization → Cloud Firestore: initializes client (evidence: `src/firebase/firebase.ts`)
- Reservation operations → Cloud Firestore: reads and writes (evidence: `src/firebase/firestore.ts`)
