# mazenturk201/love-choice architecture

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

- Interactive diagram: https://gitdiagram.com/mazenturk201/love-choice
- Repository: https://github.com/mazenturk201/love-choice

## Overview

Love Choice is a Flutter party game for friends, families, and couples, centered on questions and challenges. The documented user journey is to open the game and play category-based prompts; the tree also indicates online play, authentication, profiles, and local data support. Source excerpts do not include the Dart implementation, so feature-to-feature links are shown as unverified rather than asserted; the README supports the player-to-game relationship and the category-based gameplay description.

Main entry points: [`lib/screens/home.dart`](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/home.dart) (Home Screen), [`lib/main.dart`](https://github.com/mazenturk201/love-choice/blob/main/lib/main.dart) (Flutter Entry), [`lib/screens/gamepage.dart`](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/gamepage.dart) (Question Game), [`lib/screens/onlineHome.dart`](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineHome.dart) (Online Home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_entry["Flutter Entry<br/>[main.dart]"]
  node_home["Home Screen<br/>[home.dart]"]
  node_navigation["Route Definitions<br/>[routerRoutes.dart]"]
  node_onboarding["Onboarding<br/>[onboarding.dart]"]
end

subgraph group_play["Party Gameplay"]
  node_game["Question Game<br/>[gamepage.dart]"]
  node_cards["Card Display<br/>[carddisplay.dart]"]
  node_cardbuilder["Card Builder<br/>[buildcard.dart]"]
end

subgraph group_online["Online Play"]
  node_onlinehome["Online Home<br/>[onlineHome.dart]"]
  node_room["Room Service<br/>[room_service.dart]"]
  node_chat["Online Chat<br/>[onlineChat.dart]"]
  node_chatinfo["Chat Info"]
end

subgraph group_account["Accounts and Data"]
  node_authgate["Auth Gate<br/>[authGate.dart]"]
  node_auth["Sign-in<br/>[auth.dart]"]
  node_profile["User Profile<br/>[profile.dart]"]
  node_settings["Settings<br/>[setting.dart]"]
  node_localauth["Local Authentication<br/>[localAuth.dart]"]
  node_database[("Local Database<br/>[db_helper.dart]")]
  node_globaldata["Global Data<br/>[globalData.dart]"]
end

node_player(("Players"))

node_player -->|"opens game"| node_entry
node_entry -.->|"starts at"| node_home
node_home -.->|"starts play"| node_game
node_game -.->|"shows prompts"| node_cards
node_cards -.->|"uses"| node_cardbuilder
node_home -.->|"routes via"| node_navigation
node_entry -.->|"may show"| node_onboarding
node_home -.->|"opens online play"| node_onlinehome
node_onlinehome -.->|"uses rooms"| node_room
node_onlinehome -.->|"opens chat"| node_chat
node_chat -.->|"shows details"| node_chatinfo
node_entry -.->|"checks access"| node_authgate
node_authgate -.->|"routes to sign-in"| node_auth
node_home -.->|"opens profile"| node_profile
node_home -.->|"opens settings"| node_settings
node_auth -.->|"may authenticate"| node_localauth
node_game -.->|"may read prompts"| node_database
node_profile -.->|"may use"| node_globaldata

click node_entry "https://github.com/mazenturk201/love-choice/blob/main/lib/main.dart"
click node_home "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/home.dart"
click node_navigation "https://github.com/mazenturk201/love-choice/blob/main/lib/data/routerRoutes.dart"
click node_onboarding "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onboarding.dart"
click node_game "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/gamepage.dart"
click node_cards "https://github.com/mazenturk201/love-choice/blob/main/lib/modules/carddisplay.dart"
click node_cardbuilder "https://github.com/mazenturk201/love-choice/blob/main/lib/modules/buildcard.dart"
click node_onlinehome "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineHome.dart"
click node_room "https://github.com/mazenturk201/love-choice/blob/main/lib/data/room_service.dart"
click node_chat "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineChat.dart"
click node_chatinfo "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineChatInfo.dart"
click node_authgate "https://github.com/mazenturk201/love-choice/blob/main/lib/modules/authGate.dart"
click node_auth "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/auth.dart"
click node_profile "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/profile.dart"
click node_settings "https://github.com/mazenturk201/love-choice/blob/main/lib/screens/setting.dart"
click node_localauth "https://github.com/mazenturk201/love-choice/blob/main/lib/data/localAuth.dart"
click node_database "https://github.com/mazenturk201/love-choice/blob/main/lib/data/db_helper.dart"
click node_globaldata "https://github.com/mazenturk201/love-choice/blob/main/lib/data/globalData.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_home,node_navigation,node_onboarding toneBlue
class node_game,node_cards,node_cardbuilder toneAmber
class node_onlinehome,node_room,node_chat,node_chatinfo toneMint
class node_authgate,node_auth,node_profile,node_settings,node_localauth,node_database,node_globaldata toneRose
class node_player toneIndigo
```

## Components

### App Shell

- [Flutter Entry](https://github.com/mazenturk201/love-choice/blob/main/lib/main.dart): `lib/main.dart`
- [Home Screen](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/home.dart): `lib/screens/home.dart`
- [Route Definitions](https://github.com/mazenturk201/love-choice/blob/main/lib/data/routerRoutes.dart): `lib/data/routerRoutes.dart`
- [Onboarding](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onboarding.dart): `lib/screens/onboarding.dart`

### Party Gameplay

- [Question Game](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/gamepage.dart): `lib/screens/gamepage.dart`
- [Card Display](https://github.com/mazenturk201/love-choice/blob/main/lib/modules/carddisplay.dart): `lib/modules/carddisplay.dart`
- [Card Builder](https://github.com/mazenturk201/love-choice/blob/main/lib/modules/buildcard.dart): `lib/modules/buildcard.dart`

### Online Play

- [Online Home](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineHome.dart): `lib/screens/onlineHome.dart`
- [Room Service](https://github.com/mazenturk201/love-choice/blob/main/lib/data/room_service.dart): `lib/data/room_service.dart`
- [Online Chat](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineChat.dart): `lib/screens/onlineChat.dart`
- [Chat Info](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/onlineChatInfo.dart): `lib/screens/onlineChatInfo.dart`

### Accounts and Data

- [Auth Gate](https://github.com/mazenturk201/love-choice/blob/main/lib/modules/authGate.dart): `lib/modules/authGate.dart`
- [Sign-in](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/auth.dart): `lib/screens/auth.dart`
- [User Profile](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/profile.dart): `lib/screens/profile.dart`
- [Settings](https://github.com/mazenturk201/love-choice/blob/main/lib/screens/setting.dart): `lib/screens/setting.dart`
- [Local Authentication](https://github.com/mazenturk201/love-choice/blob/main/lib/data/localAuth.dart): `lib/data/localAuth.dart`
- [Local Database](https://github.com/mazenturk201/love-choice/blob/main/lib/data/db_helper.dart): `lib/data/db_helper.dart`
- [Global Data](https://github.com/mazenturk201/love-choice/blob/main/lib/data/globalData.dart): `lib/data/globalData.dart`

### Other components

- **Players**

## Connections

- Players → Flutter Entry: opens game (evidence: `README.md`)
- Flutter Entry → Home Screen: starts at
- Home Screen → Question Game: starts play
- Question Game → Card Display: shows prompts
- Card Display → Card Builder: uses
- Home Screen → Route Definitions: routes via
- Flutter Entry → Onboarding: may show
- Home Screen → Online Home: opens online play
- Online Home → Room Service: uses rooms
- Online Home → Online Chat: opens chat
- Online Chat → Chat Info: shows details
- Flutter Entry → Auth Gate: checks access
- Auth Gate → Sign-in: routes to sign-in
- Home Screen → User Profile: opens profile
- Home Screen → Settings: opens settings
- Sign-in → Local Authentication: may authenticate
- Question Game → Local Database: may read prompts
- User Profile → Global Data: may use
