# srujan-cpu/startologer_ai architecture

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

- Interactive diagram: https://gitdiagram.com/srujan-cpu/startologer_ai
- Repository: https://github.com/srujan-cpu/startologer_ai

## Overview

This is a web application for evaluating startup pitch materials: users upload documents and receive an analysis, extracted metrics, benchmark comparisons, and a result dashboard. The main path runs from the upload dialog through the frontend API to Flask, then through document parsing, AI analysis, and benchmarking; results may also be persisted in Firestore. Authentication and trial access are separate supporting capabilities. The README is empty, so the map relies on the supplied source excerpts and SOURCE INDEX; some backend and dashboard details are therefore represented only where those sources establish the relationship.

Main entry points: [`project-root/backend/routes/initialEndpoints.py`](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/routes/initialEndpoints.py) (Flask API routes), [`project-root/backend/agents/orchestrator.py`](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/orchestrator.py) (Analysis orchestrator), [`project-root/frontend/src/app/services/api.service.ts`](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/services/api.service.ts) (Frontend API), [`project-root/backend/agents/document_parser_agent.py`](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/document_parser_agent.py) (Document parser agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web app"]
  node_upload_dialog["Upload dialog"]
  node_frontend_api["Frontend API<br/>[api.service.ts]"]
  node_dashboard["Result dashboard"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
  node_trial_service["Trial tracking<br/>[trial.service.ts]"]
end

subgraph group_backend_api["API and access"]
  node_flask_api["Flask API routes"]
  node_input_service["Input processing"]
end

subgraph group_analysis_pipeline["Analysis pipeline"]
  node_orchestrator["Analysis orchestrator<br/>[orchestrator.py]"]
  node_document_parser["Document parser agent"]
  node_text_extractor["Text extraction<br/>[textExtractor.py]"]
  node_document_ai["Document AI"]
  node_analysis_agent["Startup analysis<br/>[analysis_agent.py]"]
  node_analysis_helper["Analysis helper<br/>[analysis_helper.py]"]
  node_metric_extractor["Metric extraction"]
  node_benchmark_agent["Benchmark agent<br/>[benchmark_agent.py]"]
end

subgraph group_data_services["Data services"]
  node_benchmark_service["Benchmark comparison"]
  node_firestore[("Firestore")]
end

node_user(("User"))
node_firebase_auth["Firebase Auth"]
node_benchmark_csv["Benchmark CSV source"]

node_user -->|"selects documents"| node_upload_dialog
node_upload_dialog -->|"submits analysis"| node_frontend_api
node_frontend_api -->|"checks trial"| node_trial_service
node_frontend_api -->|"posts documents"| node_flask_api
node_dashboard -->|"requests results"| node_frontend_api
node_user -->|"signs in"| node_auth_service
node_auth_service -->|"authenticates"| node_firebase_auth
node_flask_api -->|"validates input"| node_input_service
node_flask_api -->|"starts analysis"| node_orchestrator
node_orchestrator -->|"parses documents"| node_document_parser
node_orchestrator -->|"analyzes text"| node_analysis_agent
node_orchestrator -.->|"benchmarks results"| node_benchmark_agent
node_document_parser -->|"uses document service"| node_document_ai
node_document_parser -->|"uses text extraction"| node_text_extractor
node_analysis_agent -->|"uses analysis helper"| node_analysis_helper
node_analysis_agent -->|"extracts metrics"| node_metric_extractor
node_benchmark_agent -->|"gets comparisons"| node_benchmark_service
node_benchmark_service -.->|"loads benchmark rows"| node_benchmark_csv
node_flask_api -->|"stores and retrieves analyses"| node_firestore

click node_upload_dialog "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/shared/file-upload-dialog/file-upload-dialog/file-upload-dialog.ts"
click node_frontend_api "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/services/api.service.ts"
click node_dashboard "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/components/result-dashboard/result-dashboard.ts"
click node_auth_service "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/auth/auth.service.ts"
click node_trial_service "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/services/trial.service.ts"
click node_flask_api "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/routes/initialEndpoints.py"
click node_orchestrator "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/orchestrator.py"
click node_document_parser "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/document_parser_agent.py"
click node_text_extractor "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/textExtraction/textExtractor.py"
click node_document_ai "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/documentai_service.py"
click node_analysis_agent "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/analysis_agent.py"
click node_analysis_helper "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/helpers/analysis_helper.py"
click node_metric_extractor "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/helpers/metric_extractor.py"
click node_benchmark_agent "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/benchmark_agent.py"
click node_benchmark_service "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/benchmark_service.py"
click node_input_service "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/inputProcessService.py"
click node_firestore "https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/firestore_service.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_upload_dialog,node_frontend_api,node_dashboard,node_auth_service,node_trial_service,node_user toneBlue
class node_flask_api,node_input_service toneAmber
class node_orchestrator,node_document_parser,node_text_extractor,node_document_ai,node_analysis_agent,node_analysis_helper,node_metric_extractor,node_benchmark_agent toneMint
class node_benchmark_service,node_firestore toneRose
class node_firebase_auth,node_benchmark_csv toneIndigo
```

## Components

### Web app

- [Upload dialog](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/shared/file-upload-dialog/file-upload-dialog/file-upload-dialog.ts): `project-root/frontend/src/app/shared/file-upload-dialog/file-upload-dialog/file-upload-dialog.ts`
- [Frontend API](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/services/api.service.ts): `project-root/frontend/src/app/services/api.service.ts`
- [Result dashboard](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/components/result-dashboard/result-dashboard.ts): `project-root/frontend/src/app/components/result-dashboard/result-dashboard.ts`
- [Authentication](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/auth/auth.service.ts): `project-root/frontend/src/app/auth/auth.service.ts`
- [Trial tracking](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/frontend/src/app/services/trial.service.ts): `project-root/frontend/src/app/services/trial.service.ts`

### API and access

- [Flask API routes](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/routes/initialEndpoints.py): `project-root/backend/routes/initialEndpoints.py`
- [Input processing](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/inputProcessService.py): `project-root/backend/services/inputProcessService.py`

### Analysis pipeline

- [Analysis orchestrator](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/orchestrator.py): `project-root/backend/agents/orchestrator.py`
- [Document parser agent](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/document_parser_agent.py): `project-root/backend/agents/document_parser_agent.py`
- [Text extraction](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/textExtraction/textExtractor.py): `project-root/backend/textExtraction/textExtractor.py`
- [Document AI](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/documentai_service.py): `project-root/backend/services/documentai_service.py`
- [Startup analysis](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/analysis_agent.py): `project-root/backend/agents/analysis_agent.py`
- [Analysis helper](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/helpers/analysis_helper.py): `project-root/backend/helpers/analysis_helper.py`
- [Metric extraction](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/helpers/metric_extractor.py): `project-root/backend/helpers/metric_extractor.py`
- [Benchmark agent](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/agents/benchmark_agent.py): `project-root/backend/agents/benchmark_agent.py`

### Data services

- [Benchmark comparison](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/benchmark_service.py): `project-root/backend/services/benchmark_service.py`
- [Firestore](https://github.com/srujan-cpu/startologer_ai/blob/main/project-root/backend/services/firestore_service.py): `project-root/backend/services/firestore_service.py`

### Other components

- **User**
- **Firebase Auth**
- **Benchmark CSV source**

## Connections

- User → Upload dialog: selects documents (evidence: `project-root/frontend/src/app/shared/file-upload-dialog/file-upload-dialog/file-upload-dialog.ts`)
- Upload dialog → Frontend API: submits analysis (evidence: `project-root/frontend/src/app/shared/file-upload-dialog/file-upload-dialog/file-upload-dialog.ts`)
- Frontend API → Trial tracking: checks trial (evidence: `project-root/frontend/src/app/services/api.service.ts`)
- Frontend API → Flask API routes: posts documents (evidence: `project-root/frontend/src/app/services/api.service.ts`)
- Result dashboard → Frontend API: requests results (evidence: `project-root/frontend/src/app/components/result-dashboard/result-dashboard.ts`)
- User → Authentication: signs in (evidence: `project-root/frontend/src/app/auth/auth.service.ts`)
- Authentication → Firebase Auth: authenticates (evidence: `project-root/frontend/src/app/auth/auth.service.ts`)
- Flask API routes → Input processing: validates input (evidence: `project-root/backend/routes/initialEndpoints.py`)
- Flask API routes → Analysis orchestrator: starts analysis (evidence: `project-root/backend/routes/initialEndpoints.py`)
- Analysis orchestrator → Document parser agent: parses documents (evidence: `project-root/backend/agents/orchestrator.py`)
- Analysis orchestrator → Startup analysis: analyzes text (evidence: `project-root/backend/agents/orchestrator.py`)
- Analysis orchestrator → Benchmark agent: benchmarks results (evidence: `project-root/backend/agents/orchestrator.py`)
- Document parser agent → Document AI: uses document service (evidence: `project-root/backend/agents/document_parser_agent.py`)
- Document parser agent → Text extraction: uses text extraction (evidence: `project-root/backend/agents/document_parser_agent.py`)
- Startup analysis → Analysis helper: uses analysis helper (evidence: `project-root/backend/agents/analysis_agent.py`)
- Startup analysis → Metric extraction: extracts metrics (evidence: `project-root/backend/agents/analysis_agent.py`)
- Benchmark agent → Benchmark comparison: gets comparisons (evidence: `project-root/backend/agents/benchmark_agent.py`)
- Benchmark comparison → Benchmark CSV source: loads benchmark rows
- Flask API routes → Firestore: stores and retrieves analyses (evidence: `project-root/backend/routes/initialEndpoints.py`)
