# joeleehen/inksearch architecture

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

- Interactive diagram: https://gitdiagram.com/joeleehen/inksearch
- Repository: https://github.com/joeleehen/inksearch

## Overview

InkSearch is a color-based ink discovery frontend. A user chooses a color and result limit, submits the search, and the Inks component requests matching inks from the configured API; returned records are rendered as swatches linking to review pages. The graph captures the sampled React component flow and API configuration. The README is empty, and no API server implementation is present in the tree, so the external service is shown only as a configured dependency.

Main entry points: [`src/components/Inks.tsx`](https://github.com/joeleehen/inksearch/blob/main/src/components/Inks.tsx) (Search Controller), [`src/components/ColorPicker.tsx`](https://github.com/joeleehen/inksearch/blob/main/src/components/ColorPicker.tsx) (Color Picker), [`src/App.tsx`](https://github.com/joeleehen/inksearch/blob/main/src/App.tsx) (App), [`src/api.ts`](https://github.com/joeleehen/inksearch/blob/main/src/api.ts) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_app_component["App<br/>[App.tsx]"]
end

subgraph group_search["Color Search"]
  node_inks["Search Controller<br/>[Inks.tsx]"]
  node_picker["Color Picker<br/>[ColorPicker.tsx]"]
  node_client["API Client<br/>[api.ts]"]
end

subgraph group_results["Ink Results"]
  node_results["Results List<br/>[Results.tsx]"]
  node_ink_result["Ink Swatch<br/>[InkResult.tsx]"]
  node_fallback["Error Fallback<br/>[ErrorFallback.tsx]"]
end

node_user(("User"))
node_api_service["Ink Search API"]

node_user -->|"chooses and submits"| node_picker
node_entry -->|"renders"| node_app_component
node_app_component -->|"renders"| node_inks
node_inks -->|"renders"| node_picker
node_picker -->|"submits search"| node_inks
node_inks -->|"requests inks"| node_client
node_client -->|"targets"| node_api_service
node_inks -->|"passes results"| node_results
node_results -->|"renders each ink"| node_ink_result
node_inks -->|"configures error boundary"| node_fallback

click node_entry "https://github.com/joeleehen/inksearch/blob/main/src/main.tsx"
click node_app_component "https://github.com/joeleehen/inksearch/blob/main/src/App.tsx"
click node_inks "https://github.com/joeleehen/inksearch/blob/main/src/components/Inks.tsx"
click node_picker "https://github.com/joeleehen/inksearch/blob/main/src/components/ColorPicker.tsx"
click node_client "https://github.com/joeleehen/inksearch/blob/main/src/api.ts"
click node_results "https://github.com/joeleehen/inksearch/blob/main/src/components/Results.tsx"
click node_ink_result "https://github.com/joeleehen/inksearch/blob/main/src/components/InkResult.tsx"
click node_fallback "https://github.com/joeleehen/inksearch/blob/main/src/components/ErrorFallback.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_entry,node_app_component,node_user toneBlue
class node_inks,node_picker,node_client toneAmber
class node_results,node_ink_result,node_fallback,node_api_service toneMint
```

## Components

### Application

- [React Entry](https://github.com/joeleehen/inksearch/blob/main/src/main.tsx): `src/main.tsx`
- [App](https://github.com/joeleehen/inksearch/blob/main/src/App.tsx): `src/App.tsx`

### Color Search

- [Search Controller](https://github.com/joeleehen/inksearch/blob/main/src/components/Inks.tsx): `src/components/Inks.tsx`
- [Color Picker](https://github.com/joeleehen/inksearch/blob/main/src/components/ColorPicker.tsx): `src/components/ColorPicker.tsx`
- [API Client](https://github.com/joeleehen/inksearch/blob/main/src/api.ts): `src/api.ts`

### Ink Results

- [Results List](https://github.com/joeleehen/inksearch/blob/main/src/components/Results.tsx): `src/components/Results.tsx`
- [Ink Swatch](https://github.com/joeleehen/inksearch/blob/main/src/components/InkResult.tsx): `src/components/InkResult.tsx`
- [Error Fallback](https://github.com/joeleehen/inksearch/blob/main/src/components/ErrorFallback.tsx): `src/components/ErrorFallback.tsx`

### Other components

- **User**
- **Ink Search API**

## Connections

- User → Color Picker: chooses and submits (evidence: `src/components/ColorPicker.tsx`)
- React Entry → App: renders (evidence: `src/main.tsx`)
- App → Search Controller: renders (evidence: `src/App.tsx`)
- Search Controller → Color Picker: renders (evidence: `src/components/Inks.tsx`)
- Color Picker → Search Controller: submits search (evidence: `src/components/ColorPicker.tsx`)
- Search Controller → API Client: requests inks (evidence: `src/components/Inks.tsx`)
- API Client → Ink Search API: targets (evidence: `src/api.ts`)
- Search Controller → Results List: passes results (evidence: `src/components/Inks.tsx`)
- Results List → Ink Swatch: renders each ink (evidence: `src/components/Results.tsx`)
- Search Controller → Error Fallback: configures error boundary (evidence: `src/components/Inks.tsx`)
