# gabrielsouza98/ifpi_app architecture

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

- Interactive diagram: https://gitdiagram.com/gabrielsouza98/ifpi_app
- Repository: https://github.com/gabrielsouza98/ifpi_app

## Overview

Descontai is a Flutter discounts-and-offers app for buyers and businesses. Its documented workflow is authentication, role-specific browsing or business product management, and product image storage; Firebase and Google geocoding/Places provide backend and location capabilities. The README identifies the main screens and service responsibilities, but the Dart implementation was not excerpted, so links among those components rely only on documented relationships; unsampled details are omitted.

Main entry points: [`lib/main.dart`](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/main.dart) (App bootstrap), [`lib/dashboard_screens.dart`](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/dashboard_screens.dart) (Role dashboards), [`lib/empresa_meus_produtos.dart`](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_meus_produtos.dart) (Business products), [`lib/services/auth_service.dart`](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/auth_service.dart) (Auth service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App bootstrap<br/>[main.dart]"]
  node_routes["App routes<br/>[app_routes.dart]"]
  node_landing["Home landing"]
  node_dashboards["Role dashboards"]
end

subgraph group_identity["Identity and settings"]
  node_auth_screens["Auth screens<br/>[auth_screens.dart]"]
  node_login_screens["Login screens"]
  node_auth_service["Auth service<br/>[auth_service.dart]"]
  node_user_settings["Buyer settings"]
  node_business_settings["Business settings"]
end

subgraph group_products["Offers and products"]
  node_business_products["Business products"]
  node_product_form["Product form"]
  node_business_detail["Business product detail"]
  node_buyer_detail["Buyer product detail"]
  node_product_service["Product service"]
end

subgraph group_integrations["Platform integrations"]
  node_firestore[("Cloud Firestore")]
  node_storage[("Firebase Storage")]
  node_geocoding["Geocoding service"]
  node_google_places["Google Places"]
  node_analytics["Analytics service"]
  node_firebase_auth["Firebase Auth"]
end

node_buyer(("Buyer"))
node_business(("Business"))

node_buyer -->|"uses"| node_app
node_business -->|"uses"| node_app
node_app -->|"routes"| node_routes
node_app -->|"offers authentication"| node_auth_screens
node_app -->|"shows dashboards"| node_dashboards
node_auth_screens -->|"uses"| node_auth_service
node_login_screens -.->|"uses"| node_auth_service
node_auth_service -->|"authenticates"| node_firebase_auth
node_dashboards -->|"supports product management"| node_business_products
node_business_products -.->|"registers products"| node_product_form
node_business_products -.->|"shows details"| node_business_detail
node_dashboards -.->|"supports product browsing"| node_buyer_detail
node_product_service -->|"stores product data"| node_firestore
node_product_form -->|"uploads images"| node_storage
node_product_service -.->|"uploads images"| node_storage
node_geocoding -->|"geocodes locations"| node_google_places

click node_app "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/main.dart"
click node_routes "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/app_routes.dart"
click node_landing "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/home_landing_screen.dart"
click node_auth_screens "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/auth_screens.dart"
click node_login_screens "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/auth_login_screens.dart"
click node_auth_service "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/auth_service.dart"
click node_dashboards "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/dashboard_screens.dart"
click node_user_settings "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/usuario_configuracoes.dart"
click node_business_settings "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_configuracoes.dart"
click node_business_products "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_meus_produtos.dart"
click node_product_form "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_produto_form.dart"
click node_business_detail "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_produto_detalhes.dart"
click node_buyer_detail "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/usuario_produto_detalhes.dart"
click node_product_service "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/produto_service.dart"
click node_geocoding "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/geocoding_service.dart"
click node_analytics "https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/analytics_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_routes,node_landing,node_dashboards toneBlue
class node_auth_screens,node_login_screens,node_auth_service,node_user_settings,node_business_settings toneAmber
class node_business_products,node_product_form,node_business_detail,node_buyer_detail,node_product_service toneMint
class node_firestore,node_storage,node_geocoding,node_google_places,node_analytics,node_firebase_auth toneRose
class node_buyer,node_business toneIndigo
```

## Components

### App experience

- [App bootstrap](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/main.dart): `lib/main.dart`
- [App routes](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/app_routes.dart): `lib/app_routes.dart`
- [Home landing](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/home_landing_screen.dart): `lib/home_landing_screen.dart`
- [Role dashboards](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/dashboard_screens.dart): `lib/dashboard_screens.dart`

### Identity and settings

- [Auth screens](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/auth_screens.dart): `lib/auth_screens.dart`
- [Login screens](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/auth_login_screens.dart): `lib/auth_login_screens.dart`
- [Auth service](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [Buyer settings](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/usuario_configuracoes.dart): `lib/usuario_configuracoes.dart`
- [Business settings](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_configuracoes.dart): `lib/empresa_configuracoes.dart`

### Offers and products

- [Business products](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_meus_produtos.dart): `lib/empresa_meus_produtos.dart`
- [Product form](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_produto_form.dart): `lib/empresa_produto_form.dart`
- [Business product detail](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/empresa_produto_detalhes.dart): `lib/empresa_produto_detalhes.dart`
- [Buyer product detail](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/usuario_produto_detalhes.dart): `lib/usuario_produto_detalhes.dart`
- [Product service](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/produto_service.dart): `lib/services/produto_service.dart`

### Platform integrations

- **Cloud Firestore**
- **Firebase Storage**
- [Geocoding service](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/geocoding_service.dart): `lib/services/geocoding_service.dart`
- **Google Places**
- [Analytics service](https://github.com/gabrielsouza98/ifpi_app/blob/main/lib/services/analytics_service.dart): `lib/services/analytics_service.dart`
- **Firebase Auth**

### Other components

- **Buyer**
- **Business**

## Connections

- Buyer → App bootstrap: uses (evidence: `README.md`)
- Business → App bootstrap: uses (evidence: `README.md`)
- App bootstrap → App routes: routes (evidence: `README.md`)
- App bootstrap → Auth screens: offers authentication (evidence: `README.md`)
- App bootstrap → Role dashboards: shows dashboards (evidence: `README.md`)
- Auth screens → Auth service: uses (evidence: `README.md`)
- Login screens → Auth service: uses
- Auth service → Firebase Auth: authenticates (evidence: `README.md`)
- Role dashboards → Business products: supports product management (evidence: `README.md`)
- Business products → Product form: registers products
- Business products → Business product detail: shows details
- Role dashboards → Buyer product detail: supports product browsing
- Product service → Cloud Firestore: stores product data (evidence: `README.md`)
- Product form → Firebase Storage: uploads images (evidence: `README.md`)
- Product service → Firebase Storage: uploads images
- Geocoding service → Google Places: geocodes locations (evidence: `README.md`)
