# imartinezsoliz/ams_patrimonio architecture

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

- Interactive diagram: https://gitdiagram.com/imartinezsoliz/ams_patrimonio
- Repository: https://github.com/imartinezsoliz/ams_patrimonio

## Overview

La Ruta Blanca is a mobile-first heritage-tourism PWA. Visitors explore Sucre’s museums, heritage facts, and themed routes; inspect stops on maps; scan location QR codes to discover collectible cards and earn points; then view their collection and progress. The app also supports QR deep links and Supabase-backed data with a demo-data fallback. The graph reflects README capabilities and shown imports/calls; unsampled view implementations are represented by their exact paths, with relationships omitted where evidence was unavailable.

Main entry points: [`src/App.vue`](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/App.vue) (App shell), [`src/views/EscanerView.vue`](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/EscanerView.vue) (QR scanner), [`src/services/api.js`](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/api.js) (Data and scan API), [`src/data/mockData.js`](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/data/mockData.js) (Heritage catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_app["App shell<br/>[App.vue]"]
  node_entry["Vue entry<br/>[main.js]"]
  node_navigation["Bottom navigation<br/>[BottomNav.vue]"]
  node_header["Points header<br/>[HeaderNav.vue]"]
end

subgraph group_heritage["Heritage discovery"]
  node_explore["Explore view<br/>[ExplorarView.vue]"]
  node_routesmap["Routes and museums<br/>[MapaRutasView.vue]"]
  node_map["Map view<br/>[MapaView.vue]"]
  node_routeinfo["Route details"]
  node_museuminfo["Museum details"]
  node_catalog["Heritage catalog<br/>[mockData.js]"]
end

subgraph group_gameplay["Scanning and collection"]
  node_scanner["QR scanner<br/>[EscanerView.vue]"]
  node_qrmodal["QR generator"]
  node_collection["Card collection<br/>[ColeccionView.vue]"]
  node_cardmodal["Card details"]
end

subgraph group_platform["Data and integration"]
  node_links["QR deep links<br/>[deeplink.js]"]
  node_hydrate["Backend hydration<br/>[hydrate.js]"]
  node_api["Data and scan API<br/>[api.js]"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
  node_supabase[("Supabase backend")]
end

node_visitor(("Visitor"))
node_camera["Device camera"]
node_geolocation["Device location"]

node_visitor -->|"uses"| node_app
node_entry -->|"mounts"| node_app
node_entry -->|"loads data"| node_hydrate
node_entry -->|"captures token"| node_links
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_header
node_app -->|"selects view"| node_explore
node_app -.->|"selects view"| node_routesmap
node_app -->|"selects view"| node_map
node_app -->|"selects view"| node_scanner
node_app -->|"selects view"| node_collection
node_app -->|"shows unlock"| node_cardmodal
node_app -->|"renders"| node_qrmodal
node_explore -->|"opens"| node_routeinfo
node_explore -->|"opens"| node_museuminfo
node_explore -->|"reads catalog"| node_catalog
node_routesmap -->|"opens"| node_routeinfo
node_routesmap -->|"reads catalog"| node_catalog
node_map -->|"reads catalog"| node_catalog
node_scanner -->|"reads frames"| node_camera
node_scanner -->|"gets coordinates"| node_geolocation
node_scanner -->|"redeems scan"| node_api
node_scanner -->|"consumes token"| node_links
node_scanner -->|"emits result"| node_app
node_collection -->|"opens details"| node_cardmodal
node_hydrate -->|"loads records"| node_api
node_hydrate -->|"replaces data"| node_catalog
node_links -->|"extracts token"| node_api
node_api -->|"uses client"| node_supabaseclient
node_api -->|"uses demo data"| node_catalog
node_supabaseclient -.->|"connects"| node_supabase

click node_app "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/App.vue"
click node_entry "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/main.js"
click node_navigation "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/BottomNav.vue"
click node_header "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/HeaderNav.vue"
click node_explore "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/ExplorarView.vue"
click node_routesmap "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/MapaRutasView.vue"
click node_map "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/MapaView.vue"
click node_routeinfo "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/RutaDetalleModal.vue"
click node_museuminfo "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/MuseoDetalleModal.vue"
click node_catalog "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/data/mockData.js"
click node_scanner "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/EscanerView.vue"
click node_qrmodal "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/QrGeneradorModal.vue"
click node_collection "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/ColeccionView.vue"
click node_cardmodal "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/CardDetailModal.vue"
click node_links "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/deeplink.js"
click node_hydrate "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/hydrate.js"
click node_api "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/api.js"
click node_supabaseclient "https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/lib/supabase.js"

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_app,node_entry,node_navigation,node_header toneBlue
class node_explore,node_routesmap,node_map,node_routeinfo,node_museuminfo,node_catalog toneAmber
class node_scanner,node_qrmodal,node_collection,node_cardmodal toneMint
class node_links,node_hydrate,node_api,node_supabaseclient,node_supabase toneRose
class node_visitor,node_camera,node_geolocation toneIndigo
```

## Components

### Visitor experience

- [App shell](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/App.vue): `src/App.vue`
- [Vue entry](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/main.js): `src/main.js`
- [Bottom navigation](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/BottomNav.vue): `src/components/BottomNav.vue`
- [Points header](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/HeaderNav.vue): `src/components/HeaderNav.vue`

### Heritage discovery

- [Explore view](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/ExplorarView.vue): `src/views/ExplorarView.vue`
- [Routes and museums](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/MapaRutasView.vue): `src/views/MapaRutasView.vue`
- [Map view](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/MapaView.vue): `src/views/MapaView.vue`
- [Route details](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/RutaDetalleModal.vue): `src/components/RutaDetalleModal.vue`
- [Museum details](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/MuseoDetalleModal.vue): `src/components/MuseoDetalleModal.vue`
- [Heritage catalog](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/data/mockData.js): `src/data/mockData.js`

### Scanning and collection

- [QR scanner](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/EscanerView.vue): `src/views/EscanerView.vue`
- [QR generator](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/QrGeneradorModal.vue): `src/components/QrGeneradorModal.vue`
- [Card collection](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/views/ColeccionView.vue): `src/views/ColeccionView.vue`
- [Card details](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/components/CardDetailModal.vue): `src/components/CardDetailModal.vue`

### Data and integration

- [QR deep links](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/deeplink.js): `src/services/deeplink.js`
- [Backend hydration](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/hydrate.js): `src/services/hydrate.js`
- [Data and scan API](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/services/api.js): `src/services/api.js`
- [Supabase client](https://github.com/imartinezsoliz/ams_patrimonio/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- **Supabase backend**

### Other components

- **Visitor**
- **Device camera**
- **Device location**

## Connections

- Visitor → App shell: uses (evidence: `README.md`)
- Vue entry → App shell: mounts (evidence: `src/main.js`)
- Vue entry → Backend hydration: loads data (evidence: `src/main.js`)
- Vue entry → QR deep links: captures token (evidence: `src/main.js`)
- App shell → Bottom navigation: renders (evidence: `src/App.vue`)
- App shell → Points header: renders (evidence: `src/App.vue`)
- App shell → Explore view: selects view (evidence: `src/App.vue`)
- App shell → Routes and museums: selects view
- App shell → Map view: selects view (evidence: `src/App.vue`)
- App shell → QR scanner: selects view (evidence: `src/App.vue`)
- App shell → Card collection: selects view (evidence: `src/App.vue`)
- App shell → Card details: shows unlock (evidence: `src/App.vue`)
- App shell → QR generator: renders (evidence: `src/App.vue`)
- Explore view → Route details: opens (evidence: `src/views/ExplorarView.vue`)
- Explore view → Museum details: opens (evidence: `src/views/ExplorarView.vue`)
- Explore view → Heritage catalog: reads catalog (evidence: `src/views/ExplorarView.vue`)
- Routes and museums → Route details: opens (evidence: `src/views/MapaRutasView.vue`)
- Routes and museums → Heritage catalog: reads catalog (evidence: `src/views/MapaRutasView.vue`)
- Map view → Heritage catalog: reads catalog (evidence: `src/views/MapaView.vue`)
- QR scanner → Device camera: reads frames (evidence: `src/views/EscanerView.vue`)
- QR scanner → Device location: gets coordinates (evidence: `src/views/EscanerView.vue`)
- QR scanner → Data and scan API: redeems scan (evidence: `src/views/EscanerView.vue`)
- QR scanner → QR deep links: consumes token (evidence: `src/views/EscanerView.vue`)
- QR scanner → App shell: emits result (evidence: `src/views/EscanerView.vue`)
- Card collection → Card details: opens details (evidence: `src/views/ColeccionView.vue`)
- Backend hydration → Data and scan API: loads records (evidence: `src/services/hydrate.js`)
- Backend hydration → Heritage catalog: replaces data (evidence: `src/services/hydrate.js`)
- QR deep links → Data and scan API: extracts token (evidence: `src/services/deeplink.js`)
- Data and scan API → Supabase client: uses client (evidence: `src/services/api.js`)
- Data and scan API → Heritage catalog: uses demo data (evidence: `src/services/api.js`)
- Supabase client → Supabase backend: connects
