# afraz-dev-pro/afraz-kolkata architecture

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

- Interactive diagram: https://gitdiagram.com/afraz-dev-pro/afraz-kolkata
- Repository: https://github.com/afraz-dev-pro/afraz-kolkata

## Overview

Afraz Kolkata is an offline-first Kolkata discovery guide and day planner. A visitor explores curated places, food, markets, or transit listings, searches and filters the catalog, opens sourced details, then may save favorites or assemble and share a multi-stop itinerary. The app also provides locally persisted favorites and a selectable day/night theme. The graph follows the shown Expo Router screens and their data/state dependencies; unsampled backend and detail subfeatures are not connected without relationship evidence.

Main entry points: [`src/components/CatalogScreen.tsx`](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/components/CatalogScreen.tsx) (Catalog UI), [`src/data/kolkataCatalog.ts`](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/data/kolkataCatalog.ts) (Curated Catalog), [`app/places/[id].tsx`](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/places/%5Bid%5D.tsx) (Listing Details), [`src/theme/ThemeProvider.tsx`](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/theme/ThemeProvider.tsx) (Theme Provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_explore["Discovery"]
  node_home["Home<br/>[index.tsx]"]
  node_places["Places<br/>[places.tsx]"]
  node_food["Food<br/>[food.tsx]"]
  node_shopping["Shopping<br/>[shopping.tsx]"]
  node_routes["Transit Routes<br/>[routes.tsx]"]
  node_search["Search<br/>[search.tsx]"]
end

subgraph group_catalog["Catalog and Details"]
  node_catalog_screen["Catalog UI<br/>[CatalogScreen.tsx]"]
  node_catalog_data["Curated Catalog<br/>[kolkataCatalog.ts]"]
  node_details["Listing Details<br/>[&#91;id&#93;.tsx]"]
end

subgraph group_planning["Planning"]
  node_planner["Day Planner<br/>[planner.tsx]"]
end

subgraph group_state["Local State"]
  node_root["App Shell<br/>[_layout.tsx]"]
  node_favorites["Favorites"]
  node_theme["Theme Provider<br/>[ThemeProvider.tsx]"]
  node_palettes["Theme Palettes<br/>[colors.ts]"]
end

node_visitor(("Visitor"))
node_maps["Google Maps"]
node_share["Native Share Sheet"]
node_storage[("AsyncStorage")]

node_visitor -->|"opens"| node_home
node_home -->|"reads listings"| node_catalog_data
node_home -->|"reads saved items"| node_favorites
node_home -->|"switches theme"| node_theme
node_places -->|"renders"| node_catalog_screen
node_food -->|"renders"| node_catalog_screen
node_shopping -->|"renders"| node_catalog_screen
node_routes -->|"renders"| node_catalog_screen
node_places -->|"passes listings"| node_catalog_data
node_food -->|"passes listings"| node_catalog_data
node_shopping -->|"passes listings"| node_catalog_data
node_routes -->|"passes routes"| node_catalog_data
node_search -->|"searches catalog"| node_catalog_data
node_search -->|"renders results"| node_catalog_screen
node_catalog_screen -->|"uses item type"| node_catalog_data
node_catalog_screen -->|"toggles favorites"| node_favorites
node_catalog_screen -->|"reads colors"| node_theme
node_catalog_screen -->|"opens listing"| node_details
node_details -->|"finds listing"| node_catalog_data
node_details -->|"toggles favorite"| node_favorites
node_details -->|"reads colors"| node_theme
node_details -->|"adds stop"| node_planner
node_details -.->|"opens directions"| node_maps
node_planner -->|"finds stops"| node_catalog_data
node_planner -->|"opens stop"| node_details
node_planner -->|"shares itinerary"| node_share
node_root -->|"provides state"| node_favorites
node_root -->|"provides state"| node_theme
node_favorites -->|"reads and writes"| node_storage
node_theme -->|"reads and writes"| node_storage
node_theme -->|"selects palette"| node_palettes

click node_home "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/index.tsx"
click node_places "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/places.tsx"
click node_food "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/food.tsx"
click node_shopping "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/shopping.tsx"
click node_routes "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/routes.tsx"
click node_search "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/search.tsx"
click node_catalog_screen "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/components/CatalogScreen.tsx"
click node_catalog_data "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/data/kolkataCatalog.ts"
click node_details "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/places/%5Bid%5D.tsx"
click node_planner "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/planner.tsx"
click node_root "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/_layout.tsx"
click node_favorites "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/providers/FavoritesProvider.tsx"
click node_theme "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/theme/ThemeProvider.tsx"
click node_palettes "https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/theme/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_places,node_food,node_shopping,node_routes,node_search toneBlue
class node_catalog_screen,node_catalog_data,node_details,node_storage toneAmber
class node_planner toneMint
class node_root,node_favorites,node_theme,node_palettes toneRose
class node_visitor,node_maps,node_share toneIndigo
```

## Components

### Discovery

- [Home](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Places](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/places.tsx): `app/(tabs)/places.tsx`
- [Food](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/food.tsx): `app/(tabs)/food.tsx`
- [Shopping](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/shopping.tsx): `app/(tabs)/shopping.tsx`
- [Transit Routes](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/routes.tsx): `app/(tabs)/routes.tsx`
- [Search](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/search.tsx): `app/search.tsx`

### Catalog and Details

- [Catalog UI](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/components/CatalogScreen.tsx): `src/components/CatalogScreen.tsx`
- [Curated Catalog](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/data/kolkataCatalog.ts): `src/data/kolkataCatalog.ts`
- [Listing Details](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/places/%5Bid%5D.tsx): `app/places/[id].tsx`

### Planning

- [Day Planner](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/(tabs)/planner.tsx): `app/(tabs)/planner.tsx`

### Local State

- [App Shell](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Favorites](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/providers/FavoritesProvider.tsx): `src/providers/FavoritesProvider.tsx`
- [Theme Provider](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/theme/ThemeProvider.tsx): `src/theme/ThemeProvider.tsx`
- [Theme Palettes](https://github.com/afraz-dev-pro/afraz-kolkata/blob/main/src/theme/colors.ts): `src/theme/colors.ts`

### Other components

- **Visitor**
- **Google Maps**
- **Native Share Sheet**
- **AsyncStorage**

## Connections

- Visitor → Home: opens (evidence: `README.md`)
- Home → Curated Catalog: reads listings (evidence: `app/(tabs)/index.tsx`)
- Home → Favorites: reads saved items (evidence: `app/(tabs)/index.tsx`)
- Home → Theme Provider: switches theme (evidence: `app/(tabs)/index.tsx`)
- Places → Catalog UI: renders (evidence: `app/(tabs)/places.tsx`)
- Food → Catalog UI: renders (evidence: `app/(tabs)/food.tsx`)
- Shopping → Catalog UI: renders (evidence: `app/(tabs)/shopping.tsx`)
- Transit Routes → Catalog UI: renders (evidence: `app/(tabs)/routes.tsx`)
- Places → Curated Catalog: passes listings (evidence: `app/(tabs)/places.tsx`)
- Food → Curated Catalog: passes listings (evidence: `app/(tabs)/food.tsx`)
- Shopping → Curated Catalog: passes listings (evidence: `app/(tabs)/shopping.tsx`)
- Transit Routes → Curated Catalog: passes routes (evidence: `app/(tabs)/routes.tsx`)
- Search → Curated Catalog: searches catalog (evidence: `app/search.tsx`)
- Search → Catalog UI: renders results (evidence: `app/search.tsx`)
- Catalog UI → Curated Catalog: uses item type (evidence: `src/components/CatalogScreen.tsx`)
- Catalog UI → Favorites: toggles favorites (evidence: `src/components/CatalogScreen.tsx`)
- Catalog UI → Theme Provider: reads colors (evidence: `src/components/CatalogScreen.tsx`)
- Catalog UI → Listing Details: opens listing (evidence: `src/components/CatalogScreen.tsx`)
- Listing Details → Curated Catalog: finds listing (evidence: `app/places/[id].tsx`)
- Listing Details → Favorites: toggles favorite (evidence: `app/places/[id].tsx`)
- Listing Details → Theme Provider: reads colors (evidence: `app/places/[id].tsx`)
- Listing Details → Day Planner: adds stop (evidence: `app/places/[id].tsx`)
- Listing Details → Google Maps: opens directions (evidence: `README.md`)
- Day Planner → Curated Catalog: finds stops (evidence: `app/(tabs)/planner.tsx`)
- Day Planner → Listing Details: opens stop (evidence: `app/(tabs)/planner.tsx`)
- Day Planner → Native Share Sheet: shares itinerary (evidence: `app/(tabs)/planner.tsx`)
- App Shell → Favorites: provides state (evidence: `app/_layout.tsx`)
- App Shell → Theme Provider: provides state (evidence: `app/_layout.tsx`)
- Favorites → AsyncStorage: reads and writes (evidence: `src/providers/FavoritesProvider.tsx`)
- Theme Provider → AsyncStorage: reads and writes (evidence: `src/theme/ThemeProvider.tsx`)
- Theme Provider → Theme Palettes: selects palette (evidence: `src/theme/ThemeProvider.tsx`)
