# thiru-selvam-06/aidhunt-trac-release architecture

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

- Interactive diagram: https://gitdiagram.com/thiru-selvam-06/aidhunt-trac-release
- Repository: https://github.com/thiru-selvam-06/aidhunt-trac-release

## Overview

This is an Android app, but the README describes only how to open and run it; it does not explain the product. Source paths indicate account/authentication, tractor and workspace data, entry capture, financial reports, and PDF generation. The map groups these apparent capabilities and supporting layers. No Kotlin source was excerpted, so internal calls and data flows cannot be verified; relationships are therefore omitted rather than inferred from filenames.

Main entry points: [`app/src/main/java/com/example/MainActivity.kt`](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/MainActivity.kt) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["App screens"]
  node_main["App entry<br/>[MainActivity.kt]"]
  node_auth_ui["Sign-in screens"]
  node_home_ui["Home screen<br/>[HomeScreen.kt]"]
  node_entry_ui["Entry screen<br/>[NewEntryScreen.kt]"]
  node_account_ui["Account screen<br/>[AccountScreen.kt]"]
  node_report_ui["Report screens"]
end

subgraph group_domain["Business features"]
  node_workspace["Workspace data"]
  node_tractor["Tractor data"]
end

subgraph group_data["Data and services"]
  node_auth_repo["Authentication repository<br/>[AuthRepository.kt]"]
  node_auth_service["Firebase auth"]
  node_firestore["Firestore repository"]
  node_database[("Local database<br/>[AppDatabase.kt]")]
  node_authorization["Access control"]
  node_sync["Pending sync"]
  node_network["Network monitor<br/>[NetworkMonitor.kt]"]
end

subgraph group_support["Supporting logic"]
  node_calculations["Financial calculations"]
  node_billing["Work billing"]
  node_pdf["PDF generation"]
  node_viewmodel["Main view model<br/>[MainViewModel.kt]"]
end

node_user(("App user"))

node_user -->|"opens app"| node_main

click node_main "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/MainActivity.kt"
click node_auth_ui "https://github.com/thiru-selvam-06/aidhunt-trac-release/tree/main/app/src/main/java/com/example/ui/screens/auth"
click node_home_ui "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/screens/home/HomeScreen.kt"
click node_entry_ui "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/screens/entry/NewEntryScreen.kt"
click node_account_ui "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/screens/account/AccountScreen.kt"
click node_report_ui "https://github.com/thiru-selvam-06/aidhunt-trac-release/tree/main/app/src/main/java/com/example/ui/screens/report"
click node_workspace "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/repository/WorkspaceRepository.kt"
click node_tractor "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/repository/TractorRepository.kt"
click node_calculations "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/util/FinancialCalculationEngine.kt"
click node_billing "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/util/WorkBillingCalculator.kt"
click node_pdf "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/pdf/PdfGeneratorHelper.kt"
click node_viewmodel "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/viewmodel/MainViewModel.kt"
click node_auth_repo "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/repository/AuthRepository.kt"
click node_auth_service "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/firebase/FirebaseAuthService.kt"
click node_firestore "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/firebase/FirestoreRepository.kt"
click node_database "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/database/AppDatabase.kt"
click node_authorization "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/auth/AuthorizationManager.kt"
click node_sync "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/sync/PendingAuditManager.kt"
click node_network "https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/network/NetworkMonitor.kt"

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_auth_ui,node_home_ui,node_entry_ui,node_account_ui,node_report_ui,node_user toneBlue
class node_workspace,node_tractor toneAmber
class node_auth_repo,node_auth_service,node_firestore,node_database,node_authorization,node_sync,node_network toneMint
class node_calculations,node_billing,node_pdf,node_viewmodel toneRose
```

## Components

### App screens

- [App entry](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/MainActivity.kt): `app/src/main/java/com/example/MainActivity.kt`
- [Sign-in screens](https://github.com/thiru-selvam-06/aidhunt-trac-release/tree/main/app/src/main/java/com/example/ui/screens/auth): `app/src/main/java/com/example/ui/screens/auth`
- [Home screen](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/screens/home/HomeScreen.kt): `app/src/main/java/com/example/ui/screens/home/HomeScreen.kt`
- [Entry screen](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/screens/entry/NewEntryScreen.kt): `app/src/main/java/com/example/ui/screens/entry/NewEntryScreen.kt`
- [Account screen](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/screens/account/AccountScreen.kt): `app/src/main/java/com/example/ui/screens/account/AccountScreen.kt`
- [Report screens](https://github.com/thiru-selvam-06/aidhunt-trac-release/tree/main/app/src/main/java/com/example/ui/screens/report): `app/src/main/java/com/example/ui/screens/report`

### Business features

- [Workspace data](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/repository/WorkspaceRepository.kt): `app/src/main/java/com/example/data/repository/WorkspaceRepository.kt`
- [Tractor data](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/repository/TractorRepository.kt): `app/src/main/java/com/example/data/repository/TractorRepository.kt`

### Data and services

- [Authentication repository](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/repository/AuthRepository.kt): `app/src/main/java/com/example/data/repository/AuthRepository.kt`
- [Firebase auth](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/firebase/FirebaseAuthService.kt): `app/src/main/java/com/example/data/firebase/FirebaseAuthService.kt`
- [Firestore repository](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/firebase/FirestoreRepository.kt): `app/src/main/java/com/example/data/firebase/FirestoreRepository.kt`
- [Local database](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/database/AppDatabase.kt): `app/src/main/java/com/example/data/database/AppDatabase.kt`
- [Access control](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/auth/AuthorizationManager.kt): `app/src/main/java/com/example/data/auth/AuthorizationManager.kt`
- [Pending sync](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/sync/PendingAuditManager.kt): `app/src/main/java/com/example/data/sync/PendingAuditManager.kt`
- [Network monitor](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/data/network/NetworkMonitor.kt): `app/src/main/java/com/example/data/network/NetworkMonitor.kt`

### Supporting logic

- [Financial calculations](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/util/FinancialCalculationEngine.kt): `app/src/main/java/com/example/ui/util/FinancialCalculationEngine.kt`
- [Work billing](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/util/WorkBillingCalculator.kt): `app/src/main/java/com/example/ui/util/WorkBillingCalculator.kt`
- [PDF generation](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/pdf/PdfGeneratorHelper.kt): `app/src/main/java/com/example/pdf/PdfGeneratorHelper.kt`
- [Main view model](https://github.com/thiru-selvam-06/aidhunt-trac-release/blob/main/app/src/main/java/com/example/ui/viewmodel/MainViewModel.kt): `app/src/main/java/com/example/ui/viewmodel/MainViewModel.kt`

### Other components

- **App user**

## Connections

- App user → App entry: opens app (evidence: `README.md`)
