# zeppyx13/coasther-dashboard architecture

> Architecture diagram of the GitHub repository zeppyx13/coasther-dashboard, 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/zeppyx13/coasther-dashboard
- Repository: https://github.com/zeppyx13/coasther-dashboard

## Overview

Coasther is a Next.js admin dashboard for managing a boarding-house business. Admins sign in, enter a shared dashboard shell, and use feature pages to manage rooms, tenants, leases, invoices and payments, complaints, announcements, facilities, ratings, tariffs, and IoT devices. Feature interfaces call a shared API client to communicate with the Coasther backend; IoT monitoring also receives Socket.IO telemetry and sends device commands. The graph reflects README capabilities where feature implementation was not sampled; those backend relationships are documented at product level, not verified in unsampled source.

Main entry points: [`src/app/dashboard/page.tsx`](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/app/dashboard/page.tsx) (Dashboard overview), [`src/components/login/loginform.tsx`](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/login/loginform.tsx) (Login form), [`src/components/kamar/room-list-section.tsx`](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-list-section.tsx) (Room management), [`src/components/iot/iot-monitor-section.tsx`](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/iot/iot-monitor-section.tsx) (IoT monitoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_login["Login page<br/>[page.tsx]"]
  node_loginform["Login form<br/>[loginform.tsx]"]
  node_authapi["Authentication API<br/>[auth-api.ts]"]
  node_auth["Session tokens<br/>[auth.ts]"]
  node_shell["Dashboard shell"]
  node_api["HTTP API client<br/>[api.ts]"]
end

subgraph group_overview["Dashboard overview"]
  node_dashboard["Dashboard overview<br/>[page.tsx]"]
  node_stats["Live statistics"]
  node_complaintsdash["Complaint summary"]
  node_roomsdash["Room summary<br/>[rooms-section.tsx]"]
  node_chat["Coasther AI<br/>[admin-chat.tsx]"]
end

subgraph group_operations["Property operations"]
  node_rooms["Room management"]
  node_roomform["Room editor"]
  node_roomoverview["Room overview"]
  node_roomapi["Room API<br/>[room-api.ts]"]
  node_tenants["Tenant management"]
  node_leases["Lease management"]
  node_facilities["Facility management"]
end

subgraph group_finance["Finance and feedback"]
  node_billing["Invoices and payments"]
  node_payment["Payment records"]
  node_complaints["Complaint management"]
  node_announcements["Announcements"]
  node_ratings["Ratings and reviews<br/>[rating-all-tab.tsx]"]
end

subgraph group_iot["IoT and configuration"]
  node_iot["IoT monitoring"]
  node_meters["Meter management"]
  node_terminal["IoT terminal"]
  node_tariffs["Tariff settings"]
end

node_admin(("Admin or manager"))
node_backend{{"Coasther backend"}}
node_socket{{"Socket.IO service"}}

node_admin -->|"signs in"| node_login
node_login -->|"renders"| node_loginform
node_loginform -->|"authenticates"| node_authapi
node_loginform -->|"stores session"| node_auth
node_authapi -->|"uses client"| node_api
node_admin -->|"opens dashboard"| node_dashboard
node_dashboard -->|"renders"| node_shell
node_shell -->|"renders"| node_chat
node_dashboard -->|"renders"| node_stats
node_dashboard -->|"renders"| node_complaintsdash
node_dashboard -->|"renders"| node_roomsdash
node_admin -->|"manages rooms"| node_rooms
node_rooms -->|"opens editor"| node_roomform
node_rooms -->|"loads and updates"| node_roomapi
node_roomform -.->|"submits changes"| node_roomapi
node_admin -->|"reviews occupancy"| node_roomoverview
node_admin -->|"manages tenants"| node_tenants
node_admin -->|"manages leases"| node_leases
node_admin -->|"manages facilities"| node_facilities
node_admin -->|"monitors invoices"| node_billing
node_admin -->|"monitors payments"| node_payment
node_admin -->|"updates complaints"| node_complaints
node_admin -->|"creates announcements"| node_announcements
node_announcements -->|"broadcasts via FCM"| node_backend
node_admin -->|"reviews ratings"| node_ratings
node_ratings -->|"fetches reviews"| node_backend
node_admin -->|"monitors and controls"| node_iot
node_iot -->|"fetches status and sends commands"| node_backend
node_iot -->|"receives telemetry"| node_socket
node_admin -->|"manages meters"| node_meters
node_admin -->|"uses device terminal"| node_terminal
node_admin -->|"configures tariffs"| node_tariffs
node_roomapi -->|"uses client"| node_api
node_api -->|"sends requests"| node_backend

click node_login "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/app/page.tsx"
click node_loginform "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/login/loginform.tsx"
click node_authapi "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/auth-api.ts"
click node_auth "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/auth.ts"
click node_shell "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/nav/dashboard-shell.tsx"
click node_dashboard "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/app/dashboard/page.tsx"
click node_stats "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/stat/dashboard-stats-section.tsx"
click node_complaintsdash "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/complaint/complaints-section.tsx"
click node_roomsdash "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/rooms/rooms-section.tsx"
click node_chat "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/ai-chat/admin-chat.tsx"
click node_rooms "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-list-section.tsx"
click node_roomform "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-form-modal.tsx"
click node_roomoverview "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-overview-section.tsx"
click node_roomapi "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/room-api.ts"
click node_tenants "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/penghuni/tenant-list-section.tsx"
click node_leases "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kontrak/lease-form-modal.tsx"
click node_facilities "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/fasilitas/facility-section.tsx"
click node_billing "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/tagihan/invoice-list-section.tsx"
click node_payment "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/pembayaran/payment-list-section.tsx"
click node_complaints "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/keluhan/complaint-list-section.tsx"
click node_announcements "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/pengumuman/announcement-list-section.tsx"
click node_ratings "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/rating/rating-all-tab.tsx"
click node_iot "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/iot/iot-monitor-section.tsx"
click node_meters "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/iot/meter-list-section.tsx"
click node_terminal "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/terminal/iot-terminal-section.tsx"
click node_tariffs "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/settings/tariff-settings-card.tsx"
click node_api "https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/api.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_login,node_loginform,node_authapi,node_auth,node_shell,node_api toneBlue
class node_dashboard,node_stats,node_complaintsdash,node_roomsdash,node_chat toneAmber
class node_rooms,node_roomform,node_roomoverview,node_roomapi,node_tenants,node_leases,node_facilities toneMint
class node_billing,node_payment,node_complaints,node_announcements,node_ratings toneRose
class node_iot,node_meters,node_terminal,node_tariffs,node_admin,node_backend,node_socket toneIndigo
```

## Components

### Access and navigation

- [Login page](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Login form](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/login/loginform.tsx): `src/components/login/loginform.tsx`
- [Authentication API](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/auth-api.ts): `src/lib/auth-api.ts`
- [Session tokens](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Dashboard shell](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/nav/dashboard-shell.tsx): `src/components/dashboard/nav/dashboard-shell.tsx`
- [HTTP API client](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/api.ts): `src/lib/api.ts`

### Dashboard overview

- [Dashboard overview](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Live statistics](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/stat/dashboard-stats-section.tsx): `src/components/dashboard/stat/dashboard-stats-section.tsx`
- [Complaint summary](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/complaint/complaints-section.tsx): `src/components/dashboard/complaint/complaints-section.tsx`
- [Room summary](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/rooms/rooms-section.tsx): `src/components/dashboard/rooms/rooms-section.tsx`
- [Coasther AI](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/dashboard/ai-chat/admin-chat.tsx): `src/components/dashboard/ai-chat/admin-chat.tsx`

### Property operations

- [Room management](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-list-section.tsx): `src/components/kamar/room-list-section.tsx`
- [Room editor](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-form-modal.tsx): `src/components/kamar/room-form-modal.tsx`
- [Room overview](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kamar/room-overview-section.tsx): `src/components/kamar/room-overview-section.tsx`
- [Room API](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/lib/room-api.ts): `src/lib/room-api.ts`
- [Tenant management](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/penghuni/tenant-list-section.tsx): `src/components/penghuni/tenant-list-section.tsx`
- [Lease management](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/kontrak/lease-form-modal.tsx): `src/components/kontrak/lease-form-modal.tsx`
- [Facility management](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/fasilitas/facility-section.tsx): `src/components/fasilitas/facility-section.tsx`

### Finance and feedback

- [Invoices and payments](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/tagihan/invoice-list-section.tsx): `src/components/tagihan/invoice-list-section.tsx`
- [Payment records](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/pembayaran/payment-list-section.tsx): `src/components/pembayaran/payment-list-section.tsx`
- [Complaint management](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/keluhan/complaint-list-section.tsx): `src/components/keluhan/complaint-list-section.tsx`
- [Announcements](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/pengumuman/announcement-list-section.tsx): `src/components/pengumuman/announcement-list-section.tsx`
- [Ratings and reviews](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/rating/rating-all-tab.tsx): `src/components/rating/rating-all-tab.tsx`

### IoT and configuration

- [IoT monitoring](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/iot/iot-monitor-section.tsx): `src/components/iot/iot-monitor-section.tsx`
- [Meter management](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/iot/meter-list-section.tsx): `src/components/iot/meter-list-section.tsx`
- [IoT terminal](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/terminal/iot-terminal-section.tsx): `src/components/terminal/iot-terminal-section.tsx`
- [Tariff settings](https://github.com/zeppyx13/coasther-dashboard/blob/main/src/components/settings/tariff-settings-card.tsx): `src/components/settings/tariff-settings-card.tsx`

### Other components

- **Admin or manager**
- **Coasther backend**
- **Socket.IO service**

## Connections

- Admin or manager → Login page: signs in (evidence: `README.md`)
- Login page → Login form: renders (evidence: `src/app/page.tsx`)
- Login form → Authentication API: authenticates (evidence: `src/components/login/loginform.tsx`)
- Login form → Session tokens: stores session (evidence: `src/components/login/loginform.tsx`)
- Authentication API → HTTP API client: uses client (evidence: `src/lib/auth-api.ts`)
- Admin or manager → Dashboard overview: opens dashboard (evidence: `README.md`)
- Dashboard overview → Dashboard shell: renders (evidence: `src/app/dashboard/page.tsx`)
- Dashboard shell → Coasther AI: renders (evidence: `src/components/dashboard/nav/dashboard-shell.tsx`)
- Dashboard overview → Live statistics: renders (evidence: `src/app/dashboard/page.tsx`)
- Dashboard overview → Complaint summary: renders (evidence: `src/app/dashboard/page.tsx`)
- Dashboard overview → Room summary: renders (evidence: `src/app/dashboard/page.tsx`)
- Admin or manager → Room management: manages rooms (evidence: `README.md`)
- Room management → Room editor: opens editor (evidence: `src/components/kamar/room-list-section.tsx`)
- Room management → Room API: loads and updates (evidence: `src/components/kamar/room-list-section.tsx`)
- Room editor → Room API: submits changes (evidence: `src/components/kamar/room-form-modal.tsx`)
- Admin or manager → Room overview: reviews occupancy
- Admin or manager → Tenant management: manages tenants (evidence: `README.md`)
- Admin or manager → Lease management: manages leases (evidence: `README.md`)
- Admin or manager → Facility management: manages facilities (evidence: `README.md`)
- Admin or manager → Invoices and payments: monitors invoices (evidence: `README.md`)
- Admin or manager → Payment records: monitors payments (evidence: `README.md`)
- Admin or manager → Complaint management: updates complaints (evidence: `README.md`)
- Admin or manager → Announcements: creates announcements (evidence: `README.md`)
- Announcements → Coasther backend: broadcasts via FCM (evidence: `README.md`)
- Admin or manager → Ratings and reviews: reviews ratings
- Ratings and reviews → Coasther backend: fetches reviews
- Admin or manager → IoT monitoring: monitors and controls (evidence: `README.md`)
- IoT monitoring → Coasther backend: fetches status and sends commands (evidence: `src/components/iot/iot-monitor-section.tsx`)
- IoT monitoring → Socket.IO service: receives telemetry (evidence: `src/components/iot/iot-monitor-section.tsx`)
- Admin or manager → Meter management: manages meters (evidence: `README.md`)
- Admin or manager → IoT terminal: uses device terminal (evidence: `README.md`)
- Admin or manager → Tariff settings: configures tariffs (evidence: `README.md`)
- Room API → HTTP API client: uses client (evidence: `src/lib/room-api.ts`)
- HTTP API client → Coasther backend: sends requests (evidence: `README.md`)
