# aaryanpartap/office_location_tracker_mobile architecture

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

- Interactive diagram: https://gitdiagram.com/aaryanpartap/office_location_tracker_mobile
- Repository: https://github.com/aaryanpartap/office_location_tracker_mobile

## Overview

PingME is a Flutter employee attendance and location-tracking app with separate employee and admin workflows. Users authenticate, employees check in and share live/background location and chat; admins monitor statuses, inspect maps and route history, configure work zones, and export reports. The README documents the main capabilities and architecture, but the Dart implementation was not sampled, so some subsystem links are documented rather than verified at call-site level.

Main entry points: [`employee_location_tracker/lib/screens/employee_dashboard_screen.dart`](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/employee_dashboard_screen.dart) (Employee dashboard), [`employee_location_tracker/lib/screens/admin_dashboard_screen.dart`](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/admin_dashboard_screen.dart) (Admin dashboard), [`employee_location_tracker/lib/screens/location_tracking_dashboard_screen.dart`](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/location_tracking_dashboard_screen.dart) (Tracking dashboard), [`employee_location_tracker/lib/repositories/firebase_tracking_repository.dart`](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/firebase_tracking_repository.dart) (Firebase repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_main["App entry<br/>[main.dart]"]
  node_root_app["Root app<br/>[app.dart]"]
  node_login["Login<br/>[login_screen.dart]"]
  node_otp["OTP verification"]
  node_employee_dashboard["Employee dashboard"]
  node_admin_dashboard["Admin dashboard"]
  node_chat["Direct chat<br/>[chat_screen.dart]"]
end

subgraph group_tracking["Tracking and analytics"]
  node_tracking_dashboard["Tracking dashboard"]
  node_map["Tracking maps"]
  node_route_history["Route history"]
  node_heatmap["Heatmap analytics"]
  node_work_zones["Work zones<br/>[work_zone.dart]"]
  node_export["PDF export"]
end

subgraph group_data["State and data"]
  node_providers["Tracking state"]
  node_repository["Tracking repository"]
  node_firebase_repository["Firebase repository"]
  node_mock_repository["Mock repository"]
  node_device_tracking["Device tracking"]
  node_config["Backend mode config<br/>[app_config.dart]"]
end

subgraph group_integrations["External services"]
  node_firebase_auth{{"Firebase Auth"}}
  node_firestore[("Cloud Firestore")]
  node_google_maps{{"Google Maps"}}
  node_firebase_storage[("Firebase Storage")]
  node_tracking_service{{"Geolocation services"}}
end

node_employee(("Employee"))
node_admin(("Admin"))

node_main -->|"starts"| node_root_app
node_employee -->|"signs in"| node_login
node_admin -->|"signs in"| node_login
node_login -->|"verifies phone"| node_otp
node_otp -->|"authenticates with"| node_firebase_auth
node_employee -->|"uses"| node_employee_dashboard
node_admin -->|"uses"| node_admin_dashboard
node_employee_dashboard -.->|"manages attendance"| node_providers
node_admin_dashboard -->|"monitors team"| node_tracking_dashboard
node_employee_dashboard -->|"tracks location"| node_device_tracking
node_device_tracking -->|"gets location"| node_tracking_service
node_tracking_dashboard -->|"shows locations"| node_map
node_tracking_dashboard -->|"shows routes"| node_route_history
node_tracking_dashboard -->|"renders hotspots"| node_heatmap
node_admin_dashboard -->|"sets zones"| node_work_zones
node_admin_dashboard -->|"exports reports"| node_export
node_employee_dashboard -->|"opens chat"| node_chat
node_providers -.->|"uses"| node_repository
node_repository -->|"implemented by"| node_firebase_repository
node_repository -->|"implemented by"| node_mock_repository
node_config -->|"selects demo mode"| node_mock_repository
node_config -->|"selects production mode"| node_firebase_repository
node_firebase_repository -->|"stores tracking data"| node_firestore
node_firebase_repository -.->|"uses storage"| node_firebase_storage
node_map -->|"renders maps"| node_google_maps

click node_main "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/main.dart"
click node_root_app "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/app.dart"
click node_login "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/login_screen.dart"
click node_otp "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/otp_verification_screen.dart"
click node_employee_dashboard "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/employee_dashboard_screen.dart"
click node_admin_dashboard "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/admin_dashboard_screen.dart"
click node_chat "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/chat_screen.dart"
click node_tracking_dashboard "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/location_tracking_dashboard_screen.dart"
click node_map "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/widgets/location_tracking_map_widget.dart"
click node_route_history "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/tracker_map_widget.dart"
click node_heatmap "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/services/heat_map_utils.dart"
click node_work_zones "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/models/work_zone.dart"
click node_export "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/services/tracking_export_service.dart"
click node_providers "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/providers/tracking_provider.dart"
click node_repository "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/tracking_repository.dart"
click node_firebase_repository "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/firebase_tracking_repository.dart"
click node_mock_repository "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/mock_tracking_repository.dart"
click node_device_tracking "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/services/device_tracking_service.dart"
click node_config "https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/core/app_config.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_main,node_root_app,node_login,node_otp,node_employee_dashboard,node_admin_dashboard,node_chat toneBlue
class node_tracking_dashboard,node_map,node_route_history,node_heatmap,node_work_zones,node_export toneAmber
class node_providers,node_repository,node_firebase_repository,node_mock_repository,node_device_tracking,node_config toneMint
class node_firebase_auth,node_firestore,node_google_maps,node_firebase_storage,node_tracking_service toneRose
class node_employee,node_admin toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/main.dart): `employee_location_tracker/lib/main.dart`
- [Root app](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/app.dart): `employee_location_tracker/lib/app.dart`
- [Login](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/login_screen.dart): `employee_location_tracker/lib/screens/login_screen.dart`
- [OTP verification](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/otp_verification_screen.dart): `employee_location_tracker/lib/screens/otp_verification_screen.dart`
- [Employee dashboard](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/employee_dashboard_screen.dart): `employee_location_tracker/lib/screens/employee_dashboard_screen.dart`
- [Admin dashboard](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/admin_dashboard_screen.dart): `employee_location_tracker/lib/screens/admin_dashboard_screen.dart`
- [Direct chat](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/chat_screen.dart): `employee_location_tracker/lib/screens/chat_screen.dart`

