# towhidur-rahmaan/car-doctor-client architecture

> Architecture diagram of the GitHub repository towhidur-rahmaan/car-doctor-client, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/towhidur-rahmaan/car-doctor-client
- Repository: https://github.com/towhidur-rahmaan/car-doctor-client

## Overview

1. **Application type and deployment**
   - This is a **React single-page application** built with **Vite** and styled with **Tailwind CSS**.
   - It is deployed on **Firebase Hosting** (`firebase.json`, `.firebase`, `.firebaserc`), with the live app linked in the README.

2. **Top-level product shape**
   - The app is a **car service/customer portal** with two major user experiences:
     - a **public marketing + booking flow**
     - a **protected authenticated area** for bookings, profiles, reviews, and admin management
   - The UI and navigation are organized to support both **customer-facing pages** and an **admin dashboard**.

3. **Core shell and routing**
   - `src/main.jsx` boots the app, and `src/Routes.jsx` is the main route map.
   - `src/Layout/Main.jsx` and `src/Layout/DashboardLayout.jsx` define the two main shells:
     - the public site layout
     - the dashboard layout
   - `src/ErrorPage.jsx` provides the fallback boundary for invalid routes.

4. **Authentication and access control**
   - `src/provider/AuthProvider.jsx` centralizes authentication state and likely exposes the user/session context to the app.
   - `src/Routes.jsx/PrivateRoute.jsx` protects logged-in-only pages.
   - `src/Routes.jsx/AdminRoute.jsx` adds an admin-only boundary for dashboard management screens.
   - `src/hooks/useAdmin.jsx` is a role check hook used to distinguish admin users from regular users.

5. **Firebase integration boundary**
   - `src/firebase/firebase.config.js` holds Firebase client configuration.
   - The repo structure strongly suggests Firebase is the main backend dependency for **auth** and likely **data persistence**.
   - The presence of Firebase Hosting config also means the SPA is served as static assets from Firebase rather than a custom server.

6. **Public site content**
   - The public experience is split into reusable feature sections under `src/pages/Home/...`:
     - banner/hero
     - why choose us
     - services
     - customer reviews
     - team
     - contact/products area
   - `src/pages/AboutUs/AboutUs.jsx` provides a standalone informational page.
   - `src/pages/ServiceDetails/ServiceDetails.jsx` represents a detail view for an individual service.

7. **Booking and customer workflows**
   - `src/pages/BookService/BookService.jsx` is the primary booking entry point.
   - `src/pages/Bookings/Bookings.jsx` and `src/pages/Bookings/BookingRow.jsx` represent the customer’s booking list and row-level actions.
   - `src/pages/AddReview/AddReview.jsx` is a customer action page for submitting feedback.
   - `src/pages/Profile/Profile.jsx` is the authenticated user account area.

8. **Admin dashboard workflows**
   - `src/pages/Dashboard/AdminHome.jsx` is the dashboard landing page for admins.
   - `src/pages/Dashboard/AddService.jsx`, `ManageServices.jsx`, `ManageBookings.jsx`, and `ManageReviews.jsx` are the main operational screens.
   - These pages form the admin control plane for maintaining services, handling bookings, and moderating reviews.

9. **Shared UI and cross-cutting components**
   - `src/pages/Shared/NavBar/NavBar.jsx` and `src/pages/Shared/Footer/Footer.jsx` provide global site chrome.
   - Root-level UI helpers such as `FloatingCTA.jsx`, `GlobalEffects.jsx`, `IntroLoader.jsx`, and `SectionReveal.jsx` suggest reusable animation/UX wrappers used across multiple pages.
   - These components are cross-cutting presentation layers, not business logic.

10. **Static content and asset flow**
   - `public/products.json` and `public/services.json` are static data sources consumed by the frontend at runtime.
   - The `src/assets/` tree contains images/icons for banners, products, services, login screens, customer sections, and team pages.
   - This indicates a mostly **client-driven content model**, where some visible content is loaded from static JSON and bundled assets rather than from a separate CMS.

