# charlygoba/yucashops architecture

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

- Interactive diagram: https://gitdiagram.com/charlygoba/yucashops
- Repository: https://github.com/charlygoba/yucashops

## Overview

1. **Overall shape**
   - This is a **Flutter client application** named `agenda_dmi`, packaged for **Android, iOS, and Web**.
   - The repository is mostly a single shared Dart codebase in `lib/`, with thin native host shells under `android/` and `ios/`.

2. **Application entry and composition**
   - The main startup point is `lib/main.dart`.
   - From there, the app likely wires the top-level `MaterialApp`/theme/routing and chooses the initial screen.
   - There is no separate backend service in this repo; the app is the full client surface.

3. **Presentation / screen layer**
   - UI is split across:
     - `lib/pages/` for primary app pages such as `home.dart`, `home_screen.dart`, and `googleMaps.dart`
     - `lib/drawer/` for navigation drawer UI
     - `lib/screens/` for additional detail-oriented screens like `pet_details.dart`
   - This suggests a navigation-driven mobile UI with multiple feature screens rather than a single-page layout.

4. **Data/model and CRUD flow**
   - `lib/model/` contains the core app logic around records:
     - `Datos_Contactos.dart` looks like the main data structure
     - `agregar.dart`, `editar.dart`, and `ver.dart` strongly imply **create / edit / view** flows
     - `controllers.dart` likely centralizes form or state controllers
   - Architecturally, this is the most likely boundary where domain data enters the UI and is passed into form/detail screens.

5. **Feature intent**
   - The naming suggests the app is an **agenda / contact-management style application** with Spanish-labeled CRUD flows.
   - `googleMaps.dart` indicates one feature integrates a map view, likely to display or choose a location associated with a record.
   - `pet_details.dart` may be a specialized detail screen, indicating the app may manage more than one kind of record or has reused naming from another feature set.

6. **Configuration boundary**
   - `lib/configuration/configuration.dart` is a dedicated place for app-wide constants or environment settings.
   - This is the likely boundary for API keys, app settings, or feature flags used across the UI and model layers.

7. **Platform integration**
   - The Android and iOS folders are standard Flutter host projects, meaning native code is minimal:
     - Android main activity is `MainActivity.kt`
     - iOS entrypoint is `AppDelegate.swift`
   - Both platforms include generated plugin registrants, so Flutter plugins are being used for native capabilities.

8. **Google / Firebase-related setup**
   - `android/app/google-services.json` is present, which indicates **Google/Firebase-style service configuration on Android**.
   - Even though the exact plugins are not visible here, this file materially suggests the app may rely on Google services for some runtime integration.

9. **Assets and app shell**
   - Platform assets are defined for launch screens and icons in both Android and iOS.
   - The `images/` directory and Flutter asset bundles likely support in-app visuals and branding.
   - Web support includes `web/index.html` and `web/manifest.json`, so the app can also be deployed as a browser-based Flutter app.

10. **Build and dependency boundaries**
   - `pubspec.yaml` and `pubspec.lock` define the Dart dependencies and package graph.
   - Android uses Gradle wrappers and a standard Flutter Android build setup.
   - iOS uses Xcode project/workspace files with Flutter-generated xcconfigs.
   - These files are infrastructure only; the app’s actual behavior lives in `lib/`.

11. **Testing surface**
   - `test/widget_test.dart` is present, so there is at least a minimal Flutter test harness.
   - The test folder is small relative to the app, implying most behavior is validated manually or through lightweight widget tests.

12. **How data likely flows through the app**
   - User starts in `main.dart` → lands on a home or shell screen → navigates via drawer/pages → opens CRUD or map views.
   - Record data appears to move through model/controller classes into form and detail screens.
   - Any external service interaction, if present, is probably hidden behind Flutter plugins rather than custom backend code in this repository.

