# rajkamalr-in/ai-startup-intelligence-agent- architecture

> Architecture diagram of the GitHub repository rajkamalr-in/ai-startup-intelligence-agent-, 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/rajkamalr-in/ai-startup-intelligence-agent-
- Repository: https://github.com/rajkamalr-in/ai-startup-intelligence-agent-

## Overview

Vektor is a startup-intelligence dashboard backed by a FastAPI service and SQLite. Users explore startup profiles, signals, alerts and watchlists; the documented REST interface also supports triggering ingestion and analysis, comparing companies, and exporting reports. The ingestion workflow runs through scraping, signal consolidation and insight generation, with analysis persisted for dashboard and report use. The graph preserves the README’s comparison, reporting and Gemini capabilities. Some UI-to-API and external-feed details rely on README statements; unsampled source was not inspected.

Main entry points: [`backend/main.py`](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/main.py) (REST API), [`backend/database.py`](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/database.py) (Intelligence database), [`backend/agents/scraper_agent.py`](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/scraper_agent.py) (Signal scraper), [`backend/agents/insight_agent.py`](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/insight_agent.py) (Startup insights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Dashboard experience"]
  node_dashboard["Intelligence dashboard<br/>[App.jsx]"]
end

subgraph group_service["API and orchestration"]
  node_api["REST API<br/>[main.py]"]
end

subgraph group_intelligence["Intelligence agents"]
  node_scraper["Signal scraper<br/>[scraper_agent.py]"]
  node_consolidator["Signal consolidator"]
  node_insight["Startup insights<br/>[insight_agent.py]"]
  node_gemini["Gemini client<br/>[gemini_client.py]"]
end

subgraph group_persistence["Data and reporting"]
  node_database[("Intelligence database<br/>[database.py]")]
  node_reports["Report generator<br/>[report_agent.py]"]
end

node_investor(("Investor user"))
node_rss["News and RSS feeds"]
node_google["Google Gemini"]

node_investor -->|"uses"| node_dashboard
node_dashboard -->|"uses REST"| node_api
node_api -->|"serves data"| node_database
node_api -->|"starts ingestion"| node_scraper
node_api -->|"runs consolidation"| node_consolidator
node_api -->|"triggers analysis"| node_insight
node_scraper -->|"fetches feeds"| node_rss
node_scraper -->|"stores signals"| node_database
node_consolidator -->|"normalizes signals"| node_database
node_insight -->|"reads timelines; saves analysis"| node_database
node_insight -->|"requests insights"| node_gemini
node_gemini -->|"generates JSON"| node_google
node_api -->|"requests exports"| node_reports
node_reports -->|"reads startup data"| node_database

click node_dashboard "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/main.py"
click node_scraper "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/scraper_agent.py"
click node_consolidator "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/consolidator_agent.py"
click node_insight "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/insight_agent.py"
click node_gemini "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/gemini_client.py"
click node_database "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/database.py"
click node_reports "https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/report_agent.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_dashboard,node_investor toneBlue
class node_api toneAmber
class node_scraper,node_consolidator,node_insight,node_gemini toneMint
class node_database,node_reports toneRose
class node_rss,node_google toneIndigo
```

## Components

### Dashboard experience

- [Intelligence dashboard](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### API and orchestration

- [REST API](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/main.py): `backend/main.py`

### Intelligence agents

- [Signal scraper](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/scraper_agent.py): `backend/agents/scraper_agent.py`
- [Signal consolidator](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/consolidator_agent.py): `backend/agents/consolidator_agent.py`
- [Startup insights](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/insight_agent.py): `backend/agents/insight_agent.py`
- [Gemini client](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/gemini_client.py): `backend/agents/gemini_client.py`

### Data and reporting

- [Intelligence database](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/database.py): `backend/database.py`
- [Report generator](https://github.com/rajkamalr-in/ai-startup-intelligence-agent-/blob/main/backend/agents/report_agent.py): `backend/agents/report_agent.py`

### Other components

- **Investor user**
- **News and RSS feeds**
- **Google Gemini**

## Connections

- Investor user → Intelligence dashboard: uses (evidence: `README.md`)
- Intelligence dashboard → REST API: uses REST (evidence: `README.md`)
- REST API → Intelligence database: serves data (evidence: `backend/main.py`)
- REST API → Signal scraper: starts ingestion (evidence: `backend/main.py`)
- REST API → Signal consolidator: runs consolidation (evidence: `backend/main.py`)
- REST API → Startup insights: triggers analysis (evidence: `backend/main.py`)
- Signal scraper → News and RSS feeds: fetches feeds (evidence: `README.md`)
- Signal scraper → Intelligence database: stores signals (evidence: `backend/agents/scraper_agent.py`)
- Signal consolidator → Intelligence database: normalizes signals (evidence: `backend/agents/consolidator_agent.py`)
- Startup insights → Intelligence database: reads timelines; saves analysis (evidence: `backend/agents/insight_agent.py`)
- Startup insights → Gemini client: requests insights (evidence: `backend/agents/insight_agent.py`)
- Gemini client → Google Gemini: generates JSON (evidence: `backend/agents/gemini_client.py`)
- REST API → Report generator: requests exports (evidence: `backend/main.py`)
- Report generator → Intelligence database: reads startup data (evidence: `backend/agents/report_agent.py`)
