# abdulrhmanbadwy/studex_app architecture

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

- Interactive diagram: https://gitdiagram.com/abdulrhmanbadwy/studex_app
- Repository: https://github.com/abdulrhmanbadwy/studex_app

## Overview

Studex is a Flutter study companion for students and teachers. The main workflow is account access, finding or creating a study room, collaborating through room chat, and taking room quizzes; quiz results support room leaderboards, while teachers can view a monitoring dashboard. The app also provides onboarding, home navigation, profile and settings, localization, and offline awareness. The README describes the quiz module as Clean Architecture and other features as repository-based. Source excerpts do not show Dart call sites, so edges below rely on documented relationships; uncertain implementation links are omitted.

Main entry points: [`studex_graduation_project/lib/repositories/chat_repository.dart`](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/chat_repository.dart) (Chat repository), [`studex_graduation_project/lib/features/quiz/presentation/screens`](https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/presentation/screens) (Quiz screens), [`studex_graduation_project/lib/blocs/auth/auth_bloc.dart`](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/blocs/auth/auth_bloc.dart) (Auth state), [`studex_graduation_project/lib/features/auth`](https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/auth) (Auth screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_onboarding["Onboarding<br/>[on_boarding.dart]"]
  node_auth_ui["Auth screens"]
  node_home["Home dashboard<br/>[home_screen.dart]"]
  node_monitoring["Monitoring dashboard"]
  node_settings["Settings and profile"]
end

subgraph group_collaboration["Study collaboration"]
  node_rooms["Room discovery<br/>[rooms_list.dart]"]
  node_room_creation["Room creation<br/>[create_room.dart]"]
  node_room_repository["Room repository"]
  node_chat["Room chat<br/>[chat_screen.dart]"]
  node_chat_repository["Chat repository"]
end

subgraph group_quiz["Quiz lifecycle"]
  node_quiz_ui["Quiz screens"]
  node_quiz_cubits["Quiz Cubits"]
  node_quiz_use_cases["Quiz use cases"]
  node_quiz_repository["Quiz repository"]
  node_quiz_source["Quiz data source"]
  node_leaderboard["Leaderboard"]
end

subgraph group_platform["Identity and data"]
  node_auth_state["Auth state<br/>[auth_bloc.dart]"]
  node_auth_service["Auth service<br/>[auth_service.dart]"]
  node_auth_repository["Auth repository"]
  node_firestore[("Cloud Firestore")]
  node_firebase_auth["Firebase Authentication"]
end

node_student(("Student"))
node_teacher(("Teacher"))

node_student -->|"starts with"| node_onboarding
node_onboarding -->|"continues to"| node_auth_ui
node_student -->|"signs in"| node_auth_ui
node_auth_ui -->|"managed by"| node_auth_state
node_auth_state -->|"uses session stream"| node_auth_service
node_auth_state -->|"consumes"| node_auth_repository
node_auth_service -->|"authenticates"| node_firebase_auth
node_student -->|"opens"| node_home
node_home -->|"browses rooms"| node_rooms
node_student -->|"creates room"| node_room_creation
node_rooms -->|"uses"| node_room_repository
node_room_creation -->|"uses"| node_room_repository
node_student -->|"chats in room"| node_chat
node_chat -->|"uses"| node_chat_repository
node_chat_repository -->|"streams messages"| node_firestore
node_student -->|"creates or takes"| node_quiz_ui
node_quiz_ui -->|"state via"| node_quiz_cubits
node_quiz_cubits -->|"invokes"| node_quiz_use_cases
node_quiz_use_cases -->|"uses"| node_quiz_repository
node_quiz_repository -->|"delegates to"| node_quiz_source
node_quiz_source -->|"accesses data"| node_firestore
node_quiz_ui -->|"shows rankings"| node_leaderboard
node_student -->|"compares scores"| node_leaderboard
node_teacher -->|"reviews progress"| node_monitoring
node_student -->|"manages profile"| node_settings
node_room_repository -.->|"uses backend"| node_firestore
node_chat_repository -->|"stores messages"| node_firestore

click node_onboarding "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/onboarding/on_boarding.dart"
click node_auth_ui "https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/auth"
click node_auth_state "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/blocs/auth/auth_bloc.dart"
click node_auth_service "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/core/services/auth_service.dart"
click node_auth_repository "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/auth_repository.dart"
click node_home "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/homescreen/home_screen.dart"
click node_rooms "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/rooms/screens/rooms_list.dart"
click node_room_creation "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/rooms/screens/create_room.dart"
click node_room_repository "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/room_repository.dart"
click node_chat "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/chat/presentation/screens/chat_screen.dart"
click node_chat_repository "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/chat_repository.dart"
click node_quiz_ui "https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/presentation/screens"
click node_quiz_cubits "https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/presentation/cubits"
click node_quiz_use_cases "https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/domain/use_cases"
click node_quiz_repository "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/quiz/data/repositories/quiz_repository_impl.dart"
click node_quiz_source "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/quiz/data/data_source/quiz_remote_data_source_impl.dart"
click node_leaderboard "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/quiz/presentation/screens/leaderboard_screen.dart"
click node_monitoring "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/monitoringPanel/dashboard_screen.dart"
click node_settings "https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/settings/screens/settings_screen.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_onboarding,node_auth_ui,node_home,node_monitoring,node_settings toneBlue
class node_rooms,node_room_creation,node_room_repository,node_chat,node_chat_repository toneAmber
class node_quiz_ui,node_quiz_cubits,node_quiz_use_cases,node_quiz_repository,node_quiz_source,node_leaderboard toneMint
class node_auth_state,node_auth_service,node_auth_repository,node_firestore,node_firebase_auth toneRose
class node_student,node_teacher toneIndigo
```

## Components

### App experience

- [Onboarding](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/onboarding/on_boarding.dart): `studex_graduation_project/lib/features/onboarding/on_boarding.dart`
- [Auth screens](https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/auth): `studex_graduation_project/lib/features/auth`
- [Home dashboard](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/homescreen/home_screen.dart): `studex_graduation_project/lib/features/homescreen/home_screen.dart`
- [Monitoring dashboard](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/monitoringPanel/dashboard_screen.dart): `studex_graduation_project/lib/features/monitoringPanel/dashboard_screen.dart`
- [Settings and profile](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/settings/screens/settings_screen.dart): `studex_graduation_project/lib/features/settings/screens/settings_screen.dart`

### Study collaboration

- [Room discovery](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/rooms/screens/rooms_list.dart): `studex_graduation_project/lib/features/rooms/screens/rooms_list.dart`
- [Room creation](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/rooms/screens/create_room.dart): `studex_graduation_project/lib/features/rooms/screens/create_room.dart`
- [Room repository](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/room_repository.dart): `studex_graduation_project/lib/repositories/room_repository.dart`
- [Room chat](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/chat/presentation/screens/chat_screen.dart): `studex_graduation_project/lib/features/chat/presentation/screens/chat_screen.dart`
- [Chat repository](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/chat_repository.dart): `studex_graduation_project/lib/repositories/chat_repository.dart`

### Quiz lifecycle

- [Quiz screens](https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/presentation/screens): `studex_graduation_project/lib/features/quiz/presentation/screens`
- [Quiz Cubits](https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/presentation/cubits): `studex_graduation_project/lib/features/quiz/presentation/cubits`
- [Quiz use cases](https://github.com/abdulrhmanbadwy/studex_app/tree/main/studex_graduation_project/lib/features/quiz/domain/use_cases): `studex_graduation_project/lib/features/quiz/domain/use_cases`
- [Quiz repository](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/quiz/data/repositories/quiz_repository_impl.dart): `studex_graduation_project/lib/features/quiz/data/repositories/quiz_repository_impl.dart`
- [Quiz data source](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/quiz/data/data_source/quiz_remote_data_source_impl.dart): `studex_graduation_project/lib/features/quiz/data/data_source/quiz_remote_data_source_impl.dart`
- [Leaderboard](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/features/quiz/presentation/screens/leaderboard_screen.dart): `studex_graduation_project/lib/features/quiz/presentation/screens/leaderboard_screen.dart`

### Identity and data

- [Auth state](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/blocs/auth/auth_bloc.dart): `studex_graduation_project/lib/blocs/auth/auth_bloc.dart`
- [Auth service](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/core/services/auth_service.dart): `studex_graduation_project/lib/core/services/auth_service.dart`
- [Auth repository](https://github.com/abdulrhmanbadwy/studex_app/blob/main/studex_graduation_project/lib/repositories/auth_repository.dart): `studex_graduation_project/lib/repositories/auth_repository.dart`
- **Cloud Firestore**
- **Firebase Authentication**

### Other components

- **Student**
- **Teacher**

## Connections

- Student → Onboarding: starts with (evidence: `README.md`)
- Onboarding → Auth screens: continues to (evidence: `README.md`)
- Student → Auth screens: signs in (evidence: `README.md`)
- Auth screens → Auth state: managed by (evidence: `README.md`)
- Auth state → Auth service: uses session stream (evidence: `README.md`)
- Auth state → Auth repository: consumes (evidence: `README.md`)
- Auth service → Firebase Authentication: authenticates (evidence: `README.md`)
- Student → Home dashboard: opens (evidence: `README.md`)
- Home dashboard → Room discovery: browses rooms (evidence: `README.md`)
- Student → Room creation: creates room (evidence: `README.md`)
- Room discovery → Room repository: uses (evidence: `README.md`)
- Room creation → Room repository: uses (evidence: `README.md`)
- Student → Room chat: chats in room (evidence: `README.md`)
- Room chat → Chat repository: uses (evidence: `README.md`)
- Chat repository → Cloud Firestore: streams messages (evidence: `README.md`)
- Student → Quiz screens: creates or takes (evidence: `README.md`)
- Quiz screens → Quiz Cubits: state via (evidence: `README.md`)
- Quiz Cubits → Quiz use cases: invokes (evidence: `README.md`)
- Quiz use cases → Quiz repository: uses (evidence: `README.md`)
- Quiz repository → Quiz data source: delegates to (evidence: `README.md`)
- Quiz data source → Cloud Firestore: accesses data (evidence: `README.md`)
- Quiz screens → Leaderboard: shows rankings (evidence: `README.md`)
- Student → Leaderboard: compares scores (evidence: `README.md`)
- Teacher → Monitoring dashboard: reviews progress (evidence: `README.md`)
- Student → Settings and profile: manages profile (evidence: `README.md`)
- Room repository → Cloud Firestore: uses backend
- Chat repository → Cloud Firestore: stores messages (evidence: `README.md`)
