# bhawna-ai/bookeasy architecture

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

- Interactive diagram: https://gitdiagram.com/bhawna-ai/bookeasy
- Repository: https://github.com/bhawna-ai/bookeasy

## Overview

BookEasy lets customers browse service categories, submit appointment details, and retrieve bookings by email; businesses use a login and dashboard to manage bookings. The backend exposes booking and health endpoints, while a Mongoose model defines booking data and generates references. Frontend behavior beyond the excerpt is represented only where the README documents it; the dashboard’s specific API interactions are not shown in sampled source.

Main entry points: [`backend/server.js`](https://github.com/bhawna-ai/bookeasy/blob/main/backend/server.js) (REST API), [`frontend/dashboard.html`](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/dashboard.html) (Booking dashboard), [`frontend/index.html`](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/index.html) (Service catalog), [`frontend/booking.html`](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/booking.html) (Booking form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer booking"]
  node_catalog["Service catalog<br/>[index.html]"]
  node_category_pages["Category listings<br/>[restaurants.html]"]
  node_booking_form["Booking form<br/>[booking.html]"]
  node_booking_logic["Booking interactions<br/>[booking.js]"]
end

subgraph group_business["Business management"]
  node_business_login["Business login"]
  node_dashboard["Booking dashboard<br/>[dashboard.html]"]
end

subgraph group_backend["Booking backend"]
  node_api["REST API<br/>[server.js]"]
  node_booking_model["Booking model<br/>[Booking.js]"]
  node_mongodb[("MongoDB")]
end

node_customer(("Customer"))
node_business(("Business user"))
node_monitor(("Health monitor"))

node_customer -->|"browses"| node_catalog
node_catalog -->|"offers categories"| node_category_pages
node_customer -->|"enters details"| node_booking_form
node_booking_form -->|"uses"| node_booking_logic
node_booking_logic -->|"submits and looks up"| node_api
node_api -->|"queries and saves"| node_booking_model
node_api -->|"reads and writes"| node_mongodb
node_business -->|"signs in"| node_business_login
node_business_login -->|"opens"| node_dashboard
node_business -->|"manages bookings"| node_dashboard
node_dashboard -.->|"manages bookings"| node_api
node_monitor -->|"checks health"| node_api

click node_catalog "https://github.com/bhawna-ai/bookeasy/blob/main/frontend/index.html"
click node_category_pages "https://github.com/bhawna-ai/bookeasy/blob/main/frontend/restaurants.html"
click node_booking_form "https://github.com/bhawna-ai/bookeasy/blob/main/frontend/booking.html"
click node_booking_logic "https://github.com/bhawna-ai/bookeasy/blob/main/frontend/booking.js"
click node_business_login "https://github.com/bhawna-ai/bookeasy/blob/main/frontend/business-login.html"
click node_dashboard "https://github.com/bhawna-ai/bookeasy/blob/main/frontend/dashboard.html"
click node_api "https://github.com/bhawna-ai/bookeasy/blob/main/backend/server.js"
click node_booking_model "https://github.com/bhawna-ai/bookeasy/blob/main/backend/models/Booking.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_catalog,node_category_pages,node_booking_form,node_booking_logic,node_business toneBlue
class node_business_login,node_dashboard toneAmber
class node_api,node_booking_model,node_mongodb toneMint
class node_customer,node_monitor toneIndigo
```

## Components

### Customer booking

- [Service catalog](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/index.html): `frontend/index.html`
- [Category listings](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/restaurants.html): `frontend/restaurants.html`
- [Booking form](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/booking.html): `frontend/booking.html`
- [Booking interactions](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/booking.js): `frontend/booking.js`

### Business management

- [Business login](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/business-login.html): `frontend/business-login.html`
- [Booking dashboard](https://github.com/bhawna-ai/bookeasy/blob/main/frontend/dashboard.html): `frontend/dashboard.html`

### Booking backend

- [REST API](https://github.com/bhawna-ai/bookeasy/blob/main/backend/server.js): `backend/server.js`
- [Booking model](https://github.com/bhawna-ai/bookeasy/blob/main/backend/models/Booking.js): `backend/models/Booking.js`
- **MongoDB**

### Other components

- **Customer**
- **Business user**
- **Health monitor**

## Connections

- Customer → Service catalog: browses (evidence: `README.md`)
- Service catalog → Category listings: offers categories (evidence: `README.md`)
- Customer → Booking form: enters details (evidence: `README.md`)
- Booking form → Booking interactions: uses (evidence: `README.md`)
- Booking interactions → REST API: submits and looks up (evidence: `frontend/booking.js`)
- REST API → Booking model: queries and saves (evidence: `backend/server.js`)
- REST API → MongoDB: reads and writes (evidence: `backend/server.js`)
- Business user → Business login: signs in (evidence: `README.md`)
- Business login → Booking dashboard: opens (evidence: `README.md`)
- Business user → Booking dashboard: manages bookings (evidence: `README.md`)
- Booking dashboard → REST API: manages bookings (evidence: `README.md`)
- Health monitor → REST API: checks health (evidence: `README.md`)