### Tracking and analytics

- [Tracking dashboard](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/location_tracking_dashboard_screen.dart): `employee_location_tracker/lib/screens/location_tracking_dashboard_screen.dart`
- [Tracking maps](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/widgets/location_tracking_map_widget.dart): `employee_location_tracker/lib/widgets/location_tracking_map_widget.dart`
- [Route history](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/screens/tracker_map_widget.dart): `employee_location_tracker/lib/screens/tracker_map_widget.dart`
- [Heatmap analytics](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/services/heat_map_utils.dart): `employee_location_tracker/lib/services/heat_map_utils.dart`
- [Work zones](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/models/work_zone.dart): `employee_location_tracker/lib/models/work_zone.dart`
- [PDF export](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/services/tracking_export_service.dart): `employee_location_tracker/lib/services/tracking_export_service.dart`

### State and data

- [Tracking state](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/providers/tracking_provider.dart): `employee_location_tracker/lib/providers/tracking_provider.dart`
- [Tracking repository](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/tracking_repository.dart): `employee_location_tracker/lib/repositories/tracking_repository.dart`
- [Firebase repository](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/firebase_tracking_repository.dart): `employee_location_tracker/lib/repositories/firebase_tracking_repository.dart`
- [Mock repository](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/repositories/mock_tracking_repository.dart): `employee_location_tracker/lib/repositories/mock_tracking_repository.dart`
- [Device tracking](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/services/device_tracking_service.dart): `employee_location_tracker/lib/services/device_tracking_service.dart`
- [Backend mode config](https://github.com/aaryanpartap/office_location_tracker_mobile/blob/main/employee_location_tracker/lib/core/app_config.dart): `employee_location_tracker/lib/core/app_config.dart`

### External services

- **Firebase Auth**
- **Cloud Firestore**
- **Google Maps**
- **Firebase Storage**
- **Geolocation services**

### Other components

- **Employee**
- **Admin**

## Connections

- App entry → Root app: starts (evidence: `README.md`)
- Employee → Login: signs in (evidence: `README.md`)
- Admin → Login: signs in (evidence: `README.md`)
- Login → OTP verification: verifies phone (evidence: `README.md`)
- OTP verification → Firebase Auth: authenticates with (evidence: `README.md`)
- Employee → Employee dashboard: uses (evidence: `README.md`)
- Admin → Admin dashboard: uses (evidence: `README.md`)
- Employee dashboard → Tracking state: manages attendance
- Admin dashboard → Tracking dashboard: monitors team (evidence: `README.md`)
- Employee dashboard → Device tracking: tracks location (evidence: `README.md`)
- Device tracking → Geolocation services: gets location (evidence: `README.md`)
- Tracking dashboard → Tracking maps: shows locations (evidence: `README.md`)
- Tracking dashboard → Route history: shows routes (evidence: `README.md`)
- Tracking dashboard → Heatmap analytics: renders hotspots (evidence: `README.md`)
- Admin dashboard → Work zones: sets zones (evidence: `README.md`)
- Admin dashboard → PDF export: exports reports (evidence: `README.md`)
- Employee dashboard → Direct chat: opens chat (evidence: `README.md`)
- Tracking state → Tracking repository: uses
- Tracking repository → Firebase repository: implemented by (evidence: `README.md`)
- Tracking repository → Mock repository: implemented by (evidence: `README.md`)
- Backend mode config → Mock repository: selects demo mode (evidence: `README.md`)
- Backend mode config → Firebase repository: selects production mode (evidence: `README.md`)
- Firebase repository → Cloud Firestore: stores tracking data (evidence: `README.md`)
- Firebase repository → Firebase Storage: uses storage (evidence: `README.md`)
- Tracking maps → Google Maps: renders maps (evidence: `README.md`)
