# a-dot614/tiktok-auto-agent architecture

> Architecture diagram of the GitHub repository a-dot614/tiktok-auto-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/a-dot614/tiktok-auto-agent
- Repository: https://github.com/a-dot614/tiktok-auto-agent

## Overview

TikTok Auto Agent is a web app for preparing, scheduling, and monitoring TikTok video posts. Users authenticate in the frontend, upload videos, optionally run an autopilot processing pipeline, then manage captions, schedules, and publishing from the dashboard. The backend exposes API controllers and coordinates background work; its models persist user, media, pipeline, and posting state. The README provides no further capability details, so broader frontend feature coverage follows the routed pages and API routes in the source index. Unsampled modules are represented only at supported directory-level granularity.

Main entry points: [`backend/app/Http/Controllers/Api/V1`](https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Http/Controllers/Api/V1) (API controllers), [`backend/app/Http/Controllers/Api/V1/VideoController.php`](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Http/Controllers/Api/V1/VideoController.php) (Video library), [`backend/app/Services/PipelineOrchestrator.php`](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/PipelineOrchestrator.php) (Pipeline orchestration), [`frontend/src/App.tsx`](https://github.com/a-dot614/tiktok-auto-agent/blob/main/frontend/src/App.tsx) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Frontend"]
  node_app["App routes<br/>[App.tsx]"]
  node_pages["Product pages"]
  node_client["API client<br/>[client.ts]"]
end

subgraph group_api["API and identity"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_controllers["API controllers"]
end

subgraph group_media["Video processing"]
  node_video["Video library"]
  node_pipeline["Pipeline orchestration"]
  node_pipelinejobs["Processing jobs"]
  node_mediarecords[("Media and run state<br/>[Video.php]")]
  node_captions["AI captions"]
end

subgraph group_publishing["Scheduling and publishing"]
  node_schedule["Post scheduling"]
  node_posting["TikTok publishing"]
  node_postrecords[("Post and account state<br/>[ScheduledPost.php]")]
end

subgraph group_insights["Insights and operations"]
  node_insightcontrollers["Insights and controls"]
  node_insightservices["Recommendations and alerts"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_pages
node_pages -->|"requests through"| node_client
node_client -.->|"calls API"| node_controllers
node_controllers -->|"routes auth"| node_auth
node_controllers -->|"routes video"| node_video
node_controllers -->|"routes insights"| node_insightcontrollers
node_video -->|"stores video"| node_mediarecords
node_video -->|"starts pipeline"| node_pipeline
node_pipeline -->|"dispatches chain"| node_pipelinejobs
node_pipeline -->|"records run"| node_mediarecords
node_controllers -->|"generates captions"| node_captions
node_controllers -->|"schedules posts"| node_schedule
node_schedule -.->|"updates schedule"| node_postrecords
node_controllers -.->|"publishes posts"| node_posting
node_insightcontrollers -.->|"uses services"| node_insightservices

click node_app "https://github.com/a-dot614/tiktok-auto-agent/blob/main/frontend/src/App.tsx"
click node_pages "https://github.com/a-dot614/tiktok-auto-agent/tree/main/frontend/src/pages"
click node_client "https://github.com/a-dot614/tiktok-auto-agent/blob/main/frontend/src/api/client.ts"
click node_auth "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Http/Controllers/Api/V1/AuthController.php"
click node_controllers "https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Http/Controllers/Api/V1"
click node_video "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Http/Controllers/Api/V1/VideoController.php"
click node_pipeline "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/PipelineOrchestrator.php"
click node_pipelinejobs "https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Jobs"
click node_mediarecords "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Models/Video.php"
click node_captions "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/CaptionGenerationService.php"
click node_schedule "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/ScheduleService.php"
click node_posting "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/TikTokPublishingService.php"
click node_postrecords "https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Models/ScheduledPost.php"
click node_insightcontrollers "https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Http/Controllers/Api/V1"
click node_insightservices "https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Services"

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_app,node_pages,node_client,node_user toneBlue
class node_auth,node_controllers toneAmber
class node_video,node_pipeline,node_pipelinejobs,node_mediarecords,node_captions toneMint
class node_schedule,node_posting,node_postrecords toneRose
class node_insightcontrollers,node_insightservices toneIndigo
```

## Components

### Frontend

- [App routes](https://github.com/a-dot614/tiktok-auto-agent/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Product pages](https://github.com/a-dot614/tiktok-auto-agent/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/a-dot614/tiktok-auto-agent/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### API and identity

- [Authentication](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Http/Controllers/Api/V1/AuthController.php): `backend/app/Http/Controllers/Api/V1/AuthController.php`
- [API controllers](https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Http/Controllers/Api/V1): `backend/app/Http/Controllers/Api/V1`

### Video processing

- [Video library](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Http/Controllers/Api/V1/VideoController.php): `backend/app/Http/Controllers/Api/V1/VideoController.php`
- [Pipeline orchestration](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/PipelineOrchestrator.php): `backend/app/Services/PipelineOrchestrator.php`
- [Processing jobs](https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Jobs): `backend/app/Jobs`
- [Media and run state](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Models/Video.php): `backend/app/Models/Video.php`
- [AI captions](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/CaptionGenerationService.php): `backend/app/Services/CaptionGenerationService.php`

### Scheduling and publishing

- [Post scheduling](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/ScheduleService.php): `backend/app/Services/ScheduleService.php`
- [TikTok publishing](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Services/TikTokPublishingService.php): `backend/app/Services/TikTokPublishingService.php`
- [Post and account state](https://github.com/a-dot614/tiktok-auto-agent/blob/main/backend/app/Models/ScheduledPost.php): `backend/app/Models/ScheduledPost.php`

### Insights and operations

- [Insights and controls](https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Http/Controllers/Api/V1): `backend/app/Http/Controllers/Api/V1`
- [Recommendations and alerts](https://github.com/a-dot614/tiktok-auto-agent/tree/main/backend/app/Services): `backend/app/Services`

### Other components

- **User**

## Connections

- User → App routes: uses
- App routes → Product pages: routes to (evidence: `frontend/src/App.tsx`)
- Product pages → API client: requests through (evidence: `frontend/src/pages/Pipeline.tsx`)
- API client → API controllers: calls API
- API controllers → Authentication: routes auth (evidence: `backend/routes/api.php`)
- API controllers → Video library: routes video (evidence: `backend/routes/api.php`)
- API controllers → Insights and controls: routes insights (evidence: `backend/routes/api.php`)
- Video library → Media and run state: stores video (evidence: `backend/app/Http/Controllers/Api/V1/VideoController.php`)
- Video library → Pipeline orchestration: starts pipeline (evidence: `backend/app/Http/Controllers/Api/V1/VideoController.php`)
- Pipeline orchestration → Processing jobs: dispatches chain (evidence: `backend/app/Services/PipelineOrchestrator.php`)
- Pipeline orchestration → Media and run state: records run (evidence: `backend/app/Services/PipelineOrchestrator.php`)
- API controllers → AI captions: generates captions (evidence: `backend/app/Http/Controllers/Api/V1/VideoController.php`)
- API controllers → Post scheduling: schedules posts (evidence: `backend/app/Http/Controllers/Api/V1/ScheduledPostController.php`)
- Post scheduling → Post and account state: updates schedule
- API controllers → TikTok publishing: publishes posts
- Insights and controls → Recommendations and alerts: uses services (evidence: `backend/app/Http/Controllers/Api/V1/ScheduledPostController.php`)
