# arkajitadhikary-gif/repo-finder architecture

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

- Interactive diagram: https://gitdiagram.com/arkajitadhikary-gif/repo-finder
- Repository: https://github.com/arkajitadhikary-gif/repo-finder

## Overview

RepoFinder turns a project description into repository recommendations: the search endpoint combines smart keyword planning and architectural analysis, searches GitHub, ranks results, and adds relevance insights. Users can then generate an implementation blueprint, compare repositories, or open repository details and explore files. The README documents these product branches; sampled source confirms key search, GitHub, and repository-detail calls. Some UI-to-route and explorer wiring is documented but not visible in the sampled excerpts.

Main entry points: [`app/page.tsx`](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/page.tsx) (Search page), [`app/api/search/route.ts`](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/search/route.ts) (Search endpoint), [`app/repo/[owner]/[repo]/page.tsx`](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/repo/%5Bowner%5D/%5Brepo%5D/page.tsx) (Repository details), [`components/CodeExplorer.tsx`](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/CodeExplorer.tsx) (Code explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_search["Search and discovery"]
  node_home["Search page<br/>[page.tsx]"]
  node_search_api["Search endpoint<br/>[route.ts]"]
  node_smart["Smart search<br/>[smart-search.ts]"]
  node_github_search["GitHub search<br/>[github.ts]"]
end

subgraph group_architecture["Architecture and planning"]
  node_architect["AI architect<br/>[architect.ts]"]
  node_blueprint_api["Blueprint endpoint<br/>[route.ts]"]
  node_blueprint_modal["Blueprint roadmap<br/>[BlueprintModal.tsx]"]
end

subgraph group_repository["Repository inspection"]
  node_repo_page["Repository details<br/>[page.tsx]"]
  node_repo_data["Repository metadata<br/>[github.ts]"]
  node_detail_tabs["README and explorer tabs<br/>[RepoDetailTabs.tsx]"]
  node_code_explorer["Code explorer<br/>[CodeExplorer.tsx]"]
  node_tree_api["Repository tree endpoint<br/>[route.ts]"]
  node_file_api["Repository file endpoint<br/>[route.ts]"]
end

subgraph group_presentation["Result presentation"]
  node_repo_card["Repository cards<br/>[RepoCard.tsx]"]
  node_comparison["Repository comparison"]
end

node_user(("Builder"))
node_groq{{"Groq AI"}}
node_github{{"GitHub"}}
node_dev_platforms{{"Launch platforms"}}

node_user -->|"describes project"| node_home
node_home -->|"submits search"| node_search_api
node_search_api -->|"builds plan"| node_smart
node_search_api -->|"analyzes idea"| node_architect
node_search_api -->|"searches queries"| node_github_search
node_smart -->|"ranks results"| node_github_search
node_architect -->|"generates analysis"| node_groq
node_search_api -->|"returns recommendations"| node_repo_card
node_home -->|"requests blueprint"| node_blueprint_api
node_blueprint_api -->|"generates roadmap"| node_architect
node_home -->|"presents roadmap"| node_blueprint_modal
node_home -->|"opens comparison"| node_comparison
node_repo_card -->|"selects repositories"| node_comparison
node_repo_page -->|"loads repository data"| node_repo_data
node_repo_data -->|"fetches metadata"| node_github
node_repo_page -->|"renders tabs"| node_detail_tabs
node_detail_tabs -->|"shows explorer"| node_code_explorer
node_code_explorer -->|"loads file tree"| node_tree_api
node_code_explorer -->|"loads file content"| node_file_api
node_tree_api -->|"fetches tree"| node_github
node_file_api -->|"fetches file"| node_github
node_repo_page -->|"launches environment"| node_dev_platforms

click node_home "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/page.tsx"
click node_search_api "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/search/route.ts"
click node_smart "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/smart-search.ts"
click node_github_search "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/github.ts"
click node_architect "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/architect.ts"
click node_blueprint_api "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/blueprint/route.ts"
click node_blueprint_modal "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/BlueprintModal.tsx"
click node_repo_card "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/RepoCard.tsx"
click node_comparison "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/RepoComparisonModal.tsx"
click node_repo_page "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/repo/%5Bowner%5D/%5Brepo%5D/page.tsx"
click node_repo_data "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/github.ts"
click node_detail_tabs "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/RepoDetailTabs.tsx"
click node_code_explorer "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/CodeExplorer.tsx"
click node_tree_api "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/repo-tree/route.ts"
click node_file_api "https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/repo-file/route.ts"

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_search_api,node_smart,node_github_search toneBlue
class node_architect,node_blueprint_api,node_blueprint_modal toneAmber
class node_repo_page,node_repo_data,node_detail_tabs,node_code_explorer,node_tree_api,node_file_api toneMint
class node_repo_card,node_comparison toneRose
class node_user,node_groq,node_github,node_dev_platforms toneIndigo
```

## Components

### Search and discovery

- [Search page](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/page.tsx): `app/page.tsx`
- [Search endpoint](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/search/route.ts): `app/api/search/route.ts`
- [Smart search](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/smart-search.ts): `lib/smart-search.ts`
- [GitHub search](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/github.ts): `lib/github.ts`

### Architecture and planning

- [AI architect](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/architect.ts): `lib/architect.ts`
- [Blueprint endpoint](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/blueprint/route.ts): `app/api/blueprint/route.ts`
- [Blueprint roadmap](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/BlueprintModal.tsx): `components/BlueprintModal.tsx`

### Repository inspection

- [Repository details](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/repo/%5Bowner%5D/%5Brepo%5D/page.tsx): `app/repo/[owner]/[repo]/page.tsx`
- [Repository metadata](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/lib/github.ts): `lib/github.ts`
- [README and explorer tabs](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/RepoDetailTabs.tsx): `components/RepoDetailTabs.tsx`
- [Code explorer](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/CodeExplorer.tsx): `components/CodeExplorer.tsx`
- [Repository tree endpoint](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/repo-tree/route.ts): `app/api/repo-tree/route.ts`
- [Repository file endpoint](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/app/api/repo-file/route.ts): `app/api/repo-file/route.ts`

### Result presentation

- [Repository cards](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/RepoCard.tsx): `components/RepoCard.tsx`
- [Repository comparison](https://github.com/arkajitadhikary-gif/repo-finder/blob/main/components/RepoComparisonModal.tsx): `components/RepoComparisonModal.tsx`

### Other components

- **Builder**
- **Groq AI**
- **GitHub**
- **Launch platforms**

## Connections

- Builder → Search page: describes project (evidence: `README.md`)
- Search page → Search endpoint: submits search (evidence: `README.md`)
- Search endpoint → Smart search: builds plan (evidence: `app/api/search/route.ts`)
- Search endpoint → AI architect: analyzes idea (evidence: `app/api/search/route.ts`)
- Search endpoint → GitHub search: searches queries (evidence: `app/api/search/route.ts`)
- Smart search → GitHub search: ranks results (evidence: `lib/smart-search.ts`)
- AI architect → Groq AI: generates analysis (evidence: `lib/architect.ts`)
- Search endpoint → Repository cards: returns recommendations (evidence: `README.md`)
- Search page → Blueprint endpoint: requests blueprint (evidence: `README.md`)
- Blueprint endpoint → AI architect: generates roadmap (evidence: `app/api/blueprint/route.ts`)
- Search page → Blueprint roadmap: presents roadmap (evidence: `README.md`)
- Search page → Repository comparison: opens comparison (evidence: `README.md`)
- Repository cards → Repository comparison: selects repositories (evidence: `README.md`)
- Repository details → Repository metadata: loads repository data (evidence: `app/repo/[owner]/[repo]/page.tsx`)
- Repository metadata → GitHub: fetches metadata (evidence: `lib/github.ts`)
- Repository details → README and explorer tabs: renders tabs (evidence: `app/repo/[owner]/[repo]/page.tsx`)
- README and explorer tabs → Code explorer: shows explorer (evidence: `components/RepoDetailTabs.tsx`)
- Code explorer → Repository tree endpoint: loads file tree (evidence: `README.md`)
- Code explorer → Repository file endpoint: loads file content (evidence: `README.md`)
- Repository tree endpoint → GitHub: fetches tree (evidence: `app/api/repo-tree/route.ts`)
- Repository file endpoint → GitHub: fetches file (evidence: `app/api/repo-file/route.ts`)
- Repository details → Launch platforms: launches environment (evidence: `README.md`)
