# adam-mahmoud12/ai-workflow architecture

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

- Interactive diagram: https://gitdiagram.com/adam-mahmoud12/ai-workflow
- Repository: https://github.com/adam-mahmoud12/ai-workflow

## Overview

AI TaskFlow is a task/project workspace with account-scoped persistence, configurable AI, and visual planning and editing studios. Users manage workspace data, then use AI chat or the planner to create reviewed results; domain-specific W2M/2 parsers validate structured designs before editing or export. Other product branches include provider and account settings, reusable skills, document context, help, speaking practice, and optional Telegram delivery. Client excerpts establish several calls; broader backend route and engine wiring is summarized only where the README documents it.

Main entry points: [`backend/main.py`](https://github.com/adam-mahmoud12/ai-workflow/blob/master/backend/main.py) (Backend API), [`src/App.tsx`](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/App.tsx) (Task Workspace), [`src/AIChat.tsx`](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIChat.tsx) (AI Chat), [`src/AIPlanner.tsx`](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIPlanner.tsx) (AI Planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace"]
  node_app["Task Workspace<br/>[App.tsx]"]
  node_appdata["Workspace Data<br/>[appData.ts]"]
  node_help["Help Center<br/>[HelpCenter.tsx]"]
  node_language["Localization<br/>[localization.ts]"]
end

subgraph group_ai["AI and Context"]
  node_providers["AI Providers<br/>[AIProviders.tsx]"]
  node_chat["AI Chat<br/>[AIChat.tsx]"]
  node_planner["AI Planner<br/>[AIPlanner.tsx]"]
  node_attachments["Document Context"]
  node_actions["AI Action Types<br/>[aiActions.ts]"]
  node_skills["Reusable Skills<br/>[SkillsCenter.tsx]"]
  node_speaking["Speaking Trainer"]
end

subgraph group_studios["Planning Studios"]
  node_flowchart["Flowchart Editor"]
  node_formats["W2M Parsers<br/>[w2mFormats.ts]"]
  node_architecture["Architecture Studio"]
  node_logo["SVG Design Studio<br/>[SVGLogoStudio.tsx]"]
  node_motion["Motion Studio"]
  node_motioncompiler["Motion Compiler<br/>[motionW2M.ts]"]
end

subgraph group_platform["Accounts and Services"]
  node_database[("Application Database<br/>[database.py]")]
  node_auth["Sign-in and Accounts<br/>[AuthGate.tsx]"]
  node_backend["Backend API<br/>[main.py]"]
  node_telegram["Telegram Delivery<br/>[api.ts]"]
  node_settings["Server Settings"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"reads and writes"| node_appdata
node_appdata -->|"calls data API"| node_backend
node_backend -->|"persists data"| node_database
node_user -->|"signs in"| node_auth
node_auth -->|"calls auth API"| node_backend
node_user -->|"configures models"| node_providers
node_providers -->|"calls provider API"| node_backend
node_user -->|"asks questions"| node_chat
node_chat -->|"sends chat request"| node_backend
node_user -->|"requests plans"| node_planner
node_planner -->|"uses chat context"| node_chat
node_chat -->|"uses documents"| node_attachments
node_planner -->|"uses documents"| node_attachments
node_app -->|"describes actions"| node_actions
node_app -->|"opens skills"| node_skills
node_user -->|"edits workflows"| node_flowchart
node_flowchart -->|"parses W2M"| node_formats
node_user -->|"creates plans"| node_architecture
node_architecture -->|"parses W2M"| node_formats
node_user -->|"creates designs"| node_logo
node_logo -->|"parses W2M"| node_formats
node_user -->|"edits projects"| node_motion
node_motion -->|"validates projects"| node_motioncompiler
node_motion -->|"calls motion API"| node_backend
node_user -->|"practices speaking"| node_speaking
node_chat -->|"delivers artifacts"| node_telegram
node_logo -->|"delivers SVG"| node_telegram
node_telegram -->|"submits delivery"| node_backend
node_user -->|"configures access"| node_settings
node_settings -->|"calls settings API"| node_backend
node_user -->|"reads guidance"| node_help
node_app -->|"uses translations"| node_language

click node_app "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/App.tsx"
click node_appdata "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/appData.ts"
click node_database "https://github.com/adam-mahmoud12/ai-workflow/blob/master/backend/database.py"
click node_auth "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AuthGate.tsx"
click node_backend "https://github.com/adam-mahmoud12/ai-workflow/blob/master/backend/main.py"
click node_providers "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIProviders.tsx"
click node_chat "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIChat.tsx"
click node_planner "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIPlanner.tsx"
click node_attachments "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/DocumentAttachments.tsx"
click node_actions "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/aiActions.ts"
click node_skills "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/SkillsCenter.tsx"
click node_flowchart "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/FlowchartEditor.tsx"
click node_formats "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/w2mFormats.ts"
click node_architecture "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/ArchitecturalPlanStudio.tsx"
click node_logo "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/SVGLogoStudio.tsx"
click node_motion "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/MotionGraphicsStudio.tsx"
click node_motioncompiler "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/motionW2M.ts"
click node_speaking "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/SpeakingTrainer.tsx"
click node_telegram "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/api.ts"
click node_settings "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/ServerAccessSettings.tsx"
click node_help "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/HelpCenter.tsx"
click node_language "https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/localization.ts"

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_appdata,node_help,node_language,node_user toneBlue
class node_providers,node_chat,node_planner,node_attachments,node_actions,node_skills,node_speaking toneAmber
class node_flowchart,node_formats,node_architecture,node_logo,node_motion,node_motioncompiler toneMint
class node_database,node_auth,node_backend,node_telegram,node_settings toneRose
```

## Components

### Workspace

- [Task Workspace](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/App.tsx): `src/App.tsx`
- [Workspace Data](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/appData.ts): `src/appData.ts`
- [Help Center](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/HelpCenter.tsx): `src/HelpCenter.tsx`
- [Localization](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/localization.ts): `src/localization.ts`

### AI and Context

- [AI Providers](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIProviders.tsx): `src/AIProviders.tsx`
- [AI Chat](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIChat.tsx): `src/AIChat.tsx`
- [AI Planner](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AIPlanner.tsx): `src/AIPlanner.tsx`
- [Document Context](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/DocumentAttachments.tsx): `src/DocumentAttachments.tsx`
- [AI Action Types](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/aiActions.ts): `src/aiActions.ts`
- [Reusable Skills](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/SkillsCenter.tsx): `src/SkillsCenter.tsx`
- [Speaking Trainer](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/SpeakingTrainer.tsx): `src/SpeakingTrainer.tsx`

### Planning Studios

- [Flowchart Editor](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/FlowchartEditor.tsx): `src/FlowchartEditor.tsx`
- [W2M Parsers](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/w2mFormats.ts): `src/w2mFormats.ts`
- [Architecture Studio](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/ArchitecturalPlanStudio.tsx): `src/ArchitecturalPlanStudio.tsx`
- [SVG Design Studio](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/SVGLogoStudio.tsx): `src/SVGLogoStudio.tsx`
- [Motion Studio](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/MotionGraphicsStudio.tsx): `src/MotionGraphicsStudio.tsx`
- [Motion Compiler](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/motionW2M.ts): `src/motionW2M.ts`

### Accounts and Services

- [Application Database](https://github.com/adam-mahmoud12/ai-workflow/blob/master/backend/database.py): `backend/database.py`
- [Sign-in and Accounts](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/AuthGate.tsx): `src/AuthGate.tsx`
- [Backend API](https://github.com/adam-mahmoud12/ai-workflow/blob/master/backend/main.py): `backend/main.py`
- [Telegram Delivery](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/api.ts): `src/api.ts`
- [Server Settings](https://github.com/adam-mahmoud12/ai-workflow/blob/master/src/ServerAccessSettings.tsx): `src/ServerAccessSettings.tsx`

### Other components

- **User**

## Connections

- User → Task Workspace: uses (evidence: `src/App.tsx`)
- Task Workspace → Workspace Data: reads and writes (evidence: `src/App.tsx`)
- Workspace Data → Backend API: calls data API (evidence: `src/appData.ts`)
- Backend API → Application Database: persists data (evidence: `backend/main.py`)
- User → Sign-in and Accounts: signs in (evidence: `src/AuthGate.tsx`)
- Sign-in and Accounts → Backend API: calls auth API (evidence: `src/AuthGate.tsx`)
- User → AI Providers: configures models (evidence: `src/AIProviders.tsx`)
- AI Providers → Backend API: calls provider API (evidence: `src/AIProviders.tsx`)
- User → AI Chat: asks questions (evidence: `src/AIChat.tsx`)
- AI Chat → Backend API: sends chat request (evidence: `src/AIChat.tsx`)
- User → AI Planner: requests plans (evidence: `src/AIPlanner.tsx`)
- AI Planner → AI Chat: uses chat context (evidence: `src/AIPlanner.tsx`)
- AI Chat → Document Context: uses documents (evidence: `src/AIChat.tsx`)
- AI Planner → Document Context: uses documents (evidence: `src/AIPlanner.tsx`)
- Task Workspace → AI Action Types: describes actions (evidence: `src/App.tsx`)
- Task Workspace → Reusable Skills: opens skills (evidence: `src/App.tsx`)
- User → Flowchart Editor: edits workflows
- Flowchart Editor → W2M Parsers: parses W2M (evidence: `src/FlowchartEditor.tsx`)
- User → Architecture Studio: creates plans (evidence: `README.md`)
- Architecture Studio → W2M Parsers: parses W2M (evidence: `src/ArchitecturalPlanStudio.tsx`)
- User → SVG Design Studio: creates designs (evidence: `README.md`)
- SVG Design Studio → W2M Parsers: parses W2M (evidence: `src/SVGLogoStudio.tsx`)
- User → Motion Studio: edits projects (evidence: `README.md`)
- Motion Studio → Motion Compiler: validates projects (evidence: `src/MotionGraphicsStudio.tsx`)
- Motion Studio → Backend API: calls motion API (evidence: `src/MotionGraphicsStudio.tsx`)
- User → Speaking Trainer: practices speaking
- AI Chat → Telegram Delivery: delivers artifacts (evidence: `src/AIChat.tsx`)
- SVG Design Studio → Telegram Delivery: delivers SVG (evidence: `src/SVGLogoStudio.tsx`)
- Telegram Delivery → Backend API: submits delivery (evidence: `src/api.ts`)
- User → Server Settings: configures access
- Server Settings → Backend API: calls settings API (evidence: `src/ServerAccessSettings.tsx`)
- User → Help Center: reads guidance
- Task Workspace → Localization: uses translations (evidence: `src/localization.ts`)
