# palakash160704/ai-startup-idea-validator architecture

> Architecture diagram of the GitHub repository palakash160704/ai-startup-idea-validator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/palakash160704/ai-startup-idea-validator
- Repository: https://github.com/palakash160704/ai-startup-idea-validator

## Overview

Startup Idea Validation Engine takes a founder’s idea and business context, starts a seven-task analysis, and presents progress, scores, detailed findings, and a GO/PIVOT/KILL verdict. The backend runs the analyses in sequence, using task-specific prompts and an LLM, while keeping session state in memory; the client polls for results and offers charts, PDF export, sharing, and saved history. Theme and navigation support the user experience. Some client and server files were not excerpted, so their connections are omitted or marked unverified rather than assumed.

Main entry points: [`client/src/pages/Results.jsx`](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Results.jsx) (Results page), [`client/src/App.jsx`](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/App.jsx) (App routing), [`server/routes/validate.js`](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/routes/validate.js) (Validation API), [`server/services/validationService.js`](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/services/validationService.js) (Task orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_validate["Idea input<br/>[Validate.jsx]"]
  node_results["Results page<br/>[Results.jsx]"]
  node_history["History page<br/>[History.jsx]"]
  node_api_config["API config<br/>[api.js]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_theme["Theme provider<br/>[ThemeContext.jsx]"]
  node_charts["Visual analytics<br/>[Charts.jsx]"]
  node_displays["Task displays<br/>[ResultDisplays.jsx]"]
  node_pdf["PDF export<br/>[pdfExport.js]"]
end

subgraph group_analysis["Validation analysis"]
  node_api_server["Validation API<br/>[validate.js]"]
  node_validation["Task orchestration"]
  node_prompts["Analysis prompts<br/>[prompts.js]"]
  node_llm_client["LLM client<br/>[gemini.js]"]
  node_express["Express server<br/>[index.js]"]
end

subgraph group_state["Session and history"]
  node_sessions[("In-memory sessions<br/>[sessionStore.js]")]
  node_history_store[("Browser history<br/>[historyService.js]")]
end

node_founder(("Founder"))
node_groq{{"Groq LLM"}}

node_founder -->|"opens"| node_home
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_validate
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_history
node_app -->|"provides theme"| node_theme
node_home -->|"uses"| node_navbar
node_navbar -->|"reads and toggles"| node_theme
node_validate -->|"uses endpoint"| node_api_config
node_validate -.->|"submits idea"| node_api_server
node_express -->|"mounts routes"| node_api_server
node_api_server -->|"creates and reads"| node_sessions
node_api_server -->|"starts analysis"| node_validation
node_validation -->|"builds task prompts"| node_prompts
node_validation -->|"requests analysis"| node_llm_client
node_validation -->|"updates task results"| node_sessions
node_llm_client -->|"calls API"| node_groq
node_results -->|"uses endpoint"| node_api_config
node_results -->|"polls session"| node_api_server
node_results -->|"renders charts"| node_charts
node_results -->|"formats findings"| node_displays
node_results -->|"exports report"| node_pdf
node_results -->|"saves completed result"| node_history_store
node_history -.->|"reads saved items"| node_history_store

click node_app "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/App.jsx"
click node_home "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Home.jsx"
click node_validate "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Validate.jsx"
click node_results "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Results.jsx"
click node_history "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/History.jsx"
click node_api_config "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/config/api.js"
click node_navbar "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/components/Navbar.jsx"
click node_theme "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/context/ThemeContext.jsx"
click node_charts "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/components/Charts.jsx"
click node_displays "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/components/ResultDisplays.jsx"
click node_pdf "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/utils/pdfExport.js"
click node_api_server "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/routes/validate.js"
click node_validation "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/services/validationService.js"
click node_prompts "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/lib/prompts.js"
click node_llm_client "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/lib/gemini.js"
click node_express "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/index.js"
click node_sessions "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/lib/sessionStore.js"
click node_history_store "https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/services/historyService.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_home,node_validate,node_results,node_history,node_api_config,node_navbar,node_theme,node_charts,node_displays,node_pdf toneBlue
class node_api_server,node_validation,node_prompts,node_llm_client,node_express toneAmber
class node_sessions,node_history_store toneMint
class node_founder,node_groq toneIndigo
```

## Components

### Client experience

- [App routing](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Home page](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Idea input](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Validate.jsx): `client/src/pages/Validate.jsx`
- [Results page](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/Results.jsx): `client/src/pages/Results.jsx`
- [History page](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/pages/History.jsx): `client/src/pages/History.jsx`
- [API config](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/config/api.js): `client/src/config/api.js`
- [Navigation](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/components/Navbar.jsx): `client/src/components/Navbar.jsx`
- [Theme provider](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/context/ThemeContext.jsx): `client/src/context/ThemeContext.jsx`
- [Visual analytics](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/components/Charts.jsx): `client/src/components/Charts.jsx`
- [Task displays](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/components/ResultDisplays.jsx): `client/src/components/ResultDisplays.jsx`
- [PDF export](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/utils/pdfExport.js): `client/src/utils/pdfExport.js`

### Validation analysis

- [Validation API](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/routes/validate.js): `server/routes/validate.js`
- [Task orchestration](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/services/validationService.js): `server/services/validationService.js`
- [Analysis prompts](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/lib/prompts.js): `server/lib/prompts.js`
- [LLM client](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/lib/gemini.js): `server/lib/gemini.js`
- [Express server](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/index.js): `server/index.js`

### Session and history

- [In-memory sessions](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/server/lib/sessionStore.js): `server/lib/sessionStore.js`
- [Browser history](https://github.com/palakash160704/ai-startup-idea-validator/blob/main/client/src/services/historyService.js): `client/src/services/historyService.js`

### Other components

- **Founder**
- **Groq LLM**

## Connections

- Founder → Home page: opens (evidence: `README.md`)
- App routing → Home page: routes to (evidence: `client/src/App.jsx`)
- App routing → Idea input: routes to (evidence: `client/src/App.jsx`)
- App routing → Results page: routes to (evidence: `client/src/App.jsx`)
- App routing → History page: routes to (evidence: `client/src/App.jsx`)
- App routing → Theme provider: provides theme (evidence: `client/src/App.jsx`)
- Home page → Navigation: uses (evidence: `client/src/pages/Home.jsx`)
- Navigation → Theme provider: reads and toggles (evidence: `client/src/components/Navbar.jsx`)
- Idea input → API config: uses endpoint (evidence: `client/src/pages/Validate.jsx`)
- Idea input → Validation API: submits idea
- Express server → Validation API: mounts routes (evidence: `server/index.js`)
- Validation API → In-memory sessions: creates and reads (evidence: `server/routes/validate.js`)
- Validation API → Task orchestration: starts analysis (evidence: `server/routes/validate.js`)
- Task orchestration → Analysis prompts: builds task prompts (evidence: `server/services/validationService.js`)
- Task orchestration → LLM client: requests analysis (evidence: `server/services/validationService.js`)
- Task orchestration → In-memory sessions: updates task results (evidence: `server/services/validationService.js`)
- LLM client → Groq LLM: calls API (evidence: `README.md`)
- Results page → API config: uses endpoint (evidence: `client/src/pages/Results.jsx`)
- Results page → Validation API: polls session (evidence: `client/src/pages/Results.jsx`)
- Results page → Visual analytics: renders charts (evidence: `client/src/pages/Results.jsx`)
- Results page → Task displays: formats findings (evidence: `client/src/pages/Results.jsx`)
- Results page → PDF export: exports report (evidence: `client/src/pages/Results.jsx`)
- Results page → Browser history: saves completed result (evidence: `client/src/pages/Results.jsx`)
- History page → Browser history: reads saved items
