# shreyashigupta2310/gitvyuh_v0 architecture

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

- Interactive diagram: https://gitdiagram.com/shreyashigupta2310/gitvyuh_v0
- Repository: https://github.com/shreyashigupta2310/gitvyuh_v0

## Overview

Git Vyuh accepts a public GitHub repository URL, gathers repository metadata and content, asks Gemini to select and populate relevant quality insights, then renders those insights as interactive dashboard components. The documented capabilities include README feedback, commit activity, folder organization, tech-stack badges, scores, error states, and theme switching. The main route and rendering relationships are shown in excerpts or the README; the health page is a sample page, not part of the main analysis flow.

Main entry points: [`components/ComponentRenderer.tsx`](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ComponentRenderer.tsx) (Component dispatcher), [`components/InputBar.tsx`](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/InputBar.tsx) (URL input), [`app/api/analyze/route.ts`](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/api/analyze/route.ts) (Analysis route), [`app/page.tsx`](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/page.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Home page<br/>[page.tsx]"]
  node_input["URL input<br/>[InputBar.tsx]"]
  node_theme["Theme toggle<br/>[ThemeToggle.tsx]"]
  node_health["Health demo page<br/>[page.tsx]"]
end

subgraph group_collection["Repository data"]
  node_github_route["GitHub route<br/>[route.ts]"]
  node_github_data["GitHub data helpers<br/>[github.ts]"]
end

subgraph group_analysis["AI analysis"]
  node_analyze_route["Analysis route<br/>[route.ts]"]
  node_rate_limit["Rate limiter<br/>[rateLimit.ts]"]
  node_ai["Gemini analysis<br/>[ai.ts]"]
  node_contract["Analysis data contract<br/>[index.ts]"]
end

subgraph group_presentation["Insight components"]
  node_renderer["Component dispatcher"]
  node_score["Quality score<br/>[ScoreCard.tsx]"]
  node_readme["README feedback<br/>[ReadmeCard.tsx]"]
  node_commits["Commit chart<br/>[CommitChart.tsx]"]
  node_folder["Folder tree<br/>[FolderTree.tsx]"]
  node_stack["Tech stack badges"]
  node_error["Error state<br/>[ErrorState.tsx]"]
end

node_visitor(("Repository visitor"))
node_github["GitHub API"]
node_gemini["Gemini service"]

node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_input
node_home -->|"renders"| node_theme
node_input -->|"requests repository data"| node_github_route
node_github_route -->|"fetches repository data"| node_github_data
node_github_data -->|"requests repository data"| node_github
node_input -->|"submits repository data"| node_analyze_route
node_analyze_route -->|"checks request limit"| node_rate_limit
node_analyze_route -->|"requests analysis"| node_ai
node_ai -->|"generates analysis"| node_gemini
node_ai -->|"formats component data"| node_contract
node_analyze_route -->|"returns blocks"| node_input
node_input -->|"renders result blocks"| node_renderer
node_renderer -->|"dispatches score"| node_score
node_renderer -->|"dispatches README feedback"| node_readme
node_renderer -->|"dispatches activity"| node_commits
node_renderer -->|"dispatches structure"| node_folder
node_renderer -->|"dispatches languages"| node_stack
node_renderer -->|"dispatches errors"| node_error
node_health -->|"renders sample blocks"| node_renderer

click node_home "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/page.tsx"
click node_input "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/InputBar.tsx"
click node_theme "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ThemeToggle.tsx"
click node_github_route "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/api/github/route.ts"
click node_github_data "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/lib/github.ts"
click node_analyze_route "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/api/analyze/route.ts"
click node_rate_limit "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/lib/rateLimit.ts"
click node_ai "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/lib/ai.ts"
click node_contract "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/types/index.ts"
click node_renderer "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ComponentRenderer.tsx"
click node_score "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ScoreCard.tsx"
click node_readme "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ReadmeCard.tsx"
click node_commits "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/CommitChart.tsx"
click node_folder "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/FolderTree.tsx"
click node_stack "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/TechStackBadges.tsx"
click node_error "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ErrorState.tsx"
click node_health "https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/health/page.tsx"

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_home,node_input,node_theme,node_health toneBlue
class node_github_route,node_github_data toneAmber
class node_analyze_route,node_rate_limit,node_ai,node_contract,node_github toneMint
class node_renderer,node_score,node_readme,node_commits,node_folder,node_stack,node_error toneRose
class node_visitor,node_gemini toneIndigo
```

## Components

### Web experience

- [Home page](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/page.tsx): `app/page.tsx`
- [URL input](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/InputBar.tsx): `components/InputBar.tsx`
- [Theme toggle](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ThemeToggle.tsx): `components/ThemeToggle.tsx`
- [Health demo page](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/health/page.tsx): `app/health/page.tsx`

### Repository data

- [GitHub route](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/api/github/route.ts): `app/api/github/route.ts`
- [GitHub data helpers](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/lib/github.ts): `lib/github.ts`

### AI analysis

- [Analysis route](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/app/api/analyze/route.ts): `app/api/analyze/route.ts`
- [Rate limiter](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/lib/rateLimit.ts): `lib/rateLimit.ts`
- [Gemini analysis](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/lib/ai.ts): `lib/ai.ts`
- [Analysis data contract](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/types/index.ts): `types/index.ts`

### Insight components

- [Component dispatcher](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ComponentRenderer.tsx): `components/ComponentRenderer.tsx`
- [Quality score](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ScoreCard.tsx): `components/ScoreCard.tsx`
- [README feedback](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ReadmeCard.tsx): `components/ReadmeCard.tsx`
- [Commit chart](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/CommitChart.tsx): `components/CommitChart.tsx`
- [Folder tree](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/FolderTree.tsx): `components/FolderTree.tsx`
- [Tech stack badges](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/TechStackBadges.tsx): `components/TechStackBadges.tsx`
- [Error state](https://github.com/shreyashigupta2310/gitvyuh_v0/blob/main/components/ErrorState.tsx): `components/ErrorState.tsx`

### Other components

- **Repository visitor**
- **GitHub API**
- **Gemini service**

## Connections

- Repository visitor → Home page: opens (evidence: `README.md`)
- Home page → URL input: renders (evidence: `app/page.tsx`)
- Home page → Theme toggle: renders (evidence: `app/page.tsx`)
- URL input → GitHub route: requests repository data (evidence: `components/InputBar.tsx`)
- GitHub route → GitHub data helpers: fetches repository data (evidence: `README.md`)
- GitHub data helpers → GitHub API: requests repository data (evidence: `lib/github.ts`)
- URL input → Analysis route: submits repository data (evidence: `components/InputBar.tsx`)
- Analysis route → Rate limiter: checks request limit (evidence: `app/api/analyze/route.ts`)
- Analysis route → Gemini analysis: requests analysis (evidence: `app/api/analyze/route.ts`)
- Gemini analysis → Gemini service: generates analysis (evidence: `lib/ai.ts`)
- Gemini analysis → Analysis data contract: formats component data (evidence: `README.md`)
- Analysis route → URL input: returns blocks (evidence: `components/InputBar.tsx`)
- URL input → Component dispatcher: renders result blocks (evidence: `components/InputBar.tsx`)
- Component dispatcher → Quality score: dispatches score (evidence: `components/ComponentRenderer.tsx`)
- Component dispatcher → README feedback: dispatches README feedback (evidence: `components/ComponentRenderer.tsx`)
- Component dispatcher → Commit chart: dispatches activity (evidence: `components/ComponentRenderer.tsx`)
- Component dispatcher → Folder tree: dispatches structure (evidence: `components/ComponentRenderer.tsx`)
- Component dispatcher → Tech stack badges: dispatches languages (evidence: `components/ComponentRenderer.tsx`)
- Component dispatcher → Error state: dispatches errors (evidence: `components/ComponentRenderer.tsx`)
- Health demo page → Component dispatcher: renders sample blocks (evidence: `app/health/page.tsx`)
