# costagit33/futpontos1 architecture

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

- Interactive diagram: https://gitdiagram.com/costagit33/futpontos1
- Repository: https://github.com/costagit33/futpontos1

## Overview

FutPontos1 is a native Flutter app for football points tracking, using an existing official API and PostgreSQL-backed persistence. The user-facing workflow spans app navigation, authentication, and feature screens for players, goalkeepers, history, profiles, and regulations; scoring rules are a distinct domain capability. The README confirms the HTTP client, scoring domain, and API integration, but the sampled source does not show Dart call sites or routing, so those links are marked unverified rather than asserted as observed.

Main entry points: [`app/lib/main.dart`](https://github.com/costagit33/futpontos1/blob/main/app/lib/main.dart) (App entry), [`app/lib/core/api_client.dart`](https://github.com/costagit33/futpontos1/blob/main/app/lib/core/api_client.dart) (HTTP client), [`app/lib/pages/players_page.dart`](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/players_page.dart) (Players screen), [`app/lib/pages/auth_page.dart`](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/auth_page.dart) (Sign-in screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flutter app"]
  node_entry["App entry<br/>[main.dart]"]
  node_theme["App theme<br/>[app_theme.dart]"]
  node_auth_page["Sign-in screen<br/>[auth_page.dart]"]
  node_admin["Admin screen<br/>[admin_page.dart]"]
  node_players["Players screen<br/>[players_page.dart]"]
  node_goalkeepers["Goalkeepers screen"]
  node_history_page["History screen<br/>[history_page.dart]"]
  node_profile["Profile screen<br/>[profile_page.dart]"]
  node_regulation["Regulations screen"]
  node_registration["Smart registration"]
  node_motion["Motion widgets<br/>[motion.dart]"]
  node_banner["Sports banner<br/>[sports_banner.dart]"]
end

subgraph group_domain["Points and data"]
  node_points["Points calculator"]
  node_player_data["Player data<br/>[player.dart]"]
  node_goalkeeper_data["Goalkeeper data<br/>[goalkeeper.dart]"]
  node_history_data["History data<br/>[history.dart]"]
  node_analytics["Analytics data<br/>[analytics.dart]"]
end

subgraph group_services["App services"]
  node_api_client["HTTP client<br/>[api_client.dart]"]
  node_auth_service["Authentication service<br/>[auth_service.dart]"]
  node_token_storage["Token storage<br/>[token_storage.dart]"]
end

node_user(("User"))
node_api{{"Official API"}}
node_postgres[("PostgreSQL")]

node_user -.->|"opens app"| node_entry
node_entry -.->|"routes to"| node_auth_page
node_entry -.->|"routes to"| node_players
node_entry -.->|"routes to"| node_goalkeepers
node_entry -.->|"routes to"| node_history_page
node_entry -.->|"routes to"| node_profile
node_entry -.->|"routes to"| node_regulation
node_entry -.->|"routes to"| node_admin
node_entry -.->|"routes to"| node_registration
node_auth_page -.->|"uses"| node_auth_service
node_auth_service -.->|"uses"| node_token_storage
node_players -.->|"requests data"| node_api_client
node_goalkeepers -.->|"requests data"| node_api_client
node_history_page -.->|"requests data"| node_api_client
node_admin -.->|"requests data"| node_api_client
node_api_client -.->|"HTTP requests"| node_api
node_api -.->|"persists data"| node_postgres
node_points -.->|"scores"| node_players

click node_entry "https://github.com/costagit33/futpontos1/blob/main/app/lib/main.dart"
click node_theme "https://github.com/costagit33/futpontos1/blob/main/app/lib/core/app_theme.dart"
click node_auth_page "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/auth_page.dart"
click node_admin "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/admin_page.dart"
click node_players "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/players_page.dart"
click node_goalkeepers "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/goalkeepers_page.dart"
click node_history_page "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/history_page.dart"
click node_profile "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/profile_page.dart"
click node_regulation "https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/regulation_page.dart"
click node_registration "https://github.com/costagit33/futpontos1/blob/main/app/lib/widgets/intelligent_registration_page.dart"
click node_motion "https://github.com/costagit33/futpontos1/blob/main/app/lib/widgets/motion.dart"
click node_banner "https://github.com/costagit33/futpontos1/blob/main/app/lib/widgets/sports_banner.dart"
click node_points "https://github.com/costagit33/futpontos1/blob/main/app/lib/core/points_calculator.dart"
click node_player_data "https://github.com/costagit33/futpontos1/blob/main/app/lib/data/player.dart"
click node_goalkeeper_data "https://github.com/costagit33/futpontos1/blob/main/app/lib/data/goalkeeper.dart"
click node_history_data "https://github.com/costagit33/futpontos1/blob/main/app/lib/data/history.dart"
click node_analytics "https://github.com/costagit33/futpontos1/blob/main/app/lib/data/analytics.dart"
click node_api_client "https://github.com/costagit33/futpontos1/blob/main/app/lib/core/api_client.dart"
click node_auth_service "https://github.com/costagit33/futpontos1/blob/main/app/lib/services/auth_service.dart"
click node_token_storage "https://github.com/costagit33/futpontos1/blob/main/app/lib/services/token_storage.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_entry,node_theme,node_auth_page,node_admin,node_players,node_goalkeepers,node_history_page,node_profile,node_regulation,node_registration,node_motion,node_banner,node_user toneBlue
class node_points,node_player_data,node_goalkeeper_data,node_history_data,node_analytics,node_postgres toneAmber
class node_api_client,node_auth_service,node_token_storage,node_api toneMint
```

## Components

### Flutter app

- [App entry](https://github.com/costagit33/futpontos1/blob/main/app/lib/main.dart): `app/lib/main.dart`
- [App theme](https://github.com/costagit33/futpontos1/blob/main/app/lib/core/app_theme.dart): `app/lib/core/app_theme.dart`
- [Sign-in screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/auth_page.dart): `app/lib/pages/auth_page.dart`
- [Admin screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/admin_page.dart): `app/lib/pages/admin_page.dart`
- [Players screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/players_page.dart): `app/lib/pages/players_page.dart`
- [Goalkeepers screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/goalkeepers_page.dart): `app/lib/pages/goalkeepers_page.dart`
- [History screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/history_page.dart): `app/lib/pages/history_page.dart`
- [Profile screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/profile_page.dart): `app/lib/pages/profile_page.dart`
- [Regulations screen](https://github.com/costagit33/futpontos1/blob/main/app/lib/pages/regulation_page.dart): `app/lib/pages/regulation_page.dart`
- [Smart registration](https://github.com/costagit33/futpontos1/blob/main/app/lib/widgets/intelligent_registration_page.dart): `app/lib/widgets/intelligent_registration_page.dart`
- [Motion widgets](https://github.com/costagit33/futpontos1/blob/main/app/lib/widgets/motion.dart): `app/lib/widgets/motion.dart`
- [Sports banner](https://github.com/costagit33/futpontos1/blob/main/app/lib/widgets/sports_banner.dart): `app/lib/widgets/sports_banner.dart`

### Points and data

- [Points calculator](https://github.com/costagit33/futpontos1/blob/main/app/lib/core/points_calculator.dart): `app/lib/core/points_calculator.dart`
- [Player data](https://github.com/costagit33/futpontos1/blob/main/app/lib/data/player.dart): `app/lib/data/player.dart`
- [Goalkeeper data](https://github.com/costagit33/futpontos1/blob/main/app/lib/data/goalkeeper.dart): `app/lib/data/goalkeeper.dart`
- [History data](https://github.com/costagit33/futpontos1/blob/main/app/lib/data/history.dart): `app/lib/data/history.dart`
- [Analytics data](https://github.com/costagit33/futpontos1/blob/main/app/lib/data/analytics.dart): `app/lib/data/analytics.dart`

### App services

- [HTTP client](https://github.com/costagit33/futpontos1/blob/main/app/lib/core/api_client.dart): `app/lib/core/api_client.dart`
- [Authentication service](https://github.com/costagit33/futpontos1/blob/main/app/lib/services/auth_service.dart): `app/lib/services/auth_service.dart`
- [Token storage](https://github.com/costagit33/futpontos1/blob/main/app/lib/services/token_storage.dart): `app/lib/services/token_storage.dart`

### Other components

- **User**
- **Official API**
- **PostgreSQL**

## Connections

- User → App entry: opens app
- App entry → Sign-in screen: routes to
- App entry → Players screen: routes to
- App entry → Goalkeepers screen: routes to
- App entry → History screen: routes to
- App entry → Profile screen: routes to
- App entry → Regulations screen: routes to
- App entry → Admin screen: routes to
- App entry → Smart registration: routes to
- Sign-in screen → Authentication service: uses
- Authentication service → Token storage: uses
- Players screen → HTTP client: requests data
- Goalkeepers screen → HTTP client: requests data
- History screen → HTTP client: requests data
- Admin screen → HTTP client: requests data
- HTTP client → Official API: HTTP requests
- Official API → PostgreSQL: persists data
- Points calculator → Players screen: scores
