# rjamesmz/pawtrace architecture

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

- Interactive diagram: https://gitdiagram.com/rjamesmz/pawtrace
- Repository: https://github.com/rjamesmz/pawtrace

## Overview

Pawtrace is a cross-platform Flutter pet-tracking app. Its apparent user journey spans account access, pet registration and management, lost-pet reporting and discovery, and pet matching; the tree also indicates admin, news, alerts, and export capabilities. The README is only Flutter boilerplate, and no Dart source was excerpted, so those workflows and their internal calls cannot be verified. The graph therefore maps the identifiable product areas without inventing connections, and includes the evidenced Windows runner path as platform infrastructure.

Main entry points: [`windows/runner/flutter_window.h`](https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/flutter_window.h) (Flutter window), [`windows/runner/main.cpp`](https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/main.cpp) (Windows entry), [`windows/runner/win32_window.h`](https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/win32_window.h) (Win32 window host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and access"]
  node_main["Flutter entry<br/>[main.dart]"]
  node_auth["Authentication"]
  node_dashboard["User dashboard"]
end

subgraph group_pet["Pet and lost-pet features"]
  node_registration["Pet registration"]
  node_my_pets["My pets"]
  node_pet_detail["Pet profiles"]
  node_report["Lost-pet reports"]
  node_lost_pets["Lost-pet discovery"]
  node_lost_detail["Lost-pet details"]
  node_locate["Pet location"]
  node_ai_scan["AI pet scan<br/>[ai_scan.dart]"]
end

subgraph group_community["Community and alerts"]
  node_news["News and details"]
  node_alerts["Alerts<br/>[alert_service.dart]"]
  node_notifications["Notifications UI"]
end

subgraph group_admin["Administration"]
  node_admin_home["Admin home"]
  node_admin_pets["Admin pet records"]
  node_admin_reports["Admin reports"]
  node_user_management["User management"]
end

subgraph group_services["App services"]
  node_matching["Pet matching"]
  node_embeddings["Pet embeddings"]
  node_export["File export"]
end

subgraph group_platform["Windows platform host"]
  node_win_entry["Windows entry<br/>[main.cpp]"]
  node_flutter_window["Flutter window<br/>[flutter_window.h]"]
  node_win_host["Win32 window host<br/>[win32_window.h]"]
end

node_actor(("App user"))

node_win_entry -->|"creates"| node_flutter_window
node_flutter_window -->|"extends"| node_win_host

click node_main "https://github.com/rjamesmz/pawtrace/blob/master/lib/main.dart"
click node_auth "https://github.com/rjamesmz/pawtrace/tree/master/lib/screens/auth"
click node_dashboard "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/dashboard_home.dart"
click node_registration "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/profile_pet_registration.dart"
click node_my_pets "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/my_pets_screen.dart"
click node_pet_detail "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/pet_profile_detail.dart"
click node_report "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/report_lost_pet.dart"
click node_lost_pets "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/lost_pet_screen.dart"
click node_lost_detail "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/lost_pet_detail_screen.dart"
click node_locate "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/locate_pet_screen.dart"
click node_ai_scan "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/ai_scan.dart"
click node_matching "https://github.com/rjamesmz/pawtrace/blob/master/lib/services/pet_match_service.dart"
click node_embeddings "https://github.com/rjamesmz/pawtrace/blob/master/lib/services/pet_embedding_service.dart"
click node_news "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/shared/news_detail_screen.dart"
click node_alerts "https://github.com/rjamesmz/pawtrace/blob/master/lib/services/alert_service.dart"
click node_notifications "https://github.com/rjamesmz/pawtrace/blob/master/lib/widgets/notifications_sheet.dart"
click node_admin_home "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/barangay_admin_home_screen.dart"
click node_admin_pets "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/admin_pets_screen.dart"
click node_admin_reports "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/admin_reports_screen.dart"
click node_user_management "https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/user_management.dart"
click node_export "https://github.com/rjamesmz/pawtrace/blob/master/lib/services/file_export_service.dart"
click node_win_entry "https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/main.cpp"
click node_flutter_window "https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/flutter_window.h"
click node_win_host "https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/win32_window.h"

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,node_dashboard,node_actor toneBlue
class node_registration,node_my_pets,node_pet_detail,node_report,node_lost_pets,node_lost_detail,node_locate,node_ai_scan toneAmber
class node_news,node_alerts,node_notifications toneMint
class node_admin_home,node_admin_pets,node_admin_reports,node_user_management toneRose
class node_matching,node_embeddings,node_export toneIndigo
class node_win_entry,node_flutter_window,node_win_host toneTeal
```

## Components

### App entry and access

- [Flutter entry](https://github.com/rjamesmz/pawtrace/blob/master/lib/main.dart): `lib/main.dart`
- [Authentication](https://github.com/rjamesmz/pawtrace/tree/master/lib/screens/auth): `lib/screens/auth`
- [User dashboard](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/dashboard_home.dart): `lib/screens/user/dashboard_home.dart`

### Pet and lost-pet features

- [Pet registration](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/profile_pet_registration.dart): `lib/screens/user/profile_pet_registration.dart`
- [My pets](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/my_pets_screen.dart): `lib/screens/user/my_pets_screen.dart`
- [Pet profiles](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/pet_profile_detail.dart): `lib/screens/user/pet_profile_detail.dart`
- [Lost-pet reports](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/report_lost_pet.dart): `lib/screens/user/report_lost_pet.dart`
- [Lost-pet discovery](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/lost_pet_screen.dart): `lib/screens/user/lost_pet_screen.dart`
- [Lost-pet details](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/lost_pet_detail_screen.dart): `lib/screens/user/lost_pet_detail_screen.dart`
- [Pet location](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/locate_pet_screen.dart): `lib/screens/user/locate_pet_screen.dart`
- [AI pet scan](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/user/ai_scan.dart): `lib/screens/user/ai_scan.dart`

### Community and alerts

- [News and details](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/shared/news_detail_screen.dart): `lib/screens/shared/news_detail_screen.dart`
- [Alerts](https://github.com/rjamesmz/pawtrace/blob/master/lib/services/alert_service.dart): `lib/services/alert_service.dart`
- [Notifications UI](https://github.com/rjamesmz/pawtrace/blob/master/lib/widgets/notifications_sheet.dart): `lib/widgets/notifications_sheet.dart`

### Administration

- [Admin home](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/barangay_admin_home_screen.dart): `lib/screens/admin/barangay_admin_home_screen.dart`
- [Admin pet records](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/admin_pets_screen.dart): `lib/screens/admin/admin_pets_screen.dart`
- [Admin reports](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/admin_reports_screen.dart): `lib/screens/admin/admin_reports_screen.dart`
- [User management](https://github.com/rjamesmz/pawtrace/blob/master/lib/screens/admin/user_management.dart): `lib/screens/admin/user_management.dart`

### App services

- [Pet matching](https://github.com/rjamesmz/pawtrace/blob/master/lib/services/pet_match_service.dart): `lib/services/pet_match_service.dart`
- [Pet embeddings](https://github.com/rjamesmz/pawtrace/blob/master/lib/services/pet_embedding_service.dart): `lib/services/pet_embedding_service.dart`
- [File export](https://github.com/rjamesmz/pawtrace/blob/master/lib/services/file_export_service.dart): `lib/services/file_export_service.dart`

### Windows platform host

- [Windows entry](https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Win32 window host](https://github.com/rjamesmz/pawtrace/blob/master/windows/runner/win32_window.h): `windows/runner/win32_window.h`

### Other components

- **App user**

## Connections

- Windows entry → Flutter window: creates (evidence: `windows/runner/main.cpp`)
- Flutter window → Win32 window host: extends (evidence: `windows/runner/flutter_window.h`)
