# yacho-glitch/github-user-finder architecture

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

- Interactive diagram: https://gitdiagram.com/yacho-glitch/github-user-finder
- Repository: https://github.com/yacho-glitch/github-user-finder

## Overview

GitHub User Finder lets a user search for a GitHub username, then displays profile details and up to ten recently updated public repositories. The app debounces input, builds GitHub API URLs, fetches user and repository data independently, and renders loading or error feedback alongside the results. The graph follows the visible component calls and fetch behavior; the API service defines endpoint URLs, while the browser fetches them. Styling and type definitions support the interface and data but are not separate workflow stages.

Main entry points: [`src/App.tsx`](https://github.com/yacho-glitch/github-user-finder/blob/main/src/App.tsx) (App coordinator), [`src/components/SearchBar.tsx`](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/SearchBar.tsx) (Debounced search), [`src/components/RepoList.tsx`](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/RepoList.tsx) (Repository list), [`src/types/github.ts`](https://github.com/yacho-glitch/github-user-finder/blob/main/src/types/github.ts) (GitHub data types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Search and results"]
  node_search["Debounced search<br/>[SearchBar.tsx]"]
  node_profile["User profile<br/>[UserProfile.tsx]"]
  node_repos["Repository list<br/>[RepoList.tsx]"]
  node_card["Repository card<br/>[RepoCard.tsx]"]
  node_loading["Loading feedback<br/>[LoadingSpinner.tsx]"]
  node_error["Error feedback<br/>[ErrorMessage.tsx]"]
end

subgraph group_runtime["Application runtime"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_debounce["Debounce hook<br/>[useDebounce.ts]"]
  node_fetch["Fetch hook<br/>[useFetch.ts]"]
  node_types["GitHub data types<br/>[github.ts]"]
end

subgraph group_api["GitHub API"]
  node_urls["GitHub URLs<br/>[githubApi.ts]"]
  node_github{{"GitHub API"}}
end

node_user(("User"))

node_user -.->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_search
node_search -->|"debounces input"| node_debounce
node_search -->|"submits name"| node_app
node_app -->|"builds endpoints"| node_urls
node_app -->|"requests data"| node_fetch
node_fetch -->|"fetches JSON"| node_github
node_app -->|"renders user"| node_profile
node_app -->|"renders repositories"| node_repos
node_repos -->|"renders each"| node_card
node_app -->|"renders loading"| node_loading
node_app -->|"renders errors"| node_error
node_profile -->|"uses user shape"| node_types
node_repos -->|"uses repo shape"| node_types
node_card -->|"uses repo shape"| node_types

click node_entry "https://github.com/yacho-glitch/github-user-finder/blob/main/src/main.tsx"
click node_app "https://github.com/yacho-glitch/github-user-finder/blob/main/src/App.tsx"
click node_search "https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/SearchBar.tsx"
click node_debounce "https://github.com/yacho-glitch/github-user-finder/blob/main/src/hooks/useDebounce.ts"
click node_fetch "https://github.com/yacho-glitch/github-user-finder/blob/main/src/hooks/useFetch.ts"
click node_urls "https://github.com/yacho-glitch/github-user-finder/blob/main/src/services/githubApi.ts"
click node_profile "https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/UserProfile.tsx"
click node_repos "https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/RepoList.tsx"
click node_card "https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/RepoCard.tsx"
click node_loading "https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/LoadingSpinner.tsx"
click node_error "https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/ErrorMessage.tsx"
click node_types "https://github.com/yacho-glitch/github-user-finder/blob/main/src/types/github.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_search,node_profile,node_repos,node_card,node_loading,node_error,node_user toneBlue
class node_entry,node_app,node_debounce,node_fetch,node_types toneAmber
class node_urls,node_github toneMint
```

## Components

### Search and results

- [Debounced search](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/SearchBar.tsx): `src/components/SearchBar.tsx`
- [User profile](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/UserProfile.tsx): `src/components/UserProfile.tsx`
- [Repository list](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/RepoList.tsx): `src/components/RepoList.tsx`
- [Repository card](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/RepoCard.tsx): `src/components/RepoCard.tsx`
- [Loading feedback](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/LoadingSpinner.tsx): `src/components/LoadingSpinner.tsx`
- [Error feedback](https://github.com/yacho-glitch/github-user-finder/blob/main/src/components/ErrorMessage.tsx): `src/components/ErrorMessage.tsx`

### Application runtime

- [React entry](https://github.com/yacho-glitch/github-user-finder/blob/main/src/main.tsx): `src/main.tsx`
- [App coordinator](https://github.com/yacho-glitch/github-user-finder/blob/main/src/App.tsx): `src/App.tsx`
- [Debounce hook](https://github.com/yacho-glitch/github-user-finder/blob/main/src/hooks/useDebounce.ts): `src/hooks/useDebounce.ts`
- [Fetch hook](https://github.com/yacho-glitch/github-user-finder/blob/main/src/hooks/useFetch.ts): `src/hooks/useFetch.ts`
- [GitHub data types](https://github.com/yacho-glitch/github-user-finder/blob/main/src/types/github.ts): `src/types/github.ts`

### GitHub API

- [GitHub URLs](https://github.com/yacho-glitch/github-user-finder/blob/main/src/services/githubApi.ts): `src/services/githubApi.ts`
- **GitHub API**

### Other components

- **User**

## Connections

- User → React entry: opens app
- React entry → App coordinator: renders (evidence: `src/main.tsx`)
- App coordinator → Debounced search: renders (evidence: `src/App.tsx`)
- Debounced search → Debounce hook: debounces input (evidence: `src/components/SearchBar.tsx`)
- Debounced search → App coordinator: submits name (evidence: `src/App.tsx`)
- App coordinator → GitHub URLs: builds endpoints (evidence: `src/App.tsx`)
- App coordinator → Fetch hook: requests data (evidence: `src/App.tsx`)
- Fetch hook → GitHub API: fetches JSON (evidence: `src/hooks/useFetch.ts`)
- App coordinator → User profile: renders user (evidence: `src/App.tsx`)
- App coordinator → Repository list: renders repositories (evidence: `src/App.tsx`)
- Repository list → Repository card: renders each (evidence: `src/components/RepoList.tsx`)
- App coordinator → Loading feedback: renders loading (evidence: `src/App.tsx`)
- App coordinator → Error feedback: renders errors (evidence: `src/App.tsx`)
- User profile → GitHub data types: uses user shape (evidence: `src/components/UserProfile.tsx`)
- Repository list → GitHub data types: uses repo shape (evidence: `src/components/RepoList.tsx`)
- Repository card → GitHub data types: uses repo shape (evidence: `src/components/RepoCard.tsx`)
