# ammirajukarthikeya-cyber/startup-insight-ai architecture

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

- Interactive diagram: https://gitdiagram.com/ammirajukarthikeya-cyber/startup-insight-ai
- Repository: https://github.com/ammirajukarthikeya-cyber/startup-insight-ai

## Overview

Startup Insight AI is a SaaS for startup idea validation and related founder services. Users enter an idea for analysis, while the product also supports account management, subscriptions, mentor chat, events, news, and administration. The frontend pages use a shared API client; FastAPI registers domain routers that handle requests and use shared persistence and AI services. The README documents sandbox checkout, while unsampled page and route details limit claims about exact endpoint wiring and integrations.

Main entry points: [`backend/app/main.py`](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/main.py) (FastAPI router entry), [`backend/app/crud.py`](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/crud.py) (Domain data access), [`frontend/src/utils/api.ts`](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/utils/api.ts) (API client), [`frontend/src/app/analyzer/page.tsx`](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/analyzer/page.tsx) (Idea analyzer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_web["Web pages<br/>[page.tsx]"]
  node_analyzer_ui["Idea analyzer<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_pricing["Plans and checkout<br/>[page.tsx]"]
  node_payment_modal["Payment modal<br/>[PaymentModal.tsx]"]
  node_mentor_ui["Mentor chat<br/>[page.tsx]"]
  node_chat_widget["AI chat widget<br/>[AIChatWidget.tsx]"]
  node_events_ui["Events browser<br/>[page.tsx]"]
  node_news_ui["Tech updates<br/>[page.tsx]"]
  node_admin_ui["Admin console<br/>[page.tsx]"]
  node_auth_ui["Auth screens<br/>[page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_identity["Identity and accounts"]
  node_auth_context["Auth state<br/>[AuthContext.tsx]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_user_routes["User profile<br/>[user.py]"]
  node_email["Email delivery<br/>[email.py]"]
end

subgraph group_insight["Startup insights"]
  node_analysis_routes["Analysis requests<br/>[analyzer.py]"]
  node_ai_service["AI analysis and mentor<br/>[ai.py]"]
  node_radar["Score visualization<br/>[RadarChart.tsx]"]
end

subgraph group_services["Founder services"]
  node_billing_routes["Billing and plans<br/>[billing.py]"]
  node_event_routes["Events and bookmarks<br/>[events.py]"]
  node_news_routes["News feed<br/>[news.py]"]
  node_mentor_routes["Mentor service<br/>[mentor.py]"]
  node_admin_routes["Administration<br/>[admin.py]"]
end

subgraph group_platform["API and persistence"]
  node_app_entry["FastAPI router entry<br/>[main.py]"]
  node_crud["Domain data access<br/>[crud.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_db_session["Database sessions<br/>[database.py]"]
  node_database[("SQL database")]
end

node_founder(("Founder or admin"))
node_email_service["SMTP or email provider"]

node_founder -->|"uses"| node_web
node_founder -->|"submits idea"| node_analyzer_ui
node_founder -->|"chooses plan"| node_pricing
node_founder -->|"consults"| node_mentor_ui
node_founder -->|"discovers events"| node_events_ui
node_founder -->|"reads updates"| node_news_ui
node_founder -->|"administers"| node_admin_ui
node_auth_ui -->|"uses auth"| node_auth_context
node_auth_context -->|"requests profile"| node_api_client
node_analyzer_ui -->|"sends analysis"| node_api_client
node_analyzer_ui -->|"renders scores"| node_radar
node_dashboard -->|"loads dashboard"| node_api_client
node_pricing -->|"requests plans"| node_api_client
node_pricing -->|"opens checkout"| node_payment_modal
node_payment_modal -->|"submits payment"| node_api_client
node_mentor_ui -->|"sends chat"| node_api_client
node_chat_widget -->|"sends chat"| node_api_client
node_events_ui -->|"loads events"| node_api_client
node_news_ui -->|"loads updates"| node_api_client
node_admin_ui -->|"manages platform"| node_api_client
node_app_entry -->|"registers router"| node_auth_routes
node_app_entry -->|"registers router"| node_user_routes
node_app_entry -->|"registers router"| node_analysis_routes
node_app_entry -->|"registers router"| node_billing_routes
node_app_entry -->|"registers router"| node_event_routes
node_app_entry -->|"registers router"| node_news_routes
node_app_entry -->|"registers router"| node_mentor_routes
node_app_entry -->|"registers router"| node_admin_routes
node_auth_routes -->|"reads and writes"| node_crud
node_auth_routes -->|"sends verification"| node_email
node_email -.->|"delivers mail"| node_email_service
node_analysis_routes -->|"generates analysis"| node_ai_service
node_analysis_routes -->|"stores analysis"| node_crud
node_mentor_routes -->|"generates replies"| node_ai_service
node_mentor_routes -->|"stores chat"| node_crud
node_billing_routes -->|"manages billing data"| node_crud
node_event_routes -->|"manages events"| node_crud
node_news_routes -->|"loads updates"| node_crud
node_admin_routes -->|"manages records"| node_crud
node_user_routes -->|"reads profile data"| node_crud
node_crud -->|"queries models"| node_models
node_crud -.->|"uses sessions"| node_db_session
node_db_session -->|"connects to"| node_database
node_app_entry -->|"creates tables"| node_db_session
node_ai_service -.->|"uses AI providers"| node_email_service

click node_web "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/page.tsx"
click node_analyzer_ui "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/analyzer/page.tsx"
click node_dashboard "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/dashboard/page.tsx"
click node_pricing "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/pricing/page.tsx"
click node_payment_modal "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/components/PaymentModal.tsx"
click node_mentor_ui "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/mentor/page.tsx"
click node_chat_widget "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/components/AIChatWidget.tsx"
click node_events_ui "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/events/page.tsx"
click node_news_ui "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/news/page.tsx"
click node_admin_ui "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/admin/page.tsx"
click node_auth_ui "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/login/page.tsx"
click node_auth_context "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/context/AuthContext.tsx"
click node_api_client "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/utils/api.ts"
click node_auth_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/auth.py"
click node_user_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/user.py"
click node_analysis_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/analyzer.py"
click node_ai_service "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/ai.py"
click node_radar "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/components/RadarChart.tsx"
click node_billing_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/billing.py"
click node_event_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/events.py"
click node_news_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/news.py"
click node_mentor_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/mentor.py"
click node_admin_routes "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/admin.py"
click node_app_entry "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/main.py"
click node_crud "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/crud.py"
click node_models "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/models.py"
click node_db_session "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/database.py"
click node_email "https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/email.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_web,node_analyzer_ui,node_dashboard,node_pricing,node_payment_modal,node_mentor_ui,node_chat_widget,node_events_ui,node_news_ui,node_admin_ui,node_auth_ui,node_api_client toneBlue
class node_auth_context,node_auth_routes,node_user_routes,node_email toneAmber
class node_analysis_routes,node_ai_service,node_radar toneMint
class node_billing_routes,node_event_routes,node_news_routes,node_mentor_routes,node_admin_routes toneRose
class node_app_entry,node_crud,node_models,node_db_session,node_database,node_founder,node_email_service toneIndigo
```

## Components

### Web application

- [Web pages](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Idea analyzer](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/analyzer/page.tsx): `frontend/src/app/analyzer/page.tsx`
- [Dashboard](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/dashboard/page.tsx): `frontend/src/app/dashboard/page.tsx`
- [Plans and checkout](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/pricing/page.tsx): `frontend/src/app/pricing/page.tsx`
- [Payment modal](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/components/PaymentModal.tsx): `frontend/src/components/PaymentModal.tsx`
- [Mentor chat](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/mentor/page.tsx): `frontend/src/app/mentor/page.tsx`
- [AI chat widget](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/components/AIChatWidget.tsx): `frontend/src/components/AIChatWidget.tsx`
- [Events browser](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/events/page.tsx): `frontend/src/app/events/page.tsx`
- [Tech updates](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/news/page.tsx): `frontend/src/app/news/page.tsx`
- [Admin console](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/admin/page.tsx): `frontend/src/app/admin/page.tsx`
- [Auth screens](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/app/login/page.tsx): `frontend/src/app/login/page.tsx`
- [API client](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/utils/api.ts): `frontend/src/utils/api.ts`

### Identity and accounts

- [Auth state](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [Authentication](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [User profile](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/user.py): `backend/app/routes/user.py`
- [Email delivery](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/email.py): `backend/app/email.py`

### Startup insights

- [Analysis requests](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/analyzer.py): `backend/app/routes/analyzer.py`
- [AI analysis and mentor](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/ai.py): `backend/app/ai.py`
- [Score visualization](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/frontend/src/components/RadarChart.tsx): `frontend/src/components/RadarChart.tsx`

### Founder services

- [Billing and plans](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/billing.py): `backend/app/routes/billing.py`
- [Events and bookmarks](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/events.py): `backend/app/routes/events.py`
- [News feed](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/news.py): `backend/app/routes/news.py`
- [Mentor service](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/mentor.py): `backend/app/routes/mentor.py`
- [Administration](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/routes/admin.py): `backend/app/routes/admin.py`

### API and persistence

- [FastAPI router entry](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Domain data access](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/crud.py): `backend/app/crud.py`
- [Domain models](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/models.py): `backend/app/models.py`
- [Database sessions](https://github.com/ammirajukarthikeya-cyber/startup-insight-ai/blob/main/backend/app/database.py): `backend/app/database.py`
- **SQL database**

### Other components

- **Founder or admin**
- **SMTP or email provider**

## Connections

- Founder or admin → Web pages: uses (evidence: `README.md`)
- Founder or admin → Idea analyzer: submits idea (evidence: `README.md`)
- Founder or admin → Plans and checkout: chooses plan (evidence: `README.md`)
- Founder or admin → Mentor chat: consults (evidence: `README.md`)
- Founder or admin → Events browser: discovers events (evidence: `README.md`)
- Founder or admin → Tech updates: reads updates (evidence: `README.md`)
- Founder or admin → Admin console: administers (evidence: `README.md`)
- Auth screens → Auth state: uses auth (evidence: `frontend/src/app/login/page.tsx`)
- Auth state → API client: requests profile (evidence: `frontend/src/context/AuthContext.tsx`)
- Idea analyzer → API client: sends analysis (evidence: `frontend/src/app/analyzer/page.tsx`)
- Idea analyzer → Score visualization: renders scores (evidence: `frontend/src/app/analyzer/page.tsx`)
- Dashboard → API client: loads dashboard (evidence: `frontend/src/app/dashboard/page.tsx`)
- Plans and checkout → API client: requests plans (evidence: `frontend/src/app/pricing/page.tsx`)
- Plans and checkout → Payment modal: opens checkout (evidence: `frontend/src/app/pricing/page.tsx`)
- Payment modal → API client: submits payment (evidence: `frontend/src/components/PaymentModal.tsx`)
- Mentor chat → API client: sends chat (evidence: `frontend/src/app/mentor/page.tsx`)
- AI chat widget → API client: sends chat (evidence: `frontend/src/components/AIChatWidget.tsx`)
- Events browser → API client: loads events (evidence: `frontend/src/app/events/page.tsx`)
- Tech updates → API client: loads updates (evidence: `frontend/src/app/news/page.tsx`)
- Admin console → API client: manages platform (evidence: `frontend/src/app/admin/page.tsx`)
- FastAPI router entry → Authentication: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → User profile: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → Analysis requests: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → Billing and plans: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → Events and bookmarks: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → News feed: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → Mentor service: registers router (evidence: `backend/app/main.py`)
- FastAPI router entry → Administration: registers router (evidence: `backend/app/main.py`)
- Authentication → Domain data access: reads and writes (evidence: `backend/app/routes/auth.py`)
- Authentication → Email delivery: sends verification (evidence: `backend/app/routes/auth.py`)
- Email delivery → SMTP or email provider: delivers mail (evidence: `backend/app/email.py`)
- Analysis requests → AI analysis and mentor: generates analysis (evidence: `backend/app/routes/analyzer.py`)
- Analysis requests → Domain data access: stores analysis (evidence: `backend/app/routes/analyzer.py`)
- Mentor service → AI analysis and mentor: generates replies (evidence: `backend/app/routes/mentor.py`)
- Mentor service → Domain data access: stores chat (evidence: `backend/app/routes/mentor.py`)
- Billing and plans → Domain data access: manages billing data (evidence: `backend/app/routes/billing.py`)
- Events and bookmarks → Domain data access: manages events (evidence: `backend/app/routes/events.py`)
- News feed → Domain data access: loads updates (evidence: `backend/app/routes/news.py`)
- Administration → Domain data access: manages records (evidence: `backend/app/routes/admin.py`)
- User profile → Domain data access: reads profile data (evidence: `backend/app/routes/user.py`)
- Domain data access → Domain models: queries models (evidence: `backend/app/crud.py`)
- Domain data access → Database sessions: uses sessions
- Database sessions → SQL database: connects to (evidence: `backend/app/database.py`)
- FastAPI router entry → Database sessions: creates tables (evidence: `backend/app/main.py`)
- AI analysis and mentor → SMTP or email provider: uses AI providers
