# purvi-j38/startupsphere architecture

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

- Interactive diagram: https://gitdiagram.com/purvi-j38/startupsphere
- Repository: https://github.com/purvi-j38/startupsphere

## Overview

StartupSphere is a Django platform for turning an entrepreneur’s startup idea into a structured validation report. The principal workflow is account access, idea submission, AI or mock analysis, saved analysis review, and optional bookmarking or PDF export; dashboard and landing views provide aggregate insights. The README documents broad analysis capabilities, while the sampled service excerpt confirms Gemini integration with a mock fallback. Some view and integration details are unsampled, so uncertain relationships are omitted or marked unverified.

Main entry points: [`startup/views.py`](https://github.com/purvi-j38/startupsphere/blob/main/startup/views.py) (Idea submission), [`analysis/models.py`](https://github.com/purvi-j38/startupsphere/blob/main/analysis/models.py) (Analysis model), [`reports/views.py`](https://github.com/purvi-j38/startupsphere/blob/main/reports/views.py) (Bookmark and export views), [`startup/models.py`](https://github.com/purvi-j38/startupsphere/blob/main/startup/models.py) (Startup idea model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts and entry"]
  node_accounts["Account access<br/>[views.py]"]
  node_account_forms["Account forms<br/>[forms.py]"]
  node_user_profile["User profile model<br/>[models.py]"]
  node_landing["Landing page<br/>[views.py]"]
end

subgraph group_validation["Idea validation"]
  node_idea_submission["Idea submission<br/>[views.py]"]
  node_idea_form["Idea form<br/>[forms.py]"]
  node_startup_idea["Startup idea model<br/>[models.py]"]
  node_ai_analysis["AI analysis service<br/>[services.py]"]
  node_analysis_record["Analysis model<br/>[models.py]"]
end

subgraph group_insights["Reports and analytics"]
  node_analysis_views["Analysis report views<br/>[views.py]"]
  node_dashboard["Dashboard analytics<br/>[views.py]"]
  node_saved_report["Saved report model<br/>[models.py]"]
  node_report_views["Bookmark and export views<br/>[views.py]"]
  node_pdf_generator["PDF generator<br/>[utils.py]"]
end

subgraph group_platform["Project runtime"]
  node_django_runtime["Django runtime configuration<br/>[settings.py]"]
end

node_visitor(("Entrepreneur"))
node_gemini{{"Google Gemini API"}}
node_mysql[("MySQL database")]

node_visitor -->|"registers or signs in"| node_accounts
node_accounts -->|"validates registration"| node_account_forms
node_visitor -->|"submits idea"| node_idea_submission
node_idea_submission -->|"validates input"| node_idea_form
node_idea_submission -->|"saves idea"| node_startup_idea
node_idea_submission -->|"requests analysis"| node_ai_analysis
node_ai_analysis -.->|"calls when configured"| node_gemini
node_idea_submission -->|"stores analysis results"| node_analysis_record
node_visitor -->|"reviews report"| node_analysis_views
node_dashboard -->|"reads ideas"| node_startup_idea
node_dashboard -->|"aggregates analyses"| node_analysis_record
node_dashboard -->|"lists bookmarks"| node_saved_report
node_report_views -->|"loads report"| node_analysis_record
node_report_views -->|"toggles bookmark"| node_saved_report
node_report_views -->|"generates PDF"| node_pdf_generator
node_visitor -->|"exports or bookmarks"| node_report_views
node_landing -->|"counts submissions"| node_startup_idea
node_landing -->|"counts and scores"| node_analysis_record
node_startup_idea -.->|"persists through ORM"| node_mysql
node_analysis_record -.->|"persists through ORM"| node_mysql
node_user_profile -.->|"persists through ORM"| node_mysql
node_saved_report -.->|"persists through ORM"| node_mysql

click node_accounts "https://github.com/purvi-j38/startupsphere/blob/main/accounts/views.py"
click node_account_forms "https://github.com/purvi-j38/startupsphere/blob/main/accounts/forms.py"
click node_user_profile "https://github.com/purvi-j38/startupsphere/blob/main/accounts/models.py"
click node_landing "https://github.com/purvi-j38/startupsphere/blob/main/core/views.py"
click node_idea_submission "https://github.com/purvi-j38/startupsphere/blob/main/startup/views.py"
click node_idea_form "https://github.com/purvi-j38/startupsphere/blob/main/startup/forms.py"
click node_startup_idea "https://github.com/purvi-j38/startupsphere/blob/main/startup/models.py"
click node_ai_analysis "https://github.com/purvi-j38/startupsphere/blob/main/analysis/services.py"
click node_analysis_record "https://github.com/purvi-j38/startupsphere/blob/main/analysis/models.py"
click node_analysis_views "https://github.com/purvi-j38/startupsphere/blob/main/analysis/views.py"
click node_dashboard "https://github.com/purvi-j38/startupsphere/blob/main/dashboard/views.py"
click node_saved_report "https://github.com/purvi-j38/startupsphere/blob/main/reports/models.py"
click node_report_views "https://github.com/purvi-j38/startupsphere/blob/main/reports/views.py"
click node_pdf_generator "https://github.com/purvi-j38/startupsphere/blob/main/reports/utils.py"
click node_django_runtime "https://github.com/purvi-j38/startupsphere/blob/main/startupsphere/settings.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_accounts,node_account_forms,node_user_profile,node_landing toneBlue
class node_idea_submission,node_idea_form,node_startup_idea,node_ai_analysis,node_analysis_record,node_mysql toneAmber
class node_analysis_views,node_dashboard,node_saved_report,node_report_views,node_pdf_generator,node_gemini toneMint
class node_django_runtime toneRose
class node_visitor toneIndigo
```

## Components

### Accounts and entry

- [Account access](https://github.com/purvi-j38/startupsphere/blob/main/accounts/views.py): `accounts/views.py`
- [Account forms](https://github.com/purvi-j38/startupsphere/blob/main/accounts/forms.py): `accounts/forms.py`
- [User profile model](https://github.com/purvi-j38/startupsphere/blob/main/accounts/models.py): `accounts/models.py`
- [Landing page](https://github.com/purvi-j38/startupsphere/blob/main/core/views.py): `core/views.py`

### Idea validation

- [Idea submission](https://github.com/purvi-j38/startupsphere/blob/main/startup/views.py): `startup/views.py`
- [Idea form](https://github.com/purvi-j38/startupsphere/blob/main/startup/forms.py): `startup/forms.py`
- [Startup idea model](https://github.com/purvi-j38/startupsphere/blob/main/startup/models.py): `startup/models.py`
- [AI analysis service](https://github.com/purvi-j38/startupsphere/blob/main/analysis/services.py): `analysis/services.py`
- [Analysis model](https://github.com/purvi-j38/startupsphere/blob/main/analysis/models.py): `analysis/models.py`

### Reports and analytics

- [Analysis report views](https://github.com/purvi-j38/startupsphere/blob/main/analysis/views.py): `analysis/views.py`
- [Dashboard analytics](https://github.com/purvi-j38/startupsphere/blob/main/dashboard/views.py): `dashboard/views.py`
- [Saved report model](https://github.com/purvi-j38/startupsphere/blob/main/reports/models.py): `reports/models.py`
- [Bookmark and export views](https://github.com/purvi-j38/startupsphere/blob/main/reports/views.py): `reports/views.py`
- [PDF generator](https://github.com/purvi-j38/startupsphere/blob/main/reports/utils.py): `reports/utils.py`

### Project runtime

- [Django runtime configuration](https://github.com/purvi-j38/startupsphere/blob/main/startupsphere/settings.py): `startupsphere/settings.py`

### Other components

- **Entrepreneur**
- **Google Gemini API**
- **MySQL database**

## Connections

- Entrepreneur → Account access: registers or signs in (evidence: `accounts/views.py`)
- Account access → Account forms: validates registration (evidence: `accounts/views.py`)
- Entrepreneur → Idea submission: submits idea
- Idea submission → Idea form: validates input (evidence: `startup/views.py`)
- Idea submission → Startup idea model: saves idea (evidence: `startup/views.py`)
- Idea submission → AI analysis service: requests analysis (evidence: `startup/views.py`)
- AI analysis service → Google Gemini API: calls when configured (evidence: `analysis/services.py`)
- Idea submission → Analysis model: stores analysis results (evidence: `startup/views.py`)
- Entrepreneur → Analysis report views: reviews report
- Dashboard analytics → Startup idea model: reads ideas (evidence: `dashboard/views.py`)
- Dashboard analytics → Analysis model: aggregates analyses (evidence: `dashboard/views.py`)
- Dashboard analytics → Saved report model: lists bookmarks (evidence: `dashboard/views.py`)
- Bookmark and export views → Analysis model: loads report (evidence: `reports/views.py`)
- Bookmark and export views → Saved report model: toggles bookmark (evidence: `reports/views.py`)
- Bookmark and export views → PDF generator: generates PDF (evidence: `reports/views.py`)
- Entrepreneur → Bookmark and export views: exports or bookmarks
- Landing page → Startup idea model: counts submissions (evidence: `core/views.py`)
- Landing page → Analysis model: counts and scores (evidence: `core/views.py`)
- Startup idea model → MySQL database: persists through ORM
- Analysis model → MySQL database: persists through ORM
- User profile model → MySQL database: persists through ORM
- Saved report model → MySQL database: persists through ORM
