# shin201005/gamestoregba_mobile architecture

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

- Interactive diagram: https://gitdiagram.com/shin201005/gamestoregba_mobile
- Repository: https://github.com/shin201005/gamestoregba_mobile

## Overview

GameStore is a Flutter app for browsing, organizing, and playing classic GBA/GB/GBC games, with user accounts and an admin area. The documented user flow is to sign in, browse or search the catalog, inspect a game, then launch it in an embedded EmulatorJS player. Favorites, library membership, account state, and theme preferences are additional capabilities. The README describes WebView, SharedPreferences, and XAMPP integration; source excerpts were not provided for the Dart implementation, so those links reflect README claims rather than inspected calls.

Main entry points: [`lib/services/game_service.dart`](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/game_service.dart) (Game service), [`lib/services/auth_service.dart`](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/auth_service.dart) (Authentication service), [`lib/main.dart`](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/main.dart) (App entry), [`lib/pages/home_page.dart`](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/home_page.dart) (Home and store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_navigation["Screen navigation<br/>[main_page.dart]"]
end

subgraph group_catalog["Game catalog"]
  node_home["Home and store<br/>[home_page.dart]"]
  node_search["Game search<br/>[search_page.dart]"]
  node_game_model["Game model<br/>[game_model.dart]"]
  node_game_data["Game catalog data<br/>[games.json]"]
  node_game_detail["Game details"]
  node_library["Game library<br/>[library_page.dart]"]
  node_favorites["Favorites"]
  node_game_service["Game service<br/>[game_service.dart]"]
end

subgraph group_account["Accounts and admin"]
  node_login["Sign in<br/>[login_page.dart]"]
  node_register["Registration<br/>[register_page.dart]"]
  node_auth_service["Authentication service<br/>[auth_service.dart]"]
  node_user_model["User model<br/>[user_model.dart]"]
  node_admin["Admin screens"]
end

subgraph group_play["Play and preferences"]
  node_player["Game player"]
  node_emulator["EmulatorJS"]
  node_webview["WebView integration"]
  node_xampp["XAMPP host"]
  node_roms["ROM files"]
  node_preferences[("Local preferences")]
  node_favorite_service["Favorite service"]
  node_library_service["Library service"]
  node_theme["Theme settings<br/>[theme_service.dart]"]
end

node_user(("User"))

node_user -->|"opens app"| node_app_entry
node_app_entry -.->|"starts navigation"| node_navigation
node_user -->|"signs in"| node_login
node_user -->|"registers"| node_register
node_login -->|"authenticates"| node_auth_service
node_register -->|"creates account"| node_auth_service
node_user -->|"browses games"| node_home
node_user -->|"searches games"| node_search
node_home -.->|"loads games"| node_game_service
node_search -->|"filters games"| node_game_service
node_game_service -.->|"reads catalog"| node_game_data
node_user -->|"opens details"| node_game_detail
node_user -->|"manages library"| node_library
node_user -->|"manages favorites"| node_favorites
node_favorites -.->|"updates favorites"| node_favorite_service
node_library -.->|"updates library"| node_library_service
node_user -->|"plays game"| node_player
node_player -->|"opens player"| node_webview
node_webview -->|"hosts emulator"| node_emulator
node_emulator -->|"loads from host"| node_xampp
node_xampp -->|"serves ROMs"| node_roms
node_auth_service -->|"stores session"| node_preferences
node_favorite_service -->|"stores favorites"| node_preferences
node_library_service -->|"stores library"| node_preferences
node_user -->|"uses admin"| node_admin
node_user -->|"changes theme"| node_theme
node_theme -.->|"stores theme"| node_preferences

click node_app_entry "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/main.dart"
click node_navigation "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/main_page.dart"
click node_home "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/home_page.dart"
click node_search "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/search_page.dart"
click node_game_model "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/models/game_model.dart"
click node_game_data "https://github.com/shin201005/gamestoregba_mobile/blob/main/assets/data/games.json"
click node_game_detail "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/game_detail_page.dart"
click node_library "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/library_page.dart"
click node_favorites "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/favorites_page.dart"
click node_game_service "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/game_service.dart"
click node_login "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/login_page.dart"
click node_register "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/register_page.dart"
click node_auth_service "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/auth_service.dart"
click node_user_model "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/models/user_model.dart"
click node_admin "https://github.com/shin201005/gamestoregba_mobile/tree/main/lib/pages/admin"
click node_player "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/play_game_page.dart"
click node_webview "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/play_game_page.dart"
click node_favorite_service "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/favorite_service.dart"
click node_library_service "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/library_service.dart"
click node_theme "https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/theme_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_entry,node_navigation,node_user toneBlue
class node_home,node_search,node_game_model,node_game_data,node_game_detail,node_library,node_favorites,node_game_service toneAmber
class node_login,node_register,node_auth_service,node_user_model,node_admin toneMint
class node_player,node_emulator,node_webview,node_xampp,node_roms,node_preferences,node_favorite_service,node_library_service,node_theme toneRose
```

## Components

### App navigation

- [App entry](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/main.dart): `lib/main.dart`
- [Screen navigation](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/main_page.dart): `lib/pages/main_page.dart`

### Game catalog

- [Home and store](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/home_page.dart): `lib/pages/home_page.dart`
- [Game search](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/search_page.dart): `lib/pages/search_page.dart`
- [Game model](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/models/game_model.dart): `lib/models/game_model.dart`
- [Game catalog data](https://github.com/shin201005/gamestoregba_mobile/blob/main/assets/data/games.json): `assets/data/games.json`
- [Game details](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/game_detail_page.dart): `lib/pages/game_detail_page.dart`
- [Game library](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/library_page.dart): `lib/pages/library_page.dart`
- [Favorites](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/favorites_page.dart): `lib/pages/favorites_page.dart`
- [Game service](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/game_service.dart): `lib/services/game_service.dart`

### Accounts and admin

- [Sign in](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/login_page.dart): `lib/pages/login_page.dart`
- [Registration](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/register_page.dart): `lib/pages/register_page.dart`
- [Authentication service](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [User model](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/models/user_model.dart): `lib/models/user_model.dart`
- [Admin screens](https://github.com/shin201005/gamestoregba_mobile/tree/main/lib/pages/admin): `lib/pages/admin`

### Play and preferences

- [Game player](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/play_game_page.dart): `lib/pages/play_game_page.dart`
- **EmulatorJS**
- [WebView integration](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/pages/play_game_page.dart): `lib/pages/play_game_page.dart`
- **XAMPP host**
- **ROM files**
- **Local preferences**
- [Favorite service](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/favorite_service.dart): `lib/services/favorite_service.dart`
- [Library service](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/library_service.dart): `lib/services/library_service.dart`
- [Theme settings](https://github.com/shin201005/gamestoregba_mobile/blob/main/lib/services/theme_service.dart): `lib/services/theme_service.dart`

### Other components

- **User**

## Connections

- User → App entry: opens app (evidence: `README.md`)
- App entry → Screen navigation: starts navigation
- User → Sign in: signs in (evidence: `README.md`)
- User → Registration: registers (evidence: `README.md`)
- Sign in → Authentication service: authenticates (evidence: `README.md`)
- Registration → Authentication service: creates account (evidence: `README.md`)
- User → Home and store: browses games (evidence: `README.md`)
- User → Game search: searches games (evidence: `README.md`)
- Home and store → Game service: loads games
- Game search → Game service: filters games (evidence: `README.md`)
- Game service → Game catalog data: reads catalog
- User → Game details: opens details (evidence: `README.md`)
- User → Game library: manages library (evidence: `README.md`)
- User → Favorites: manages favorites (evidence: `README.md`)
- Favorites → Favorite service: updates favorites
- Game library → Library service: updates library
- User → Game player: plays game (evidence: `README.md`)
- Game player → WebView integration: opens player (evidence: `README.md`)
- WebView integration → EmulatorJS: hosts emulator (evidence: `README.md`)
- EmulatorJS → XAMPP host: loads from host (evidence: `README.md`)
- XAMPP host → ROM files: serves ROMs (evidence: `README.md`)
- Authentication service → Local preferences: stores session (evidence: `README.md`)
- Favorite service → Local preferences: stores favorites (evidence: `README.md`)
- Library service → Local preferences: stores library (evidence: `README.md`)
- User → Admin screens: uses admin (evidence: `README.md`)
- User → Theme settings: changes theme (evidence: `README.md`)
- Theme settings → Local preferences: stores theme
