# bagpotato/mapa-interactivo-cataluna architecture

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

- Interactive diagram: https://gitdiagram.com/bagpotato/mapa-interactivo-cataluna
- Repository: https://github.com/bagpotato/mapa-interactivo-cataluna

## Overview

Coneix Cat is a client-rendered interactive map for exploring places across Catalonia, Mallorca, and Menorca. A visitor opens the map, filters or searches destinations and can change the regional view; selecting a place opens its detail panel, which includes seasonal guidance, images, and links for directions and further reading. The sampled map component owns these interactions and reads its destination records from a separate catalog. External map tiles and image lookups are visible in the excerpt; other source files were not inspected, so the graph avoids inferring additional subsystems.

Main entry points: [`nextjs_space/components/catalonia-map.tsx`](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx) (Interactive map), [`nextjs_space/app/page.tsx`](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/app/page.tsx) (Map page), [`nextjs_space/components/pois.ts`](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/pois.ts) (POI catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_page["Map page<br/>[page.tsx]"]
end

subgraph group_explore["Map exploration"]
  node_mapview["Interactive map<br/>[catalonia-map.tsx]"]
  node_discovery["Search and filters<br/>[catalonia-map.tsx]"]
  node_region["Region navigation<br/>[catalonia-map.tsx]"]
  node_details["Place details<br/>[catalonia-map.tsx]"]
end

subgraph group_places["Places and integrations"]
  node_catalog["POI catalog<br/>[pois.ts]"]
  node_tiles["Carto map tiles"]
  node_wiki["Wikipedia images"]
  node_directions["Google Maps directions"]
  node_wikipedia["Wikipedia articles"]
end

node_visitor(("Map visitor"))

node_visitor -->|"opens"| node_page
node_page -->|"loads dynamically"| node_mapview
node_mapview -->|"reads places"| node_catalog
node_mapview -->|"renders"| node_discovery
node_mapview -->|"renders"| node_region
node_mapview -->|"opens place"| node_details
node_mapview -->|"loads tiles"| node_tiles
node_details -->|"fetches images"| node_wiki
node_details -->|"links directions"| node_directions
node_details -->|"links article"| node_wikipedia

click node_page "https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/app/page.tsx"
click node_mapview "https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx"
click node_discovery "https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx"
click node_region "https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx"
click node_details "https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx"
click node_catalog "https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/pois.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_page toneBlue
class node_mapview,node_discovery,node_region,node_details toneAmber
class node_catalog,node_tiles,node_wiki,node_directions,node_wikipedia toneMint
class node_visitor toneIndigo
```

## Components

### Application entry

- [Map page](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/app/page.tsx): `nextjs_space/app/page.tsx`

### Map exploration

- [Interactive map](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx): `nextjs_space/components/catalonia-map.tsx`
- [Search and filters](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx): `nextjs_space/components/catalonia-map.tsx`
- [Region navigation](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx): `nextjs_space/components/catalonia-map.tsx`
- [Place details](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/catalonia-map.tsx): `nextjs_space/components/catalonia-map.tsx`

### Places and integrations

- [POI catalog](https://github.com/bagpotato/mapa-interactivo-cataluna/blob/main/nextjs_space/components/pois.ts): `nextjs_space/components/pois.ts`
- **Carto map tiles**
- **Wikipedia images**
- **Google Maps directions**
- **Wikipedia articles**

### Other components

- **Map visitor**

## Connections

- Map visitor → Map page: opens
- Map page → Interactive map: loads dynamically (evidence: `nextjs_space/app/page.tsx`)
- Interactive map → POI catalog: reads places (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Interactive map → Search and filters: renders (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Interactive map → Region navigation: renders (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Interactive map → Place details: opens place (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Interactive map → Carto map tiles: loads tiles (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Place details → Wikipedia images: fetches images (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Place details → Google Maps directions: links directions (evidence: `nextjs_space/components/catalonia-map.tsx`)
- Place details → Wikipedia articles: links article (evidence: `nextjs_space/components/catalonia-map.tsx`)
