# orgainseconsulting/orgainse-website architecture

> Architecture diagram of the GitHub repository orgainseconsulting/orgainse-website, 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/orgainseconsulting/orgainse-website
- Repository: https://github.com/orgainseconsulting/orgainse-website

## Overview

Orgainse is a consulting-marketing website with lead-capture tools and a JWT-protected content and operations dashboard. Visitors enter through the React app, browse consulting and editorial pages, and can submit assessments, ROI calculations, contact or consultation requests, and newsletter signups. Admins authenticate to manage leads, users, settings, blog, careers, and newsletter content. Production API routing is handled by Vercel serverless functions backed by MongoDB; the README describes FastAPI as a development mirror. Some subsystem links are documented capabilities rather than sampled call sites.

Main entry points: [`frontend/src/App.js`](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/App.js) (React app and routes), [`api/_handlers`](https://github.com/orgainseconsulting/orgainse-website/tree/main/api/_handlers) (API handlers), [`frontend/src/components/AdminDashboard.js`](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/AdminDashboard.js) (Admin dashboard), [`api/index.js`](https://github.com/orgainseconsulting/orgainse-website/blob/main/api/index.js) (API dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website experience"]
  node_react_app["React app and routes<br/>[App.js]"]
  node_marketing_pages["Marketing pages"]
  node_regional_pricing["Regional pricing"]
end

subgraph group_leads["Lead capture"]
  node_booking["Consultation booking<br/>[CalendlyContext.js]"]
  node_assessment["AI assessment"]
  node_roi["ROI calculator<br/>[ROICalculator.js]"]
  node_contact["Contact and leads<br/>[contact.js]"]
end

subgraph group_content["Editorial content"]
  node_blog_site["Blog and issues<br/>[BlogIndex.js]"]
  node_careers_site["Careers<br/>[Careers.js]"]
  node_newsletter_site["Newsletter<br/>[NewsletterIndex.js]"]
end

subgraph group_admin["Admin operations"]
  node_admin_ui["Admin dashboard<br/>[AdminDashboard.js]"]
  node_auth_context["Admin authentication<br/>[AuthContext.js]"]
  node_blog_admin["Blog management<br/>[BlogManager.js]"]
  node_careers_admin["Careers management<br/>[CareersManager.js]"]
  node_newsletter_admin["Newsletter management"]
end

subgraph group_api["API and data"]
  node_api_client["Frontend API client<br/>[api.js]"]
  node_newsletter_client["Newsletter API client<br/>[newsletterApi.js]"]
  node_dispatcher["API dispatcher<br/>[index.js]"]
  node_api_handlers["API handlers"]
  node_auth_utils["Auth and database helpers<br/>[_auth-utils.js]"]
  node_security["API security<br/>[security.js]"]
  node_verify_admin["Admin token verification<br/>[verify-admin.js]"]
  node_mongo[("MongoDB")]
end

node_visitor(("Visitor"))
node_admin_user(("Admin user"))
node_booking_service["Google Calendar booking"]

node_visitor -->|"browses"| node_react_app
node_admin_user -->|"uses dashboard"| node_react_app
node_react_app -->|"routes to"| node_marketing_pages
node_react_app -->|"routes to"| node_assessment
node_react_app -->|"routes to"| node_roi
node_react_app -->|"routes to"| node_blog_site
node_react_app -->|"routes to"| node_careers_site
node_react_app -->|"routes to"| node_newsletter_site
node_react_app -->|"routes to"| node_admin_ui
node_react_app -->|"provides context"| node_regional_pricing
node_react_app -->|"provides context"| node_booking
node_booking -.->|"opens booking"| node_booking_service
node_assessment -.->|"submits assessment"| node_api_client
node_roi -.->|"requests projection"| node_api_client
node_contact -.->|"accepts lead"| node_api_client
node_blog_site -.->|"loads content"| node_dispatcher
node_careers_site -.->|"loads roles"| node_dispatcher
node_newsletter_site -.->|"uses client"| node_newsletter_client
node_admin_user -.->|"authenticates"| node_auth_context
node_admin_ui -->|"uses auth"| node_auth_context
node_admin_ui -.->|"manages blog"| node_blog_admin
node_admin_ui -.->|"manages careers"| node_careers_admin
node_admin_ui -.->|"manages newsletter"| node_newsletter_admin
node_blog_admin -.->|"calls content API"| node_api_handlers
node_careers_admin -.->|"calls careers API"| node_api_handlers
node_newsletter_admin -->|"uses client"| node_newsletter_client
node_newsletter_client -.->|"requests API"| node_dispatcher
node_api_client -.->|"requests API"| node_dispatcher
node_dispatcher -->|"dispatches routes"| node_api_handlers
node_api_handlers -.->|"reads and writes"| node_mongo
node_api_handlers -.->|"uses protections"| node_security
node_api_handlers -.->|"checks admin token"| node_verify_admin
node_auth_utils -->|"connects to"| node_mongo
node_verify_admin -.->|"verifies JWT"| node_auth_utils

click node_react_app "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/App.js"
click node_marketing_pages "https://github.com/orgainseconsulting/orgainse-website/tree/main/frontend/src/pages"
click node_regional_pricing "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/context/RegionalPricingContext.js"
click node_booking "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/context/CalendlyContext.js"
click node_assessment "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/AIAssessmentTool.js"
click node_roi "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/ROICalculator.js"
click node_contact "https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_handlers/contact.js"
click node_blog_site "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/BlogIndex.js"
click node_careers_site "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/Careers.js"
click node_newsletter_site "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/NewsletterIndex.js"
click node_admin_ui "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/AdminDashboard.js"
click node_auth_context "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/AuthContext.js"
click node_blog_admin "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/blog/BlogManager.js"
click node_careers_admin "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/careers/CareersManager.js"
click node_newsletter_admin "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/newsletter/NewsletterManager.js"
click node_api_client "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/lib/api.js"
click node_newsletter_client "https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/lib/newsletterApi.js"
click node_dispatcher "https://github.com/orgainseconsulting/orgainse-website/blob/main/api/index.js"
click node_api_handlers "https://github.com/orgainseconsulting/orgainse-website/tree/main/api/_handlers"
click node_auth_utils "https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_auth-utils.js"
click node_security "https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_middleware/security.js"
click node_verify_admin "https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_middleware/verify-admin.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_react_app,node_marketing_pages,node_regional_pricing,node_admin_user toneBlue
class node_booking,node_assessment,node_roi,node_contact toneAmber
class node_blog_site,node_careers_site,node_newsletter_site toneMint
class node_admin_ui,node_auth_context,node_blog_admin,node_careers_admin,node_newsletter_admin toneRose
class node_api_client,node_newsletter_client,node_dispatcher,node_api_handlers,node_auth_utils,node_security,node_verify_admin,node_mongo,node_visitor,node_booking_service toneIndigo
```

## Components

### Website experience

- [React app and routes](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Marketing pages](https://github.com/orgainseconsulting/orgainse-website/tree/main/frontend/src/pages): `frontend/src/pages`
- [Regional pricing](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/context/RegionalPricingContext.js): `frontend/src/context/RegionalPricingContext.js`

### Lead capture

- [Consultation booking](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/context/CalendlyContext.js): `frontend/src/context/CalendlyContext.js`
- [AI assessment](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/AIAssessmentTool.js): `frontend/src/pages/AIAssessmentTool.js`
- [ROI calculator](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/ROICalculator.js): `frontend/src/pages/ROICalculator.js`
- [Contact and leads](https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_handlers/contact.js): `api/_handlers/contact.js`

### Editorial content

- [Blog and issues](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/BlogIndex.js): `frontend/src/pages/BlogIndex.js`
- [Careers](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/Careers.js): `frontend/src/pages/Careers.js`
- [Newsletter](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/pages/NewsletterIndex.js): `frontend/src/pages/NewsletterIndex.js`

### Admin operations

- [Admin dashboard](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/AdminDashboard.js): `frontend/src/components/AdminDashboard.js`
- [Admin authentication](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/AuthContext.js): `frontend/src/components/AuthContext.js`
- [Blog management](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/blog/BlogManager.js): `frontend/src/components/blog/BlogManager.js`
- [Careers management](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/careers/CareersManager.js): `frontend/src/components/careers/CareersManager.js`
- [Newsletter management](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/components/newsletter/NewsletterManager.js): `frontend/src/components/newsletter/NewsletterManager.js`

### API and data

- [Frontend API client](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`
- [Newsletter API client](https://github.com/orgainseconsulting/orgainse-website/blob/main/frontend/src/lib/newsletterApi.js): `frontend/src/lib/newsletterApi.js`
- [API dispatcher](https://github.com/orgainseconsulting/orgainse-website/blob/main/api/index.js): `api/index.js`
- [API handlers](https://github.com/orgainseconsulting/orgainse-website/tree/main/api/_handlers): `api/_handlers`
- [Auth and database helpers](https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_auth-utils.js): `api/_auth-utils.js`
- [API security](https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_middleware/security.js): `api/_middleware/security.js`
- [Admin token verification](https://github.com/orgainseconsulting/orgainse-website/blob/main/api/_middleware/verify-admin.js): `api/_middleware/verify-admin.js`
- **MongoDB**

### Other components

- **Visitor**
- **Admin user**
- **Google Calendar booking**

## Connections

- Visitor → React app and routes: browses (evidence: `README.md`)
- Admin user → React app and routes: uses dashboard (evidence: `README.md`)
- React app and routes → Marketing pages: routes to (evidence: `frontend/src/App.js`)
- React app and routes → AI assessment: routes to (evidence: `frontend/src/App.js`)
- React app and routes → ROI calculator: routes to (evidence: `frontend/src/App.js`)
- React app and routes → Blog and issues: routes to (evidence: `frontend/src/App.js`)
- React app and routes → Careers: routes to (evidence: `frontend/src/App.js`)
- React app and routes → Newsletter: routes to (evidence: `frontend/src/App.js`)
- React app and routes → Admin dashboard: routes to (evidence: `frontend/src/App.js`)
- React app and routes → Regional pricing: provides context (evidence: `frontend/src/App.js`)
- React app and routes → Consultation booking: provides context (evidence: `frontend/src/App.js`)
- Consultation booking → Google Calendar booking: opens booking (evidence: `README.md`)
- AI assessment → Frontend API client: submits assessment (evidence: `README.md`)
- ROI calculator → Frontend API client: requests projection (evidence: `README.md`)
- Contact and leads → Frontend API client: accepts lead (evidence: `README.md`)
- Blog and issues → API dispatcher: loads content (evidence: `README.md`)
- Careers → API dispatcher: loads roles (evidence: `README.md`)
- Newsletter → Newsletter API client: uses client (evidence: `frontend/src/lib/newsletterApi.js`)
- Admin user → Admin authentication: authenticates (evidence: `README.md`)
- Admin dashboard → Admin authentication: uses auth (evidence: `frontend/src/App.js`)
- Admin dashboard → Blog management: manages blog
- Admin dashboard → Careers management: manages careers
- Admin dashboard → Newsletter management: manages newsletter
- Blog management → API handlers: calls content API (evidence: `frontend/src/components/blog/BlogManager.js`)
- Careers management → API handlers: calls careers API (evidence: `frontend/src/components/careers/CareersManager.js`)
- Newsletter management → Newsletter API client: uses client (evidence: `frontend/src/components/newsletter/NewsletterManager.js`)
- Newsletter API client → API dispatcher: requests API (evidence: `README.md`)
- Frontend API client → API dispatcher: requests API (evidence: `README.md`)
- API dispatcher → API handlers: dispatches routes (evidence: `api/index.js`)
- API handlers → MongoDB: reads and writes (evidence: `README.md`)
- API handlers → API security: uses protections (evidence: `api/_handlers/admin-delete.js`)
- API handlers → Admin token verification: checks admin token (evidence: `api/_handlers/admin-delete.js`)
- Auth and database helpers → MongoDB: connects to (evidence: `api/_auth-utils.js`)
- Admin token verification → Auth and database helpers: verifies JWT (evidence: `api/_middleware/verify-admin.js`)
