# andersonfxc/anderseed-website architecture

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

- Interactive diagram: https://gitdiagram.com/andersonfxc/anderseed-website
- Repository: https://github.com/andersonfxc/anderseed-website

## Overview

Anderseed BA Readiness Assessment MVP V2 supports an assessment-to-readiness-result workflow, with contact capture and funnel reporting, plus owner-facing lead oversight and external event/marketing integrations. The source index identifies the main function modules and their imports; several endpoint implementations and the assessment UI are not excerpted, so their internal flow is represented only where the README or index supports it. The README says Brevo contact sync, result emails, and nurture sequences are out of scope for this MVP.

Main entry points: [`netlify/functions/assessment-contact.mjs`](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-contact.mjs) (Contact Capture), [`netlify/functions/_brevo-client.mjs`](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-client.mjs) (Brevo Client), [`netlify/functions/telegram-webhook.mjs`](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/telegram-webhook.mjs) (Telegram Membership Webhook), [`netlify/functions/_lead-heat.mjs`](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_lead-heat.mjs) (Lead Scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_assessment["Assessment &amp; Reporting"]
  node_assessment_complete["Assessment Completion"]
  node_assessment_contact["Contact Capture"]
  node_assessment_events["Funnel Events"]
  node_assessment_utils["Assessment Utilities"]
  node_funnel_report["Funnel Report"]
  node_reporting_utils["Reporting Utilities"]
end

subgraph group_leads["Lead Management"]
  node_lead_identity["Lead Identity<br/>[_lead-identity.mjs]"]
  node_lead_heat["Lead Scoring<br/>[_lead-heat.mjs]"]
  node_manual_lead["Manual Lead Handling<br/>[_manual-lead.mjs]"]
  node_lead_store[("Netlify Database")]
  node_email_validation["Email Validation"]
end

subgraph group_integrations["External Integrations"]
  node_brevo_webhook["Brevo Webhook Processing<br/>[_brevo-webhook.mjs]"]
  node_brevo_client["Brevo Client<br/>[_brevo-client.mjs]"]
  node_brevo_config["Brevo Configuration<br/>[_brevo-config.mjs]"]
  node_brevo_templates["Brevo Email Templates"]
  node_eventbrite_webhook["Eventbrite Webhook Processing"]
  node_eventbrite_client["Eventbrite Client"]
  node_telegram_webhook["Telegram Membership Webhook"]
  node_telegram_config["Telegram Configuration"]
end

subgraph group_owner["Owner Operations"]
  node_owner_auth["Owner Authentication<br/>[_owner-auth.mjs]"]
  node_owner_auth_endpoint["Owner Auth Endpoint<br/>[owner-auth.mjs]"]
  node_owner_dashboard["Owner Dashboard API"]
  node_dashboard_integrations["Dashboard Integrations"]
  node_dashboard_reporting["Dashboard Reporting"]
  node_owner_ui["Owner Dashboard<br/>[dashboard.js]"]
end

node_visitor(("Assessment Visitor"))
node_report_user(("Report User"))
node_brevo_service["Brevo"]
node_eventbrite_service["Eventbrite"]
node_telegram_service["Telegram"]
node_identity_service["Netlify Identity"]

node_visitor -.->|"submits assessment"| node_assessment_complete
node_assessment_complete -->|"uses assessment logic"| node_assessment_utils
node_visitor -.->|"submits contact"| node_assessment_contact
node_assessment_contact -->|"uses assessment utilities"| node_assessment_utils
node_assessment_contact -->|"validates email"| node_email_validation
node_assessment_contact -->|"resolves lead"| node_lead_identity
node_assessment_contact -->|"updates lead score"| node_lead_heat
node_assessment_events -->|"uses assessment utilities"| node_assessment_utils
node_report_user -.->|"requests report"| node_funnel_report
node_funnel_report -->|"uses reporting utilities"| node_reporting_utils
node_assessment_contact -.->|"persists lead data"| node_lead_store
node_lead_identity -->|"normalizes email"| node_email_validation
node_lead_heat -->|"syncs score attributes"| node_brevo_client
node_brevo_webhook -->|"normalizes email"| node_email_validation
node_brevo_webhook -->|"applies scoring rule"| node_lead_heat
node_brevo_webhook -->|"updates contact attributes"| node_brevo_client
node_brevo_webhook -.->|"receives events"| node_brevo_service
node_brevo_client -->|"loads configuration"| node_brevo_config
node_brevo_client -->|"sends API requests"| node_brevo_service
node_eventbrite_webhook -->|"retrieves event data"| node_eventbrite_client
node_eventbrite_webhook -->|"resolves lead"| node_lead_identity
node_eventbrite_webhook -->|"syncs lead identity"| node_brevo_client
node_eventbrite_webhook -.->|"receives events"| node_eventbrite_service
node_eventbrite_client -->|"retrieves resources"| node_eventbrite_service
node_telegram_webhook -->|"loads configuration"| node_telegram_config
node_telegram_webhook -->|"applies scoring event"| node_lead_heat
node_telegram_webhook -->|"updates lifecycle status"| node_lead_identity
node_telegram_webhook -->|"updates contact attributes"| node_brevo_client
node_telegram_webhook -.->|"receives membership updates"| node_telegram_service
node_owner_auth_endpoint -->|"uses auth utilities"| node_owner_auth
node_owner_auth -->|"formats auth response"| node_reporting_utils
node_owner_auth -->|"verifies identity"| node_identity_service
node_owner_dashboard -->|"authorizes requests"| node_owner_auth
node_owner_dashboard -->|"loads integration data"| node_dashboard_integrations
node_owner_dashboard -->|"loads reporting data"| node_dashboard_reporting
node_dashboard_reporting -->|"uses lead scores"| node_lead_heat
node_owner_ui -.->|"requests dashboard data"| node_owner_dashboard
node_brevo_templates -.->|"provides template content"| node_brevo_service

click node_assessment_complete "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-complete.mjs"
click node_assessment_contact "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-contact.mjs"
click node_assessment_events "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-events.mjs"
click node_assessment_utils "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_assessment-utils.mjs"
click node_funnel_report "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-funnel-report.mjs"
click node_reporting_utils "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_assessment-reporting-utils.mjs"
click node_lead_identity "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_lead-identity.mjs"
click node_lead_heat "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_lead-heat.mjs"
click node_manual_lead "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_manual-lead.mjs"
click node_email_validation "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_email-validation.mjs"
click node_brevo_webhook "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-webhook.mjs"
click node_brevo_client "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-client.mjs"
click node_brevo_config "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-config.mjs"
click node_brevo_templates "https://github.com/andersonfxc/anderseed-website/blob/main/integrations/brevo/email-templates.mjs"
click node_eventbrite_webhook "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_eventbrite-webhook.mjs"
click node_eventbrite_client "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_eventbrite-client.mjs"
click node_telegram_webhook "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/telegram-webhook.mjs"
click node_telegram_config "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_telegram-config.mjs"
click node_owner_auth "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_owner-auth.mjs"
click node_owner_auth_endpoint "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/owner-auth.mjs"
click node_owner_dashboard "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/owner-dashboard.mjs"
click node_dashboard_integrations "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_owner-dashboard-integrations.mjs"
click node_dashboard_reporting "https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_owner-dashboard-reporting.mjs"
click node_owner_ui "https://github.com/andersonfxc/anderseed-website/blob/main/admin/owner-dashboard/dashboard.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_assessment_complete,node_assessment_contact,node_assessment_events,node_assessment_utils,node_funnel_report,node_reporting_utils,node_report_user toneBlue
class node_lead_identity,node_lead_heat,node_manual_lead,node_lead_store,node_email_validation toneAmber
class node_brevo_webhook,node_brevo_client,node_brevo_config,node_brevo_templates,node_eventbrite_webhook,node_eventbrite_client,node_telegram_webhook,node_telegram_config toneMint
class node_owner_auth,node_owner_auth_endpoint,node_owner_dashboard,node_dashboard_integrations,node_dashboard_reporting,node_owner_ui toneRose
class node_visitor,node_brevo_service,node_eventbrite_service,node_telegram_service,node_identity_service toneIndigo
```

## Components

### Assessment & Reporting

- [Assessment Completion](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-complete.mjs): `netlify/functions/assessment-complete.mjs`
- [Contact Capture](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-contact.mjs): `netlify/functions/assessment-contact.mjs`
- [Funnel Events](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-events.mjs): `netlify/functions/assessment-events.mjs`
- [Assessment Utilities](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_assessment-utils.mjs): `netlify/functions/_assessment-utils.mjs`
- [Funnel Report](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/assessment-funnel-report.mjs): `netlify/functions/assessment-funnel-report.mjs`
- [Reporting Utilities](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_assessment-reporting-utils.mjs): `netlify/functions/_assessment-reporting-utils.mjs`

### Lead Management

- [Lead Identity](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_lead-identity.mjs): `netlify/functions/_lead-identity.mjs`
- [Lead Scoring](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_lead-heat.mjs): `netlify/functions/_lead-heat.mjs`
- [Manual Lead Handling](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_manual-lead.mjs): `netlify/functions/_manual-lead.mjs`
- **Netlify Database**
- [Email Validation](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_email-validation.mjs): `netlify/functions/_email-validation.mjs`

### External Integrations

- [Brevo Webhook Processing](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-webhook.mjs): `netlify/functions/_brevo-webhook.mjs`
- [Brevo Client](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-client.mjs): `netlify/functions/_brevo-client.mjs`
- [Brevo Configuration](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_brevo-config.mjs): `netlify/functions/_brevo-config.mjs`
- [Brevo Email Templates](https://github.com/andersonfxc/anderseed-website/blob/main/integrations/brevo/email-templates.mjs): `integrations/brevo/email-templates.mjs`
- [Eventbrite Webhook Processing](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_eventbrite-webhook.mjs): `netlify/functions/_eventbrite-webhook.mjs`
- [Eventbrite Client](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_eventbrite-client.mjs): `netlify/functions/_eventbrite-client.mjs`
- [Telegram Membership Webhook](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/telegram-webhook.mjs): `netlify/functions/telegram-webhook.mjs`
- [Telegram Configuration](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_telegram-config.mjs): `netlify/functions/_telegram-config.mjs`

### Owner Operations

- [Owner Authentication](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_owner-auth.mjs): `netlify/functions/_owner-auth.mjs`
- [Owner Auth Endpoint](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/owner-auth.mjs): `netlify/functions/owner-auth.mjs`
- [Owner Dashboard API](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/owner-dashboard.mjs): `netlify/functions/owner-dashboard.mjs`
- [Dashboard Integrations](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_owner-dashboard-integrations.mjs): `netlify/functions/_owner-dashboard-integrations.mjs`
- [Dashboard Reporting](https://github.com/andersonfxc/anderseed-website/blob/main/netlify/functions/_owner-dashboard-reporting.mjs): `netlify/functions/_owner-dashboard-reporting.mjs`
- [Owner Dashboard](https://github.com/andersonfxc/anderseed-website/blob/main/admin/owner-dashboard/dashboard.js): `admin/owner-dashboard/dashboard.js`

### Other components

- **Assessment Visitor**
- **Report User**
- **Brevo**
- **Eventbrite**
- **Telegram**
- **Netlify Identity**

## Connections

- Assessment Visitor → Assessment Completion: submits assessment (evidence: `README.md`)
- Assessment Completion → Assessment Utilities: uses assessment logic (evidence: `netlify/functions/assessment-complete.mjs`)
- Assessment Visitor → Contact Capture: submits contact (evidence: `README.md`)
- Contact Capture → Assessment Utilities: uses assessment utilities (evidence: `netlify/functions/assessment-contact.mjs`)
- Contact Capture → Email Validation: validates email (evidence: `netlify/functions/assessment-contact.mjs`)
- Contact Capture → Lead Identity: resolves lead (evidence: `netlify/functions/assessment-contact.mjs`)
- Contact Capture → Lead Scoring: updates lead score (evidence: `netlify/functions/assessment-contact.mjs`)
- Funnel Events → Assessment Utilities: uses assessment utilities (evidence: `netlify/functions/assessment-events.mjs`)
- Report User → Funnel Report: requests report (evidence: `README.md`)
- Funnel Report → Reporting Utilities: uses reporting utilities (evidence: `netlify/functions/assessment-funnel-report.mjs`)
- Contact Capture → Netlify Database: persists lead data
- Lead Identity → Email Validation: normalizes email (evidence: `netlify/functions/_lead-identity.mjs`)
- Lead Scoring → Brevo Client: syncs score attributes (evidence: `netlify/functions/_lead-heat.mjs`)
- Brevo Webhook Processing → Email Validation: normalizes email (evidence: `netlify/functions/_brevo-webhook.mjs`)
- Brevo Webhook Processing → Lead Scoring: applies scoring rule (evidence: `netlify/functions/_brevo-webhook.mjs`)
- Brevo Webhook Processing → Brevo Client: updates contact attributes (evidence: `netlify/functions/_brevo-webhook.mjs`)
- Brevo Webhook Processing → Brevo: receives events
- Brevo Client → Brevo Configuration: loads configuration (evidence: `netlify/functions/_brevo-client.mjs`)
- Brevo Client → Brevo: sends API requests (evidence: `netlify/functions/_brevo-client.mjs`)
- Eventbrite Webhook Processing → Eventbrite Client: retrieves event data (evidence: `netlify/functions/_eventbrite-webhook.mjs`)
- Eventbrite Webhook Processing → Lead Identity: resolves lead (evidence: `netlify/functions/_eventbrite-webhook.mjs`)
- Eventbrite Webhook Processing → Brevo Client: syncs lead identity (evidence: `netlify/functions/_eventbrite-webhook.mjs`)
- Eventbrite Webhook Processing → Eventbrite: receives events
- Eventbrite Client → Eventbrite: retrieves resources (evidence: `netlify/functions/_eventbrite-client.mjs`)
- Telegram Membership Webhook → Telegram Configuration: loads configuration (evidence: `netlify/functions/telegram-webhook.mjs`)
- Telegram Membership Webhook → Lead Scoring: applies scoring event (evidence: `netlify/functions/telegram-webhook.mjs`)
- Telegram Membership Webhook → Lead Identity: updates lifecycle status (evidence: `netlify/functions/telegram-webhook.mjs`)
- Telegram Membership Webhook → Brevo Client: updates contact attributes (evidence: `netlify/functions/telegram-webhook.mjs`)
- Telegram Membership Webhook → Telegram: receives membership updates
- Owner Auth Endpoint → Owner Authentication: uses auth utilities (evidence: `netlify/functions/owner-auth.mjs`)
- Owner Authentication → Reporting Utilities: formats auth response (evidence: `netlify/functions/_owner-auth.mjs`)
- Owner Authentication → Netlify Identity: verifies identity (evidence: `netlify/functions/_owner-auth.mjs`)
- Owner Dashboard API → Owner Authentication: authorizes requests (evidence: `netlify/functions/owner-dashboard.mjs`)
- Owner Dashboard API → Dashboard Integrations: loads integration data (evidence: `netlify/functions/owner-dashboard.mjs`)
- Owner Dashboard API → Dashboard Reporting: loads reporting data (evidence: `netlify/functions/owner-dashboard.mjs`)
- Dashboard Reporting → Lead Scoring: uses lead scores (evidence: `netlify/functions/_owner-dashboard-reporting.mjs`)
- Owner Dashboard → Owner Dashboard API: requests dashboard data
- Brevo Email Templates → Brevo: provides template content
