# latentcat/latentbox architecture

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

- Interactive diagram: https://gitdiagram.com/latentcat/latentbox
- Repository: https://github.com/latentcat/latentbox

## Overview

Latent Box is a multilingual curated resource site for AI, creativity, and art. Visitors enter through the home page, browse themed collections, and follow curated product, gallery, or paper links; maintainers and the community contribute to the curated content. The graph groups the many collection routes by content type and includes shared navigation, presentation, and community features. Connections are limited to sampled page imports and README-described capabilities; unsampled route implementations are represented by their existing directories.

Main entry points: [`src/app/[locale]/(docs)`](https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)) (Collection routes), [`src/components/SimpleLayout.tsx`](https://github.com/latentcat/latentbox/blob/main/src/components/SimpleLayout.tsx) (Article layout), [`src/app/[locale]/(common)/page.tsx`](https://github.com/latentcat/latentbox/blob/main/src/app/%5Blocale%5D/(common)/page.tsx) (Home page), [`src/components/collection/ProductView.tsx`](https://github.com/latentcat/latentbox/blob/main/src/components/collection/ProductView.tsx) (Product cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Site discovery"]
  node_home["Home page<br/>[page.tsx]"]
  node_home_sections["Home sections"]
end

subgraph group_collections["Curated collections"]
  node_docs_routes["Collection routes"]
  node_collection_data["Curated datasets"]
  node_product_view["Product cards<br/>[ProductView.tsx]"]
  node_gallery_view["Resource galleries<br/>[GalleryView.tsx]"]
  node_paper_view["Paper collections<br/>[PaperView.tsx]"]
  node_product_tree["Product tree<br/>[ProductTree.tsx]"]
  node_unity_tree["Unity resource tree"]
end

subgraph group_presentation["Shared presentation"]
  node_layout["Article layout<br/>[SimpleLayout.tsx]"]
  node_header["Site navigation<br/>[Header.tsx]"]
  node_locale_nav["Locale navigation<br/>[navigation.ts]"]
end

subgraph group_community["Community features"]
  node_contributions["Contributor credits<br/>[Contributors.tsx]"]
  node_feedback["Reader feedback<br/>[Feedback.tsx]"]
  node_stars_api["Star count API<br/>[route.ts]"]
  node_count_service["Count service<br/>[count.ts]"]
  node_mongodb[("MongoDB<br/>[mongodb.ts]")]
end

node_visitors(("Visitors"))
node_curators(("Curators"))
node_community_channels(("Community channels"))
node_github(("GitHub contributors"))

node_visitors -->|"browse"| node_home
node_home -->|"renders"| node_home_sections
node_visitors -.->|"browse"| node_docs_routes
node_docs_routes -->|"uses layout"| node_layout
node_docs_routes -->|"loads data"| node_collection_data
node_docs_routes -->|"renders products"| node_product_view
node_docs_routes -->|"renders tree"| node_product_tree
node_docs_routes -->|"renders gallery"| node_gallery_view
node_docs_routes -->|"uses tree"| node_unity_tree
node_docs_routes -->|"renders papers"| node_paper_view
node_product_view -->|"reads items"| node_collection_data
node_gallery_view -->|"reads items"| node_collection_data
node_visitors -.->|"navigate"| node_header
node_header -->|"routes links"| node_locale_nav
node_layout -->|"renders feedback"| node_feedback
node_layout -->|"credits authors"| node_contributions
node_curators -.->|"curate content"| node_collection_data
node_curators -->|"submit changes"| node_github
node_community_channels -->|"share suggestions"| node_curators
node_visitors -.->|"request stars"| node_stars_api
node_stars_api -->|"calls"| node_count_service
node_count_service -->|"uses database"| node_mongodb

click node_home "https://github.com/latentcat/latentbox/blob/main/src/app/%5Blocale%5D/(common)/page.tsx"
click node_home_sections "https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(common)"
click node_docs_routes "https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)"
click node_collection_data "https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)"
click node_product_view "https://github.com/latentcat/latentbox/blob/main/src/components/collection/ProductView.tsx"
click node_gallery_view "https://github.com/latentcat/latentbox/blob/main/src/components/collection/GalleryView.tsx"
click node_paper_view "https://github.com/latentcat/latentbox/blob/main/src/components/collection/PaperView.tsx"
click node_product_tree "https://github.com/latentcat/latentbox/blob/main/src/app/%5Blocale%5D/(docs)/awesome-ai-products/ProductTree.tsx"
click node_unity_tree "https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)/awesome-unity"
click node_layout "https://github.com/latentcat/latentbox/blob/main/src/components/SimpleLayout.tsx"
click node_header "https://github.com/latentcat/latentbox/blob/main/src/components/Header.tsx"
click node_locale_nav "https://github.com/latentcat/latentbox/blob/main/src/navigation.ts"
click node_contributions "https://github.com/latentcat/latentbox/blob/main/src/components/Contributors.tsx"
click node_feedback "https://github.com/latentcat/latentbox/blob/main/src/components/Feedback.tsx"
click node_stars_api "https://github.com/latentcat/latentbox/blob/main/src/app/api/stars/route.ts"
click node_count_service "https://github.com/latentcat/latentbox/blob/main/src/lib/server/count.ts"
click node_mongodb "https://github.com/latentcat/latentbox/blob/main/src/lib/server/mongodb.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_home_sections toneBlue
class node_docs_routes,node_collection_data,node_product_view,node_gallery_view,node_paper_view,node_product_tree,node_unity_tree toneAmber
class node_layout,node_header,node_locale_nav toneMint
class node_contributions,node_feedback,node_stars_api,node_count_service,node_mongodb toneRose
class node_visitors,node_curators,node_community_channels,node_github toneIndigo
```

## Components

### Site discovery

- [Home page](https://github.com/latentcat/latentbox/blob/main/src/app/%5Blocale%5D/(common)/page.tsx): `src/app/[locale]/(common)/page.tsx`
- [Home sections](https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(common)): `src/app/[locale]/(common)`

### Curated collections

- [Collection routes](https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)): `src/app/[locale]/(docs)`
- [Curated datasets](https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)): `src/app/[locale]/(docs)`
- [Product cards](https://github.com/latentcat/latentbox/blob/main/src/components/collection/ProductView.tsx): `src/components/collection/ProductView.tsx`
- [Resource galleries](https://github.com/latentcat/latentbox/blob/main/src/components/collection/GalleryView.tsx): `src/components/collection/GalleryView.tsx`
- [Paper collections](https://github.com/latentcat/latentbox/blob/main/src/components/collection/PaperView.tsx): `src/components/collection/PaperView.tsx`
- [Product tree](https://github.com/latentcat/latentbox/blob/main/src/app/%5Blocale%5D/(docs)/awesome-ai-products/ProductTree.tsx): `src/app/[locale]/(docs)/awesome-ai-products/ProductTree.tsx`
- [Unity resource tree](https://github.com/latentcat/latentbox/tree/main/src/app/%5Blocale%5D/(docs)/awesome-unity): `src/app/[locale]/(docs)/awesome-unity`

### Shared presentation

- [Article layout](https://github.com/latentcat/latentbox/blob/main/src/components/SimpleLayout.tsx): `src/components/SimpleLayout.tsx`
- [Site navigation](https://github.com/latentcat/latentbox/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Locale navigation](https://github.com/latentcat/latentbox/blob/main/src/navigation.ts): `src/navigation.ts`

### Community features

- [Contributor credits](https://github.com/latentcat/latentbox/blob/main/src/components/Contributors.tsx): `src/components/Contributors.tsx`
- [Reader feedback](https://github.com/latentcat/latentbox/blob/main/src/components/Feedback.tsx): `src/components/Feedback.tsx`
- [Star count API](https://github.com/latentcat/latentbox/blob/main/src/app/api/stars/route.ts): `src/app/api/stars/route.ts`
- [Count service](https://github.com/latentcat/latentbox/blob/main/src/lib/server/count.ts): `src/lib/server/count.ts`
- [MongoDB](https://github.com/latentcat/latentbox/blob/main/src/lib/server/mongodb.ts): `src/lib/server/mongodb.ts`

### Other components

- **Visitors**
- **Curators**
- **Community channels**
- **GitHub contributors**

## Connections

- Visitors → Home page: browse
- Home page → Home sections: renders (evidence: `src/app/[locale]/(common)/page.tsx`)
- Visitors → Collection routes: browse
- Collection routes → Article layout: uses layout (evidence: `src/app/[locale]/(docs)/awesome-ai-products/page.tsx`)
- Collection routes → Curated datasets: loads data (evidence: `src/app/[locale]/(docs)/awesome-ai-products/page.tsx`)
- Collection routes → Product cards: renders products (evidence: `src/app/[locale]/(docs)/awesome-ai-products/page.tsx`)
- Collection routes → Product tree: renders tree (evidence: `src/app/[locale]/(docs)/awesome-ai-products/page.tsx`)
- Collection routes → Resource galleries: renders gallery (evidence: `src/app/[locale]/(docs)/awesome-unity/page.tsx`)
- Collection routes → Unity resource tree: uses tree (evidence: `src/app/[locale]/(docs)/awesome-unity/page.tsx`)
- Collection routes → Paper collections: renders papers (evidence: `src/app/[locale]/(docs)/houdini-nodes/page.tsx`)
- Product cards → Curated datasets: reads items (evidence: `src/components/collection/ProductView.tsx`)
- Resource galleries → Curated datasets: reads items (evidence: `src/components/collection/GalleryView.tsx`)
- Visitors → Site navigation: navigate
- Site navigation → Locale navigation: routes links (evidence: `src/components/Header.tsx`)
- Article layout → Reader feedback: renders feedback (evidence: `src/components/SimpleLayout.tsx`)
- Article layout → Contributor credits: credits authors (evidence: `src/components/SimpleLayout.tsx`)
- Curators → Curated datasets: curate content
- Curators → GitHub contributors: submit changes
- Community channels → Curators: share suggestions
- Visitors → Star count API: request stars
- Star count API → Count service: calls (evidence: `src/app/api/stars/route.ts`)
- Count service → MongoDB: uses database (evidence: `src/lib/server/count.ts`)