11. **Route and feature boundaries**
   - The repository is organized by **feature/page** rather than by low-level components.
   - Public marketing pages, authenticated user pages, and admin pages are separated into different folders, which maps cleanly to distinct diagram layers:
     - anonymous/public
     - authenticated customer
     - authenticated admin

12. **Build and runtime tooling**
   - `vite.config.js`, `tailwind.config.js`, `postcss.config.js`, and `eslint.config.js` define the frontend build, styling, and linting toolchain.
   - There is no evidence of a custom backend service in this repo; the architecture appears to be a **frontend SPA + Firebase-backed identity/deployment setup** with static content and client-side routing.

Main entry points: [`src/Routes.jsx/AdminRoute.jsx`](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx/AdminRoute.jsx) (Admin gate), [`src/Routes.jsx/PrivateRoute.jsx`](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx/PrivateRoute.jsx) (Private gate), [`src/pages/Home/Home/Home.jsx`](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Home.jsx) (Home page), [`src/Routes.jsx`](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx) (Route map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_core["Core shell"]
  node_node_main(("Entry point<br/>boot<br/>[main.jsx]"))
  node_node_routes["Route map<br/>routing<br/>[Routes.jsx]"]
  node_node_private_route{{"Private gate<br/>auth guard<br/>[PrivateRoute.jsx]"}}
  node_node_admin_route{{"Admin gate<br/>role guard<br/>[AdminRoute.jsx]"}}
  node_node_auth[("Auth provider<br/>session context<br/>[AuthProvider.jsx]")]
  node_node_use_admin(("Admin check<br/>role hook<br/>[useAdmin.jsx]"))
  node_node_main_layout["Main shell<br/>public layout<br/>[Main.jsx]"]
  node_node_dashboard_layout["Dashboard shell<br/>dashboard layout"]
  node_node_error["Error page<br/>fallback<br/>[ErrorPage.jsx]"]
  node_node_nav["Nav bar<br/>site chrome<br/>[NavBar.jsx]"]
  node_node_footer["Footer<br/>site chrome<br/>[Footer.jsx]"]
  node_node_fx(("UI effects<br/>presentation wrappers<br/>[FloatingCTA.jsx]"))
end

subgraph group_grp_public["Public site"]
  node_node_home["Home page<br/>public page<br/>[Home.jsx]"]
  node_node_banner["Banner<br/>home section<br/>[Banner.jsx]"]
  node_node_services["Services<br/>catalog section<br/>[Services.jsx]"]
  node_node_contact["Contact<br/>content section<br/>[Contact.jsx]"]
  node_node_customer_review["Reviews<br/>home section<br/>[CustomerReview.jsx]"]
  node_node_team["Team<br/>home section<br/>[Team.jsx]"]
  node_node_why["Why us<br/>home section<br/>[WhyChooseUs.jsx]"]
  node_node_about["About us<br/>public page<br/>[AboutUs.jsx]"]
  node_node_service_details["Service details<br/>detail page<br/>[ServiceDetails.jsx]"]
end

subgraph group_grp_customer["Customer area"]
  node_node_book_service["Book service<br/>booking page<br/>[BookService.jsx]"]
  node_node_bookings["Bookings<br/>customer page<br/>[Bookings.jsx]"]
  node_node_booking_row["Booking row<br/>row component<br/>[BookingRow.jsx]"]
  node_node_add_review["Add review<br/>customer page<br/>[AddReview.jsx]"]
  node_node_profile["Profile<br/>account page<br/>[Profile.jsx]"]
  node_node_login["Login<br/>auth page<br/>[Login.jsx]"]
  node_node_signup["Signup<br/>auth page<br/>[Signup.jsx]"]
end

subgraph group_grp_admin["Admin area"]
  node_node_admin_home["Admin home<br/>dashboard page<br/>[AdminHome.jsx]"]
  node_node_add_service["Add service<br/>admin page<br/>[AddService.jsx]"]
  node_node_manage_services["Manage services<br/>admin page<br/>[ManageServices.jsx]"]
  node_node_manage_bookings["Manage bookings<br/>admin page<br/>[ManageBookings.jsx]"]
  node_node_manage_reviews["Manage reviews<br/>admin page<br/>[ManageReviews.jsx]"]
end

subgraph group_grp_data["Data and assets"]
  node_node_firebase[("Firebase config<br/>backend client<br/>[firebase.config.js]")]
end

node_node_main -->|"boots"| node_node_routes
node_node_routes -->|"public shell"| node_node_main_layout
node_node_routes -->|"dashboard shell"| node_node_dashboard_layout
node_node_routes -->|"guards"| node_node_private_route
node_node_routes -->|"guards"| node_node_admin_route
node_node_routes -->|"fallback"| node_node_error
node_node_auth -->|"session"| node_node_private_route
node_node_auth -->|"session"| node_node_admin_route
node_node_auth -->|"context"| node_node_use_admin
node_node_firebase -->|"auth backend"| node_node_auth
node_node_main_layout -->|"includes"| node_node_nav
node_node_main_layout -->|"includes"| node_node_footer
node_node_main_layout -->|"reuses"| node_node_fx
node_node_home -->|"composes"| node_node_banner
node_node_home -->|"composes"| node_node_services
node_node_home -->|"composes"| node_node_contact
node_node_home -->|"composes"| node_node_customer_review
node_node_home -->|"composes"| node_node_team
node_node_home -->|"composes"| node_node_why
node_node_services -->|"leads to"| node_node_service_details
node_node_service_details -->|"routes to"| node_node_book_service
node_node_private_route -->|"protects"| node_node_book_service
node_node_private_route -->|"protects"| node_node_bookings
node_node_private_route -->|"protects"| node_node_add_review
node_node_private_route -->|"protects"| node_node_profile
node_node_private_route -->|"feeds"| node_node_admin_route
node_node_bookings -->|"renders"| node_node_booking_row
node_node_admin_route -->|"protects"| node_node_admin_home
node_node_admin_route -->|"protects"| node_node_add_service
node_node_admin_route -->|"protects"| node_node_manage_services
node_node_admin_route -->|"protects"| node_node_manage_bookings
node_node_admin_route -->|"protects"| node_node_manage_reviews

click node_node_main "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/main.jsx"
click node_node_routes "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx"
click node_node_private_route "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx/PrivateRoute.jsx"
click node_node_admin_route "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx/AdminRoute.jsx"
click node_node_auth "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/provider/AuthProvider.jsx"
click node_node_use_admin "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/hooks/useAdmin.jsx"
click node_node_main_layout "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Layout/Main.jsx"
click node_node_dashboard_layout "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Layout/DashboardLayout.jsx"
click node_node_error "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/ErrorPage.jsx"
click node_node_nav "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Shared/NavBar/NavBar.jsx"
click node_node_footer "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Shared/Footer/Footer.jsx"
click node_node_fx "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/FloatingCTA.jsx"
click node_node_home "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Home.jsx"
click node_node_banner "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Banner/Banner.jsx"
click node_node_services "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Services/Services.jsx"
click node_node_contact "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Contact/Contact.jsx"
click node_node_customer_review "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/CustomerReview/CustomerReview.jsx"
click node_node_team "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Team/Team.jsx"
click node_node_why "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/WhyChooseUs/WhyChooseUs.jsx"
click node_node_about "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/AboutUs/AboutUs.jsx"
click node_node_service_details "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/ServiceDetails/ServiceDetails.jsx"
click node_node_book_service "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/BookService/BookService.jsx"
click node_node_bookings "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Bookings/Bookings.jsx"
click node_node_booking_row "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Bookings/BookingRow.jsx"
click node_node_add_review "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/AddReview/AddReview.jsx"
click node_node_profile "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Profile/Profile.jsx"
click node_node_login "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Login/Login.jsx"
click node_node_signup "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Signup/Signup.jsx"
click node_node_admin_home "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/AdminHome.jsx"
click node_node_add_service "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/AddService.jsx"
click node_node_manage_services "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/ManageServices.jsx"
click node_node_manage_bookings "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/ManageBookings.jsx"
click node_node_manage_reviews "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/ManageReviews.jsx"
click node_node_firebase "https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/firebase/firebase.config.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_node_main,node_node_routes,node_node_private_route,node_node_admin_route,node_node_auth,node_node_use_admin,node_node_main_layout,node_node_dashboard_layout,node_node_error,node_node_nav,node_node_footer,node_node_fx toneBlue
class node_node_home,node_node_banner,node_node_services,node_node_contact,node_node_customer_review,node_node_team,node_node_why,node_node_about,node_node_service_details toneAmber
class node_node_book_service,node_node_bookings,node_node_booking_row,node_node_add_review,node_node_profile,node_node_login,node_node_signup toneMint
class node_node_admin_home,node_node_add_service,node_node_manage_services,node_node_manage_bookings,node_node_manage_reviews toneRose
class node_node_firebase toneIndigo
```

## Components

### Core shell

App bootstrap, routing, layouts, auth, and cross-cutting UI

- [Entry point](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/main.jsx): boot · Mounts the React app and starts routing · `src/main.jsx`
- [Route map](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx): routing · Defines public, private, and admin routes · `src/Routes.jsx`
- [Private gate](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx/PrivateRoute.jsx): auth guard · Blocks unauthenticated access to protected pages · `src/Routes.jsx/PrivateRoute.jsx`
- [Admin gate](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Routes.jsx/AdminRoute.jsx): role guard · Restricts dashboard management to admin users · `src/Routes.jsx/AdminRoute.jsx`
- [Auth provider](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/provider/AuthProvider.jsx): session context · Holds global login state and user session data · `src/provider/AuthProvider.jsx`
- [Admin check](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/hooks/useAdmin.jsx): role hook · Determines whether the current user is an admin · `src/hooks/useAdmin.jsx`
- [Main shell](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Layout/Main.jsx): public layout · Shared layout for the public site · `src/Layout/Main.jsx`
- [Dashboard shell](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/Layout/DashboardLayout.jsx): dashboard layout · Shared layout for protected dashboard pages · `src/Layout/DashboardLayout.jsx`
- [Error page](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/ErrorPage.jsx): fallback · Displays invalid-route or app-level error state · `src/ErrorPage.jsx`
- [Nav bar](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Shared/NavBar/NavBar.jsx): site chrome · Global top navigation · `src/pages/Shared/NavBar/NavBar.jsx`
- [Footer](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Shared/Footer/Footer.jsx): site chrome · Global footer for public pages · `src/pages/Shared/Footer/Footer.jsx`
- [UI effects](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/FloatingCTA.jsx): presentation wrappers · Reusable animation and CTA helpers · `FloatingCTA.jsx`

### Public site

Anonymous marketing and service discovery experience

- [Home page](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Home.jsx): public page · Landing page composed from reusable marketing sections · `src/pages/Home/Home/Home.jsx`
- [Banner](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Banner/Banner.jsx): home section · Hero entry section · `src/pages/Home/Banner/Banner.jsx`
- [Services](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Services/Services.jsx): catalog section · Shows service offerings and cards · `src/pages/Home/Services/Services.jsx`
- [Contact](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Contact/Contact.jsx): content section · Contact and product showcase area · `src/pages/Home/Home/Contact/Contact.jsx`
- [Reviews](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/CustomerReview/CustomerReview.jsx): home section · Customer testimonials section · `src/pages/Home/Home/CustomerReview/CustomerReview.jsx`
- [Team](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/Team/Team.jsx): home section · Team introduction section · `src/pages/Home/Home/Team/Team.jsx`
- [Why us](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Home/Home/WhyChooseUs/WhyChooseUs.jsx): home section · Value proposition section · `src/pages/Home/Home/WhyChooseUs/WhyChooseUs.jsx`
- [About us](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/AboutUs/AboutUs.jsx): public page · Standalone informational page · `src/pages/AboutUs/AboutUs.jsx`
- [Service details](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/ServiceDetails/ServiceDetails.jsx): detail page · Shows an individual service · `src/pages/ServiceDetails/ServiceDetails.jsx`

### Customer area

Authenticated customer workflows

- [Book service](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/BookService/BookService.jsx): booking page · Primary booking entry point · `src/pages/BookService/BookService.jsx`
- [Bookings](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Bookings/Bookings.jsx): customer page · Customer booking list and actions · `src/pages/Bookings/Bookings.jsx`
- [Booking row](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Bookings/BookingRow.jsx): row component · Row-level booking actions · `src/pages/Bookings/BookingRow.jsx`
- [Add review](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/AddReview/AddReview.jsx): customer page · Authenticated feedback submission page · `src/pages/AddReview/AddReview.jsx`
- [Profile](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Profile/Profile.jsx): account page · Authenticated user account area · `src/pages/Profile/Profile.jsx`
- [Login](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Login/Login.jsx): auth page · User sign-in screen · `src/pages/Login/Login.jsx`
- [Signup](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Signup/Signup.jsx): auth page · User registration screen · `src/pages/Signup/Signup.jsx`

### Admin area

Protected dashboard management screens

- [Admin home](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/AdminHome.jsx): dashboard page · Dashboard landing page for admins · `src/pages/Dashboard/AdminHome.jsx`
- [Add service](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/AddService.jsx): admin page · Creates new services · `src/pages/Dashboard/AddService.jsx`
- [Manage services](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/ManageServices.jsx): admin page · Edits and maintains services · `src/pages/Dashboard/ManageServices.jsx`
- [Manage bookings](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/ManageBookings.jsx): admin page · Handles booking operations · `src/pages/Dashboard/ManageBookings.jsx`
- [Manage reviews](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/pages/Dashboard/ManageReviews.jsx): admin page · Moderates customer reviews · `src/pages/Dashboard/ManageReviews.jsx`

### Data and assets

Firebase client setup and runtime content sources

- [Firebase config](https://github.com/towhidur-rahmaan/car-doctor-client/blob/main/src/firebase/firebase.config.js): backend client · Client-side Firebase setup for auth and persistence · `src/firebase/firebase.config.js`

## Connections

- Entry point → Route map: boots · Entry point renders the route map
- Route map → Main shell: public shell · Public pages are wrapped in the main layout
- Route map → Dashboard shell: dashboard shell · Protected admin pages use the dashboard layout
- Route map → Private gate: guards · Private routes protect authenticated customer pages
- Route map → Admin gate: guards · Admin routes enforce role-based access
- Route map → Error page: fallback · Unhandled routes go to the error page
- Auth provider → Private gate: session · Authentication state powers protected access
- Auth provider → Admin gate: session · Role checks depend on the current user session
- Auth provider → Admin check: context · Admin hook reads from auth state
- Firebase config → Auth provider: auth backend · Firebase provides the client auth boundary
- Main shell → Nav bar: includes · Public shell contains site navigation
- Main shell → Footer: includes · Public shell contains site footer
- Main shell → UI effects: reuses · Public experience uses shared UI effects
- Home page → Banner: composes · Home page assembles hero section
- Home page → Services: composes · Home page assembles services section
- Home page → Contact: composes · Home page assembles contact/products section
- Home page → Reviews: composes · Home page assembles testimonials section
- Home page → Team: composes · Home page assembles team section
- Home page → Why us: composes · Home page assembles value proposition section
- Services → Service details: leads to · Service browsing connects into detail views
- Service details → Book service: routes to · Detail view leads into booking
- Private gate → Book service: protects · Booking requires a signed-in user
- Private gate → Bookings: protects · Booking history is authenticated
- Private gate → Add review: protects · Review submission is authenticated
- Private gate → Profile: protects · Profile access requires login
- Private gate → Admin gate: feeds · Admin-only pages are also protected by login
- Bookings → Booking row: renders · Bookings list is built from row items
- Admin gate → Admin home: protects · Admin landing page is role-gated
- Admin gate → Add service: protects · Add-service screen is admin only
- Admin gate → Manage services: protects · Service management is admin only
- Admin gate → Manage bookings: protects · Booking operations are admin only
- Admin gate → Manage reviews: protects · Review moderation is admin only