Main entry points: [`lib/main.dart`](https://github.com/charlygoba/yucashops/blob/main/lib/main.dart) (Main), [`lib/pages/home.dart`](https://github.com/charlygoba/yucashops/blob/main/lib/pages/home.dart) (Home), [`lib/model/Datos_Contactos.dart`](https://github.com/charlygoba/yucashops/blob/main/lib/model/Datos_Contactos.dart) (Contact data), [`lib/drawer/drawer_screen.dart`](https://github.com/charlygoba/yucashops/blob/main/lib/drawer/drawer_screen.dart) (Drawer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_main["Main<br/>Flutter entrypoint<br/>[main.dart]"]
  node_config["Config<br/>[configuration.dart]"]
end

subgraph group_ui["Presentation"]
  node_drawer["Drawer<br/>nav shell<br/>[drawer_screen.dart]"]
  node_home["Home<br/>screen<br/>[home.dart]"]
  node_home_screen["Home screen<br/>[home_screen.dart]"]
  node_maps["Maps<br/>feature screen<br/>[googleMaps.dart]"]
  node_details["Pet details<br/>detail screen<br/>[pet_details.dart]"]
end

subgraph group_model["Domain model"]
  node_record["Contact data<br/>domain model"]
  node_create["Add record<br/>create flow<br/>[agregar.dart]"]
  node_edit["Edit record<br/>update flow<br/>[editar.dart]"]
  node_view["View record<br/>read flow<br/>[ver.dart]"]
  node_controllers["Controllers<br/>state/form logic<br/>[controllers.dart]"]
end

subgraph group_platform["Platform hosts"]
  node_android_main["Android host<br/>native shell<br/>[MainActivity.kt]"]
  node_android_services["Google services<br/>service config"]
  node_ios_app["iOS host<br/>native shell<br/>[AppDelegate.swift]"]
  node_generated["Plugins<br/>generated glue"]
end

subgraph group_web["Web host"]
  node_web_index["Web entry<br/>web shell<br/>[index.html]"]
  node_web_manifest["Web manifest<br/>pwa config<br/>[manifest.json]"]
end

subgraph group_build["Build config"]
  node_pubspec["Pubspec<br/>package config<br/>[pubspec.yaml]"]
end

node_main -->|"launches"| node_home
node_main -->|"composes"| node_home_screen
node_main -->|"reads"| node_config
node_main -->|"registers"| node_generated
node_home_screen -->|"uses"| node_drawer
node_home_screen -->|"hosts"| node_home
node_home -->|"navigates"| node_maps
node_home -->|"navigates"| node_details
node_drawer -->|"routes to"| node_create
node_drawer -->|"routes to"| node_view
node_create -->|"creates"| node_record
node_edit -->|"updates"| node_record
node_view -->|"displays"| node_record
node_create -->|"binds"| node_controllers
node_edit -->|"binds"| node_controllers
node_view -->|"uses"| node_controllers
node_maps -->|"uses"| node_config
node_details -->|"shows"| node_record
node_android_main -->|"uses"| node_generated
node_android_main -->|"configures"| node_android_services
node_ios_app -->|"uses"| node_generated
node_web_index -->|"pairs with"| node_web_manifest
node_pubspec -->|"packages"| node_main

click node_main "https://github.com/charlygoba/yucashops/blob/main/lib/main.dart"
click node_drawer "https://github.com/charlygoba/yucashops/blob/main/lib/drawer/drawer_screen.dart"
click node_home "https://github.com/charlygoba/yucashops/blob/main/lib/pages/home.dart"
click node_home_screen "https://github.com/charlygoba/yucashops/blob/main/lib/pages/home_screen.dart"
click node_maps "https://github.com/charlygoba/yucashops/blob/main/lib/pages/googleMaps.dart"
click node_details "https://github.com/charlygoba/yucashops/blob/main/lib/screens/pet_details.dart"
click node_config "https://github.com/charlygoba/yucashops/blob/main/lib/configuration/configuration.dart"
click node_record "https://github.com/charlygoba/yucashops/blob/main/lib/model/Datos_Contactos.dart"
click node_create "https://github.com/charlygoba/yucashops/blob/main/lib/model/agregar.dart"
click node_edit "https://github.com/charlygoba/yucashops/blob/main/lib/model/editar.dart"
click node_view "https://github.com/charlygoba/yucashops/blob/main/lib/model/ver.dart"
click node_controllers "https://github.com/charlygoba/yucashops/blob/main/lib/model/controllers.dart"
click node_android_main "https://github.com/charlygoba/yucashops/blob/main/android/app/src/main/kotlin/com/example/agenda_dmi/MainActivity.kt"
click node_android_services "https://github.com/charlygoba/yucashops/blob/main/android/app/google-services.json"
click node_ios_app "https://github.com/charlygoba/yucashops/blob/main/ios/Runner/AppDelegate.swift"
click node_web_index "https://github.com/charlygoba/yucashops/blob/main/web/index.html"
click node_web_manifest "https://github.com/charlygoba/yucashops/blob/main/web/manifest.json"
click node_pubspec "https://github.com/charlygoba/yucashops/blob/main/pubspec.yaml"
click node_generated "https://github.com/charlygoba/yucashops/blob/main/lib/generated_plugin_registrant.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_main,node_config toneBlue
class node_drawer,node_home,node_home_screen,node_maps,node_details toneAmber
class node_record,node_create,node_edit,node_view,node_controllers toneMint
class node_android_main,node_android_services,node_ios_app,node_generated toneRose
class node_web_index,node_web_manifest toneIndigo
class node_pubspec toneTeal
```

## Components

### App shell

Startup and shared Flutter composition

- [Main](https://github.com/charlygoba/yucashops/blob/main/lib/main.dart): Flutter entrypoint · Bootstraps the app and wires the top-level shell · `lib/main.dart`
- [Config](https://github.com/charlygoba/yucashops/blob/main/lib/configuration/configuration.dart): app config · Shared constants and app-wide settings · `lib/configuration/configuration.dart`

### Presentation

Screens, drawers, and navigation surfaces

- [Drawer](https://github.com/charlygoba/yucashops/blob/main/lib/drawer/drawer_screen.dart): nav shell · Navigation drawer used across the app · `lib/drawer/drawer_screen.dart`
- [Home](https://github.com/charlygoba/yucashops/blob/main/lib/pages/home.dart): screen · Primary landing page · `lib/pages/home.dart`
- [Home screen](https://github.com/charlygoba/yucashops/blob/main/lib/pages/home_screen.dart): screen · Main home view or app container screen · `lib/pages/home_screen.dart`
- [Maps](https://github.com/charlygoba/yucashops/blob/main/lib/pages/googleMaps.dart): feature screen · Map-based view for location context · `lib/pages/googleMaps.dart`
- [Pet details](https://github.com/charlygoba/yucashops/blob/main/lib/screens/pet_details.dart): detail screen · Specialized record detail view · `lib/screens/pet_details.dart`

### Domain model

Record data and CRUD flows

- [Contact data](https://github.com/charlygoba/yucashops/blob/main/lib/model/Datos_Contactos.dart): domain model · Core record structure used by the app · `lib/model/Datos_Contactos.dart`
- [Add record](https://github.com/charlygoba/yucashops/blob/main/lib/model/agregar.dart): create flow · Screen or flow for creating records · `lib/model/agregar.dart`
- [Edit record](https://github.com/charlygoba/yucashops/blob/main/lib/model/editar.dart): update flow · Screen or flow for updating records · `lib/model/editar.dart`
- [View record](https://github.com/charlygoba/yucashops/blob/main/lib/model/ver.dart): read flow · Screen or flow for displaying record details · `lib/model/ver.dart`
- [Controllers](https://github.com/charlygoba/yucashops/blob/main/lib/model/controllers.dart): state/form logic · Shared controllers and form state for CRUD screens · `lib/model/controllers.dart`

### Platform hosts

Native Android and iOS entrypoints plus service wiring

- [Android host](https://github.com/charlygoba/yucashops/blob/main/android/app/src/main/kotlin/com/example/agenda_dmi/MainActivity.kt): native shell · Android Flutter entry activity · `android/app/src/main/kotlin/com/example/agenda_dmi/MainActivity.kt`
- [Google services](https://github.com/charlygoba/yucashops/blob/main/android/app/google-services.json): service config · Android Google/Firebase-style runtime configuration · `android/app/google-services.json`
- [iOS host](https://github.com/charlygoba/yucashops/blob/main/ios/Runner/AppDelegate.swift): native shell · iOS Flutter entry delegate · `ios/Runner/AppDelegate.swift`
- [Plugins](https://github.com/charlygoba/yucashops/blob/main/lib/generated_plugin_registrant.dart): generated glue · Auto-generated plugin registration for Flutter integrations · `lib/generated_plugin_registrant.dart`

### Web host

Browser entrypoint and PWA manifest

- [Web entry](https://github.com/charlygoba/yucashops/blob/main/web/index.html): web shell · Browser entrypoint for Flutter web · `web/index.html`
- [Web manifest](https://github.com/charlygoba/yucashops/blob/main/web/manifest.json): pwa config · Web app manifest and install metadata · `web/manifest.json`

### Build config

Package and dependency boundary

- [Pubspec](https://github.com/charlygoba/yucashops/blob/main/pubspec.yaml): package config · Dart dependencies and app package metadata · `pubspec.yaml`

## Connections

- Main → Home: launches · App startup lands on the primary UI
- Main → Home screen: composes · Top-level shell likely wraps the home container
- Main → Config: reads · Startup uses shared app settings
- Main → Plugins: registers · Wires Flutter plugins during startup
- Home screen → Drawer: uses · Primary screen exposes navigation drawer
- Home screen → Home: hosts · Home screen is the main landing content
- Home → Maps: navigates · Home can branch into map-based feature views
- Home → Pet details: navigates · Home can open detail-oriented screens
- Drawer → Add record: routes to · Drawer exposes creation workflow
- Drawer → View record: routes to · Drawer exposes read/view workflow
- Add record → Contact data: creates · New records are built from the core data model
- Edit record → Contact data: updates · Existing records are edited through the domain model
- View record → Contact data: displays · Detail views render the record model
- Add record → Controllers: binds · Creation forms rely on shared controllers
- Edit record → Controllers: binds · Edit forms rely on shared controllers
- View record → Controllers: uses · Read views may reuse controller/state logic
- Maps → Config: uses · Map feature likely depends on shared configuration
- Pet details → Contact data: shows · Specialized detail screen presents record data
- Android host → Plugins: uses · Android shell participates in plugin registration
- Android host → Google services: configures · Android host is paired with Google services config
- iOS host → Plugins: uses · iOS shell participates in plugin registration
- Web entry → Web manifest: pairs with · Web entrypoint is defined alongside the PWA manifest
- Pubspec → Main: packages · Dependency setup supports the shared Dart app
