# nguyendal/fastboost architecture

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

- Interactive diagram: https://gitdiagram.com/nguyendal/fastboost
- Repository: https://github.com/nguyendal/fastboost

## Overview

FastBoost is a game-services marketplace demo. Customers browse services, configure and pay for orders, then communicate through order and support chat; providers and admins manage assigned work, accounts, pricing, and support. The graph combines documented product capabilities with relationships visible in the excerpts and SOURCE INDEX. Several feature implementations were not sampled, so their internals are represented at the route or directory level rather than inferred.

Main entry points: [`client/src/App.jsx`](https://github.com/nguyendal/fastboost/blob/main/client/src/App.jsx) (Web application), [`server/src/controllers/orderController.js`](https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/orderController.js) (Order lifecycle), [`server/src/app.js`](https://github.com/nguyendal/fastboost/blob/main/server/src/app.js) (Express API), [`server/src/controllers/paymentController.js`](https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/paymentController.js) (Payment processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer experience"]
  node_clientapp["Web application<br/>[App.jsx]"]
  node_servicebrowse["Service browsing<br/>[ServicesPage.jsx]"]
  node_checkoutui["Checkout<br/>[CheckoutPage.jsx]"]
  node_matchchat["Match and chat<br/>[MatchPage.jsx]"]
  node_supportchat["Support chat<br/>[SupportChat.jsx]"]
  node_accountui["Account and loyalty"]
  node_orderui["Order management"]
  node_frontendapi["API clients"]
end

subgraph group_orders["Orders and pricing"]
  node_orderroutes["Order routes<br/>[orderRoutes.js]"]
  node_orderlogic["Order lifecycle<br/>[orderController.js]"]
  node_paymentlogic["Payment processing"]
  node_checkoutrules["Checkout discounts<br/>[checkoutCoupon.js]"]
  node_pricing["Pricing management<br/>[priceController.js]"]
  node_loyaltyreferrals["Loyalty and referrals<br/>[referralProgram.js]"]
end

subgraph group_identity["Identity and accounts"]
  node_authstorage["Session storage<br/>[authStorage.js]"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_socialauth["Social sign-in"]
  node_authguard["Token authorization<br/>[authMiddleware.js]"]
end

subgraph group_operations["Provider and admin operations"]
  node_opsroutes["Operations routes"]
  node_provideragreement["Provider agreements"]
end

subgraph group_platform["API and persistence"]
  node_domainroutes["Marketplace feature routes"]
  node_serverapp["Express API<br/>[app.js]"]
  node_database[("PostgreSQL data<br/>[prisma.js]")]
end

node_customer(("Customer"))
node_stripe["Stripe"]
node_oauth["OAuth providers"]
node_docusign["DocuSign"]

node_customer -->|"uses"| node_clientapp
node_clientapp -->|"routes to"| node_servicebrowse
node_clientapp -->|"routes to"| node_checkoutui
node_clientapp -->|"routes to"| node_matchchat
node_clientapp -->|"routes to"| node_accountui
node_clientapp -->|"routes to"| node_orderui
node_clientapp -->|"renders"| node_supportchat
node_clientapp -->|"reads session"| node_authstorage
node_customer -->|"browses"| node_servicebrowse
node_customer -->|"configures order"| node_checkoutui
node_customer -->|"communicates"| node_matchchat
node_clientapp -.->|"requests data"| node_frontendapi
node_frontendapi -->|"calls API"| node_serverapp
node_authroutes -->|"routes to"| node_socialauth
node_clientapp -->|"authenticates"| node_authroutes
node_serverapp -->|"mounts"| node_authroutes
node_serverapp -->|"mounts"| node_orderroutes
node_serverapp -->|"mounts"| node_opsroutes
node_serverapp -->|"mounts"| node_domainroutes
node_orderroutes -->|"routes to"| node_orderlogic
node_orderlogic -->|"reads and writes"| node_database
node_orderlogic -->|"applies discounts"| node_checkoutrules
node_orderlogic -->|"calculates price"| node_pricing
node_orderlogic -->|"awards benefits"| node_loyaltyreferrals
node_orderlogic -->|"uses payments"| node_stripe
node_paymentlogic -->|"updates orders"| node_database
node_paymentlogic -->|"applies coupon"| node_checkoutrules
node_paymentlogic -->|"creates sessions"| node_stripe
node_paymentlogic -->|"grants rewards"| node_loyaltyreferrals
node_serverapp -->|"handles webhook"| node_paymentlogic
node_opsroutes -->|"protects routes"| node_authguard
node_opsroutes -->|"queries records"| node_database
node_opsroutes -->|"mounts agreement"| node_provideragreement
node_provideragreement -.->|"integrates"| node_docusign
node_socialauth -->|"stores identities"| node_database
node_socialauth -->|"verifies identity"| node_oauth
node_authroutes -->|"protects endpoints"| node_authguard
node_customer -->|"requests support"| node_supportchat

click node_clientapp "https://github.com/nguyendal/fastboost/blob/main/client/src/App.jsx"
click node_servicebrowse "https://github.com/nguyendal/fastboost/blob/main/client/src/pages/ServicesPage.jsx"
click node_checkoutui "https://github.com/nguyendal/fastboost/blob/main/client/src/pages/CheckoutPage.jsx"
click node_matchchat "https://github.com/nguyendal/fastboost/blob/main/client/src/pages/MatchPage.jsx"
click node_supportchat "https://github.com/nguyendal/fastboost/blob/main/client/src/components/SupportChat.jsx"
click node_accountui "https://github.com/nguyendal/fastboost/blob/main/client/src/pages/AccountSettingsPage.jsx"
click node_orderui "https://github.com/nguyendal/fastboost/blob/main/client/src/pages/CustomerOrdersPage.jsx"
click node_frontendapi "https://github.com/nguyendal/fastboost/tree/main/client/src/api"
click node_authstorage "https://github.com/nguyendal/fastboost/blob/main/client/src/utils/authStorage.js"
click node_authroutes "https://github.com/nguyendal/fastboost/blob/main/server/src/routes/authRoutes.js"
click node_socialauth "https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/socialAuthController.js"
click node_authguard "https://github.com/nguyendal/fastboost/blob/main/server/src/middleware/authMiddleware.js"
click node_orderroutes "https://github.com/nguyendal/fastboost/blob/main/server/src/routes/orderRoutes.js"
click node_orderlogic "https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/orderController.js"
click node_paymentlogic "https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/paymentController.js"
click node_checkoutrules "https://github.com/nguyendal/fastboost/blob/main/server/src/utils/checkoutCoupon.js"
click node_pricing "https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/priceController.js"
click node_loyaltyreferrals "https://github.com/nguyendal/fastboost/blob/main/server/src/utils/referralProgram.js"
click node_opsroutes "https://github.com/nguyendal/fastboost/blob/main/server/src/routes/operationsRoutes.js"
click node_provideragreement "https://github.com/nguyendal/fastboost/blob/main/server/src/routes/providerAgreementRoutes.js"
click node_domainroutes "https://github.com/nguyendal/fastboost/tree/main/server/src/routes"
click node_serverapp "https://github.com/nguyendal/fastboost/blob/main/server/src/app.js"
click node_database "https://github.com/nguyendal/fastboost/blob/main/server/src/prisma.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_clientapp,node_servicebrowse,node_checkoutui,node_matchchat,node_supportchat,node_accountui,node_orderui,node_frontendapi toneBlue
class node_orderroutes,node_orderlogic,node_paymentlogic,node_checkoutrules,node_pricing,node_loyaltyreferrals toneAmber
class node_authstorage,node_authroutes,node_socialauth,node_authguard toneMint
class node_opsroutes,node_provideragreement toneRose
class node_domainroutes,node_serverapp,node_database,node_customer,node_stripe,node_oauth,node_docusign toneIndigo
```

## Components

### Customer experience

- [Web application](https://github.com/nguyendal/fastboost/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Service browsing](https://github.com/nguyendal/fastboost/blob/main/client/src/pages/ServicesPage.jsx): `client/src/pages/ServicesPage.jsx`
- [Checkout](https://github.com/nguyendal/fastboost/blob/main/client/src/pages/CheckoutPage.jsx): `client/src/pages/CheckoutPage.jsx`
- [Match and chat](https://github.com/nguyendal/fastboost/blob/main/client/src/pages/MatchPage.jsx): `client/src/pages/MatchPage.jsx`
- [Support chat](https://github.com/nguyendal/fastboost/blob/main/client/src/components/SupportChat.jsx): `client/src/components/SupportChat.jsx`
- [Account and loyalty](https://github.com/nguyendal/fastboost/blob/main/client/src/pages/AccountSettingsPage.jsx): `client/src/pages/AccountSettingsPage.jsx`
- [Order management](https://github.com/nguyendal/fastboost/blob/main/client/src/pages/CustomerOrdersPage.jsx): `client/src/pages/CustomerOrdersPage.jsx`
- [API clients](https://github.com/nguyendal/fastboost/tree/main/client/src/api): `client/src/api`

### Orders and pricing

- [Order routes](https://github.com/nguyendal/fastboost/blob/main/server/src/routes/orderRoutes.js): `server/src/routes/orderRoutes.js`
- [Order lifecycle](https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/orderController.js): `server/src/controllers/orderController.js`
- [Payment processing](https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/paymentController.js): `server/src/controllers/paymentController.js`
- [Checkout discounts](https://github.com/nguyendal/fastboost/blob/main/server/src/utils/checkoutCoupon.js): `server/src/utils/checkoutCoupon.js`
- [Pricing management](https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/priceController.js): `server/src/controllers/priceController.js`
- [Loyalty and referrals](https://github.com/nguyendal/fastboost/blob/main/server/src/utils/referralProgram.js): `server/src/utils/referralProgram.js`

### Identity and accounts

- [Session storage](https://github.com/nguyendal/fastboost/blob/main/client/src/utils/authStorage.js): `client/src/utils/authStorage.js`
- [Authentication routes](https://github.com/nguyendal/fastboost/blob/main/server/src/routes/authRoutes.js): `server/src/routes/authRoutes.js`
- [Social sign-in](https://github.com/nguyendal/fastboost/blob/main/server/src/controllers/socialAuthController.js): `server/src/controllers/socialAuthController.js`
- [Token authorization](https://github.com/nguyendal/fastboost/blob/main/server/src/middleware/authMiddleware.js): `server/src/middleware/authMiddleware.js`

### Provider and admin operations

- [Operations routes](https://github.com/nguyendal/fastboost/blob/main/server/src/routes/operationsRoutes.js): `server/src/routes/operationsRoutes.js`
- [Provider agreements](https://github.com/nguyendal/fastboost/blob/main/server/src/routes/providerAgreementRoutes.js): `server/src/routes/providerAgreementRoutes.js`

### API and persistence

- [Marketplace feature routes](https://github.com/nguyendal/fastboost/tree/main/server/src/routes): `server/src/routes`
- [Express API](https://github.com/nguyendal/fastboost/blob/main/server/src/app.js): `server/src/app.js`
- [PostgreSQL data](https://github.com/nguyendal/fastboost/blob/main/server/src/prisma.js): `server/src/prisma.js`

### Other components

- **Customer**
- **Stripe**
- **OAuth providers**
- **DocuSign**

## Connections

- Customer → Web application: uses
- Web application → Service browsing: routes to (evidence: `client/src/App.jsx`)
- Web application → Checkout: routes to (evidence: `client/src/App.jsx`)
- Web application → Match and chat: routes to (evidence: `client/src/App.jsx`)
- Web application → Account and loyalty: routes to (evidence: `client/src/App.jsx`)
- Web application → Order management: routes to (evidence: `client/src/App.jsx`)
- Web application → Support chat: renders (evidence: `client/src/App.jsx`)
- Web application → Session storage: reads session (evidence: `client/src/App.jsx`)
- Customer → Service browsing: browses
- Customer → Checkout: configures order
- Customer → Match and chat: communicates
- Web application → API clients: requests data
- API clients → Express API: calls API
- Authentication routes → Social sign-in: routes to (evidence: `server/src/routes/authRoutes.js`)
- Web application → Authentication routes: authenticates
- Express API → Authentication routes: mounts (evidence: `server/src/app.js`)
- Express API → Order routes: mounts (evidence: `server/src/app.js`)
- Express API → Operations routes: mounts (evidence: `server/src/app.js`)
- Express API → Marketplace feature routes: mounts (evidence: `server/src/app.js`)
- Order routes → Order lifecycle: routes to (evidence: `server/src/routes/orderRoutes.js`)
- Order lifecycle → PostgreSQL data: reads and writes (evidence: `server/src/controllers/orderController.js`)
- Order lifecycle → Checkout discounts: applies discounts (evidence: `server/src/controllers/orderController.js`)
- Order lifecycle → Pricing management: calculates price (evidence: `server/src/controllers/orderController.js`)
- Order lifecycle → Loyalty and referrals: awards benefits (evidence: `server/src/controllers/orderController.js`)
- Order lifecycle → Stripe: uses payments (evidence: `server/src/controllers/orderController.js`)
- Payment processing → PostgreSQL data: updates orders (evidence: `server/src/controllers/paymentController.js`)
- Payment processing → Checkout discounts: applies coupon (evidence: `server/src/controllers/paymentController.js`)
- Payment processing → Stripe: creates sessions (evidence: `server/src/controllers/paymentController.js`)
- Payment processing → Loyalty and referrals: grants rewards (evidence: `server/src/controllers/paymentController.js`)
- Express API → Payment processing: handles webhook (evidence: `server/src/app.js`)
- Operations routes → Token authorization: protects routes (evidence: `server/src/routes/operationsRoutes.js`)
- Operations routes → PostgreSQL data: queries records (evidence: `server/src/routes/operationsRoutes.js`)
- Operations routes → Provider agreements: mounts agreement (evidence: `server/src/routes/operationsRoutes.js`)
- Provider agreements → DocuSign: integrates
- Social sign-in → PostgreSQL data: stores identities (evidence: `server/src/controllers/socialAuthController.js`)
- Social sign-in → OAuth providers: verifies identity (evidence: `server/src/controllers/socialAuthController.js`)
- Authentication routes → Token authorization: protects endpoints (evidence: `server/src/routes/authRoutes.js`)
- Customer → Support chat: requests support
