# lelei-prtty/furpectmatch-thesis architecture

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

- Interactive diagram: https://gitdiagram.com/lelei-prtty/furpectmatch-thesis
- Repository: https://github.com/lelei-prtty/furpectmatch-thesis

## Overview

This is a React adoption platform for pet guardians and pet providers. Guardians register, set adoption preferences, receive pet recommendations, and submit adoption requests; providers register, publish listings, and review requests. Both roles use dashboards for profiles, notifications, and messaging. The runtime divides into route/page orchestration, guardian discovery and provider listing workflows, shared account and adoption data services, and Supabase-backed persistence. Several capabilities are established by module names and import references rather than complete excerpts, so the graph omits uncertain links and does not infer undocumented integrations.

Main entry points: [`src/App.jsx`](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/App.jsx) (App routes), [`src/lib/supabaseClient.js`](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/lib/supabaseClient.js) (Supabase client), [`src/pages/PetGuardian/GuardianDashboard.jsx`](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/GuardianDashboard.jsx) (Guardian dashboard), [`src/pages/PetProvider/ProviderDashboard.jsx`](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/ProviderDashboard.jsx) (Provider dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App routing"]
  node_routes["App routes<br/>[App.jsx]"]
  node_home["Home page<br/>[HomePage.jsx]"]
  node_terms["Terms page<br/>[Terms.jsx]"]
end

subgraph group_guardian["Guardian experience"]
  node_guardian_auth["Guardian login and signup<br/>[Register.jsx]"]
  node_guardian_dashboard["Guardian dashboard"]
  node_guardian_profile["Guardian profile<br/>[ProfileModal.jsx]"]
  node_preferences_form["Preferences form"]
  node_recommendations["Pet recommendations<br/>[recommender.js]"]
  node_matches["Top matches"]
end

subgraph group_provider["Provider experience"]
  node_provider_auth["Provider login and signup<br/>[Register.jsx]"]
  node_provider_dashboard["Provider dashboard"]
  node_listing_form["Add pet listing<br/>[AddPetModal.jsx]"]
  node_listing_detail["Listing details<br/>[PetModal.jsx]"]
end

subgraph group_services["Shared data services"]
  node_preferences_storage["Preference storage"]
  node_preference_options["Preference options"]
  node_pet_filters["Pet filters<br/>[petFilters.js]"]
  node_accounts["Accounts and sessions<br/>[Accounts.jsx]"]
  node_guardian_session["Guardian requests"]
  node_provider_session["Provider listings"]
  node_requests["Adoption requests<br/>[Requests.jsx]"]
  node_messaging["Messaging<br/>[Messaging.jsx]"]
  node_presence["User presence<br/>[Presence.jsx]"]
  node_notifications["Notifications"]
  node_profile_section["Profile display<br/>[ProfileSection.jsx]"]
  node_pet_breeds["Pet breed data<br/>[Petbreeds.jsx]"]
  node_search_select["Search selector<br/>[SearchSelect.jsx]"]
  node_pet_photo["Pet imagery<br/>[PetPhoto.jsx]"]
end

subgraph group_persistence["Persistence and integration"]
  node_supabase_client["Supabase client<br/>[supabaseClient.js]"]
end

node_guardian_actor(("Pet guardian"))
node_provider_actor(("Pet provider"))
node_supabase[("Supabase service")]

node_guardian_actor -->|"opens app"| node_routes
node_provider_actor -->|"opens app"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_guardian_auth
node_routes -->|"routes to"| node_guardian_dashboard
node_routes -->|"routes to"| node_provider_auth
node_routes -->|"routes to"| node_provider_dashboard
node_routes -->|"routes to"| node_terms
node_routes -->|"checks session"| node_accounts
node_guardian_dashboard -->|"requests matches"| node_recommendations
node_guardian_dashboard -->|"submits request"| node_guardian_session
node_guardian_dashboard -->|"loads preferences"| node_preferences_storage
node_guardian_dashboard -->|"renders profile"| node_profile_section
node_guardian_dashboard -->|"renders images"| node_pet_photo
node_guardian_profile -->|"renders form"| node_preferences_form
node_guardian_profile -->|"uses storage"| node_preferences_storage
node_preferences_storage -->|"normalizes with"| node_preference_options
node_matches -->|"requests matches"| node_recommendations
node_recommendations -->|"uses filters"| node_pet_filters
node_provider_dashboard -->|"loads listings"| node_provider_session
node_provider_dashboard -->|"updates requests"| node_provider_session
node_provider_dashboard -->|"starts approved chat"| node_messaging
node_provider_dashboard -->|"renders notifications"| node_notifications
node_listing_form -->|"uses selector"| node_search_select
node_listing_form -->|"loads breeds"| node_pet_breeds
node_listing_detail -->|"uses listing data"| node_provider_session
node_guardian_session -->|"loads requests"| node_requests
node_provider_session -->|"loads requests"| node_requests
node_messaging -->|"loads presence"| node_presence
node_messaging -->|"reads requests"| node_requests
node_accounts -->|"uses client"| node_supabase_client
node_guardian_session -->|"uses client"| node_supabase_client
node_provider_session -->|"uses client"| node_supabase_client
node_requests -->|"uses client"| node_supabase_client
node_messaging -->|"uses client"| node_supabase_client
node_presence -->|"uses client"| node_supabase_client
node_preferences_storage -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase

click node_routes "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/App.jsx"
click node_home "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/HomePage.jsx"
click node_terms "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/Terms.jsx"
click node_guardian_auth "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/Register.jsx"
click node_guardian_dashboard "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/GuardianDashboard.jsx"
click node_guardian_profile "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/ProfileModal.jsx"
click node_preferences_form "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/Petpreferencesform.jsx"
click node_preferences_storage "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Petpreferencesstorage.jsx"
click node_preference_options "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Petpreferencesoptions.jsx"
click node_recommendations "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/api/recommender.js"
click node_matches "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/TopMatchesModal.jsx"
click node_pet_filters "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/utils/petFilters.js"
click node_provider_auth "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/Register.jsx"
click node_provider_dashboard "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/ProviderDashboard.jsx"
click node_listing_form "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/AddPetModal.jsx"
click node_listing_detail "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/PetModal.jsx"
click node_accounts "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Accounts.jsx"
click node_guardian_session "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/GuardianSession.jsx"
click node_provider_session "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/ProviderSession.jsx"
click node_requests "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Requests.jsx"
click node_messaging "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Messaging.jsx"
click node_presence "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Presence.jsx"
click node_notifications "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/NotificationModal.jsx"
click node_profile_section "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/ProfileSection.jsx"
click node_pet_breeds "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Petbreeds.jsx"
click node_search_select "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/SearchSelect.jsx"
click node_pet_photo "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/PetPhoto.jsx"
click node_supabase_client "https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/lib/supabaseClient.js"

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_routes,node_home,node_terms toneBlue
class node_guardian_auth,node_guardian_dashboard,node_guardian_profile,node_preferences_form,node_recommendations,node_matches,node_supabase toneAmber
class node_provider_auth,node_provider_dashboard,node_listing_form,node_listing_detail toneMint
class node_preferences_storage,node_preference_options,node_pet_filters,node_accounts,node_guardian_session,node_provider_session,node_requests,node_messaging,node_presence,node_notifications,node_profile_section,node_pet_breeds,node_search_select,node_pet_photo toneRose
class node_supabase_client,node_guardian_actor,node_provider_actor toneIndigo
```

## Components

### App routing

- [App routes](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/App.jsx): `src/App.jsx`
- [Home page](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`
- [Terms page](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/Terms.jsx): `src/pages/Terms.jsx`

### Guardian experience

- [Guardian login and signup](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/Register.jsx): `src/pages/PetGuardian/Register.jsx`
- [Guardian dashboard](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/GuardianDashboard.jsx): `src/pages/PetGuardian/GuardianDashboard.jsx`
- [Guardian profile](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetGuardian/ProfileModal.jsx): `src/pages/PetGuardian/ProfileModal.jsx`
- [Preferences form](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/Petpreferencesform.jsx): `src/components/Petpreferencesform.jsx`
- [Pet recommendations](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/api/recommender.js): `src/api/recommender.js`
- [Top matches](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/TopMatchesModal.jsx): `src/components/TopMatchesModal.jsx`

### Provider experience

- [Provider login and signup](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/Register.jsx): `src/pages/PetProvider/Register.jsx`
- [Provider dashboard](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/ProviderDashboard.jsx): `src/pages/PetProvider/ProviderDashboard.jsx`
- [Add pet listing](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/AddPetModal.jsx): `src/pages/PetProvider/AddPetModal.jsx`
- [Listing details](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/pages/PetProvider/PetModal.jsx): `src/pages/PetProvider/PetModal.jsx`

### Shared data services

- [Preference storage](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Petpreferencesstorage.jsx): `src/Data/Petpreferencesstorage.jsx`
- [Preference options](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Petpreferencesoptions.jsx): `src/Data/Petpreferencesoptions.jsx`
- [Pet filters](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/utils/petFilters.js): `src/utils/petFilters.js`
- [Accounts and sessions](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Accounts.jsx): `src/Data/Accounts.jsx`
- [Guardian requests](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/GuardianSession.jsx): `src/Data/GuardianSession.jsx`
- [Provider listings](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/ProviderSession.jsx): `src/Data/ProviderSession.jsx`
- [Adoption requests](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Requests.jsx): `src/Data/Requests.jsx`
- [Messaging](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Messaging.jsx): `src/Data/Messaging.jsx`
- [User presence](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Presence.jsx): `src/Data/Presence.jsx`
- [Notifications](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/NotificationModal.jsx): `src/components/NotificationModal.jsx`
- [Profile display](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/ProfileSection.jsx): `src/components/ProfileSection.jsx`
- [Pet breed data](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/Data/Petbreeds.jsx): `src/Data/Petbreeds.jsx`
- [Search selector](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/SearchSelect.jsx): `src/components/SearchSelect.jsx`
- [Pet imagery](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/components/PetPhoto.jsx): `src/components/PetPhoto.jsx`

### Persistence and integration

- [Supabase client](https://github.com/lelei-prtty/furpectmatch-thesis/blob/main/src/lib/supabaseClient.js): `src/lib/supabaseClient.js`

### Other components

- **Pet guardian**
- **Pet provider**
- **Supabase service**

## Connections

- Pet guardian → App routes: opens app (evidence: `src/App.jsx`)
- Pet provider → App routes: opens app (evidence: `src/App.jsx`)
- App routes → Home page: routes to (evidence: `src/App.jsx`)
- App routes → Guardian login and signup: routes to (evidence: `src/App.jsx`)
- App routes → Guardian dashboard: routes to (evidence: `src/App.jsx`)
- App routes → Provider login and signup: routes to (evidence: `src/App.jsx`)
- App routes → Provider dashboard: routes to (evidence: `src/App.jsx`)
- App routes → Terms page: routes to (evidence: `src/App.jsx`)
- App routes → Accounts and sessions: checks session (evidence: `src/App.jsx`)
- Guardian dashboard → Pet recommendations: requests matches (evidence: `src/pages/PetGuardian/GuardianDashboard.jsx`)
- Guardian dashboard → Guardian requests: submits request (evidence: `src/pages/PetGuardian/GuardianDashboard.jsx`)
- Guardian dashboard → Preference storage: loads preferences (evidence: `src/pages/PetGuardian/GuardianDashboard.jsx`)
- Guardian dashboard → Profile display: renders profile (evidence: `src/pages/PetGuardian/GuardianDashboard.jsx`)
- Guardian dashboard → Pet imagery: renders images (evidence: `src/pages/PetGuardian/GuardianDashboard.jsx`)
- Guardian profile → Preferences form: renders form (evidence: `src/pages/PetGuardian/ProfileModal.jsx`)
- Guardian profile → Preference storage: uses storage (evidence: `src/pages/PetGuardian/ProfileModal.jsx`)
- Preference storage → Preference options: normalizes with (evidence: `src/Data/Petpreferencesstorage.jsx`)
- Top matches → Pet recommendations: requests matches (evidence: `src/components/TopMatchesModal.jsx`)
- Pet recommendations → Pet filters: uses filters (evidence: `src/api/recommender.js`)
- Provider dashboard → Provider listings: loads listings (evidence: `src/pages/PetProvider/ProviderDashboard.jsx`)
- Provider dashboard → Provider listings: updates requests (evidence: `src/pages/PetProvider/ProviderDashboard.jsx`)
- Provider dashboard → Messaging: starts approved chat (evidence: `src/pages/PetProvider/ProviderDashboard.jsx`)
- Provider dashboard → Notifications: renders notifications (evidence: `src/pages/PetProvider/ProviderDashboard.jsx`)
- Add pet listing → Search selector: uses selector (evidence: `src/pages/PetProvider/AddPetModal.jsx`)
- Add pet listing → Pet breed data: loads breeds (evidence: `src/pages/PetProvider/AddPetModal.jsx`)
- Listing details → Provider listings: uses listing data (evidence: `src/pages/PetProvider/PetModal.jsx`)
- Guardian requests → Adoption requests: loads requests (evidence: `src/Data/GuardianSession.jsx`)
- Provider listings → Adoption requests: loads requests (evidence: `src/Data/ProviderSession.jsx`)
- Messaging → User presence: loads presence (evidence: `src/Data/Messaging.jsx`)
- Messaging → Adoption requests: reads requests (evidence: `src/Data/Messaging.jsx`)
- Accounts and sessions → Supabase client: uses client (evidence: `src/Data/Accounts.jsx`)
- Guardian requests → Supabase client: uses client (evidence: `src/Data/GuardianSession.jsx`)
- Provider listings → Supabase client: uses client (evidence: `src/Data/ProviderSession.jsx`)
- Adoption requests → Supabase client: uses client (evidence: `src/Data/Requests.jsx`)
- Messaging → Supabase client: uses client (evidence: `src/Data/Messaging.jsx`)
- User presence → Supabase client: uses client (evidence: `src/Data/Presence.jsx`)
- Preference storage → Supabase client: uses client (evidence: `src/Data/Petpreferencesstorage.jsx`)
- Supabase client → Supabase service: connects to (evidence: `src/lib/supabaseClient.js`)
