# phuoc-link/eventhub-mobile architecture

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

- Interactive diagram: https://gitdiagram.com/phuoc-link/eventhub-mobile
- Repository: https://github.com/phuoc-link/eventhub-mobile

## Overview

EventHub is a Flutter client for managing and registering for events through a REST API. Users sign in, explore and inspect events, register for individual schedules, and manage profiles or events they own. The README also documents place search, image uploads, notifications, participant lists, and registration management. Dart implementation excerpts were not provided, so feature-to-provider and provider-to-repository calls are not asserted; documented API interactions are cited to the README.

Main entry points: [`lib/features/auth/presentation/providers/auth_provider.dart`](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/presentation/providers/auth_provider.dart) (Authentication state), [`lib/main.dart`](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/main.dart) (Flutter app), [`lib/core/router/main_shell.dart`](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/router/main_shell.dart) (Navigation shell), [`lib/features/auth/presentation/screens/login_screen.dart`](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/presentation/screens/login_screen.dart) (Login and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Core"]
  node_app_entry["Flutter app<br/>[main.dart]"]
  node_app_shell["Navigation shell<br/>[main_shell.dart]"]
  node_routing["App routing<br/>[app_router.dart]"]
  node_api_client["REST client<br/>[dio_client.dart]"]
  node_token_storage[("Token storage<br/>[token_storage.dart]")]
end

subgraph group_identity["Accounts"]
  node_auth_ui["Login and signup<br/>[login_screen.dart]"]
  node_auth_state["Authentication state<br/>[auth_provider.dart]"]
  node_auth_data["Account access"]
  node_profile_ui["Profile screens"]
  node_profile_actions["Profile actions"]
  node_profile_data["Profile data"]
end

subgraph group_events["Event Discovery and Management"]
  node_explore["Event discovery"]
  node_explore_state["Explore filters"]
  node_event_detail["Event details"]
  node_event_form["Create and edit"]
  node_event_data["Event data access"]
  node_place_search["Place search"]
  node_my_events["Owned events"]
end

subgraph group_engagement["Participation and Updates"]
  node_registrations["My registrations"]
  node_registration_actions["Registration actions"]
  node_registration_data["Registration data"]
  node_participants["Schedule participants"]
  node_notifications["Notifications"]
  node_notification_data["Notification data"]
end

node_user(("App user"))
node_api{{"EventHub REST API"}}

node_user -->|"opens"| node_app_entry
node_app_entry -.->|"starts"| node_app_shell
node_user -->|"signs in"| node_auth_ui
node_auth_ui -.->|"submits credentials"| node_auth_state
node_auth_state -.->|"requests access"| node_auth_data
node_auth_data -.->|"authenticates"| node_api
node_user -->|"browses events"| node_explore
node_explore -->|"fetches filtered events"| node_api
node_user -->|"opens event"| node_event_detail
node_event_detail -->|"loads event schedules"| node_api
node_user -->|"views registrations"| node_registrations
node_registrations -->|"fetches registrations"| node_api
node_user -->|"registers or cancels"| node_registration_actions
node_registration_actions -->|"updates registration"| node_api
node_user -->|"creates or edits"| node_event_form
node_event_form -->|"saves event"| node_api
node_user -->|"manages events"| node_my_events
node_my_events -->|"loads owned events"| node_api
node_user -->|"searches places"| node_place_search
node_place_search -.->|"requests suggestions"| node_api
node_user -->|"views attendees"| node_participants
node_participants -->|"loads attendees"| node_api
node_user -.->|"checks updates"| node_notifications
node_notifications -.->|"loads notifications"| node_api
node_user -->|"edits profile"| node_profile_ui
node_profile_ui -.->|"changes profile"| node_profile_actions
node_profile_actions -.->|"updates profile"| node_profile_data
node_profile_data -.->|"saves profile"| node_api
node_api_client -.->|"sends REST requests"| node_api
node_auth_state -.->|"persists session"| node_token_storage
node_app_shell -.->|"uses routes"| node_routing

click node_app_entry "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/main.dart"
click node_app_shell "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/router/main_shell.dart"
click node_routing "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/router/app_router.dart"
click node_api_client "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/network/dio_client.dart"
click node_token_storage "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/storage/token_storage.dart"
click node_auth_ui "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/presentation/screens/login_screen.dart"
click node_auth_state "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/presentation/providers/auth_provider.dart"
click node_auth_data "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/data/auth_repository.dart"
click node_profile_ui "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/profile/presentation/screens/profile_screen.dart"
click node_profile_actions "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/profile/presentation/providers/profile_actions_provider.dart"
click node_profile_data "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/profile/data/profile_repository.dart"
click node_explore "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/explore_screen.dart"
click node_explore_state "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/providers/explore_provider.dart"
click node_event_detail "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/event_detail_screen.dart"
click node_event_form "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/event_form_screen.dart"
click node_event_data "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/data/event_repository.dart"
click node_place_search "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/providers/place_search_provider.dart"
click node_my_events "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/my_events_screen.dart"
click node_registrations "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/presentation/screens/my_registrations_screen.dart"
click node_registration_actions "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/presentation/providers/registration_actions_provider.dart"
click node_registration_data "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/data/registration_repository.dart"
click node_participants "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/presentation/screens/schedule_participants_screen.dart"
click node_notifications "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/notifications/presentation/screens/notifications_screen.dart"
click node_notification_data "https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/notifications/data/notification_repository.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_app_shell,node_routing,node_api_client,node_token_storage,node_user toneBlue
class node_auth_ui,node_auth_state,node_auth_data,node_profile_ui,node_profile_actions,node_profile_data toneAmber
class node_explore,node_explore_state,node_event_detail,node_event_form,node_event_data,node_place_search,node_my_events,node_api toneMint
class node_registrations,node_registration_actions,node_registration_data,node_participants,node_notifications,node_notification_data toneRose
```

## Components

### Application Core

- [Flutter app](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/main.dart): `lib/main.dart`
- [Navigation shell](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/router/main_shell.dart): `lib/core/router/main_shell.dart`
- [App routing](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/router/app_router.dart): `lib/core/router/app_router.dart`
- [REST client](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/network/dio_client.dart): `lib/core/network/dio_client.dart`
- [Token storage](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/core/storage/token_storage.dart): `lib/core/storage/token_storage.dart`

### Accounts

- [Login and signup](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/presentation/screens/login_screen.dart): `lib/features/auth/presentation/screens/login_screen.dart`
- [Authentication state](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/presentation/providers/auth_provider.dart): `lib/features/auth/presentation/providers/auth_provider.dart`
- [Account access](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/auth/data/auth_repository.dart): `lib/features/auth/data/auth_repository.dart`
- [Profile screens](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/profile/presentation/screens/profile_screen.dart): `lib/features/profile/presentation/screens/profile_screen.dart`
- [Profile actions](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/profile/presentation/providers/profile_actions_provider.dart): `lib/features/profile/presentation/providers/profile_actions_provider.dart`
- [Profile data](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/profile/data/profile_repository.dart): `lib/features/profile/data/profile_repository.dart`

### Event Discovery and Management

- [Event discovery](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/explore_screen.dart): `lib/features/events/presentation/screens/explore_screen.dart`
- [Explore filters](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/providers/explore_provider.dart): `lib/features/events/presentation/providers/explore_provider.dart`
- [Event details](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/event_detail_screen.dart): `lib/features/events/presentation/screens/event_detail_screen.dart`
- [Create and edit](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/event_form_screen.dart): `lib/features/events/presentation/screens/event_form_screen.dart`
- [Event data access](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/data/event_repository.dart): `lib/features/events/data/event_repository.dart`
- [Place search](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/providers/place_search_provider.dart): `lib/features/events/presentation/providers/place_search_provider.dart`
- [Owned events](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/events/presentation/screens/my_events_screen.dart): `lib/features/events/presentation/screens/my_events_screen.dart`

### Participation and Updates

- [My registrations](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/presentation/screens/my_registrations_screen.dart): `lib/features/registrations/presentation/screens/my_registrations_screen.dart`
- [Registration actions](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/presentation/providers/registration_actions_provider.dart): `lib/features/registrations/presentation/providers/registration_actions_provider.dart`
- [Registration data](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/data/registration_repository.dart): `lib/features/registrations/data/registration_repository.dart`
- [Schedule participants](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/registrations/presentation/screens/schedule_participants_screen.dart): `lib/features/registrations/presentation/screens/schedule_participants_screen.dart`
- [Notifications](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/notifications/presentation/screens/notifications_screen.dart): `lib/features/notifications/presentation/screens/notifications_screen.dart`
- [Notification data](https://github.com/phuoc-link/eventhub-mobile/blob/main/lib/features/notifications/data/notification_repository.dart): `lib/features/notifications/data/notification_repository.dart`

### Other components

- **App user**
- **EventHub REST API**

## Connections

- App user → Flutter app: opens (evidence: `README.md`)
- Flutter app → Navigation shell: starts
- App user → Login and signup: signs in (evidence: `README.md`)
- Login and signup → Authentication state: submits credentials
- Authentication state → Account access: requests access
- Account access → EventHub REST API: authenticates
- App user → Event discovery: browses events (evidence: `README.md`)
- Event discovery → EventHub REST API: fetches filtered events (evidence: `README.md`)
- App user → Event details: opens event (evidence: `README.md`)
- Event details → EventHub REST API: loads event schedules (evidence: `README.md`)
- App user → My registrations: views registrations (evidence: `README.md`)
- My registrations → EventHub REST API: fetches registrations (evidence: `README.md`)
- App user → Registration actions: registers or cancels (evidence: `README.md`)
- Registration actions → EventHub REST API: updates registration (evidence: `README.md`)
- App user → Create and edit: creates or edits (evidence: `README.md`)
- Create and edit → EventHub REST API: saves event (evidence: `README.md`)
- App user → Owned events: manages events (evidence: `README.md`)
- Owned events → EventHub REST API: loads owned events (evidence: `README.md`)
- App user → Place search: searches places (evidence: `README.md`)
- Place search → EventHub REST API: requests suggestions
- App user → Schedule participants: views attendees (evidence: `README.md`)
- Schedule participants → EventHub REST API: loads attendees (evidence: `README.md`)
- App user → Notifications: checks updates
- Notifications → EventHub REST API: loads notifications
- App user → Profile screens: edits profile (evidence: `README.md`)
- Profile screens → Profile actions: changes profile
- Profile actions → Profile data: updates profile
- Profile data → EventHub REST API: saves profile
- REST client → EventHub REST API: sends REST requests
- Authentication state → Token storage: persists session
- Navigation shell → App routing: uses routes
