# chandrabhushan-mishra01/dockerforge architecture

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

- Interactive diagram: https://gitdiagram.com/chandrabhushan-mishra01/dockerforge
- Repository: https://github.com/chandrabhushan-mishra01/dockerforge

## Overview

DockerForge turns a public GitHub repository into a generated, build-tested Docker deployment and live preview. The user submits a repository URL in the browser; the frontend starts a build and follows its stages and logs over SSE. The backend orchestrator clones and analyzes the repository, repairs import casing, requests deployment files from Groq, then builds and runs them with Docker, retrying failures. Results include generated files and a preview URL. The README documents these capabilities; links between sampled backend modules are shown where the orchestrator or routes own the calls.

Main entry points: [`frontend/src/App.jsx`](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/App.jsx) (Build interface), [`backend/pipeline/orchestrator.py`](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/orchestrator.py) (Pipeline orchestrator), [`backend/app.py`](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/app.py) (FastAPI routes and SSE), [`backend/pipeline/executor.py`](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/executor.py) (Docker build and run)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser interface"]
  node_app_ui["Build interface<br/>[App.jsx]"]
  node_repo_form["Repository form<br/>[RepoForm.jsx]"]
  node_stage_view["Stage timeline<br/>[PipelineSteps.jsx]"]
  node_log_view["Build console<br/>[ConsoleLog.jsx]"]
  node_result_view["Result and preview<br/>[ResultPanel.jsx]"]
end

subgraph group_api_state["API and build state"]
  node_api["FastAPI routes and SSE<br/>[app.py]"]
  node_build_store[("In-memory build store<br/>[store.py]")]
  node_build_models["Build records and stages<br/>[schemas.py]"]
end

subgraph group_pipeline["Build pipeline"]
  node_orchestrator["Pipeline orchestrator<br/>[orchestrator.py]"]
  node_repo_inspector["Clone and inspect<br/>[inspector.py]"]
  node_source_fixer["Import case repair<br/>[source_fixer.py]"]
  node_file_generator["Deployment generation<br/>[generator.py]"]
  node_docker_executor["Docker build and run<br/>[executor.py]"]
end

subgraph group_integrations["External services"]
  node_github["GitHub repository"]
  node_groq["Groq LLM"]
  node_docker["Docker daemon"]
end

node_user(("Repository user"))
node_running_app["Live preview"]

node_user -->|"enters URL"| node_repo_form
node_repo_form -->|"submits URL"| node_app_ui
node_app_ui -->|"starts build"| node_api
node_app_ui -->|"streams and fetches"| node_api
node_api -->|"creates and reads"| node_build_store
node_api -->|"dispatches build"| node_orchestrator
node_build_store -->|"stores records"| node_build_models
node_api -->|"validates and returns"| node_build_models
node_orchestrator -->|"updates build state"| node_build_store
node_orchestrator -->|"clones and analyzes"| node_repo_inspector
node_repo_inspector -->|"clones repository"| node_github
node_orchestrator -->|"repairs imports"| node_source_fixer
node_orchestrator -->|"requests deployment files"| node_file_generator
node_file_generator -->|"requests generation"| node_groq
node_orchestrator -->|"builds and runs"| node_docker_executor
node_docker_executor -->|"builds and launches"| node_docker
node_orchestrator -->|"regenerates on failure"| node_file_generator
node_app_ui -->|"renders stages"| node_stage_view
node_app_ui -->|"renders logs"| node_log_view
node_app_ui -->|"renders results"| node_result_view
node_docker_executor -->|"starts preview"| node_running_app
node_app_ui -->|"opens preview link"| node_running_app

