# somunaexe/bulfighter architecture

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

- Interactive diagram: https://gitdiagram.com/somunaexe/bulfighter
- Repository: https://github.com/somunaexe/bulfighter

## Overview

Bulfighter is a React SPA for joining the show, completing consent, browsing video clips, and administering applicant, consent, and topic data. The primary public workflow collects an interest and uploads associated files; administrators can invite applicants to consent, and applicants validate the invite before submitting the consent form. Separate routes serve clips and admin pages. The README describes a serverless email backend, but its deployment wiring is not shown; backend links are therefore limited to documented capability. API endpoints and Lambda implementation details are only partially evidenced.

Main entry points: [`src/main.jsx`](https://github.com/somunaexe/bulfighter/blob/main/src/main.jsx) (Route dispatcher), [`src/admin/Admin.jsx`](https://github.com/somunaexe/bulfighter/blob/main/src/admin/Admin.jsx) (Admin workspace), [`src/api/http.js`](https://github.com/somunaexe/bulfighter/blob/main/src/api/http.js) (JSON fetch helper), [`src/api/interests.js`](https://github.com/somunaexe/bulfighter/blob/main/src/api/interests.js) (Interest API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application routes"]
  node_router["Route dispatcher<br/>[main.jsx]"]
  node_home["Home page<br/>[App.jsx]"]
end

subgraph group_public["Public experience"]
  node_clips["Clip browser<br/>[Clips.jsx]"]
  node_contact["Join application<br/>[Contact.jsx]"]
  node_consent["Consent form<br/>[ConsentForm.jsx]"]
end

subgraph group_admin["Administration"]
  node_admin_page["Admin workspace<br/>[Admin.jsx]"]
  node_interest_admin["Interest management<br/>[Interests.jsx]"]
  node_consent_admin["Consent management<br/>[Consents.jsx]"]
  node_topic_admin["Topic management<br/>[Topics.jsx]"]
end

subgraph group_api["API and backend"]
  node_interest_api["Interest API<br/>[interests.js]"]
  node_topic_api["Topic API<br/>[topics.js]"]
  node_invite_api["Consent invite API<br/>[consentInvite.js]"]
  node_consent_api["Consent API<br/>[consents.js]"]
  node_auth_api["Admin auth API<br/>[adminAuth.js]"]
  node_request_json["JSON fetch helper<br/>[http.js]"]
  node_lambda_endpoints{{"Serverless endpoints"}}
  node_invite_backend["Consent email handler<br/>[inviteToConsent.js]"]
end

node_visitor(("Site visitor"))
node_smtp(("SMTP service"))

node_visitor -->|"opens site"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_clips
node_router -->|"routes to"| node_consent
node_router -->|"routes to"| node_admin_page
node_home -->|"renders"| node_contact
node_clips -->|"loads topics"| node_topic_api
node_contact -->|"creates interest"| node_interest_api
node_consent -->|"validates invite"| node_invite_api
node_consent -->|"submits consent"| node_consent_api
node_admin_page -->|"renders"| node_interest_admin
node_admin_page -->|"renders"| node_consent_admin
node_admin_page -->|"renders"| node_topic_admin
node_admin_page -.->|"authenticates"| node_auth_api
node_interest_admin -->|"loads applicants"| node_interest_api
node_interest_admin -->|"sends invite"| node_invite_api
node_consent_admin -->|"manages consents"| node_consent_api
node_topic_admin -->|"manages topics"| node_topic_api
node_auth_api -->|"uses fetch helper"| node_request_json
node_interest_api -->|"uses fetch helper"| node_request_json
node_topic_api -->|"uses fetch helper"| node_request_json
node_invite_api -->|"uses fetch helper"| node_request_json
node_consent_api -->|"uses fetch helper"| node_request_json
node_interest_api -->|"calls endpoint"| node_lambda_endpoints
node_topic_api -->|"calls endpoint"| node_lambda_endpoints
node_invite_api -->|"calls endpoint"| node_lambda_endpoints
node_consent_api -->|"calls endpoint"| node_lambda_endpoints
node_auth_api -->|"calls endpoint"| node_lambda_endpoints
node_invite_backend -.->|"sends email"| node_smtp

click node_router "https://github.com/somunaexe/bulfighter/blob/main/src/main.jsx"
click node_home "https://github.com/somunaexe/bulfighter/blob/main/src/App.jsx"
click node_clips "https://github.com/somunaexe/bulfighter/blob/main/src/sections/Clips.jsx"
click node_contact "https://github.com/somunaexe/bulfighter/blob/main/src/sections/Contact.jsx"
click node_consent "https://github.com/somunaexe/bulfighter/blob/main/src/sections/ConsentForm.jsx"
click node_interest_api "https://github.com/somunaexe/bulfighter/blob/main/src/api/interests.js"
click node_topic_api "https://github.com/somunaexe/bulfighter/blob/main/src/api/topics.js"
click node_invite_api "https://github.com/somunaexe/bulfighter/blob/main/src/api/consentInvite.js"
click node_consent_api "https://github.com/somunaexe/bulfighter/blob/main/src/api/consents.js"
click node_admin_page "https://github.com/somunaexe/bulfighter/blob/main/src/admin/Admin.jsx"
click node_interest_admin "https://github.com/somunaexe/bulfighter/blob/main/src/admin/Interests.jsx"
click node_consent_admin "https://github.com/somunaexe/bulfighter/blob/main/src/admin/Consents.jsx"
click node_topic_admin "https://github.com/somunaexe/bulfighter/blob/main/src/admin/Topics.jsx"
click node_auth_api "https://github.com/somunaexe/bulfighter/blob/main/src/api/adminAuth.js"
click node_request_json "https://github.com/somunaexe/bulfighter/blob/main/src/api/http.js"
click node_invite_backend "https://github.com/somunaexe/bulfighter/blob/main/src/backend/inviteToConsent.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_router,node_home toneBlue
class node_clips,node_contact,node_consent toneAmber
class node_admin_page,node_interest_admin,node_consent_admin,node_topic_admin toneMint
class node_interest_api,node_topic_api,node_invite_api,node_consent_api,node_auth_api,node_request_json,node_lambda_endpoints,node_invite_backend toneRose
class node_visitor,node_smtp toneIndigo
```

## Components

### Application routes

- [Route dispatcher](https://github.com/somunaexe/bulfighter/blob/main/src/main.jsx): `src/main.jsx`
- [Home page](https://github.com/somunaexe/bulfighter/blob/main/src/App.jsx): `src/App.jsx`

### Public experience

- [Clip browser](https://github.com/somunaexe/bulfighter/blob/main/src/sections/Clips.jsx): `src/sections/Clips.jsx`
- [Join application](https://github.com/somunaexe/bulfighter/blob/main/src/sections/Contact.jsx): `src/sections/Contact.jsx`
- [Consent form](https://github.com/somunaexe/bulfighter/blob/main/src/sections/ConsentForm.jsx): `src/sections/ConsentForm.jsx`

### Administration

- [Admin workspace](https://github.com/somunaexe/bulfighter/blob/main/src/admin/Admin.jsx): `src/admin/Admin.jsx`
- [Interest management](https://github.com/somunaexe/bulfighter/blob/main/src/admin/Interests.jsx): `src/admin/Interests.jsx`
- [Consent management](https://github.com/somunaexe/bulfighter/blob/main/src/admin/Consents.jsx): `src/admin/Consents.jsx`
- [Topic management](https://github.com/somunaexe/bulfighter/blob/main/src/admin/Topics.jsx): `src/admin/Topics.jsx`

### API and backend

- [Interest API](https://github.com/somunaexe/bulfighter/blob/main/src/api/interests.js): `src/api/interests.js`
- [Topic API](https://github.com/somunaexe/bulfighter/blob/main/src/api/topics.js): `src/api/topics.js`
- [Consent invite API](https://github.com/somunaexe/bulfighter/blob/main/src/api/consentInvite.js): `src/api/consentInvite.js`
- [Consent API](https://github.com/somunaexe/bulfighter/blob/main/src/api/consents.js): `src/api/consents.js`
- [Admin auth API](https://github.com/somunaexe/bulfighter/blob/main/src/api/adminAuth.js): `src/api/adminAuth.js`
- [JSON fetch helper](https://github.com/somunaexe/bulfighter/blob/main/src/api/http.js): `src/api/http.js`
- **Serverless endpoints**
- [Consent email handler](https://github.com/somunaexe/bulfighter/blob/main/src/backend/inviteToConsent.js): `src/backend/inviteToConsent.js`

### Other components

- **Site visitor**
- **SMTP service**

## Connections

- Site visitor → Route dispatcher: opens site (evidence: `src/main.jsx`)
- Route dispatcher → Home page: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Clip browser: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Consent form: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Admin workspace: routes to (evidence: `src/main.jsx`)
- Home page → Join application: renders (evidence: `src/App.jsx`)
- Clip browser → Topic API: loads topics (evidence: `src/sections/Clips.jsx`)
- Join application → Interest API: creates interest (evidence: `src/sections/Contact.jsx`)
- Consent form → Consent invite API: validates invite (evidence: `src/sections/ConsentForm.jsx`)
- Consent form → Consent API: submits consent (evidence: `src/sections/ConsentForm.jsx`)
- Admin workspace → Interest management: renders (evidence: `src/admin/Admin.jsx`)
- Admin workspace → Consent management: renders (evidence: `src/admin/Admin.jsx`)
- Admin workspace → Topic management: renders (evidence: `src/admin/Admin.jsx`)
- Admin workspace → Admin auth API: authenticates (evidence: `src/admin/Admin.jsx`)
- Interest management → Interest API: loads applicants (evidence: `src/admin/Interests.jsx`)
- Interest management → Consent invite API: sends invite (evidence: `src/admin/Interests.jsx`)
- Consent management → Consent API: manages consents (evidence: `src/admin/Consents.jsx`)
- Topic management → Topic API: manages topics (evidence: `src/admin/Topics.jsx`)
- Admin auth API → JSON fetch helper: uses fetch helper (evidence: `src/api/adminAuth.js`)
- Interest API → JSON fetch helper: uses fetch helper (evidence: `src/api/interests.js`)
- Topic API → JSON fetch helper: uses fetch helper (evidence: `src/api/topics.js`)
- Consent invite API → JSON fetch helper: uses fetch helper (evidence: `src/api/consentInvite.js`)
- Consent API → JSON fetch helper: uses fetch helper (evidence: `src/api/consents.js`)
- Interest API → Serverless endpoints: calls endpoint (evidence: `src/api/interests.js`)
- Topic API → Serverless endpoints: calls endpoint (evidence: `src/api/topics.js`)
- Consent invite API → Serverless endpoints: calls endpoint (evidence: `src/api/consentInvite.js`)
- Consent API → Serverless endpoints: calls endpoint (evidence: `src/api/consents.js`)
- Admin auth API → Serverless endpoints: calls endpoint (evidence: `src/api/adminAuth.js`)
- Consent email handler → SMTP service: sends email (evidence: `README.md`)
