# lianeheidemann/cirioapp_v2 architecture

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

- Interactive diagram: https://gitdiagram.com/lianeheidemann/cirioapp_v2
- Repository: https://github.com/lianeheidemann/cirioapp_v2

## Overview

CírioApp is a Flutter guide to the Círio de Nazaré. The main user flow runs from feature screens through providers to data access and results; major branches cover events, map and places, news, notifications, favorites, and the AI assistant. The README documents these capabilities and the broad provider/repository/service architecture; source excerpts were limited to Android build files, so uncertain internal call wiring is omitted.

Main entry points: [`lib/app.dart`](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/app.dart) (Flutter app), [`lib/features/map/map_provider.dart`](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/map/map_provider.dart) (Map state), [`lib/data/repositories/ai_assistant_repository.dart`](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/ai_assistant_repository.dart) (Assistant data access), [`lib/features/favorites/favorites_provider.dart`](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/favorites/favorites_provider.dart) (Favorites)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App experience"]
  node_app["Flutter app<br/>[app.dart]"]
  node_home["Home<br/>[home_screen.dart]"]
  node_language["Language settings<br/>[app_language.dart]"]
  node_favorites["Favorites"]
  node_favorite_store[("Favorites storage")]
end

subgraph group_content["Event and place content"]
  node_events["Event schedule<br/>[events_screen.dart]"]
  node_event_state["Event state"]
  node_event_data["Event data access"]
  node_map["Map and places<br/>[map_screen.dart]"]
  node_map_state["Map state<br/>[map_provider.dart]"]
  node_place_state["Place state"]
  node_place_data["Place data access"]
  node_location["Location service"]
end

subgraph group_updates["News and notifications"]
  node_news["Editorial news<br/>[news_screen.dart]"]
  node_news_state["News state<br/>[news_provider.dart]"]
  node_news_data["News data access"]
  node_notifications["Notification history"]
  node_notification_service["Push notification service"]
end

subgraph group_assistant["AI assistant"]
  node_assistant["AI assistant"]
  node_assistant_state["Assistant state"]
  node_assistant_data["Assistant data access"]
  node_semantic["Semantic retrieval"]
  node_gemini["Gemini service"]
end

node_user(("Resident or pilgrim"))
node_osm["OpenStreetMap"]
node_firestore[("Cloud Firestore")]
node_fcm["Firebase Cloud Messaging"]
node_gemini_api["Gemini API"]

node_user -->|"opens"| node_app
node_app -->|"shows"| node_home
node_user -->|"browses"| node_events
node_events -->|"requests events"| node_event_state
node_event_state -->|"loads schedule"| node_event_data
node_user -->|"explores places"| node_map
node_map -->|"requests map data"| node_map_state
node_map_state -->|"gets location"| node_location
node_location -->|"uses map data"| node_osm
node_map_state -->|"loads places"| node_place_state
node_place_state -->|"loads places"| node_place_data
node_user -->|"reads news"| node_news
node_news -->|"requests articles"| node_news_state
node_news_state -->|"loads articles"| node_news_data
node_news_data -->|"reads news"| node_firestore
node_user -->|"views alerts"| node_notifications
node_notifications -->|"manages push"| node_notification_service
node_notification_service -->|"receives updates"| node_fcm
node_user -->|"saves items"| node_favorites
node_favorites -->|"persists favorites"| node_favorite_store
node_user -->|"asks question"| node_assistant
node_assistant -->|"submits question"| node_assistant_state
node_assistant_state -->|"requests answer"| node_assistant_data
node_assistant_data -->|"retrieves context"| node_semantic
node_assistant_data -->|"requests response"| node_gemini
node_gemini -->|"generates answer"| node_gemini_api
node_app -->|"uses language"| node_language

