# kbdevs12/cahaya-futsal-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/kbdevs12/cahaya-futsal-frontend
- Repository: https://github.com/kbdevs12/cahaya-futsal-frontend

## Overview

This is a Flutter application whose feature structure suggests field availability and booking, with authentication, payment, bookings, notifications, and profile capabilities. The README is only a Flutter starter template, and the sampled source contains platform launchers rather than Dart feature code; therefore, the product workflow is inferred from the file tree, and internal feature wiring is not asserted.

Main entry points: [`lib/src/app/router.dart`](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/app/router.dart) (Navigation), [`lib/main.dart`](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/main.dart) (Flutter entry), [`lib/src/app/app.dart`](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/app/app.dart) (App shell), [`lib/src/features/availability`](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/availability) (Field availability)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_entry["Flutter entry<br/>[main.dart]"]
  node_shell["App shell<br/>[app.dart]"]
  node_router["Navigation<br/>[router.dart]"]
  node_home["Home"]
end

subgraph group_booking["Booking journey"]
  node_availability["Field availability"]
  node_booking_create["Create booking"]
  node_bookings["My bookings"]
  node_payment["Payment QR"]
end

subgraph group_account["Account"]
  node_auth["Authentication"]
  node_profile["User profile"]
  node_notifications["Notifications"]
end

subgraph group_platform["Shared services"]
  node_api["HTTP client<br/>[dio_client.dart]"]
  node_token_store[("Token storage<br/>[token_storage.dart]")]
  node_fcm["Push messaging<br/>[fcm_service.dart]"]
end

node_user(("User"))
node_api_service{{"Backend API"}}
node_firebase{{"Firebase"}}

node_user -->|"launches"| node_entry
node_entry -->|"starts"| node_shell
node_shell -->|"uses navigation"| node_router
node_router -->|"routes"| node_auth
node_router -->|"routes"| node_home
node_router -->|"routes"| node_availability
node_router -->|"routes"| node_bookings
node_router -->|"routes"| node_payment
node_router -->|"routes"| node_profile
node_router -->|"routes"| node_notifications
node_availability -->|"offers booking"| node_booking_create

click node_entry "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/main.dart"
click node_shell "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/app/app.dart"
click node_router "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/app/router.dart"
click node_home "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/home"
click node_auth "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/auth"
click node_availability "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/availability"
click node_booking_create "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/features/availability/presentation/screens/create_booking_screen.dart"
click node_bookings "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/bookings"
click node_payment "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/payments"
click node_profile "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/profile"
click node_notifications "https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/notifications"
click node_api "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/core/network/dio_client.dart"
click node_token_store "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/core/storage/token_storage.dart"
click node_fcm "https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/core/notifications/fcm_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_entry,node_shell,node_router,node_home,node_user toneBlue
class node_availability,node_booking_create,node_bookings,node_payment toneAmber
class node_auth,node_profile,node_notifications,node_api_service toneMint
class node_api,node_token_store,node_fcm toneRose
class node_firebase toneIndigo
```

## Components

### App shell

- [Flutter entry](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/main.dart): `lib/main.dart`
- [App shell](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/app/app.dart): `lib/src/app/app.dart`
- [Navigation](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/app/router.dart): `lib/src/app/router.dart`
- [Home](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/home): `lib/src/features/home`

### Booking journey

- [Field availability](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/availability): `lib/src/features/availability`
- [Create booking](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/features/availability/presentation/screens/create_booking_screen.dart): `lib/src/features/availability/presentation/screens/create_booking_screen.dart`
- [My bookings](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/bookings): `lib/src/features/bookings`
- [Payment QR](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/payments): `lib/src/features/payments`

### Account

- [Authentication](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/auth): `lib/src/features/auth`
- [User profile](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/profile): `lib/src/features/profile`
- [Notifications](https://github.com/kbdevs12/cahaya-futsal-frontend/tree/main/lib/src/features/notifications): `lib/src/features/notifications`

### Shared services

- [HTTP client](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/core/network/dio_client.dart): `lib/src/core/network/dio_client.dart`
- [Token storage](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/core/storage/token_storage.dart): `lib/src/core/storage/token_storage.dart`
- [Push messaging](https://github.com/kbdevs12/cahaya-futsal-frontend/blob/main/lib/src/core/notifications/fcm_service.dart): `lib/src/core/notifications/fcm_service.dart`

### Other components

- **User**
- **Backend API**
- **Firebase**

## Connections

- User → Flutter entry: launches
- Flutter entry → App shell: starts
- App shell → Navigation: uses navigation
- Navigation → Authentication: routes
- Navigation → Home: routes
- Navigation → Field availability: routes
- Navigation → My bookings: routes
- Navigation → Payment QR: routes
- Navigation → User profile: routes
- Navigation → Notifications: routes
- Field availability → Create booking: offers booking
