# vedant169/forgeflow architecture

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

- Interactive diagram: https://gitdiagram.com/vedant169/forgeflow
- Repository: https://github.com/vedant169/forgeflow

## Overview

ForgeFlow lets users connect to JSON REST APIs, flatten and profile irregular payloads, persist owned ETL runs, then inspect history and dynamic analytics. The React app orchestrates connection, mapping, dashboard, and analytics views; its client ETL service can call the Express API or run offline. Backend routes enforce authentication before the ETL controller invokes extraction, transformation, inference, and persistence. README documents RBAC, isolated history, and analytics; some frontend and middleware wiring is unsampled, so uncertain links are omitted.

Main entry points: [`etl-frontend/src/App.jsx`](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/App.jsx) (App orchestrator), [`etl-backend/src/controllers/etl.controller.js`](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/controllers/etl.controller.js) (Pipeline and analytics controller), [`etl-frontend/src/services/clientEtl.js`](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/services/clientEtl.js) (Client ETL and API), [`etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx`](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx) (Executive dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App orchestrator<br/>[App.jsx]"]
  node_landing["Landing and login"]
  node_connection["API connection"]
  node_mapper["Data mapping"]
  node_dashboard["Executive dashboard"]
  node_analytics["Analytics canvas"]
  node_chart["Dataset charts"]
  node_samples["Preset datasets<br/>[sampleDatasets.js]"]
  node_client["Client ETL and API<br/>[clientEtl.js]"]
end

subgraph group_backend["API and security"]
  node_server["Express server<br/>[server.js]"]
  node_etl_routes["ETL routes<br/>[etl.routes.js]"]
  node_auth_middleware["JWT protection<br/>[auth.middleware.js]"]
  node_rate_limit["Auth rate limit"]
end

subgraph group_etl["ETL processing"]
  node_etl_controller["Pipeline and analytics controller<br/>[etl.controller.js]"]
  node_extract["API extraction<br/>[extract.service.js]"]
  node_transform["JSON flattening"]
  node_inference["Type inference"]
end

subgraph group_data["Persistence and analytics"]
  node_pipeline_records[("Pipeline records<br/>[PipelineRecord.js]")]
end

subgraph group_identity["Identity"]
  node_auth_routes["Auth routes<br/>[auth.routes.js]"]
  node_auth_controller["Auth controller<br/>[auth.controller.js]"]
  node_user_model[("User records<br/>[User.js]")]
end

node_user(("User"))
node_external_api{{"JSON REST APIs"}}
node_mongo[("MongoDB")]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_landing
node_app -->|"renders"| node_connection
node_app -->|"renders"| node_mapper
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_analytics
node_app -->|"invokes"| node_client
node_connection -->|"uses presets"| node_samples
node_dashboard -->|"renders"| node_chart
node_dashboard -->|"exports data"| node_client
node_analytics -->|"requests analytics"| node_client
node_client -->|"fetches payload"| node_external_api
node_client -->|"sends ETL request"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_etl_routes
node_auth_routes -->|"limits requests"| node_rate_limit
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_controller -->|"reads and creates"| node_user_model
node_etl_routes -->|"protects routes"| node_auth_middleware
node_etl_routes -->|"dispatches"| node_etl_controller
node_etl_controller -->|"extracts"| node_extract
node_etl_controller -->|"transforms"| node_transform
node_etl_controller -->|"profiles fields"| node_inference
node_etl_controller -->|"stores and queries"| node_pipeline_records
node_pipeline_records -->|"persists in"| node_mongo
node_etl_controller -->|"returns history and analytics"| node_dashboard

click node_app "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/App.jsx"
click node_landing "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/FlowForgeLanding.jsx"
click node_connection "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/ConnectionScreen.jsx"
click node_mapper "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/DataMapperScreen.jsx"
click node_dashboard "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx"
click node_analytics "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/AnalyticsCanvasScreen.jsx"
click node_chart "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/DatasetAnalyticsChart.jsx"
click node_samples "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/data/sampleDatasets.js"
click node_client "https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/services/clientEtl.js"
click node_server "https://github.com/vedant169/forgeflow/blob/main/etl-backend/server.js"
click node_auth_routes "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/routes/auth.routes.js"
click node_auth_controller "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/controllers/auth.controller.js"
click node_user_model "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/models/User.js"
click node_etl_routes "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/routes/etl.routes.js"
click node_auth_middleware "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/middleware/auth.middleware.js"
click node_rate_limit "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/middleware/rateLimit.middleware.js"
click node_etl_controller "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/controllers/etl.controller.js"
click node_extract "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/services/extract.service.js"
click node_transform "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/services/transform.service.js"
click node_inference "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/services/typeInference.service.js"
click node_pipeline_records "https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/models/PipelineRecord.js"

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_landing,node_connection,node_mapper,node_dashboard,node_analytics,node_chart,node_samples,node_client,node_user toneBlue
class node_server,node_etl_routes,node_auth_middleware,node_rate_limit,node_mongo toneAmber
class node_etl_controller,node_extract,node_transform,node_inference,node_external_api toneMint
class node_pipeline_records toneRose
class node_auth_routes,node_auth_controller,node_user_model toneIndigo
```

## Components

### Frontend experience

- [App orchestrator](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/App.jsx): `etl-frontend/src/App.jsx`
- [Landing and login](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/FlowForgeLanding.jsx): `etl-frontend/src/components/FlowForgeLanding.jsx`
- [API connection](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/ConnectionScreen.jsx): `etl-frontend/src/components/ConnectionScreen.jsx`
- [Data mapping](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/DataMapperScreen.jsx): `etl-frontend/src/components/DataMapperScreen.jsx`
- [Executive dashboard](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx): `etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx`
- [Analytics canvas](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/AnalyticsCanvasScreen.jsx): `etl-frontend/src/components/AnalyticsCanvasScreen.jsx`
- [Dataset charts](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/components/DatasetAnalyticsChart.jsx): `etl-frontend/src/components/DatasetAnalyticsChart.jsx`
- [Preset datasets](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/data/sampleDatasets.js): `etl-frontend/src/data/sampleDatasets.js`
- [Client ETL and API](https://github.com/vedant169/forgeflow/blob/main/etl-frontend/src/services/clientEtl.js): `etl-frontend/src/services/clientEtl.js`

### API and security

- [Express server](https://github.com/vedant169/forgeflow/blob/main/etl-backend/server.js): `etl-backend/server.js`
- [ETL routes](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/routes/etl.routes.js): `etl-backend/src/routes/etl.routes.js`
- [JWT protection](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/middleware/auth.middleware.js): `etl-backend/src/middleware/auth.middleware.js`
- [Auth rate limit](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/middleware/rateLimit.middleware.js): `etl-backend/src/middleware/rateLimit.middleware.js`

### ETL processing

- [Pipeline and analytics controller](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/controllers/etl.controller.js): `etl-backend/src/controllers/etl.controller.js`
- [API extraction](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/services/extract.service.js): `etl-backend/src/services/extract.service.js`
- [JSON flattening](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/services/transform.service.js): `etl-backend/src/services/transform.service.js`
- [Type inference](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/services/typeInference.service.js): `etl-backend/src/services/typeInference.service.js`

### Persistence and analytics

- [Pipeline records](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/models/PipelineRecord.js): `etl-backend/src/models/PipelineRecord.js`

### Identity

- [Auth routes](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/routes/auth.routes.js): `etl-backend/src/routes/auth.routes.js`
- [Auth controller](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/controllers/auth.controller.js): `etl-backend/src/controllers/auth.controller.js`
- [User records](https://github.com/vedant169/forgeflow/blob/main/etl-backend/src/models/User.js): `etl-backend/src/models/User.js`

### Other components

- **User**
- **JSON REST APIs**
- **MongoDB**

## Connections

- User → App orchestrator: uses (evidence: `README.md`)
- App orchestrator → Landing and login: renders (evidence: `etl-frontend/src/App.jsx`)
- App orchestrator → API connection: renders (evidence: `etl-frontend/src/App.jsx`)
- App orchestrator → Data mapping: renders (evidence: `etl-frontend/src/App.jsx`)
- App orchestrator → Executive dashboard: renders (evidence: `etl-frontend/src/App.jsx`)
- App orchestrator → Analytics canvas: renders (evidence: `etl-frontend/src/App.jsx`)
- App orchestrator → Client ETL and API: invokes (evidence: `etl-frontend/src/App.jsx`)
- API connection → Preset datasets: uses presets (evidence: `etl-frontend/src/components/ConnectionScreen.jsx`)
- Executive dashboard → Dataset charts: renders (evidence: `etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx`)
- Executive dashboard → Client ETL and API: exports data (evidence: `etl-frontend/src/components/FlowForgeExecutiveDashboard.jsx`)
- Analytics canvas → Client ETL and API: requests analytics (evidence: `etl-frontend/src/components/AnalyticsCanvasScreen.jsx`)
- Client ETL and API → JSON REST APIs: fetches payload (evidence: `etl-frontend/src/services/clientEtl.js`)
- Client ETL and API → Express server: sends ETL request (evidence: `etl-frontend/src/services/clientEtl.js`)
- Express server → Auth routes: mounts (evidence: `etl-backend/server.js`)
- Express server → ETL routes: mounts (evidence: `etl-backend/server.js`)
- Auth routes → Auth rate limit: limits requests (evidence: `etl-backend/src/routes/auth.routes.js`)
- Auth routes → Auth controller: dispatches (evidence: `etl-backend/src/routes/auth.routes.js`)
- Auth controller → User records: reads and creates (evidence: `etl-backend/src/controllers/auth.controller.js`)
- ETL routes → JWT protection: protects routes (evidence: `etl-backend/src/routes/etl.routes.js`)
- ETL routes → Pipeline and analytics controller: dispatches (evidence: `etl-backend/src/routes/etl.routes.js`)
- Pipeline and analytics controller → API extraction: extracts (evidence: `etl-backend/src/controllers/etl.controller.js`)
- Pipeline and analytics controller → JSON flattening: transforms (evidence: `etl-backend/src/controllers/etl.controller.js`)
- Pipeline and analytics controller → Type inference: profiles fields (evidence: `etl-backend/src/controllers/etl.controller.js`)
- Pipeline and analytics controller → Pipeline records: stores and queries (evidence: `etl-backend/src/controllers/etl.controller.js`)
- Pipeline records → MongoDB: persists in (evidence: `README.md`)
- Pipeline and analytics controller → Executive dashboard: returns history and analytics (evidence: `README.md`)
