# deleteme0/seating-app architecture

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

- Interactive diagram: https://gitdiagram.com/deleteme0/seating-app
- Repository: https://github.com/deleteme0/seating-app

## Overview

This is a Next.js exam seating-allocation frontend. Users can continue from the login screen, manage department roll numbers and room capacities, then select data and rooms, auto-assign students, inspect or edit seat selections, and download department-wise seating PDFs. The selection page fetches student and hall data from an external API; the repository contains no backend implementation. The graph reflects shown component calls and fetches; other unsampled behavior is omitted.

Main entry points: [`src/app/selection/page.tsx`](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/page.tsx) (Selection page), [`src/app/selection/pdfmaker.tsx`](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/pdfmaker.tsx) (PDF generator), [`src/app/manage/page.tsx`](https://github.com/deleteme0/seating-app/blob/master/src/app/manage/page.tsx) (Room and student setup), [`src/app/selection/searchbar.tsx`](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/searchbar.tsx) (Selection and controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and setup"]
  node_login["Login screen<br/>[page.tsx]"]
  node_management["Room and student setup<br/>[page.tsx]"]
end

subgraph group_seating["Seating workflow"]
  node_selection["Selection page<br/>[page.tsx]"]
  node_search["Selection and controls<br/>[searchbar.tsx]"]
  node_allocator["Auto seating allocator<br/>[autoaddem.tsx]"]
  node_roompicker["Room picker<br/>[showrooms.tsx]"]
  node_seatview["Seat display and selection<br/>[displayroom.tsx]"]
end

subgraph group_exports["Seating export"]
  node_pdf["PDF generator<br/>[pdfmaker.tsx]"]
  node_document["Seating PDF"]
end

node_user(("User"))
node_api["Management API"]
node_jspdf["jsPDF library"]

node_user -->|"opens"| node_login
node_login -->|"continues to"| node_selection
node_user -->|"opens"| node_management
node_management -->|"posts room and student data"| node_api
node_management -->|"links to"| node_selection
node_selection -->|"fetches rooms and students"| node_api
node_selection -->|"renders"| node_search
node_selection -->|"renders"| node_roompicker
node_selection -->|"renders"| node_pdf
node_search -->|"calls for arrangement"| node_allocator
node_roompicker -->|"renders"| node_seatview
node_user -->|"selects and arranges"| node_search
node_user -->|"selects seats"| node_seatview
node_user -->|"requests download"| node_pdf
node_pdf -->|"creates PDF with"| node_jspdf
node_pdf -->|"saves"| node_document

click node_login "https://github.com/deleteme0/seating-app/blob/master/src/app/page.tsx"
click node_management "https://github.com/deleteme0/seating-app/blob/master/src/app/manage/page.tsx"
click node_selection "https://github.com/deleteme0/seating-app/blob/master/src/app/selection/page.tsx"
click node_search "https://github.com/deleteme0/seating-app/blob/master/src/app/selection/searchbar.tsx"
click node_allocator "https://github.com/deleteme0/seating-app/blob/master/src/app/utililties/autoaddem.tsx"
click node_roompicker "https://github.com/deleteme0/seating-app/blob/master/src/app/selection/showrooms.tsx"
click node_seatview "https://github.com/deleteme0/seating-app/blob/master/src/app/selection/displayroom.tsx"
click node_pdf "https://github.com/deleteme0/seating-app/blob/master/src/app/selection/pdfmaker.tsx"

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_login,node_management,node_user toneBlue
class node_selection,node_search,node_allocator,node_roompicker,node_seatview toneAmber
class node_pdf,node_document,node_api toneMint
class node_jspdf toneIndigo
```

## Components

### Entry and setup

- [Login screen](https://github.com/deleteme0/seating-app/blob/master/src/app/page.tsx): `src/app/page.tsx`
- [Room and student setup](https://github.com/deleteme0/seating-app/blob/master/src/app/manage/page.tsx): `src/app/manage/page.tsx`

### Seating workflow

- [Selection page](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/page.tsx): `src/app/selection/page.tsx`
- [Selection and controls](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/searchbar.tsx): `src/app/selection/searchbar.tsx`
- [Auto seating allocator](https://github.com/deleteme0/seating-app/blob/master/src/app/utililties/autoaddem.tsx): `src/app/utililties/autoaddem.tsx`
- [Room picker](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/showrooms.tsx): `src/app/selection/showrooms.tsx`
- [Seat display and selection](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/displayroom.tsx): `src/app/selection/displayroom.tsx`

### Seating export

- [PDF generator](https://github.com/deleteme0/seating-app/blob/master/src/app/selection/pdfmaker.tsx): `src/app/selection/pdfmaker.tsx`
- **Seating PDF**

### Other components

- **User**
- **Management API**
- **jsPDF library**

## Connections

- User → Login screen: opens (evidence: `src/app/page.tsx`)
- Login screen → Selection page: continues to (evidence: `src/app/page.tsx`)
- User → Room and student setup: opens (evidence: `src/app/manage/page.tsx`)
- Room and student setup → Management API: posts room and student data (evidence: `src/app/manage/page.tsx`)
- Room and student setup → Selection page: links to (evidence: `src/app/manage/page.tsx`)
- Selection page → Management API: fetches rooms and students (evidence: `src/app/selection/page.tsx`)
- Selection page → Selection and controls: renders (evidence: `src/app/selection/page.tsx`)
- Selection page → Room picker: renders (evidence: `src/app/selection/page.tsx`)
- Selection page → PDF generator: renders (evidence: `src/app/selection/page.tsx`)
- Selection and controls → Auto seating allocator: calls for arrangement (evidence: `src/app/selection/searchbar.tsx`)
- Room picker → Seat display and selection: renders (evidence: `src/app/selection/showrooms.tsx`)
- User → Selection and controls: selects and arranges (evidence: `src/app/selection/searchbar.tsx`)
- User → Seat display and selection: selects seats (evidence: `src/app/selection/displayroom.tsx`)
- User → PDF generator: requests download (evidence: `src/app/selection/pdfmaker.tsx`)
- PDF generator → jsPDF library: creates PDF with (evidence: `src/app/selection/pdfmaker.tsx`)
- PDF generator → Seating PDF: saves (evidence: `src/app/selection/pdfmaker.tsx`)
