# shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform architecture

> Architecture diagram of the GitHub repository shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform
- Repository: https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform

## Overview

Al-Powered-Intelligent-Sales-Forecasting-Platform is a lead-management and sales-intelligence application, with a FastAPI backend and a React dashboard in the tree (the README’s Streamlit description appears out of date). The workflow is to manage prospects, generate company analysis and qualification scores, then prepare outreach and review pipeline forecasts. The graph includes the documented model-inspection capability; unsampled ML and AI internals and frontend-to-API request wiring are not expanded beyond the evidence provided.

Main entry points: [`frontend/src/App.tsx`](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/App.tsx) (Workspace shell), [`app/main.py`](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/main.py) (FastAPI application), [`app/routers/analysis.py`](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/analysis.py) (Company analysis), [`app/routers/scroing.py`](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/scroing.py) (Lead scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Sales workspace"]
  node_app_ui["Workspace shell<br/>[App.tsx]"]
  node_lead_directory["Prospect directory<br/>[DirectoryView.tsx]"]
  node_lead_form["Lead editor<br/>[LeadFormDrawer.tsx]"]
  node_forecast["Pipeline forecast<br/>[ForecastView.tsx]"]
  node_forecast_chart["Forecast chart"]
  node_workbench["Account workbench<br/>[WorkbenchView.tsx]"]
  node_model_view["Model view"]
  node_sales_types["Sales data types<br/>[sales.ts]"]
end

subgraph group_api["API workflows"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_lead_api["Lead management<br/>[leads.py]"]
  node_analysis_api["Company analysis<br/>[analysis.py]"]
  node_scoring_api["Lead scoring<br/>[scroing.py]"]
  node_outreach_api["Outreach generation<br/>[outreach.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
end

subgraph group_intelligence["Lead intelligence"]
  node_ai_analysis["Company analysis service<br/>[ai_service.py]"]
  node_ai_outreach["Outreach AI service<br/>[ai_service.py]"]
  node_scoring["Scoring logic<br/>[scoring_service.py]"]
end

subgraph group_persistence["Persistence"]
  node_database["Database session<br/>[database.py]"]
  node_models[("Sales records<br/>[models.py]")]
end

node_operator(("Sales operator"))

node_operator -->|"uses"| node_app_ui
node_app_ui -->|"renders"| node_lead_directory
node_app_ui -->|"renders"| node_lead_form
node_app_ui -->|"renders"| node_forecast
node_app_ui -->|"renders"| node_workbench
node_app_ui -->|"renders"| node_model_view
node_forecast -->|"renders"| node_forecast_chart
node_lead_directory -->|"uses types"| node_sales_types
node_lead_form -->|"uses types"| node_sales_types
node_forecast_chart -->|"uses types"| node_sales_types
node_workbench -->|"uses types"| node_sales_types
node_api_app -->|"creates tables"| node_database
node_api_app -->|"registers"| node_lead_api
node_api_app -->|"registers"| node_analysis_api
node_api_app -->|"registers"| node_outreach_api
node_api_app -->|"registers"| node_scoring_api
node_lead_api -->|"gets sessions"| node_database
node_lead_api -->|"reads/writes"| node_models
node_lead_api -->|"validates"| node_schemas
node_analysis_api -->|"gets sessions"| node_database
node_analysis_api -->|"reads/writes"| node_models
node_analysis_api -->|"validates"| node_schemas
node_analysis_api -->|"calls"| node_ai_analysis
node_outreach_api -->|"gets sessions"| node_database
node_outreach_api -->|"reads/writes"| node_models
node_outreach_api -->|"validates"| node_schemas
node_outreach_api -->|"generates content"| node_ai_outreach
node_scoring_api -->|"gets sessions"| node_database
node_scoring_api -->|"reads/writes"| node_models
node_scoring_api -->|"validates"| node_schemas
node_scoring_api -->|"calculates scores"| node_scoring

click node_app_ui "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/App.tsx"
click node_lead_directory "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/DirectoryView.tsx"
click node_lead_form "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/LeadFormDrawer.tsx"
click node_forecast "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/ForecastView.tsx"
click node_forecast_chart "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/PipelineForecastChart.tsx"
click node_workbench "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/WorkbenchView.tsx"
click node_model_view "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/ModelArchitectureView.tsx"
click node_sales_types "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/types/sales.ts"
click node_api_app "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/main.py"
click node_lead_api "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/leads.py"
click node_analysis_api "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/analysis.py"
click node_scoring_api "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/scroing.py"
click node_outreach_api "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/outreach.py"
click node_ai_analysis "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/ai_service.py"
click node_ai_outreach "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/services/ai_service.py"
click node_scoring "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/services/scoring_service.py"
click node_schemas "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/schemas.py"
click node_database "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/database.py"
click node_models "https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/models.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_lead_directory,node_lead_form,node_forecast,node_forecast_chart,node_workbench,node_model_view,node_sales_types toneBlue
class node_api_app,node_lead_api,node_analysis_api,node_scoring_api,node_outreach_api,node_schemas toneAmber
class node_ai_analysis,node_ai_outreach,node_scoring toneMint
class node_database,node_models toneRose
class node_operator toneIndigo
```

## Components

### Sales workspace

- [Workspace shell](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Prospect directory](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/DirectoryView.tsx): `frontend/src/components/DirectoryView.tsx`
- [Lead editor](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/LeadFormDrawer.tsx): `frontend/src/components/LeadFormDrawer.tsx`
- [Pipeline forecast](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/ForecastView.tsx): `frontend/src/components/ForecastView.tsx`
- [Forecast chart](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/PipelineForecastChart.tsx): `frontend/src/components/PipelineForecastChart.tsx`
- [Account workbench](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/WorkbenchView.tsx): `frontend/src/components/WorkbenchView.tsx`
- [Model view](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/components/ModelArchitectureView.tsx): `frontend/src/components/ModelArchitectureView.tsx`
- [Sales data types](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/frontend/src/types/sales.ts): `frontend/src/types/sales.ts`

### API workflows

- [FastAPI application](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/main.py): `app/main.py`
- [Lead management](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/leads.py): `app/routers/leads.py`
- [Company analysis](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/analysis.py): `app/routers/analysis.py`
- [Lead scoring](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/scroing.py): `app/routers/scroing.py`
- [Outreach generation](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/routers/outreach.py): `app/routers/outreach.py`
- [API schemas](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/schemas.py): `app/schemas.py`

### Lead intelligence

- [Company analysis service](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/ai_service.py): `app/ai_service.py`
- [Outreach AI service](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/services/ai_service.py): `app/services/ai_service.py`
- [Scoring logic](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/services/scoring_service.py): `app/services/scoring_service.py`

### Persistence

- [Database session](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/database.py): `app/database.py`
- [Sales records](https://github.com/shireeshavelugoti-web/al-powered-intelligent-sales-forecasting-platform/blob/main/app/models.py): `app/models.py`

### Other components

- **Sales operator**

## Connections

- Sales operator → Workspace shell: uses
- Workspace shell → Prospect directory: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → Lead editor: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → Pipeline forecast: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → Account workbench: renders (evidence: `frontend/src/App.tsx`)
- Workspace shell → Model view: renders (evidence: `frontend/src/App.tsx`)
- Pipeline forecast → Forecast chart: renders (evidence: `frontend/src/components/ForecastView.tsx`)
- Prospect directory → Sales data types: uses types (evidence: `frontend/src/components/DirectoryView.tsx`)
- Lead editor → Sales data types: uses types (evidence: `frontend/src/components/LeadFormDrawer.tsx`)
- Forecast chart → Sales data types: uses types (evidence: `frontend/src/components/PipelineForecastChart.tsx`)
- Account workbench → Sales data types: uses types (evidence: `frontend/src/components/WorkbenchView.tsx`)
- FastAPI application → Database session: creates tables (evidence: `app/main.py`)
- FastAPI application → Lead management: registers (evidence: `app/main.py`)
- FastAPI application → Company analysis: registers (evidence: `app/main.py`)
- FastAPI application → Outreach generation: registers (evidence: `app/main.py`)
- FastAPI application → Lead scoring: registers (evidence: `app/main.py`)
- Lead management → Database session: gets sessions (evidence: `app/routers/leads.py`)
- Lead management → Sales records: reads/writes (evidence: `app/routers/leads.py`)
- Lead management → API schemas: validates (evidence: `app/routers/leads.py`)
- Company analysis → Database session: gets sessions (evidence: `app/routers/analysis.py`)
- Company analysis → Sales records: reads/writes (evidence: `app/routers/analysis.py`)
- Company analysis → API schemas: validates (evidence: `app/routers/analysis.py`)
- Company analysis → Company analysis service: calls (evidence: `app/routers/analysis.py`)
- Outreach generation → Database session: gets sessions (evidence: `app/routers/outreach.py`)
- Outreach generation → Sales records: reads/writes (evidence: `app/routers/outreach.py`)
- Outreach generation → API schemas: validates (evidence: `app/routers/outreach.py`)
- Outreach generation → Outreach AI service: generates content (evidence: `app/routers/outreach.py`)
- Lead scoring → Database session: gets sessions (evidence: `app/routers/scroing.py`)
- Lead scoring → Sales records: reads/writes (evidence: `app/routers/scroing.py`)
- Lead scoring → API schemas: validates (evidence: `app/routers/scroing.py`)
- Lead scoring → Scoring logic: calculates scores (evidence: `app/routers/scroing.py`)
