# uniquead/manga-map-store architecture

> Architecture diagram of the GitHub repository uniquead/manga-map-store, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uniquead/manga-map-store
- Repository: https://github.com/uniquead/manga-map-store

## Overview

MangaMap is a directory for discovering physical manga, light-novel, used-book, and merchandise shops. Visitors start at the destination-focused home page, then explore searchable and filterable listings on a map, open shop details, or submit a listing. The API keeps listings in an in-memory array, serves published shops, accepts submissions as pending, and supports moderation. The map uses OpenStreetMap tiles. Storage is process-local rather than a persistent database; source excerpts show the route calls and UI interactions, while the README documents the broader product capabilities.

Main entry points: [`app/api/shops/route.ts`](https://github.com/uniquead/manga-map-store/blob/main/app/api/shops/route.ts) (Shop API), [`app/explore/page.tsx`](https://github.com/uniquead/manga-map-store/blob/main/app/explore/page.tsx) (Search and filters), [`components/Nav.tsx`](https://github.com/uniquead/manga-map-store/blob/main/components/Nav.tsx) (Site navigation), [`app/page.tsx`](https://github.com/uniquead/manga-map-store/blob/main/app/page.tsx) (Welcome and destinations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Shop discovery"]
  node_home["Welcome and destinations<br/>[page.tsx]"]
  node_explore["Search and filters<br/>[page.tsx]"]
  node_map["Shop map<br/>[ShopMap.tsx]"]
  node_details["Shop details<br/>[page.tsx]"]
end

subgraph group_directory["Directory services"]
  node_shops_api["Shop API<br/>[route.ts]"]
  node_shop_state[("In-memory listings<br/>[route.ts]")]
end

subgraph group_community["Community and moderation"]
  node_submit["Shop submission<br/>[page.tsx]"]
  node_moderation["Submission moderation<br/>[page.tsx]"]
end

subgraph group_shared["Shared interface"]
  node_nav["Site navigation<br/>[Nav.tsx]"]
end

node_visitor(("Reader"))
node_osm["OpenStreetMap tiles"]

node_visitor -->|"opens"| node_home
node_home -->|"links to"| node_explore
node_home -->|"links to"| node_submit
node_visitor -->|"searches listings"| node_explore
node_explore -->|"fetches listings"| node_shops_api
node_shops_api -->|"reads listings"| node_shop_state
node_shops_api -->|"returns published shops"| node_explore
node_explore -->|"renders filtered shops"| node_map
node_map -->|"loads map tiles"| node_osm
node_explore -->|"opens listing"| node_details
node_details -->|"fetches listings"| node_shops_api
node_submit -->|"posts submission"| node_shops_api
node_shops_api -->|"adds pending listing"| node_shop_state
node_moderation -->|"loads and updates status"| node_shops_api
node_shops_api -->|"updates status"| node_shop_state
node_visitor -->|"reviews submissions"| node_moderation
node_nav -->|"links to"| node_explore
node_nav -->|"links to"| node_submit
node_nav -->|"links to"| node_moderation
node_details -->|"links to directions"| node_osm

click node_home "https://github.com/uniquead/manga-map-store/blob/main/app/page.tsx"
click node_explore "https://github.com/uniquead/manga-map-store/blob/main/app/explore/page.tsx"
click node_map "https://github.com/uniquead/manga-map-store/blob/main/components/ShopMap.tsx"
click node_details "https://github.com/uniquead/manga-map-store/blob/main/app/shop/%5Bid%5D/page.tsx"
click node_shops_api "https://github.com/uniquead/manga-map-store/blob/main/app/api/shops/route.ts"
click node_shop_state "https://github.com/uniquead/manga-map-store/blob/main/app/api/shops/route.ts"
click node_submit "https://github.com/uniquead/manga-map-store/blob/main/app/submit/page.tsx"
click node_moderation "https://github.com/uniquead/manga-map-store/blob/main/app/admin/page.tsx"
click node_nav "https://github.com/uniquead/manga-map-store/blob/main/components/Nav.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_home,node_explore,node_map,node_details toneBlue
class node_shops_api,node_shop_state toneAmber
class node_submit,node_moderation toneMint
class node_nav toneRose
class node_visitor,node_osm toneIndigo
```

## Components

### Shop discovery

- [Welcome and destinations](https://github.com/uniquead/manga-map-store/blob/main/app/page.tsx): `app/page.tsx`
- [Search and filters](https://github.com/uniquead/manga-map-store/blob/main/app/explore/page.tsx): `app/explore/page.tsx`
- [Shop map](https://github.com/uniquead/manga-map-store/blob/main/components/ShopMap.tsx): `components/ShopMap.tsx`
- [Shop details](https://github.com/uniquead/manga-map-store/blob/main/app/shop/%5Bid%5D/page.tsx): `app/shop/[id]/page.tsx`

### Directory services

- [Shop API](https://github.com/uniquead/manga-map-store/blob/main/app/api/shops/route.ts): `app/api/shops/route.ts`
- [In-memory listings](https://github.com/uniquead/manga-map-store/blob/main/app/api/shops/route.ts): `app/api/shops/route.ts`

### Community and moderation

- [Shop submission](https://github.com/uniquead/manga-map-store/blob/main/app/submit/page.tsx): `app/submit/page.tsx`
- [Submission moderation](https://github.com/uniquead/manga-map-store/blob/main/app/admin/page.tsx): `app/admin/page.tsx`

### Shared interface

- [Site navigation](https://github.com/uniquead/manga-map-store/blob/main/components/Nav.tsx): `components/Nav.tsx`

### Other components

- **Reader**
- **OpenStreetMap tiles**

## Connections

- Reader → Welcome and destinations: opens (evidence: `README.md`)
- Welcome and destinations → Search and filters: links to (evidence: `app/page.tsx`)
- Welcome and destinations → Shop submission: links to (evidence: `app/page.tsx`)
- Reader → Search and filters: searches listings (evidence: `README.md`)
- Search and filters → Shop API: fetches listings (evidence: `app/explore/page.tsx`)
- Shop API → In-memory listings: reads listings (evidence: `app/api/shops/route.ts`)
- Shop API → Search and filters: returns published shops (evidence: `app/explore/page.tsx`)
- Search and filters → Shop map: renders filtered shops (evidence: `app/explore/page.tsx`)
- Shop map → OpenStreetMap tiles: loads map tiles (evidence: `components/ShopMap.tsx`)
- Search and filters → Shop details: opens listing (evidence: `app/explore/page.tsx`)
- Shop details → Shop API: fetches listings (evidence: `app/shop/[id]/page.tsx`)
- Shop submission → Shop API: posts submission (evidence: `app/submit/page.tsx`)
- Shop API → In-memory listings: adds pending listing (evidence: `app/api/shops/route.ts`)
- Submission moderation → Shop API: loads and updates status (evidence: `app/admin/page.tsx`)
- Shop API → In-memory listings: updates status (evidence: `app/api/shops/route.ts`)
- Reader → Submission moderation: reviews submissions (evidence: `README.md`)
- Site navigation → Search and filters: links to (evidence: `components/Nav.tsx`)
- Site navigation → Shop submission: links to (evidence: `components/Nav.tsx`)
- Site navigation → Submission moderation: links to (evidence: `components/Nav.tsx`)
- Shop details → OpenStreetMap tiles: links to directions (evidence: `app/shop/[id]/page.tsx`)
