# miccaaz/linkshub architecture

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

- Interactive diagram: https://gitdiagram.com/miccaaz/linkshub
- Repository: https://github.com/miccaaz/linkshub

## Overview

LinksHub is a mobile link organizer. Users add a link with a predefined category, then browse category-filtered links, inspect details, open a URL, or delete an entry. The excerpts show screens owning storage calls and category selection; local AsyncStorage is the persistence layer. The README documents the broader categorization and management capabilities. Some widget implementations and app layout were only indexed, so the graph keeps those relationships limited to indexed references.

Main entry points: [`src/app/(index)/index.tsx`](https://github.com/miccaaz/linkshub/blob/main/src/app/(index)/index.tsx) (Browse links), [`src/app/add/index.tsx`](https://github.com/miccaaz/linkshub/blob/main/src/app/add/index.tsx) (Add link), [`src/components/categories/index.tsx`](https://github.com/miccaaz/linkshub/blob/main/src/components/categories/index.tsx) (Category selector), [`src/storage/link-storage.ts`](https://github.com/miccaaz/linkshub/blob/main/src/storage/link-storage.ts) (Link storage API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["App screens"]
  node_home["Browse links<br/>[index.tsx]"]
  node_add["Add link<br/>[index.tsx]"]
  node_layout["App layout<br/>[_layout.tsx]"]
end

subgraph group_domain["Link organization"]
  node_category_data["Category definitions<br/>[categories.ts]"]
  node_storage["Link storage API<br/>[link-storage.ts]"]
end

subgraph group_ui["Reusable UI"]
  node_categories["Category selector<br/>[index.tsx]"]
  node_category["Category item<br/>[index.tsx]"]
  node_link_card["Link card<br/>[index.tsx]"]
  node_option["Detail actions<br/>[index.tsx]"]
  node_input["Text input<br/>[index.tsx]"]
  node_button["Action button<br/>[index.tsx]"]
  node_colors["Color tokens<br/>[colors.ts]"]
end

subgraph group_runtime["Local runtime"]
  node_async_storage[("AsyncStorage")]
  node_os_links["Device URL handler"]
end

node_user(("User"))

node_user -->|"browses"| node_home
node_user -->|"enters link"| node_add
node_home -->|"navigates"| node_add
node_home -->|"loads, deletes"| node_storage
node_add -->|"saves"| node_storage
node_storage -->|"reads, writes"| node_async_storage
node_home -->|"renders"| node_categories
node_add -->|"renders"| node_categories
node_home -->|"renders"| node_link_card
node_home -->|"renders"| node_option
node_add -->|"renders"| node_input
node_add -->|"renders"| node_button
node_categories -->|"renders"| node_category
node_categories -->|"uses options"| node_category_data
node_home -->|"filters by"| node_category_data
node_home -->|"opens URL"| node_os_links
node_layout -->|"uses tokens"| node_colors

click node_home "https://github.com/miccaaz/linkshub/blob/main/src/app/(index)/index.tsx"
click node_add "https://github.com/miccaaz/linkshub/blob/main/src/app/add/index.tsx"
click node_layout "https://github.com/miccaaz/linkshub/blob/main/src/app/_layout.tsx"
click node_category_data "https://github.com/miccaaz/linkshub/blob/main/src/utils/categories.ts"
click node_storage "https://github.com/miccaaz/linkshub/blob/main/src/storage/link-storage.ts"
click node_categories "https://github.com/miccaaz/linkshub/blob/main/src/components/categories/index.tsx"
click node_category "https://github.com/miccaaz/linkshub/blob/main/src/components/category/index.tsx"
click node_link_card "https://github.com/miccaaz/linkshub/blob/main/src/components/link/index.tsx"
click node_option "https://github.com/miccaaz/linkshub/blob/main/src/components/option/index.tsx"
click node_input "https://github.com/miccaaz/linkshub/blob/main/src/components/input/index.tsx"
click node_button "https://github.com/miccaaz/linkshub/blob/main/src/components/button/index.tsx"
click node_colors "https://github.com/miccaaz/linkshub/blob/main/src/styles/colors.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_add,node_layout,node_user toneBlue
class node_category_data,node_storage toneAmber
class node_categories,node_category,node_link_card,node_option,node_input,node_button,node_colors toneMint
class node_async_storage,node_os_links toneRose
```

## Components

### App screens

- [Browse links](https://github.com/miccaaz/linkshub/blob/main/src/app/(index)/index.tsx): `src/app/(index)/index.tsx`
- [Add link](https://github.com/miccaaz/linkshub/blob/main/src/app/add/index.tsx): `src/app/add/index.tsx`
- [App layout](https://github.com/miccaaz/linkshub/blob/main/src/app/_layout.tsx): `src/app/_layout.tsx`

### Link organization

- [Category definitions](https://github.com/miccaaz/linkshub/blob/main/src/utils/categories.ts): `src/utils/categories.ts`
- [Link storage API](https://github.com/miccaaz/linkshub/blob/main/src/storage/link-storage.ts): `src/storage/link-storage.ts`

### Reusable UI

- [Category selector](https://github.com/miccaaz/linkshub/blob/main/src/components/categories/index.tsx): `src/components/categories/index.tsx`
- [Category item](https://github.com/miccaaz/linkshub/blob/main/src/components/category/index.tsx): `src/components/category/index.tsx`
- [Link card](https://github.com/miccaaz/linkshub/blob/main/src/components/link/index.tsx): `src/components/link/index.tsx`
- [Detail actions](https://github.com/miccaaz/linkshub/blob/main/src/components/option/index.tsx): `src/components/option/index.tsx`
- [Text input](https://github.com/miccaaz/linkshub/blob/main/src/components/input/index.tsx): `src/components/input/index.tsx`
- [Action button](https://github.com/miccaaz/linkshub/blob/main/src/components/button/index.tsx): `src/components/button/index.tsx`
- [Color tokens](https://github.com/miccaaz/linkshub/blob/main/src/styles/colors.ts): `src/styles/colors.ts`

### Local runtime

- **AsyncStorage**
- **Device URL handler**

### Other components

- **User**

## Connections

- User → Browse links: browses (evidence: `README.md`)
- User → Add link: enters link (evidence: `README.md`)
- Browse links → Add link: navigates (evidence: `src/app/(index)/index.tsx`)
- Browse links → Link storage API: loads, deletes (evidence: `src/app/(index)/index.tsx`)
- Add link → Link storage API: saves (evidence: `src/app/add/index.tsx`)
- Link storage API → AsyncStorage: reads, writes (evidence: `src/storage/link-storage.ts`)
- Browse links → Category selector: renders (evidence: `src/app/(index)/index.tsx`)
- Add link → Category selector: renders (evidence: `src/app/add/index.tsx`)
- Browse links → Link card: renders (evidence: `src/app/(index)/index.tsx`)
- Browse links → Detail actions: renders (evidence: `src/app/(index)/index.tsx`)
- Add link → Text input: renders (evidence: `src/app/add/index.tsx`)
- Add link → Action button: renders (evidence: `src/app/add/index.tsx`)
- Category selector → Category item: renders (evidence: `src/components/categories/index.tsx`)
- Category selector → Category definitions: uses options (evidence: `src/components/categories/index.tsx`)
- Browse links → Category definitions: filters by (evidence: `src/app/(index)/index.tsx`)
- Browse links → Device URL handler: opens URL (evidence: `src/app/(index)/index.tsx`)
- App layout → Color tokens: uses tokens (evidence: `src/app/_layout.tsx`)