click node_app "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/app.dart"
click node_home "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/home/home_screen.dart"
click node_language "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/core/localization/app_language.dart"
click node_events "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/events/events_screen.dart"
click node_event_state "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/events/events_provider.dart"
click node_event_data "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/event_repository.dart"
click node_map "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/map/map_screen.dart"
click node_map_state "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/map/map_provider.dart"
click node_place_state "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/places/places_provider.dart"
click node_place_data "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/place_repository.dart"
click node_location "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/location_service.dart"
click node_news "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/news/news_screen.dart"
click node_news_state "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/news/news_provider.dart"
click node_news_data "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/news_repository.dart"
click node_notifications "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/notifications/notifications_provider.dart"
click node_notification_service "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/firebase_notifications_service.dart"
click node_favorites "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/favorites/favorites_provider.dart"
click node_favorite_store "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/local/favorites_local_storage.dart"
click node_assistant "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/ai_assistant/ai_assistant_screen.dart"
click node_assistant_state "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/ai_assistant/ai_assistant_provider.dart"
click node_assistant_data "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/ai_assistant_repository.dart"
click node_semantic "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/semantic_search_service.dart"
click node_gemini "https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/gemini_service.dart"

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_home,node_language,node_favorites,node_favorite_store toneBlue
class node_events,node_event_state,node_event_data,node_map,node_map_state,node_place_state,node_place_data,node_location,node_firestore toneAmber
class node_news,node_news_state,node_news_data,node_notifications,node_notification_service,node_gemini_api toneMint
class node_assistant,node_assistant_state,node_assistant_data,node_semantic,node_gemini toneRose
class node_user,node_osm,node_fcm toneIndigo
```

## Components

### App experience

- [Flutter app](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/app.dart): `lib/app.dart`
- [Home](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/home/home_screen.dart): `lib/features/home/home_screen.dart`
- [Language settings](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/core/localization/app_language.dart): `lib/core/localization/app_language.dart`
- [Favorites](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/favorites/favorites_provider.dart): `lib/features/favorites/favorites_provider.dart`
- [Favorites storage](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/local/favorites_local_storage.dart): `lib/data/local/favorites_local_storage.dart`

### Event and place content

- [Event schedule](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/events/events_screen.dart): `lib/features/events/events_screen.dart`
- [Event state](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/events/events_provider.dart): `lib/features/events/events_provider.dart`
- [Event data access](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/event_repository.dart): `lib/data/repositories/event_repository.dart`
- [Map and places](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/map/map_screen.dart): `lib/features/map/map_screen.dart`
- [Map state](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/map/map_provider.dart): `lib/features/map/map_provider.dart`
- [Place state](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/places/places_provider.dart): `lib/features/places/places_provider.dart`
- [Place data access](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/place_repository.dart): `lib/data/repositories/place_repository.dart`
- [Location service](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/location_service.dart): `lib/data/services/location_service.dart`

### News and notifications

- [Editorial news](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/news/news_screen.dart): `lib/features/news/news_screen.dart`
- [News state](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/news/news_provider.dart): `lib/features/news/news_provider.dart`
- [News data access](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/news_repository.dart): `lib/data/repositories/news_repository.dart`
- [Notification history](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/notifications/notifications_provider.dart): `lib/features/notifications/notifications_provider.dart`
- [Push notification service](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/firebase_notifications_service.dart): `lib/data/services/firebase_notifications_service.dart`

### AI assistant

- [AI assistant](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/ai_assistant/ai_assistant_screen.dart): `lib/features/ai_assistant/ai_assistant_screen.dart`
- [Assistant state](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/features/ai_assistant/ai_assistant_provider.dart): `lib/features/ai_assistant/ai_assistant_provider.dart`
- [Assistant data access](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/repositories/ai_assistant_repository.dart): `lib/data/repositories/ai_assistant_repository.dart`
- [Semantic retrieval](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/semantic_search_service.dart): `lib/data/services/semantic_search_service.dart`
- [Gemini service](https://github.com/lianeheidemann/cirioapp_v2/blob/main/lib/data/services/gemini_service.dart): `lib/data/services/gemini_service.dart`

### Other components

- **Resident or pilgrim**
- **OpenStreetMap**
- **Cloud Firestore**
- **Firebase Cloud Messaging**
- **Gemini API**

## Connections

- Resident or pilgrim → Flutter app: opens
- Flutter app → Home: shows
- Resident or pilgrim → Event schedule: browses
- Event schedule → Event state: requests events
- Event state → Event data access: loads schedule
- Resident or pilgrim → Map and places: explores places
- Map and places → Map state: requests map data
- Map state → Location service: gets location
- Location service → OpenStreetMap: uses map data
- Map state → Place state: loads places
- Place state → Place data access: loads places
- Resident or pilgrim → Editorial news: reads news
- Editorial news → News state: requests articles
- News state → News data access: loads articles
- News data access → Cloud Firestore: reads news
- Resident or pilgrim → Notification history: views alerts
- Notification history → Push notification service: manages push
- Push notification service → Firebase Cloud Messaging: receives updates
- Resident or pilgrim → Favorites: saves items
- Favorites → Favorites storage: persists favorites
- Resident or pilgrim → AI assistant: asks question
- AI assistant → Assistant state: submits question
- Assistant state → Assistant data access: requests answer
- Assistant data access → Semantic retrieval: retrieves context
- Assistant data access → Gemini service: requests response
- Gemini service → Gemini API: generates answer
- Flutter app → Language settings: uses language
