# gokul-mechaktroniker/washing-machine-app---whz architecture

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

- Interactive diagram: https://gitdiagram.com/gokul-mechaktroniker/washing-machine-app---whz
- Repository: https://github.com/gokul-mechaktroniker/washing-machine-app---whz

## Overview

WashMate.io is a Flutter laundry-monitoring app backed by Firebase. Residents authenticate, view machine availability and cycle phases, claim a machine, and receive a completion alert; machine state resets after five minutes. The README documents the major product capabilities, while sampled implementation is limited to the Cloud Functions and platform launchers, so app-to-backend relationships below rely on README statements rather than inspected Dart call sites.

Main entry points: [`lib/bottom_navigation_menu.dart`](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/bottom_navigation_menu.dart) (App navigation), [`functions/index.js`](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/functions/index.js) (Laundry automation), [`lib/main.dart`](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/main.dart) (App entry), [`lib/data/repositories/washing_machine/washing_machine_repository.dart`](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/washing_machine/washing_machine_repository.dart) (Machine repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter app"]
  node_app["App entry<br/>[main.dart]"]
  node_onboarding["Onboarding"]
  node_navigation["App navigation"]
  node_profile["User profile"]
  node_faq["Laundry FAQ<br/>[faq_screen.dart]"]
end

subgraph group_identity["Identity"]
  node_login["Login and signup<br/>[login_screen.dart]"]
  node_authflow["Auth flows"]
  node_authrepo["Authentication repository"]
end

subgraph group_laundry["Laundry operations"]
  node_home["Machine dashboard<br/>[home_screen.dart]"]
  node_machinecontroller["Machine state controller"]
  node_machinerepo["Machine repository"]
  node_machinemodel["Machine model"]
  node_notifications["Notification history"]
  node_notificationcontroller["Notification controller"]
end

subgraph group_backend["Firebase backend"]
  node_firebaseauth[("Firebase Authentication")]
  node_firestore[("Cloud Firestore")]
  node_cloudfunctions["Laundry automation<br/>[index.js]"]
  node_fcm["Firebase Cloud Messaging"]
  node_users["User data"]
end

node_resident(("Resident"))

node_resident -->|"opens"| node_app
node_app -->|"greets new users"| node_onboarding
node_app -.->|"routes through"| node_navigation
node_resident -->|"signs in"| node_login
node_login -.->|"starts auth flow"| node_authflow
node_authflow -.->|"delegates auth"| node_authrepo
node_authrepo -->|"authenticates"| node_firebaseauth
node_navigation -->|"opens dashboard"| node_home
node_home -.->|"shows live state"| node_machinecontroller
node_machinecontroller -.->|"requests machine data"| node_machinerepo
node_machinerepo -->|"listens and writes"| node_firestore
node_machinerepo -.->|"uses model"| node_machinemodel
node_cloudfunctions -->|"reads and updates"| node_firestore
node_cloudfunctions -->|"sends completion alert"| node_fcm
node_cloudfunctions -->|"persists alert and resets"| node_firestore
node_navigation -->|"opens history"| node_notifications
node_notifications -.->|"shows stored alerts"| node_notificationcontroller
node_notificationcontroller -->|"loads history"| node_firestore
node_cloudfunctions -->|"targets machine owner"| node_users
node_navigation -.->|"opens profile"| node_profile
node_navigation -.->|"opens FAQ"| node_faq

click node_app "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/main.dart"
click node_onboarding "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/authentication/screens/onboarding/onboarding_screen.dart"
click node_navigation "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/bottom_navigation_menu.dart"
click node_login "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/authentication/screens/login/login_screen.dart"
click node_authflow "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/authentication/controllers/signup/signup_controller.dart"
click node_authrepo "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/authentication/authentication_repository.dart"
click node_home "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/home/home_screen.dart"
click node_machinecontroller "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/controllers/card_controller/card_controller.dart"
click node_machinerepo "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/washing_machine/washing_machine_repository.dart"
click node_machinemodel "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/washing_machine/washing_machine_model.dart"
click node_cloudfunctions "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/functions/index.js"
click node_notifications "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/notification/notification_screen.dart"
click node_notificationcontroller "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/controllers/notification_controller/notification_controller.dart"
click node_users "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/user/user_repository.dart"
click node_profile "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/profile/profile_screen.dart"
click node_faq "https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/faq/faq_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_app,node_onboarding,node_navigation,node_profile,node_faq toneBlue
class node_login,node_authflow,node_authrepo toneAmber
class node_home,node_machinecontroller,node_machinerepo,node_machinemodel,node_notifications,node_notificationcontroller toneMint
class node_firebaseauth,node_firestore,node_cloudfunctions,node_fcm,node_users toneRose
class node_resident toneIndigo
```

## Components

### Flutter app

- [App entry](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/main.dart): `lib/main.dart`
- [Onboarding](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/authentication/screens/onboarding/onboarding_screen.dart): `lib/features/authentication/screens/onboarding/onboarding_screen.dart`
- [App navigation](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/bottom_navigation_menu.dart): `lib/bottom_navigation_menu.dart`
- [User profile](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/profile/profile_screen.dart): `lib/features/Laundry/screens/profile/profile_screen.dart`
- [Laundry FAQ](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/faq/faq_screen.dart): `lib/features/Laundry/screens/faq/faq_screen.dart`

### Identity

- [Login and signup](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/authentication/screens/login/login_screen.dart): `lib/features/authentication/screens/login/login_screen.dart`
- [Auth flows](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/authentication/controllers/signup/signup_controller.dart): `lib/features/authentication/controllers/signup/signup_controller.dart`
- [Authentication repository](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/authentication/authentication_repository.dart): `lib/data/repositories/authentication/authentication_repository.dart`

### Laundry operations

- [Machine dashboard](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/home/home_screen.dart): `lib/features/Laundry/screens/home/home_screen.dart`
- [Machine state controller](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/controllers/card_controller/card_controller.dart): `lib/features/Laundry/controllers/card_controller/card_controller.dart`
- [Machine repository](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/washing_machine/washing_machine_repository.dart): `lib/data/repositories/washing_machine/washing_machine_repository.dart`
- [Machine model](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/washing_machine/washing_machine_model.dart): `lib/data/repositories/washing_machine/washing_machine_model.dart`
- [Notification history](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/screens/notification/notification_screen.dart): `lib/features/Laundry/screens/notification/notification_screen.dart`
- [Notification controller](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/features/Laundry/controllers/notification_controller/notification_controller.dart): `lib/features/Laundry/controllers/notification_controller/notification_controller.dart`

### Firebase backend

- **Firebase Authentication**
- **Cloud Firestore**
- [Laundry automation](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/functions/index.js): `functions/index.js`
- **Firebase Cloud Messaging**
- [User data](https://github.com/gokul-mechaktroniker/washing-machine-app---whz/blob/main/lib/data/repositories/user/user_repository.dart): `lib/data/repositories/user/user_repository.dart`

### Other components

- **Resident**

## Connections

- Resident → App entry: opens (evidence: `README.md`)
- App entry → Onboarding: greets new users (evidence: `README.md`)
- App entry → App navigation: routes through
- Resident → Login and signup: signs in (evidence: `README.md`)
- Login and signup → Auth flows: starts auth flow
- Auth flows → Authentication repository: delegates auth
- Authentication repository → Firebase Authentication: authenticates (evidence: `README.md`)
- App navigation → Machine dashboard: opens dashboard (evidence: `README.md`)
- Machine dashboard → Machine state controller: shows live state
- Machine state controller → Machine repository: requests machine data
- Machine repository → Cloud Firestore: listens and writes (evidence: `README.md`)
- Machine repository → Machine model: uses model
- Laundry automation → Cloud Firestore: reads and updates (evidence: `functions/index.js`)
- Laundry automation → Firebase Cloud Messaging: sends completion alert (evidence: `functions/index.js`)
- Laundry automation → Cloud Firestore: persists alert and resets (evidence: `functions/index.js`)
- App navigation → Notification history: opens history (evidence: `README.md`)
- Notification history → Notification controller: shows stored alerts
- Notification controller → Cloud Firestore: loads history (evidence: `README.md`)
- Laundry automation → User data: targets machine owner (evidence: `functions/index.js`)
- App navigation → User profile: opens profile
- App navigation → Laundry FAQ: opens FAQ
