# amanjain44/multi_content_factory architecture

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

- Interactive diagram: https://gitdiagram.com/amanjain44/multi_content_factory
- Repository: https://github.com/amanjain44/multi_content_factory

## Overview

MCF Content Studio is a web application for grounding content in project sources, developing it through an AI-assisted workflow, and managing projects and schedules. The visible workflow runs from source grounding through content selection, platform strategy, topic and angle, content strategy, storyboard, and script. The backend also exposes authentication, diagnostics, and project-management APIs. Source excerpts establish the ingestion sequence and frontend API-client use; most route and AI implementation files were not sampled, so their internal links are omitted.

Main entry points: [`backend/app/main.py`](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/main.py) (API application), [`backend/app/services/ingestion_service.py`](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/ingestion_service.py) (Source ingestion), [`frontend/src/lib/project-service.ts`](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/lib/project-service.ts) (Project service), [`backend/app/api/routes/ai.py`](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/ai.py) (AI routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_project_pages["Project pages<br/>[page.tsx]"]
  node_workspace["Project workspace"]
  node_workflow_preview["Workflow preview"]
  node_project_service["Project service<br/>[project-service.ts]"]
  node_api_client["API client<br/>[api-client.ts]"]
  node_schedule_ui["Calendar and scheduling<br/>[calendar-view.tsx]"]
end

subgraph group_api["Backend API"]
  node_app_entry["API application<br/>[main.py]"]
  node_project_routes["Project routes<br/>[projects.py]"]
  node_stage_routes["Workflow stage routes<br/>[workflow_stages.py]"]
  node_source_routes["Source routes<br/>[sources.py]"]
  node_ai_routes["AI routes<br/>[ai.py]"]
  node_schedule_routes["Schedule routes<br/>[schedules.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_diagnostic_routes["Diagnostics routes<br/>[diagnostics.py]"]
end

subgraph group_content["Content workflow"]
  node_content_stages["AI content stages"]
  node_ai_orchestrator["AI orchestrator<br/>[ai_orchestrator.py]"]
end

subgraph group_sources["Source processing"]
  node_extraction["Document extraction"]
  node_chunking["Text chunking"]
  node_ingestion["Source ingestion"]
  node_retrieval["Source retrieval"]
  node_source_store[("Source and chunk data<br/>[source.py]")]
end

node_user(("Studio user"))

node_user -->|"manages projects"| node_project_pages
node_user -->|"views workflow"| node_workflow_preview
node_project_service -->|"sends requests"| node_api_client
node_app_entry -->|"registers"| node_project_routes
node_app_entry -->|"registers"| node_stage_routes
node_app_entry -->|"registers"| node_source_routes
node_app_entry -->|"registers"| node_ai_routes
node_app_entry -->|"registers"| node_schedule_routes
node_app_entry -->|"registers"| node_auth_routes
node_app_entry -->|"registers"| node_diagnostic_routes
node_ingestion -->|"extracts text"| node_extraction
node_ingestion -->|"chunks text"| node_chunking
node_ingestion -->|"persists chunks"| node_source_store
node_retrieval -->|"searches chunks"| node_source_store
node_workspace -.->|"uses"| node_project_service
node_schedule_ui -.->|"requests schedules"| node_schedule_routes
node_ai_routes -.->|"dispatches AI"| node_ai_orchestrator
node_ai_orchestrator -.->|"runs stages"| node_content_stages

click node_project_pages "https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/app/projects/page.tsx"
click node_workspace "https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/components/projects/workspace-content.tsx"
click node_workflow_preview "https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/components/composer/WorkflowPreview.tsx"
click node_project_service "https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/lib/project-service.ts"
click node_api_client "https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/lib/api-client.ts"
click node_schedule_ui "https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/components/calendar-view.tsx"
click node_app_entry "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/main.py"
click node_project_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/projects.py"
click node_stage_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/workflow_stages.py"
click node_source_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/sources.py"
click node_ai_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/ai.py"
click node_schedule_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/schedules.py"
click node_auth_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/auth.py"
click node_diagnostic_routes "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/diagnostics.py"
click node_content_stages "https://github.com/amanjain44/multi_content_factory/tree/main/backend/app/ai/graphs"
click node_ai_orchestrator "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/ai/services/ai_orchestrator.py"
click node_extraction "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/extraction_service.py"
click node_chunking "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/chunking_service.py"
click node_ingestion "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/ingestion_service.py"
click node_retrieval "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/retrieval_service.py"
click node_source_store "https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/models/source.py"

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_project_pages,node_workspace,node_workflow_preview,node_project_service,node_api_client,node_schedule_ui,node_user toneBlue
class node_app_entry,node_project_routes,node_stage_routes,node_source_routes,node_ai_routes,node_schedule_routes,node_auth_routes,node_diagnostic_routes toneAmber
class node_content_stages,node_ai_orchestrator toneMint
class node_extraction,node_chunking,node_ingestion,node_retrieval,node_source_store toneRose
```

## Components

### Web application

- [Project pages](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/app/projects/page.tsx): `frontend/src/app/projects/page.tsx`
- [Project workspace](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/components/projects/workspace-content.tsx): `frontend/src/components/projects/workspace-content.tsx`
- [Workflow preview](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/components/composer/WorkflowPreview.tsx): `frontend/src/components/composer/WorkflowPreview.tsx`
- [Project service](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/lib/project-service.ts): `frontend/src/lib/project-service.ts`
- [API client](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/lib/api-client.ts): `frontend/src/lib/api-client.ts`
- [Calendar and scheduling](https://github.com/amanjain44/multi_content_factory/blob/main/frontend/src/components/calendar-view.tsx): `frontend/src/components/calendar-view.tsx`

### Backend API

- [API application](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/main.py): `backend/app/main.py`
- [Project routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/projects.py): `backend/app/api/routes/projects.py`
- [Workflow stage routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/workflow_stages.py): `backend/app/api/routes/workflow_stages.py`
- [Source routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/sources.py): `backend/app/api/routes/sources.py`
- [AI routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/ai.py): `backend/app/api/routes/ai.py`
- [Schedule routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/schedules.py): `backend/app/api/routes/schedules.py`
- [Authentication routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/auth.py): `backend/app/api/routes/auth.py`
- [Diagnostics routes](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/api/routes/diagnostics.py): `backend/app/api/routes/diagnostics.py`

### Content workflow

- [AI content stages](https://github.com/amanjain44/multi_content_factory/tree/main/backend/app/ai/graphs): `backend/app/ai/graphs`
- [AI orchestrator](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/ai/services/ai_orchestrator.py): `backend/app/ai/services/ai_orchestrator.py`

### Source processing

- [Document extraction](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/extraction_service.py): `backend/app/services/extraction_service.py`
- [Text chunking](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/chunking_service.py): `backend/app/services/chunking_service.py`
- [Source ingestion](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/ingestion_service.py): `backend/app/services/ingestion_service.py`
- [Source retrieval](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/services/retrieval_service.py): `backend/app/services/retrieval_service.py`
- [Source and chunk data](https://github.com/amanjain44/multi_content_factory/blob/main/backend/app/models/source.py): `backend/app/models/source.py`

### Other components

- **Studio user**

## Connections

- Studio user → Project pages: manages projects
- Studio user → Workflow preview: views workflow (evidence: `frontend/src/components/composer/WorkflowPreview.tsx`)
- Project service → API client: sends requests (evidence: `frontend/src/lib/project-service.ts`)
- API application → Project routes: registers (evidence: `backend/app/main.py`)
- API application → Workflow stage routes: registers (evidence: `backend/app/main.py`)
- API application → Source routes: registers (evidence: `backend/app/main.py`)
- API application → AI routes: registers (evidence: `backend/app/main.py`)
- API application → Schedule routes: registers (evidence: `backend/app/main.py`)
- API application → Authentication routes: registers (evidence: `backend/app/main.py`)
- API application → Diagnostics routes: registers (evidence: `backend/app/main.py`)
- Source ingestion → Document extraction: extracts text (evidence: `backend/app/services/ingestion_service.py`)
- Source ingestion → Text chunking: chunks text (evidence: `backend/app/services/ingestion_service.py`)
- Source ingestion → Source and chunk data: persists chunks (evidence: `backend/app/services/ingestion_service.py`)
- Source retrieval → Source and chunk data: searches chunks (evidence: `backend/app/services/retrieval_service.py`)
- Project workspace → Project service: uses
- Calendar and scheduling → Schedule routes: requests schedules
- AI routes → AI orchestrator: dispatches AI
- AI orchestrator → AI content stages: runs stages