click node_app_ui "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/App.jsx"
click node_repo_form "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/RepoForm.jsx"
click node_stage_view "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/PipelineSteps.jsx"
click node_log_view "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/ConsoleLog.jsx"
click node_result_view "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/ResultPanel.jsx"
click node_api "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/app.py"
click node_build_store "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/core/store.py"
click node_build_models "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/core/schemas.py"
click node_orchestrator "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/orchestrator.py"
click node_repo_inspector "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/inspector.py"
click node_source_fixer "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/source_fixer.py"
click node_file_generator "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/generator.py"
click node_docker_executor "https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/executor.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_app_ui,node_repo_form,node_stage_view,node_log_view,node_result_view,node_user,node_running_app toneBlue
class node_api,node_build_store,node_build_models toneAmber
class node_orchestrator,node_repo_inspector,node_source_fixer,node_file_generator,node_docker_executor toneMint
class node_github,node_groq,node_docker toneRose
```

## Components

### Browser interface

- [Build interface](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Repository form](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/RepoForm.jsx): `frontend/src/features/build/RepoForm.jsx`
- [Stage timeline](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/PipelineSteps.jsx): `frontend/src/features/build/PipelineSteps.jsx`
- [Build console](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/ConsoleLog.jsx): `frontend/src/features/build/ConsoleLog.jsx`
- [Result and preview](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/frontend/src/features/build/ResultPanel.jsx): `frontend/src/features/build/ResultPanel.jsx`

### API and build state

- [FastAPI routes and SSE](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/app.py): `backend/app.py`
- [In-memory build store](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/core/store.py): `backend/core/store.py`
- [Build records and stages](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/core/schemas.py): `backend/core/schemas.py`

### Build pipeline

- [Pipeline orchestrator](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/orchestrator.py): `backend/pipeline/orchestrator.py`
- [Clone and inspect](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/inspector.py): `backend/pipeline/inspector.py`
- [Import case repair](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/source_fixer.py): `backend/pipeline/source_fixer.py`
- [Deployment generation](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/generator.py): `backend/pipeline/generator.py`
- [Docker build and run](https://github.com/chandrabhushan-mishra01/dockerforge/blob/main/backend/pipeline/executor.py): `backend/pipeline/executor.py`

### External services

- **GitHub repository**
- **Groq LLM**
- **Docker daemon**

### Other components

- **Repository user**
- **Live preview**

## Connections

- Repository user → Repository form: enters URL (evidence: `README.md`)
- Repository form → Build interface: submits URL (evidence: `frontend/src/App.jsx`)
- Build interface → FastAPI routes and SSE: starts build (evidence: `frontend/src/App.jsx`)
- Build interface → FastAPI routes and SSE: streams and fetches (evidence: `frontend/src/App.jsx`)
- FastAPI routes and SSE → In-memory build store: creates and reads (evidence: `backend/app.py`)
- FastAPI routes and SSE → Pipeline orchestrator: dispatches build (evidence: `backend/app.py`)
- In-memory build store → Build records and stages: stores records (evidence: `backend/core/store.py`)
- FastAPI routes and SSE → Build records and stages: validates and returns (evidence: `backend/app.py`)
- Pipeline orchestrator → In-memory build store: updates build state (evidence: `backend/pipeline/orchestrator.py`)
- Pipeline orchestrator → Clone and inspect: clones and analyzes (evidence: `README.md`)
- Clone and inspect → GitHub repository: clones repository (evidence: `backend/pipeline/inspector.py`)
- Pipeline orchestrator → Import case repair: repairs imports (evidence: `backend/pipeline/orchestrator.py`)
- Pipeline orchestrator → Deployment generation: requests deployment files (evidence: `backend/pipeline/orchestrator.py`)
- Deployment generation → Groq LLM: requests generation (evidence: `README.md`)
- Pipeline orchestrator → Docker build and run: builds and runs (evidence: `README.md`)
- Docker build and run → Docker daemon: builds and launches (evidence: `backend/pipeline/executor.py`)
- Pipeline orchestrator → Deployment generation: regenerates on failure (evidence: `README.md`)
- Build interface → Stage timeline: renders stages (evidence: `frontend/src/App.jsx`)
- Build interface → Build console: renders logs (evidence: `frontend/src/App.jsx`)
- Build interface → Result and preview: renders results (evidence: `frontend/src/App.jsx`)
- Docker build and run → Live preview: starts preview (evidence: `README.md`)
- Build interface → Live preview: opens preview link (evidence: `README.md`)
