# jashwanth-xr/startup-progress-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/jashwanth-xr/startup-progress-monitor
- Repository: https://github.com/jashwanth-xr/startup-progress-monitor

## Overview

Startup Progress Monitor records startup profiles and monthly metrics, then exposes analysis and rankings through a FastAPI API. Its main analysis flow loads metric history, builds growth trends, calculates runway and health, and evaluates alerts; a separate Streamlit dashboard presents sample startup data with charts and alert/score components. The API and dashboard appear to be separate paths: the sampled dashboard uses in-file data rather than calling the API. Some small modules, including the alert dispatcher and scoring normalizer, were not excerpted, so their runtime relationships are not asserted.

Main entry points: [`api/routes.py`](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/api/routes.py) (API Routes), [`database/connection.py`](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/database/connection.py) (DB Connection), [`database/init_db.py`](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/database/init_db.py) (Table Setup), [`main.py`](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/main.py) (FastAPI App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and Runtime"]
  node_app["FastAPI App<br/>[main.py]"]
  node_routes["API Routes<br/>[routes.py]"]
end

subgraph group_data["Startup Data"]
  node_startup["Startup Model<br/>[startup.py]"]
  node_metrics["Metrics Model<br/>[metrics.py]"]
  node_connection["DB Connection<br/>[connection.py]"]
  node_init["Table Setup<br/>[init_db.py]"]
  node_store[("SQLite Store<br/>[startup_monitor.db]")]
end

subgraph group_analysis["Analytics and Scoring"]
  node_trends["Metric Trends<br/>[trends.py]"]
  node_growth["Growth Rates<br/>[growth.py]"]
  node_runway["Runway Estimate<br/>[runway.py]"]
  node_health["Health Score<br/>[health_score.py]"]
  node_momentum["Momentum Score<br/>[momentum.py]"]
  node_normalizer["Score Normalizer<br/>[normalizer.py]"]
end

subgraph group_alerts["Risk Alerts"]
  node_rules["Alert Rules<br/>[rules.py]"]
  node_dispatcher["Alert Dispatcher<br/>[dispatcher.py]"]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_charts["Charts<br/>[charts.py]"]
  node_components["Score and Alerts UI<br/>[components.py]"]
end

node_user(("User"))

node_user -->|"requests"| node_app
node_app -->|"initializes tables"| node_init
node_app -->|"registers routes"| node_routes
node_init -->|"creates tables on"| node_connection
node_init -->|"registers model"| node_startup
node_init -->|"registers model"| node_metrics
node_connection -->|"connects to"| node_store
node_startup -->|"uses model base"| node_connection
node_metrics -->|"uses model base"| node_connection
node_routes -->|"gets DB sessions"| node_connection
node_routes -->|"queries and creates"| node_startup
node_routes -->|"queries and creates"| node_metrics
node_routes -->|"builds metric trends"| node_trends
node_trends -->|"calculates growth"| node_growth
node_routes -->|"calculates runway"| node_runway
node_routes -->|"calculates health"| node_health
node_routes -->|"calculates momentum"| node_momentum
node_routes -->|"runs alert rules"| node_rules
node_user -->|"views dashboard"| node_dashboard
node_dashboard -->|"renders charts"| node_charts
node_dashboard -->|"renders score and alerts"| node_components

click node_app "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/main.py"
click node_routes "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/api/routes.py"
click node_startup "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/models/startup.py"
click node_metrics "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/models/metrics.py"
click node_connection "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/database/connection.py"
click node_init "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/database/init_db.py"
click node_store "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/startup_monitor.db"
click node_trends "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/analytics/trends.py"
click node_growth "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/analytics/growth.py"
click node_runway "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/analytics/runway.py"
click node_health "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/scoring/health_score.py"
click node_momentum "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/scoring/momentum.py"
click node_normalizer "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/scoring/normalizer.py"
click node_rules "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/alerts/rules.py"
click node_dispatcher "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/alerts/dispatcher.py"
click node_dashboard "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/dashboard/app.py"
click node_charts "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/dashboard/charts.py"
click node_components "https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/dashboard/components.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,node_routes,node_user toneBlue
class node_startup,node_metrics,node_connection,node_init,node_store toneAmber
class node_trends,node_growth,node_runway,node_health,node_momentum,node_normalizer toneMint
class node_rules,node_dispatcher toneRose
class node_dashboard,node_charts,node_components toneIndigo
```

## Components

### API and Runtime

- [FastAPI App](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/main.py): `main.py`
- [API Routes](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/api/routes.py): `api/routes.py`

### Startup Data

- [Startup Model](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/models/startup.py): `models/startup.py`
- [Metrics Model](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/models/metrics.py): `models/metrics.py`
- [DB Connection](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/database/connection.py): `database/connection.py`
- [Table Setup](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/database/init_db.py): `database/init_db.py`
- [SQLite Store](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/startup_monitor.db): `startup_monitor.db`

### Analytics and Scoring

- [Metric Trends](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/analytics/trends.py): `analytics/trends.py`
- [Growth Rates](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/analytics/growth.py): `analytics/growth.py`
- [Runway Estimate](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/analytics/runway.py): `analytics/runway.py`
- [Health Score](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/scoring/health_score.py): `scoring/health_score.py`
- [Momentum Score](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/scoring/momentum.py): `scoring/momentum.py`
- [Score Normalizer](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/scoring/normalizer.py): `scoring/normalizer.py`

### Risk Alerts

- [Alert Rules](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/alerts/rules.py): `alerts/rules.py`
- [Alert Dispatcher](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/alerts/dispatcher.py): `alerts/dispatcher.py`

### Dashboard

- [Streamlit Dashboard](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/dashboard/app.py): `dashboard/app.py`
- [Charts](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/dashboard/charts.py): `dashboard/charts.py`
- [Score and Alerts UI](https://github.com/jashwanth-xr/startup-progress-monitor/blob/main/dashboard/components.py): `dashboard/components.py`

### Other components

- **User**

## Connections

- User → FastAPI App: requests (evidence: `main.py`)
- FastAPI App → Table Setup: initializes tables (evidence: `main.py`)
- FastAPI App → API Routes: registers routes (evidence: `main.py`)
- Table Setup → DB Connection: creates tables on (evidence: `database/init_db.py`)
- Table Setup → Startup Model: registers model (evidence: `database/init_db.py`)
- Table Setup → Metrics Model: registers model (evidence: `database/init_db.py`)
- DB Connection → SQLite Store: connects to (evidence: `database/connection.py`)
- Startup Model → DB Connection: uses model base (evidence: `models/startup.py`)
- Metrics Model → DB Connection: uses model base (evidence: `models/metrics.py`)
- API Routes → DB Connection: gets DB sessions (evidence: `api/routes.py`)
- API Routes → Startup Model: queries and creates (evidence: `api/routes.py`)
- API Routes → Metrics Model: queries and creates (evidence: `api/routes.py`)
- API Routes → Metric Trends: builds metric trends (evidence: `api/routes.py`)
- Metric Trends → Growth Rates: calculates growth (evidence: `analytics/trends.py`)
- API Routes → Runway Estimate: calculates runway (evidence: `api/routes.py`)
- API Routes → Health Score: calculates health (evidence: `api/routes.py`)
- API Routes → Momentum Score: calculates momentum (evidence: `api/routes.py`)
- API Routes → Alert Rules: runs alert rules (evidence: `api/routes.py`)
- User → Streamlit Dashboard: views dashboard (evidence: `dashboard/app.py`)
- Streamlit Dashboard → Charts: renders charts (evidence: `dashboard/app.py`)
- Streamlit Dashboard → Score and Alerts UI: renders score and alerts (evidence: `dashboard/app.py`)
