# syedfayazali/docufast-app architecture

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

- Interactive diagram: https://gitdiagram.com/syedfayazali/docufast-app
- Repository: https://github.com/syedfayazali/docufast-app

## Overview

DocuFast India is a customer-facing services platform for applications, appointments, and payments, with an admin area for managing orders and customers. Users enter through the routed web app, browse services, submit applications or book appointments, and can pay; admins manage operational records and send customer updates. The sampled server code confirms payment-order creation and webhook settlement, plus appointment email/push and application-update notifications. Many page and API implementations were not sampled, so those capabilities are represented without speculative internal links.

Main entry points: [`docufast/src/App.jsx`](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/App.jsx) (Routes and app shell), [`docufast/api/_lib/core.js`](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/core.js) (Server core helpers), [`docufast/api/_lib/push.js`](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/push.js) (Web push delivery), [`docufast/api/appointment-mail.js`](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/appointment-mail.js) (Appointment notices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_app["Routes and app shell<br/>[App.jsx]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_scroll["Route scrolling<br/>[ScrollToTop.jsx]"]
end

subgraph group_operations["Customer operations"]
  node_services["Service catalog<br/>[Services.jsx]"]
  node_application["Applications<br/>[Applications.jsx]"]
  node_apply["Application submission<br/>[Apply.jsx]"]
  node_appointments["Appointments<br/>[appointments.js]"]
  node_booking["Appointment booking"]
  node_payments["Customer payments<br/>[Pay.jsx]"]
end

subgraph group_admin["Admin operations"]
  node_admin["Admin console<br/>[AdminDashboard.jsx]"]
  node_serviceadmin["Service editor<br/>[ServiceEditor.jsx]"]
  node_orderadmin["Order management<br/>[AdminOrders.jsx]"]
  node_appointmentadmin["Appointment management"]
  node_paymentadmin["Payment management<br/>[AdminPayments.jsx]"]
end

subgraph group_server["Server services"]
  node_api["API request layer<br/>[backend.js]"]
  node_core["Server core helpers<br/>[core.js]"]
  node_createorder["Create payment order<br/>[create-order.js]"]
  node_webhook["Payment webhook"]
  node_appointmentmail["Appointment notices"]
  node_updatemail["Application update email"]
  node_pushsend["Application push<br/>[push-send.js]"]
  node_pushsubscribe["Push subscriptions<br/>[push-subscribe.js]"]
  node_mail["Email delivery<br/>[mail.js]"]
  node_push["Web push delivery<br/>[push.js]"]
end

node_user(("Customer or admin"))
node_database[("Supabase")]

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"mounts"| node_scroll
node_app -->|"routes to"| node_services
node_app -->|"routes to"| node_application
node_app -->|"routes to"| node_apply
node_app -->|"routes to"| node_booking
node_app -->|"routes to"| node_payments
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_serviceadmin
node_app -->|"routes to"| node_orderadmin
node_app -->|"routes to"| node_appointmentadmin
node_app -->|"routes to"| node_paymentadmin
node_createorder -->|"uses helpers"| node_core
node_webhook -->|"settles order"| node_core
node_appointmentmail -->|"authenticates and queries"| node_core
node_appointmentmail -->|"sends notification"| node_push
node_appointmentmail -.->|"sends email"| node_mail
node_updatemail -->|"authenticates and queries"| node_core
node_updatemail -->|"sends email"| node_mail
node_pushsend -->|"authenticates and queries"| node_core
node_pushsend -->|"sends notification"| node_push
node_pushsubscribe -->|"authenticates and stores"| node_core
node_core -->|"imports helpers"| node_mail
node_core -->|"imports helpers"| node_push
node_core -->|"creates client"| node_database
node_push -->|"reads subscriptions"| node_database

click node_app "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/App.jsx"
click node_auth "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/lib/AuthContext.jsx"
click node_scroll "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/components/ScrollToTop.jsx"
click node_services "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Services.jsx"
click node_application "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Applications.jsx"
click node_apply "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Apply.jsx"
click node_appointments "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/lib/appointments.js"
click node_booking "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/BookAppointment.jsx"
click node_payments "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Pay.jsx"
click node_admin "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminDashboard.jsx"
click node_serviceadmin "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/ServiceEditor.jsx"
click node_orderadmin "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminOrders.jsx"
click node_appointmentadmin "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminAppointments.jsx"
click node_paymentadmin "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminPayments.jsx"
click node_api "https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/api/backend.js"
click node_core "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/core.js"
click node_createorder "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/create-order.js"
click node_webhook "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/razorpay-webhook.js"
click node_appointmentmail "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/appointment-mail.js"
click node_updatemail "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/application-update-mail.js"
click node_pushsend "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/push-send.js"
click node_pushsubscribe "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/push-subscribe.js"
click node_mail "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/mail.js"
click node_push "https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/push.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_app,node_auth,node_scroll toneBlue
class node_services,node_application,node_apply,node_appointments,node_booking,node_payments,node_database toneAmber
class node_admin,node_serviceadmin,node_orderadmin,node_appointmentadmin,node_paymentadmin toneMint
class node_api,node_core,node_createorder,node_webhook,node_appointmentmail,node_updatemail,node_pushsend,node_pushsubscribe,node_mail,node_push toneRose
class node_user toneIndigo
```

## Components

### Web app

- [Routes and app shell](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/App.jsx): `docufast/src/App.jsx`
- [Authentication state](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/lib/AuthContext.jsx): `docufast/src/lib/AuthContext.jsx`
- [Route scrolling](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/components/ScrollToTop.jsx): `docufast/src/components/ScrollToTop.jsx`

### Customer operations

- [Service catalog](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Services.jsx): `docufast/src/pages/Services.jsx`
- [Applications](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Applications.jsx): `docufast/src/pages/Applications.jsx`
- [Application submission](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Apply.jsx): `docufast/src/pages/Apply.jsx`
- [Appointments](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/lib/appointments.js): `docufast/src/lib/appointments.js`
- [Appointment booking](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/BookAppointment.jsx): `docufast/src/pages/BookAppointment.jsx`
- [Customer payments](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/Pay.jsx): `docufast/src/pages/Pay.jsx`

### Admin operations

- [Admin console](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminDashboard.jsx): `docufast/src/pages/admin/AdminDashboard.jsx`
- [Service editor](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/ServiceEditor.jsx): `docufast/src/pages/admin/ServiceEditor.jsx`
- [Order management](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminOrders.jsx): `docufast/src/pages/admin/AdminOrders.jsx`
- [Appointment management](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminAppointments.jsx): `docufast/src/pages/admin/AdminAppointments.jsx`
- [Payment management](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/pages/admin/AdminPayments.jsx): `docufast/src/pages/admin/AdminPayments.jsx`

### Server services

- [API request layer](https://github.com/syedfayazali/docufast-app/blob/main/docufast/src/api/backend.js): `docufast/src/api/backend.js`
- [Server core helpers](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/core.js): `docufast/api/_lib/core.js`
- [Create payment order](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/create-order.js): `docufast/api/create-order.js`
- [Payment webhook](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/razorpay-webhook.js): `docufast/api/razorpay-webhook.js`
- [Appointment notices](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/appointment-mail.js): `docufast/api/appointment-mail.js`
- [Application update email](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/application-update-mail.js): `docufast/api/application-update-mail.js`
- [Application push](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/push-send.js): `docufast/api/push-send.js`
- [Push subscriptions](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/push-subscribe.js): `docufast/api/push-subscribe.js`
- [Email delivery](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/mail.js): `docufast/api/_lib/mail.js`
- [Web push delivery](https://github.com/syedfayazali/docufast-app/blob/main/docufast/api/_lib/push.js): `docufast/api/_lib/push.js`

### Other components

- **Customer or admin**
- **Supabase**

## Connections

- Customer or admin → Routes and app shell: uses
- Routes and app shell → Authentication state: provides auth (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Route scrolling: mounts (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Service catalog: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Applications: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Application submission: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Appointment booking: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Customer payments: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Admin console: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Service editor: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Order management: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Appointment management: routes to (evidence: `docufast/src/App.jsx`)
- Routes and app shell → Payment management: routes to (evidence: `docufast/src/App.jsx`)
- Create payment order → Server core helpers: uses helpers (evidence: `docufast/api/create-order.js`)
- Payment webhook → Server core helpers: settles order (evidence: `docufast/api/razorpay-webhook.js`)
- Appointment notices → Server core helpers: authenticates and queries (evidence: `docufast/api/appointment-mail.js`)
- Appointment notices → Web push delivery: sends notification (evidence: `docufast/api/appointment-mail.js`)
- Appointment notices → Email delivery: sends email
- Application update email → Server core helpers: authenticates and queries (evidence: `docufast/api/application-update-mail.js`)
- Application update email → Email delivery: sends email (evidence: `docufast/api/application-update-mail.js`)
- Application push → Server core helpers: authenticates and queries (evidence: `docufast/api/push-send.js`)
- Application push → Web push delivery: sends notification (evidence: `docufast/api/push-send.js`)
- Push subscriptions → Server core helpers: authenticates and stores (evidence: `docufast/api/push-subscribe.js`)
- Server core helpers → Email delivery: imports helpers (evidence: `docufast/api/_lib/core.js`)
- Server core helpers → Web push delivery: imports helpers (evidence: `docufast/api/_lib/core.js`)
- Server core helpers → Supabase: creates client (evidence: `docufast/api/_lib/core.js`)
- Web push delivery → Supabase: reads subscriptions (evidence: `docufast/api/_lib/push.js`)
