# aflores14/dm-uner architecture

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

- Interactive diagram: https://gitdiagram.com/aflores14/dm-uner
- Repository: https://github.com/aflores14/dm-uner

## Overview

Mi Ciudad is an Expo mobile guide to Colón. Visitors browse and search attractions, view place details, explore a map, plan routes, and see events; signed-in users can manage favorites and recorded visits. Location services support proximity alerts and navigation, while audio guides enrich place details. The service layer combines remote requests with SQLite caching and mock-data fallbacks. Relationships below rely on README statements and the supplied source excerpts or index references; unsampled implementation details are not inferred.

Main entry points: [`src/servicios/lugares.ts`](https://github.com/aflores14/dm-uner/blob/main/src/servicios/lugares.ts) (Place Service), [`app/(tabs)/index.tsx`](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/index.tsx) (Place Browser), [`src/contexto/AuthContext.tsx`](https://github.com/aflores14/dm-uner/blob/main/src/contexto/AuthContext.tsx) (Authentication Context), [`app/(tabs)/recorrido.tsx`](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/recorrido.tsx) (Route Planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and Events"]
  node_home["Place Browser<br/>[index.tsx]"]
  node_placecard["Place Card<br/>[TarjetaLugar.tsx]"]
  node_detail["Place Details<br/>[&#91;id&#93;.tsx]"]
  node_agenda["Event Agenda<br/>[agenda.tsx]"]
  node_audio["Audio Player"]
end

subgraph group_exploration["Map and Navigation"]
  node_maptab["Map Screen<br/>[mapa.tsx]"]
  node_map["Interactive Map"]
  node_compass["Destination Compass<br/>[BrujulaDestino.tsx]"]
  node_route["Route Planner<br/>[recorrido.tsx]"]
  node_geo["Location Utilities<br/>[geolocalizacion.ts]"]
end

subgraph group_account["Account and Activity"]
  node_profile["Profile<br/>[perfil.tsx]"]
  node_auth["Authentication Context<br/>[AuthContext.tsx]"]
end

subgraph group_services["Services and Data"]
  node_types["Domain Types<br/>[index.ts]"]
  node_places["Place Service<br/>[lugares.ts]"]
  node_events["Event Service<br/>[eventos.ts]"]
  node_audio_service["Audio Guide Service<br/>[audioguias.ts]"]
  node_visits["Visit Service<br/>[visitas.ts]"]
  node_favorites["Favorites Service<br/>[favoritos.ts]"]
  node_notifications["Notifications<br/>[notificaciones.ts]"]
  node_client["HTTP Client<br/>[cliente.ts]"]
  node_database[("Local SQLite<br/>[database.ts]")]
  node_place_mocks["Place Mock Data<br/>[lugaresMock.ts]"]
  node_event_mocks["Event Mock Data<br/>[eventosMock.ts]"]
end

node_visitor(("Visitor"))
node_mapsapp["Maps App"]
node_api["Tourism API"]
node_os_notifications["Device Notifications"]

node_visitor -->|"browses"| node_home
node_visitor -->|"views events"| node_agenda
node_visitor -->|"opens map"| node_maptab
node_visitor -->|"plans route"| node_route
node_visitor -->|"opens profile"| node_profile
node_home -->|"loads places"| node_places
node_home -->|"gets location"| node_geo
node_home -->|"alerts nearby"| node_notifications
node_home -->|"reads favorites"| node_auth
node_home -->|"renders cards"| node_placecard
node_detail -->|"loads place"| node_places
node_detail -->|"toggles favorite"| node_auth
node_detail -->|"shows guide"| node_audio
node_agenda -->|"loads events"| node_events
node_agenda -->|"loads places"| node_places
node_agenda -->|"schedules alerts"| node_notifications
node_maptab -->|"renders map"| node_map
node_map -->|"tracks location"| node_geo
node_map -->|"shows direction"| node_compass
node_map -->|"opens directions"| node_mapsapp
node_route -->|"loads places"| node_places
node_route -->|"records visits"| node_visits
node_route -->|"gets location"| node_geo
node_route -->|"reads account"| node_auth
node_profile -->|"manages account"| node_auth
node_profile -->|"loads places"| node_places
node_profile -->|"manages alerts"| node_notifications
node_audio -->|"loads audio"| node_audio_service
node_auth -->|"authenticates remotely"| node_client
node_auth -->|"loads favorites"| node_database
node_places -->|"requests data"| node_client
node_places -->|"caches places"| node_database
node_places -->|"falls back"| node_place_mocks
node_events -->|"requests events"| node_client
node_events -->|"falls back"| node_event_mocks
node_visits -->|"stores visits"| node_database
node_favorites -->|"stores favorites"| node_database
node_notifications -->|"schedules alerts"| node_os_notifications
node_client -->|"sends requests"| node_api

click node_home "https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/index.tsx"
click node_placecard "https://github.com/aflores14/dm-uner/blob/main/src/componentes/TarjetaLugar.tsx"
click node_detail "https://github.com/aflores14/dm-uner/blob/main/app/lugar/%5Bid%5D.tsx"
click node_agenda "https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/agenda.tsx"
click node_maptab "https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/mapa.tsx"
click node_map "https://github.com/aflores14/dm-uner/blob/main/src/componentes/MapaInteractivo.tsx"
click node_compass "https://github.com/aflores14/dm-uner/blob/main/src/componentes/BrujulaDestino.tsx"
click node_route "https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/recorrido.tsx"
click node_geo "https://github.com/aflores14/dm-uner/blob/main/src/utilidades/geolocalizacion.ts"
click node_profile "https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/perfil.tsx"
click node_auth "https://github.com/aflores14/dm-uner/blob/main/src/contexto/AuthContext.tsx"
click node_audio "https://github.com/aflores14/dm-uner/blob/main/src/componentes/ReproductorAudioguia.tsx"
click node_types "https://github.com/aflores14/dm-uner/blob/main/src/tipos/index.ts"
click node_places "https://github.com/aflores14/dm-uner/blob/main/src/servicios/lugares.ts"
click node_events "https://github.com/aflores14/dm-uner/blob/main/src/servicios/eventos.ts"
click node_audio_service "https://github.com/aflores14/dm-uner/blob/main/src/servicios/audioguias.ts"
click node_visits "https://github.com/aflores14/dm-uner/blob/main/src/servicios/visitas.ts"
click node_favorites "https://github.com/aflores14/dm-uner/blob/main/src/servicios/favoritos.ts"
click node_notifications "https://github.com/aflores14/dm-uner/blob/main/src/servicios/notificaciones.ts"
click node_client "https://github.com/aflores14/dm-uner/blob/main/src/servicios/cliente.ts"
click node_database "https://github.com/aflores14/dm-uner/blob/main/src/servicios/database.ts"
click node_place_mocks "https://github.com/aflores14/dm-uner/blob/main/src/mocks/lugaresMock.ts"
click node_event_mocks "https://github.com/aflores14/dm-uner/blob/main/src/mocks/eventosMock.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_placecard,node_detail,node_agenda,node_audio toneBlue
class node_maptab,node_map,node_compass,node_route,node_geo toneAmber
class node_profile,node_auth,node_api toneMint
class node_types,node_places,node_events,node_audio_service,node_visits,node_favorites,node_notifications,node_client,node_database,node_place_mocks,node_event_mocks toneRose
class node_visitor,node_mapsapp,node_os_notifications toneIndigo
```

## Components

### Discovery and Events

- [Place Browser](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Place Card](https://github.com/aflores14/dm-uner/blob/main/src/componentes/TarjetaLugar.tsx): `src/componentes/TarjetaLugar.tsx`
- [Place Details](https://github.com/aflores14/dm-uner/blob/main/app/lugar/%5Bid%5D.tsx): `app/lugar/[id].tsx`
- [Event Agenda](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/agenda.tsx): `app/(tabs)/agenda.tsx`
- [Audio Player](https://github.com/aflores14/dm-uner/blob/main/src/componentes/ReproductorAudioguia.tsx): `src/componentes/ReproductorAudioguia.tsx`

### Map and Navigation

- [Map Screen](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/mapa.tsx): `app/(tabs)/mapa.tsx`
- [Interactive Map](https://github.com/aflores14/dm-uner/blob/main/src/componentes/MapaInteractivo.tsx): `src/componentes/MapaInteractivo.tsx`
- [Destination Compass](https://github.com/aflores14/dm-uner/blob/main/src/componentes/BrujulaDestino.tsx): `src/componentes/BrujulaDestino.tsx`
- [Route Planner](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/recorrido.tsx): `app/(tabs)/recorrido.tsx`
- [Location Utilities](https://github.com/aflores14/dm-uner/blob/main/src/utilidades/geolocalizacion.ts): `src/utilidades/geolocalizacion.ts`

### Account and Activity

- [Profile](https://github.com/aflores14/dm-uner/blob/main/app/(tabs)/perfil.tsx): `app/(tabs)/perfil.tsx`
- [Authentication Context](https://github.com/aflores14/dm-uner/blob/main/src/contexto/AuthContext.tsx): `src/contexto/AuthContext.tsx`

### Services and Data

- [Domain Types](https://github.com/aflores14/dm-uner/blob/main/src/tipos/index.ts): `src/tipos/index.ts`
- [Place Service](https://github.com/aflores14/dm-uner/blob/main/src/servicios/lugares.ts): `src/servicios/lugares.ts`
- [Event Service](https://github.com/aflores14/dm-uner/blob/main/src/servicios/eventos.ts): `src/servicios/eventos.ts`
- [Audio Guide Service](https://github.com/aflores14/dm-uner/blob/main/src/servicios/audioguias.ts): `src/servicios/audioguias.ts`
- [Visit Service](https://github.com/aflores14/dm-uner/blob/main/src/servicios/visitas.ts): `src/servicios/visitas.ts`
- [Favorites Service](https://github.com/aflores14/dm-uner/blob/main/src/servicios/favoritos.ts): `src/servicios/favoritos.ts`
- [Notifications](https://github.com/aflores14/dm-uner/blob/main/src/servicios/notificaciones.ts): `src/servicios/notificaciones.ts`
- [HTTP Client](https://github.com/aflores14/dm-uner/blob/main/src/servicios/cliente.ts): `src/servicios/cliente.ts`
- [Local SQLite](https://github.com/aflores14/dm-uner/blob/main/src/servicios/database.ts): `src/servicios/database.ts`
- [Place Mock Data](https://github.com/aflores14/dm-uner/blob/main/src/mocks/lugaresMock.ts): `src/mocks/lugaresMock.ts`
- [Event Mock Data](https://github.com/aflores14/dm-uner/blob/main/src/mocks/eventosMock.ts): `src/mocks/eventosMock.ts`

### Other components

- **Visitor**
- **Maps App**
- **Tourism API**
- **Device Notifications**

## Connections

- Visitor → Place Browser: browses (evidence: `README.md`)
- Visitor → Event Agenda: views events (evidence: `README.md`)
- Visitor → Map Screen: opens map
- Visitor → Route Planner: plans route
- Visitor → Profile: opens profile
- Place Browser → Place Service: loads places (evidence: `app/(tabs)/index.tsx`)
- Place Browser → Location Utilities: gets location (evidence: `app/(tabs)/index.tsx`)
- Place Browser → Notifications: alerts nearby (evidence: `app/(tabs)/index.tsx`)
- Place Browser → Authentication Context: reads favorites (evidence: `app/(tabs)/index.tsx`)
- Place Browser → Place Card: renders cards (evidence: `app/(tabs)/index.tsx`)
- Place Details → Place Service: loads place (evidence: `app/lugar/[id].tsx`)
- Place Details → Authentication Context: toggles favorite (evidence: `app/lugar/[id].tsx`)
- Place Details → Audio Player: shows guide (evidence: `app/lugar/[id].tsx`)
- Event Agenda → Event Service: loads events (evidence: `app/(tabs)/agenda.tsx`)
- Event Agenda → Place Service: loads places (evidence: `app/(tabs)/agenda.tsx`)
- Event Agenda → Notifications: schedules alerts (evidence: `app/(tabs)/agenda.tsx`)
- Map Screen → Interactive Map: renders map (evidence: `app/(tabs)/mapa.tsx`)
- Interactive Map → Location Utilities: tracks location (evidence: `src/componentes/MapaInteractivo.tsx`)
- Interactive Map → Destination Compass: shows direction (evidence: `src/componentes/MapaInteractivo.tsx`)
- Interactive Map → Maps App: opens directions
- Route Planner → Place Service: loads places (evidence: `app/(tabs)/recorrido.tsx`)
- Route Planner → Visit Service: records visits (evidence: `app/(tabs)/recorrido.tsx`)
- Route Planner → Location Utilities: gets location (evidence: `app/(tabs)/recorrido.tsx`)
- Route Planner → Authentication Context: reads account (evidence: `app/(tabs)/recorrido.tsx`)
- Profile → Authentication Context: manages account (evidence: `app/(tabs)/perfil.tsx`)
- Profile → Place Service: loads places (evidence: `app/(tabs)/perfil.tsx`)
- Profile → Notifications: manages alerts (evidence: `app/(tabs)/perfil.tsx`)
- Audio Player → Audio Guide Service: loads audio (evidence: `src/componentes/ReproductorAudioguia.tsx`)
- Authentication Context → HTTP Client: authenticates remotely (evidence: `src/contexto/AuthContext.tsx`)
- Authentication Context → Local SQLite: loads favorites (evidence: `src/contexto/AuthContext.tsx`)
- Place Service → HTTP Client: requests data (evidence: `src/servicios/lugares.ts`)
- Place Service → Local SQLite: caches places (evidence: `src/servicios/lugares.ts`)
- Place Service → Place Mock Data: falls back (evidence: `src/servicios/lugares.ts`)
- Event Service → HTTP Client: requests events (evidence: `src/servicios/eventos.ts`)
- Event Service → Event Mock Data: falls back (evidence: `src/servicios/eventos.ts`)
- Visit Service → Local SQLite: stores visits (evidence: `src/servicios/visitas.ts`)
- Favorites Service → Local SQLite: stores favorites (evidence: `src/servicios/favoritos.ts`)
- Notifications → Device Notifications: schedules alerts (evidence: `src/servicios/notificaciones.ts`)
- HTTP Client → Tourism API: sends requests (evidence: `src/servicios/cliente.ts`)
