# yaya1426/manhattan-project architecture

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

- Interactive diagram: https://gitdiagram.com/yaya1426/manhattan-project
- Repository: https://github.com/yaya1426/manhattan-project

## Overview

The Manhattan Project is a Laravel admin backend and API for a course-and-podcast marketing site. Its main workflow is admins author and publish course content, then the separate marketing site requests published or coming-soon course data through the API. Other important branches manage site promotions and review inbound podcast, contact, and course-interest submissions; podcast requests can trigger PR email. The graph reflects documented flows and source-index references; several controllers and route files were not sampled, so uncertain connections are omitted or shown as unverified.

Main entry points: [`routes/web.php`](https://github.com/yaya1426/manhattan-project/blob/main/routes/web.php) (Web routes), [`routes/api.php`](https://github.com/yaya1426/manhattan-project/blob/main/routes/api.php) (API routes), [`app/Http/Controllers/CourseController.php`](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/CourseController.php) (Course editor), [`app/Http/Controllers/Api/CourseApiController.php`](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/CourseApiController.php) (Course API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_course["Course content"]
  node_course_editor["Course editor"]
  node_course_records[("Course records<br/>[Course.php]")]
  node_course_sections[("Course sections")]
  node_course_themes[("Course themes<br/>[CourseTheme.php]")]
  node_theme_presets[("Theme presets<br/>[ThemePreset.php]")]
end

subgraph group_api["Public API"]
  node_api_routes["API routes<br/>[api.php]"]
  node_api_security["API key and CORS"]
  node_course_api["Course API"]
  node_promotion_api["Promotion API"]
  node_interest_api["Interest API"]
end

subgraph group_admin["Admin operations"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth["Admin authentication"]
  node_submissions["Contact submissions"]
  node_podcast_requests["Podcast requests"]
  node_interest_admin["Interest management"]
  node_site_promotions["Popup and banner"]
end

subgraph group_integrations["Services and integrations"]
  node_promotion_service["Promotion availability"]
  node_sendgrid["Email notifications"]
  node_phone_service["Phone normalization"]
end

node_admin_user(("Admin"))
node_public_site(("Marketing site"))
node_email_provider["SendGrid"]

node_admin_user -.->|"uses panel"| node_web_routes
node_web_routes -->|"routes login"| node_auth
node_web_routes -.->|"routes admin"| node_course_editor
node_course_editor -->|"updates"| node_course_records
node_course_editor -->|"saves sections"| node_course_sections
node_course_editor -->|"sets theme"| node_course_themes
node_course_themes -->|"references preset"| node_theme_presets
node_public_site -->|"requests data"| node_api_routes
node_api_routes -->|"requires key"| node_api_security
node_api_routes -->|"routes course requests"| node_course_api
node_course_api -->|"loads courses"| node_course_records
node_course_api -->|"formats sections"| node_course_sections
node_api_routes -.->|"routes promotion requests"| node_promotion_api
node_promotion_api -.->|"checks availability"| node_promotion_service
node_api_routes -.->|"routes interest requests"| node_interest_api
node_interest_api -->|"normalizes numbers"| node_phone_service
node_interest_api -.->|"shares interest records"| node_interest_admin
node_web_routes -.->|"routes review"| node_submissions
node_web_routes -.->|"routes review"| node_podcast_requests
node_web_routes -.->|"routes review"| node_interest_admin
node_podcast_requests -->|"sends notification"| node_sendgrid
node_sendgrid -.->|"sends email"| node_email_provider
node_web_routes -.->|"routes editing"| node_site_promotions
node_site_promotions -.->|"provides promotion data"| node_promotion_service

click node_web_routes "https://github.com/yaya1426/manhattan-project/blob/main/routes/web.php"
click node_auth "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_course_editor "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/CourseController.php"
click node_course_records "https://github.com/yaya1426/manhattan-project/blob/main/app/Models/Course.php"
click node_course_sections "https://github.com/yaya1426/manhattan-project/tree/main/app/Models"
click node_course_themes "https://github.com/yaya1426/manhattan-project/blob/main/app/Models/CourseTheme.php"
click node_theme_presets "https://github.com/yaya1426/manhattan-project/blob/main/app/Models/ThemePreset.php"
click node_api_routes "https://github.com/yaya1426/manhattan-project/blob/main/routes/api.php"
click node_api_security "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Middleware/ApiKeyMiddleware.php"
click node_course_api "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/CourseApiController.php"
click node_promotion_api "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/SitePromotionController.php"
click node_interest_api "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/ComingSoonInterestController.php"
click node_submissions "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/ContactMessageController.php"
click node_podcast_requests "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/PodcastGuestController.php"
click node_interest_admin "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Admin/ComingSoonInterestController.php"
click node_site_promotions "https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Admin/FlashPopupController.php"
click node_promotion_service "https://github.com/yaya1426/manhattan-project/blob/main/app/Services/PromotionService.php"
click node_sendgrid "https://github.com/yaya1426/manhattan-project/blob/main/app/Services/SendGridService.php"
click node_phone_service "https://github.com/yaya1426/manhattan-project/blob/main/app/Services/PhoneNumberService.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_course_editor,node_course_records,node_course_sections,node_course_themes,node_theme_presets toneBlue
class node_api_routes,node_api_security,node_course_api,node_promotion_api,node_interest_api toneAmber
class node_web_routes,node_auth,node_submissions,node_podcast_requests,node_interest_admin,node_site_promotions toneMint
class node_promotion_service,node_sendgrid,node_phone_service toneRose
class node_admin_user,node_public_site,node_email_provider toneIndigo
```

## Components

### Course content

- [Course editor](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/CourseController.php): `app/Http/Controllers/CourseController.php`
- [Course records](https://github.com/yaya1426/manhattan-project/blob/main/app/Models/Course.php): `app/Models/Course.php`
- [Course sections](https://github.com/yaya1426/manhattan-project/tree/main/app/Models): `app/Models`
- [Course themes](https://github.com/yaya1426/manhattan-project/blob/main/app/Models/CourseTheme.php): `app/Models/CourseTheme.php`
- [Theme presets](https://github.com/yaya1426/manhattan-project/blob/main/app/Models/ThemePreset.php): `app/Models/ThemePreset.php`

### Public API

- [API routes](https://github.com/yaya1426/manhattan-project/blob/main/routes/api.php): `routes/api.php`
- [API key and CORS](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Middleware/ApiKeyMiddleware.php): `app/Http/Middleware/ApiKeyMiddleware.php`
- [Course API](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/CourseApiController.php): `app/Http/Controllers/Api/CourseApiController.php`
- [Promotion API](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/SitePromotionController.php): `app/Http/Controllers/Api/SitePromotionController.php`
- [Interest API](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Api/ComingSoonInterestController.php): `app/Http/Controllers/Api/ComingSoonInterestController.php`

### Admin operations

- [Web routes](https://github.com/yaya1426/manhattan-project/blob/main/routes/web.php): `routes/web.php`
- [Admin authentication](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Contact submissions](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/ContactMessageController.php): `app/Http/Controllers/ContactMessageController.php`
- [Podcast requests](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/PodcastGuestController.php): `app/Http/Controllers/PodcastGuestController.php`
- [Interest management](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Admin/ComingSoonInterestController.php): `app/Http/Controllers/Admin/ComingSoonInterestController.php`
- [Popup and banner](https://github.com/yaya1426/manhattan-project/blob/main/app/Http/Controllers/Admin/FlashPopupController.php): `app/Http/Controllers/Admin/FlashPopupController.php`

### Services and integrations

- [Promotion availability](https://github.com/yaya1426/manhattan-project/blob/main/app/Services/PromotionService.php): `app/Services/PromotionService.php`
- [Email notifications](https://github.com/yaya1426/manhattan-project/blob/main/app/Services/SendGridService.php): `app/Services/SendGridService.php`
- [Phone normalization](https://github.com/yaya1426/manhattan-project/blob/main/app/Services/PhoneNumberService.php): `app/Services/PhoneNumberService.php`

### Other components

- **Admin**
- **Marketing site**
- **SendGrid**

## Connections

- Admin → Web routes: uses panel
- Web routes → Admin authentication: routes login
- Web routes → Course editor: routes admin
- Course editor → Course records: updates (evidence: `app/Http/Controllers/CourseController.php`)
- Course editor → Course sections: saves sections (evidence: `app/Http/Controllers/CourseController.php`)
- Course editor → Course themes: sets theme (evidence: `app/Http/Controllers/CourseController.php`)
- Course themes → Theme presets: references preset
- Marketing site → API routes: requests data
- API routes → API key and CORS: requires key
- API routes → Course API: routes course requests
- Course API → Course records: loads courses (evidence: `app/Http/Controllers/Api/CourseApiController.php`)
- Course API → Course sections: formats sections (evidence: `app/Http/Controllers/Api/CourseApiController.php`)
- API routes → Promotion API: routes promotion requests
- Promotion API → Promotion availability: checks availability
- API routes → Interest API: routes interest requests
- Interest API → Phone normalization: normalizes numbers
- Interest API → Interest management: shares interest records
- Web routes → Contact submissions: routes review
- Web routes → Podcast requests: routes review
- Web routes → Interest management: routes review
- Podcast requests → Email notifications: sends notification (evidence: `app/Http/Controllers/PodcastGuestController.php`)
- Email notifications → SendGrid: sends email
- Web routes → Popup and banner: routes editing
- Popup and banner → Promotion availability: provides promotion data
