# jxadhd/butterfly-effect-project-website architecture

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

- Interactive diagram: https://gitdiagram.com/jxadhd/butterfly-effect-project-website
- Repository: https://github.com/jxadhd/butterfly-effect-project-website

## Overview

BFEP is a Drupal website for discovering humanitarian fundraisers and presenting verification and policy information; it does not process donations. Visitors browse campaign and initiative listings or search, then can submit referrals or correction requests. Staff maintain campaign records and review incoming submissions. The graph also includes search, metadata, and cache/settings layers. Relationships are limited to those shown in excerpts, SOURCE INDEX references, or README statements; some broader form and administration flows are documented but their internal wiring is not shown.

Main entry points: [`drupal/modules/custom/bfep/src/Repository/CampaignRepository.php`](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Repository/CampaignRepository.php) (Campaign read model), [`drupal/modules/custom/bfep/src/Controller/CampaignController.php`](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/CampaignController.php) (Campaign pages), [`drupal/modules/custom/bfep/src/Service/BfepSettings.php`](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/BfepSettings.php) (Site settings), [`drupal/modules/custom/bfep/src/Controller/AdminController.php`](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/AdminController.php) (Staff administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public discovery"]
  node_campaign_pages["Campaign pages"]
  node_campaign_list["Campaign listings"]
  node_campaign_data["Campaign read model"]
  node_campaign_view["Campaign presentation"]
  node_home["Homepage<br/>[HomeController.php]"]
  node_initiative_pages["Initiative pages"]
  node_initiative_data["Initiative read model"]
  node_database_search["Database search"]
  node_search_shortcut["Search shortcut"]
end

subgraph group_staff["Staff operations"]
  node_staff_admin["Staff administration"]
  node_campaign_forms["Campaign editing"]
  node_admin_forms["Record administration"]
  node_review_forms["Submission review"]
end

subgraph group_submissions["Community submissions"]
  node_referral_form["Referral submission<br/>[ReferralForm.php]"]
  node_change_form["Correction request"]
  node_volunteer_form["Volunteer application<br/>[VolunteerForm.php]"]
  node_submission_base["Submission protection"]
end

subgraph group_trust["Trust and content"]
  node_trust_pages["Trust information"]
  node_content_settings["Policy content"]
  node_seo["SEO metadata<br/>[SeoManager.php]"]
end

subgraph group_platform["Shared services"]
  node_settings["Site settings<br/>[BfepSettings.php]"]
  node_cache["Cache invalidation"]
  node_audit["Audit logging<br/>[AuditLogger.php]"]
  node_health["Database health<br/>[HealthCheck.php]"]
end

node_visitor(("Website visitor"))
node_bfdb[("BFEP database")]

node_visitor -->|"browses"| node_campaign_pages
node_visitor -->|"visits"| node_home
node_visitor -->|"discovers"| node_initiative_pages
node_visitor -->|"searches"| node_database_search
node_visitor -->|"submits referral"| node_referral_form
node_visitor -->|"requests correction"| node_change_form
node_campaign_pages -->|"delegates listings"| node_campaign_list
node_campaign_pages -->|"reads campaign"| node_campaign_data
node_campaign_pages -->|"formats detail"| node_campaign_view
node_campaign_list -->|"queries listings"| node_campaign_data
node_campaign_list -->|"builds cards"| node_campaign_view
node_home -->|"loads highlights"| node_campaign_data
node_home -->|"formats highlights"| node_campaign_view
node_initiative_pages -->|"loads initiatives"| node_initiative_data
node_campaign_data -->|"queries"| node_bfdb
node_initiative_data -->|"queries"| node_bfdb
node_database_search -->|"searches records"| node_bfdb
node_search_shortcut -->|"looks up campaigns"| node_campaign_data
node_staff_admin -->|"uses filter form"| node_admin_forms
node_staff_admin -->|"checks health"| node_health
node_staff_admin -->|"queries records"| node_bfdb
node_campaign_forms -->|"records changes"| node_audit
node_campaign_forms -->|"invalidates listings"| node_cache
node_referral_form -->|"extends protection"| node_submission_base
node_change_form -->|"extends protection"| node_submission_base
node_volunteer_form -->|"extends protection"| node_submission_base
node_review_forms -->|"uses record base"| node_admin_forms
node_trust_pages -->|"reads settings"| node_settings
node_content_settings -.->|"supports editable content"| node_visitor
node_seo -->|"reads campaign"| node_campaign_data
node_campaign_pages -->|"uses configuration"| node_settings
node_campaign_data -->|"uses cache limits"| node_settings
node_campaign_data -->|"tags cached reads"| node_cache
node_database_search -->|"uses settings"| node_settings

click node_campaign_pages "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/CampaignController.php"
click node_campaign_list "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/CampaignListBuilder.php"
click node_campaign_data "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Repository/CampaignRepository.php"
click node_campaign_view "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/CampaignPresenter.php"
click node_home "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/HomeController.php"
click node_initiative_pages "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/InitiativeController.php"
click node_initiative_data "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Repository/InitiativeRepository.php"
click node_database_search "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Plugin/Search/BfepDatabaseSearch.php"
click node_search_shortcut "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/EventSubscriber/SearchShortcutSubscriber.php"
click node_staff_admin "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/AdminController.php"
click node_campaign_forms "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/CampaignAddForm.php"
click node_admin_forms "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/AdminRecordFormBase.php"
click node_referral_form "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ReferralForm.php"
click node_change_form "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ChangeRequestForm.php"
click node_volunteer_form "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/VolunteerForm.php"
click node_submission_base "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ProtectedExternalFormBase.php"
click node_review_forms "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ReferralReviewForm.php"
click node_trust_pages "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/TrustController.php"
click node_content_settings "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep_content/src/Form/ContentSettingsForm.php"
click node_seo "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/SeoManager.php"
click node_settings "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/BfepSettings.php"
click node_cache "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/BfepCacheInvalidator.php"
click node_audit "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/AuditLogger.php"
click node_health "https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/HealthCheck.php"

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_campaign_pages,node_campaign_list,node_campaign_data,node_campaign_view,node_home,node_initiative_pages,node_initiative_data,node_database_search,node_search_shortcut toneBlue
class node_staff_admin,node_campaign_forms,node_admin_forms,node_review_forms,node_bfdb toneAmber
class node_referral_form,node_change_form,node_volunteer_form,node_submission_base toneMint
class node_trust_pages,node_content_settings,node_seo toneRose
class node_settings,node_cache,node_audit,node_health,node_visitor toneIndigo
```

## Components

### Public discovery

- [Campaign pages](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/CampaignController.php): `drupal/modules/custom/bfep/src/Controller/CampaignController.php`
- [Campaign listings](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/CampaignListBuilder.php): `drupal/modules/custom/bfep/src/Service/CampaignListBuilder.php`
- [Campaign read model](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Repository/CampaignRepository.php): `drupal/modules/custom/bfep/src/Repository/CampaignRepository.php`
- [Campaign presentation](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/CampaignPresenter.php): `drupal/modules/custom/bfep/src/Service/CampaignPresenter.php`
- [Homepage](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/HomeController.php): `drupal/modules/custom/bfep/src/Controller/HomeController.php`
- [Initiative pages](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/InitiativeController.php): `drupal/modules/custom/bfep/src/Controller/InitiativeController.php`
- [Initiative read model](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Repository/InitiativeRepository.php): `drupal/modules/custom/bfep/src/Repository/InitiativeRepository.php`
- [Database search](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Plugin/Search/BfepDatabaseSearch.php): `drupal/modules/custom/bfep/src/Plugin/Search/BfepDatabaseSearch.php`
- [Search shortcut](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/EventSubscriber/SearchShortcutSubscriber.php): `drupal/modules/custom/bfep/src/EventSubscriber/SearchShortcutSubscriber.php`

### Staff operations

- [Staff administration](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/AdminController.php): `drupal/modules/custom/bfep/src/Controller/AdminController.php`
- [Campaign editing](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/CampaignAddForm.php): `drupal/modules/custom/bfep/src/Form/CampaignAddForm.php`
- [Record administration](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/AdminRecordFormBase.php): `drupal/modules/custom/bfep/src/Form/AdminRecordFormBase.php`
- [Submission review](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ReferralReviewForm.php): `drupal/modules/custom/bfep/src/Form/ReferralReviewForm.php`

### Community submissions

- [Referral submission](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ReferralForm.php): `drupal/modules/custom/bfep/src/Form/ReferralForm.php`
- [Correction request](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ChangeRequestForm.php): `drupal/modules/custom/bfep/src/Form/ChangeRequestForm.php`
- [Volunteer application](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/VolunteerForm.php): `drupal/modules/custom/bfep/src/Form/VolunteerForm.php`
- [Submission protection](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Form/ProtectedExternalFormBase.php): `drupal/modules/custom/bfep/src/Form/ProtectedExternalFormBase.php`

### Trust and content

- [Trust information](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Controller/TrustController.php): `drupal/modules/custom/bfep/src/Controller/TrustController.php`
- [Policy content](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep_content/src/Form/ContentSettingsForm.php): `drupal/modules/custom/bfep_content/src/Form/ContentSettingsForm.php`
- [SEO metadata](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/SeoManager.php): `drupal/modules/custom/bfep/src/Service/SeoManager.php`

### Shared services

- [Site settings](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/BfepSettings.php): `drupal/modules/custom/bfep/src/Service/BfepSettings.php`
- [Cache invalidation](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/BfepCacheInvalidator.php): `drupal/modules/custom/bfep/src/Service/BfepCacheInvalidator.php`
- [Audit logging](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/AuditLogger.php): `drupal/modules/custom/bfep/src/Service/AuditLogger.php`
- [Database health](https://github.com/jxadhd/butterfly-effect-project-website/blob/main/drupal/modules/custom/bfep/src/Service/HealthCheck.php): `drupal/modules/custom/bfep/src/Service/HealthCheck.php`

### Other components

- **Website visitor**
- **BFEP database**

## Connections

- Website visitor → Campaign pages: browses (evidence: `README.md`)
- Website visitor → Homepage: visits (evidence: `README.md`)
- Website visitor → Initiative pages: discovers (evidence: `README.md`)
- Website visitor → Database search: searches (evidence: `drupal/modules/custom/bfep/src/Plugin/Search/BfepDatabaseSearch.php`)
- Website visitor → Referral submission: submits referral (evidence: `README.md`)
- Website visitor → Correction request: requests correction (evidence: `README.md`)
- Campaign pages → Campaign listings: delegates listings (evidence: `drupal/modules/custom/bfep/src/Controller/CampaignController.php`)
- Campaign pages → Campaign read model: reads campaign (evidence: `drupal/modules/custom/bfep/src/Controller/CampaignController.php`)
- Campaign pages → Campaign presentation: formats detail (evidence: `drupal/modules/custom/bfep/src/Controller/CampaignController.php`)
- Campaign listings → Campaign read model: queries listings (evidence: `drupal/modules/custom/bfep/src/Service/CampaignListBuilder.php`)
- Campaign listings → Campaign presentation: builds cards (evidence: `drupal/modules/custom/bfep/src/Service/CampaignListBuilder.php`)
- Homepage → Campaign read model: loads highlights (evidence: `drupal/modules/custom/bfep/src/Controller/HomeController.php`)
- Homepage → Campaign presentation: formats highlights (evidence: `drupal/modules/custom/bfep/src/Controller/HomeController.php`)
- Initiative pages → Initiative read model: loads initiatives (evidence: `drupal/modules/custom/bfep/src/Controller/InitiativeController.php`)
- Campaign read model → BFEP database: queries (evidence: `drupal/modules/custom/bfep/src/Repository/CampaignRepository.php`)
- Initiative read model → BFEP database: queries (evidence: `drupal/modules/custom/bfep/src/Repository/InitiativeRepository.php`)
- Database search → BFEP database: searches records (evidence: `drupal/modules/custom/bfep/src/Plugin/Search/BfepDatabaseSearch.php`)
- Search shortcut → Campaign read model: looks up campaigns (evidence: `drupal/modules/custom/bfep/src/EventSubscriber/SearchShortcutSubscriber.php`)
- Staff administration → Record administration: uses filter form (evidence: `drupal/modules/custom/bfep/src/Controller/AdminController.php`)
- Staff administration → Database health: checks health (evidence: `drupal/modules/custom/bfep/src/Controller/AdminController.php`)
- Staff administration → BFEP database: queries records (evidence: `drupal/modules/custom/bfep/src/Controller/AdminController.php`)
- Campaign editing → Audit logging: records changes (evidence: `drupal/modules/custom/bfep/src/Form/CampaignAddForm.php`)
- Campaign editing → Cache invalidation: invalidates listings (evidence: `drupal/modules/custom/bfep/src/Form/CampaignAddForm.php`)
- Referral submission → Submission protection: extends protection (evidence: `drupal/modules/custom/bfep/src/Form/ReferralForm.php`)
- Correction request → Submission protection: extends protection (evidence: `drupal/modules/custom/bfep/src/Form/ChangeRequestForm.php`)
- Volunteer application → Submission protection: extends protection (evidence: `drupal/modules/custom/bfep/src/Form/VolunteerForm.php`)
- Submission review → Record administration: uses record base (evidence: `drupal/modules/custom/bfep/src/Form/ReferralReviewForm.php`)
- Trust information → Site settings: reads settings (evidence: `drupal/modules/custom/bfep/src/Controller/TrustController.php`)
- Policy content → Website visitor: supports editable content (evidence: `README.md`)
- SEO metadata → Campaign read model: reads campaign (evidence: `drupal/modules/custom/bfep/src/Service/SeoManager.php`)
- Campaign pages → Site settings: uses configuration (evidence: `drupal/modules/custom/bfep/src/Controller/CampaignController.php`)
- Campaign read model → Site settings: uses cache limits (evidence: `drupal/modules/custom/bfep/src/Repository/CampaignRepository.php`)
- Campaign read model → Cache invalidation: tags cached reads (evidence: `drupal/modules/custom/bfep/src/Repository/CampaignRepository.php`)
- Database search → Site settings: uses settings (evidence: `drupal/modules/custom/bfep/src/Plugin/Search/BfepDatabaseSearch.php`)
