# stivencr7/potoche-appmobile architecture

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

- Interactive diagram: https://gitdiagram.com/stivencr7/potoche-appmobile
- Repository: https://github.com/stivencr7/potoche-appmobile

## Overview

Potoche is an Android app for the Club Campestre Potoche, combining food ordering, event reservations, promotions, and customer account features. The customer flow is to browse categorized dishes, build a cart, choose a payment method, and place an order; users can also make reservations. Admin screens manage dishes, promotions, and order status, while push notifications communicate order updates and offers. The README describes MVVM, repositories, Firebase, and Room, but no runtime source was excerpted, so implementation links are omitted or marked unverified.

Main entry points: [`app/src/main/java/com/example/potoche/ui/screen/HomeAdmin/HomeAdminScreen.kt`](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/HomeAdmin/HomeAdminScreen.kt) (Admin Panel), [`app/src/main/java/com/example/potoche/ui/navigation/AppNavGraph.kt`](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/navigation/AppNavGraph.kt) (App Navigation), [`app/src/main/java/com/example/potoche/ui/screen/home/InicioScreen.kt`](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/home/InicioScreen.kt) (Menu and Categories), [`app/src/main/java/com/example/potoche/ui/activity/MainActivity.kt`](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/activity/MainActivity.kt) (Main Activity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Navigation"]
  node_main["Main Activity<br/>[MainActivity.kt]"]
  node_navigation["App Navigation<br/>[AppNavGraph.kt]"]
end

subgraph group_ordering["Ordering"]
  node_menu["Menu and Categories<br/>[InicioScreen.kt]"]
  node_cart["Shopping Cart<br/>[CarritoScreen.kt]"]
  node_checkout["Order Summary"]
  node_payment["Payment Selection"]
  node_orderhistory["My Orders"]
end

subgraph group_reservations["Reservations"]
  node_reservations["Reservations<br/>[ReservasScreen.kt]"]
  node_reservationprocess["Reservation Details"]
end

subgraph group_accounts["Accounts"]
  node_login["Sign In<br/>[LoginScreen.kt]"]
  node_profile["Customer Profile<br/>[PerfilScreen.kt]"]
  node_addresses["Saved Addresses"]
end

subgraph group_operations["Admin and Updates"]
  node_offers["Promotions"]
  node_adminhome["Admin Panel<br/>[HomeAdminScreen.kt]"]
  node_dishadmin["Dish Management"]
  node_banneradmin["Promotion Management<br/>[BannerScreen.kt]"]
  node_orderadmin["Order Status"]
  node_push["Push Notifications"]
end

node_customer(("Customer"))
node_admin(("Administrator"))
node_firebase[("Firebase Services")]

node_customer -.->|"opens app"| node_main
node_main -.->|"starts navigation"| node_navigation
node_navigation -.->|"routes to"| node_login
node_navigation -.->|"routes to"| node_menu
node_customer -.->|"browses menu"| node_menu
node_menu -.->|"adds dishes"| node_cart
node_cart -.->|"reviews order"| node_checkout
node_checkout -.->|"selects payment"| node_payment
node_customer -.->|"starts reservation"| node_reservations
node_reservations -.->|"sets details"| node_reservationprocess
node_customer -.->|"manages account"| node_profile
node_profile -.->|"manages addresses"| node_addresses
node_customer -.->|"views offers"| node_offers
node_admin -.->|"opens panel"| node_adminhome
node_adminhome -.->|"manages dishes"| node_dishadmin
node_adminhome -.->|"manages promotions"| node_banneradmin
node_adminhome -.->|"updates statuses"| node_orderadmin
node_orderadmin -.->|"triggers updates"| node_push
node_offers -.->|"announces offers"| node_push
node_login -.->|"authenticates with"| node_firebase

click node_main "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/activity/MainActivity.kt"
click node_navigation "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/navigation/AppNavGraph.kt"
click node_login "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/login/LoginScreen.kt"
click node_profile "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/perfil/PerfilScreen.kt"
click node_addresses "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/misdirecciones/MisDireccionesScreen.kt"
click node_menu "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/home/InicioScreen.kt"
click node_cart "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/carrito/CarritoScreen.kt"
click node_checkout "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/FinalizarPedido/OrderSummaryScreen.kt"
click node_payment "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/metodopago/SeleccionarMetodoPagoScreen.kt"
click node_orderhistory "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/mispedidos/MisPedidosScreen.kt"
click node_reservations "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/reservas/ReservasScreen.kt"
click node_reservationprocess "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/reservasfecha/ProcesoDeReservaScreen.kt"
click node_offers "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/promociones/PromocionesScreen.kt"
click node_adminhome "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/HomeAdmin/HomeAdminScreen.kt"
click node_dishadmin "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/data/remote/firestore/PlatillosFirestoreDataSource.kt"
click node_banneradmin "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/bannerAdmin/BannerScreen.kt"
click node_orderadmin "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/EstPedidoAdmin/AdminEstPedidoScreen.kt"
click node_push "https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/services/MyFirebaseMessagingService.kt"

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_navigation toneBlue
class node_menu,node_cart,node_checkout,node_payment,node_orderhistory,node_firebase toneAmber
class node_reservations,node_reservationprocess toneMint
class node_login,node_profile,node_addresses toneRose
class node_offers,node_adminhome,node_dishadmin,node_banneradmin,node_orderadmin,node_push,node_customer,node_admin toneIndigo
```

## Components

### App Navigation

- [Main Activity](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/activity/MainActivity.kt): `app/src/main/java/com/example/potoche/ui/activity/MainActivity.kt`
- [App Navigation](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/navigation/AppNavGraph.kt): `app/src/main/java/com/example/potoche/ui/navigation/AppNavGraph.kt`

### Ordering

- [Menu and Categories](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/home/InicioScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/home/InicioScreen.kt`
- [Shopping Cart](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/carrito/CarritoScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/carrito/CarritoScreen.kt`
- [Order Summary](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/FinalizarPedido/OrderSummaryScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/FinalizarPedido/OrderSummaryScreen.kt`
- [Payment Selection](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/metodopago/SeleccionarMetodoPagoScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/metodopago/SeleccionarMetodoPagoScreen.kt`
- [My Orders](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/mispedidos/MisPedidosScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/mispedidos/MisPedidosScreen.kt`

### Reservations

- [Reservations](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/reservas/ReservasScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/reservas/ReservasScreen.kt`
- [Reservation Details](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/reservasfecha/ProcesoDeReservaScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/reservasfecha/ProcesoDeReservaScreen.kt`

### Accounts

- [Sign In](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/login/LoginScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/login/LoginScreen.kt`
- [Customer Profile](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/perfil/PerfilScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/perfil/PerfilScreen.kt`
- [Saved Addresses](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/misdirecciones/MisDireccionesScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/misdirecciones/MisDireccionesScreen.kt`

### Admin and Updates

- [Promotions](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/promociones/PromocionesScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/promociones/PromocionesScreen.kt`
- [Admin Panel](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/HomeAdmin/HomeAdminScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/HomeAdmin/HomeAdminScreen.kt`
- [Dish Management](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/data/remote/firestore/PlatillosFirestoreDataSource.kt): `app/src/main/java/com/example/potoche/data/remote/firestore/PlatillosFirestoreDataSource.kt`
- [Promotion Management](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/bannerAdmin/BannerScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/bannerAdmin/BannerScreen.kt`
- [Order Status](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/ui/screen/EstPedidoAdmin/AdminEstPedidoScreen.kt): `app/src/main/java/com/example/potoche/ui/screen/EstPedidoAdmin/AdminEstPedidoScreen.kt`
- [Push Notifications](https://github.com/stivencr7/potoche-appmobile/blob/main/app/src/main/java/com/example/potoche/services/MyFirebaseMessagingService.kt): `app/src/main/java/com/example/potoche/services/MyFirebaseMessagingService.kt`

### Other components

- **Customer**
- **Administrator**
- **Firebase Services**

## Connections

- Customer → Main Activity: opens app
- Main Activity → App Navigation: starts navigation
- App Navigation → Sign In: routes to
- App Navigation → Menu and Categories: routes to
- Customer → Menu and Categories: browses menu (evidence: `README.md`)
- Menu and Categories → Shopping Cart: adds dishes (evidence: `README.md`)
- Shopping Cart → Order Summary: reviews order (evidence: `README.md`)
- Order Summary → Payment Selection: selects payment (evidence: `README.md`)
- Customer → Reservations: starts reservation (evidence: `README.md`)
- Reservations → Reservation Details: sets details
- Customer → Customer Profile: manages account
- Customer Profile → Saved Addresses: manages addresses
- Customer → Promotions: views offers (evidence: `README.md`)
- Administrator → Admin Panel: opens panel (evidence: `README.md`)
- Admin Panel → Dish Management: manages dishes (evidence: `README.md`)
- Admin Panel → Promotion Management: manages promotions (evidence: `README.md`)
- Admin Panel → Order Status: updates statuses (evidence: `README.md`)
- Order Status → Push Notifications: triggers updates (evidence: `README.md`)
- Promotions → Push Notifications: announces offers (evidence: `README.md`)
- Sign In → Firebase Services: authenticates with (evidence: `README.md`)
