# ishitachvn/attendance-app architecture

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

- Interactive diagram: https://gitdiagram.com/ishitachvn/attendance-app
- Repository: https://github.com/ishitachvn/attendance-app

## Overview

MediTrack is a Flutter attendance and municipal-worker tracking app. Workers authenticate, mark geofenced attendance with location and photo proof, and send GPS updates; administrators view worker locations, route history, and attendance logs. The tree identifies the screens, services, and models, while the README documents the main capabilities and Firebase integrations. Dart implementation excerpts were not provided, so links between particular screens and services are omitted where the README does not establish them.

Main entry points: [`lib/screens/worker/mark_attendance_screen.dart`](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/mark_attendance_screen.dart) (Mark Attendance), [`lib/screens/admin/admin_dashboard_screen.dart`](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/admin/admin_dashboard_screen.dart) (Admin Dashboard), [`lib/screens/auth/login_screen.dart`](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/auth/login_screen.dart) (Role Login), [`lib/services/firestore_service.dart`](https://github.com/ishitachvn/attendance-app/blob/main/lib/services/firestore_service.dart) (Firestore Access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_login["Role Login<br/>[login_screen.dart]"]
  node_auth_service["Authentication<br/>[auth_service.dart]"]
  node_user_model["User Profile<br/>[user_model.dart]"]
end

subgraph group_worker["Worker Operations"]
  node_worker_home["Worker Home"]
  node_attendance["Mark Attendance"]
  node_camera["Photo Proof<br/>[camera_screen.dart]"]
  node_map["Worker Map<br/>[map_screen.dart]"]
  node_attendance_model["Attendance Record"]
  node_task_model["Task Data<br/>[task_model.dart]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin Dashboard"]
end

subgraph group_platform["Data Services"]
  node_firestore_service["Firestore Access"]
  node_storage_service["Photo Storage"]
  node_firebase_auth["Firebase Auth"]
  node_firestore[("Firestore")]
  node_firebase_storage[("Firebase Storage")]
end

node_worker_actor(("Worker"))
node_admin_actor(("Administrator"))
node_gps["GPS Location"]
node_google_maps["Google Maps"]

node_worker_actor -->|"signs in"| node_login
node_admin_actor -->|"signs in"| node_login
node_login -.->|"authenticates"| node_auth_service
node_auth_service -->|"uses"| node_firebase_auth
node_worker_actor -->|"marks attendance"| node_attendance
node_attendance -->|"captures location"| node_gps
node_attendance -->|"captures proof"| node_camera
node_camera -->|"uploads photo"| node_storage_service
node_storage_service -->|"stores photo"| node_firebase_storage
node_gps -->|"sends updates"| node_firestore_service
node_firestore_service -->|"writes data"| node_firestore
node_admin_actor -->|"views tracking"| node_admin_dashboard
node_admin_dashboard -->|"shows locations"| node_google_maps
node_admin_dashboard -.->|"reads logs"| node_firestore_service

click node_login "https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/auth/login_screen.dart"
click node_auth_service "https://github.com/ishitachvn/attendance-app/blob/main/lib/services/auth_service.dart"
click node_user_model "https://github.com/ishitachvn/attendance-app/blob/main/lib/models/user_model.dart"
click node_worker_home "https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/worker_home_screen.dart"
click node_attendance "https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/mark_attendance_screen.dart"
click node_camera "https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/camera_screen.dart"
click node_map "https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/map_screen.dart"
click node_attendance_model "https://github.com/ishitachvn/attendance-app/blob/main/lib/models/attendance_model.dart"
click node_task_model "https://github.com/ishitachvn/attendance-app/blob/main/lib/models/task_model.dart"
click node_admin_dashboard "https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/admin/admin_dashboard_screen.dart"
click node_firestore_service "https://github.com/ishitachvn/attendance-app/blob/main/lib/services/firestore_service.dart"
click node_storage_service "https://github.com/ishitachvn/attendance-app/blob/main/lib/services/storage_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_login,node_auth_service,node_user_model toneBlue
class node_worker_home,node_attendance,node_camera,node_map,node_attendance_model,node_task_model toneAmber
class node_admin_dashboard toneMint
class node_firestore_service,node_storage_service,node_firebase_auth,node_firestore,node_firebase_storage,node_worker_actor toneRose
class node_admin_actor,node_gps,node_google_maps toneIndigo
```

## Components

### Authentication

- [Role Login](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/auth/login_screen.dart): `lib/screens/auth/login_screen.dart`
- [Authentication](https://github.com/ishitachvn/attendance-app/blob/main/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [User Profile](https://github.com/ishitachvn/attendance-app/blob/main/lib/models/user_model.dart): `lib/models/user_model.dart`

### Worker Operations

- [Worker Home](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/worker_home_screen.dart): `lib/screens/worker/worker_home_screen.dart`
- [Mark Attendance](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/mark_attendance_screen.dart): `lib/screens/worker/mark_attendance_screen.dart`
- [Photo Proof](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/camera_screen.dart): `lib/screens/worker/camera_screen.dart`
- [Worker Map](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/worker/map_screen.dart): `lib/screens/worker/map_screen.dart`
- [Attendance Record](https://github.com/ishitachvn/attendance-app/blob/main/lib/models/attendance_model.dart): `lib/models/attendance_model.dart`
- [Task Data](https://github.com/ishitachvn/attendance-app/blob/main/lib/models/task_model.dart): `lib/models/task_model.dart`

### Administration

- [Admin Dashboard](https://github.com/ishitachvn/attendance-app/blob/main/lib/screens/admin/admin_dashboard_screen.dart): `lib/screens/admin/admin_dashboard_screen.dart`

### Data Services

- [Firestore Access](https://github.com/ishitachvn/attendance-app/blob/main/lib/services/firestore_service.dart): `lib/services/firestore_service.dart`
- [Photo Storage](https://github.com/ishitachvn/attendance-app/blob/main/lib/services/storage_service.dart): `lib/services/storage_service.dart`
- **Firebase Auth**
- **Firestore**
- **Firebase Storage**

### Other components

- **Worker**
- **Administrator**
- **GPS Location**
- **Google Maps**

## Connections

- Worker → Role Login: signs in (evidence: `README.md`)
- Administrator → Role Login: signs in (evidence: `README.md`)
- Role Login → Authentication: authenticates
- Authentication → Firebase Auth: uses (evidence: `README.md`)
- Worker → Mark Attendance: marks attendance (evidence: `README.md`)
- Mark Attendance → GPS Location: captures location (evidence: `README.md`)
- Mark Attendance → Photo Proof: captures proof (evidence: `README.md`)
- Photo Proof → Photo Storage: uploads photo (evidence: `README.md`)
- Photo Storage → Firebase Storage: stores photo (evidence: `README.md`)
- GPS Location → Firestore Access: sends updates (evidence: `README.md`)
- Firestore Access → Firestore: writes data (evidence: `README.md`)
- Administrator → Admin Dashboard: views tracking (evidence: `README.md`)
- Admin Dashboard → Google Maps: shows locations (evidence: `README.md`)
- Admin Dashboard → Firestore Access: reads logs
