# lacaba-bry/carefurapp architecture

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

- Interactive diagram: https://gitdiagram.com/lacaba-bry/carefurapp
- Repository: https://github.com/lacaba-bry/carefurapp

## Overview

CareFur is a mobile companion for pet owners with an active boarding stay: users sign in or enter a boarding code, then view stay information and use pet, care, room, camera, profile, and messaging features. App.tsx owns session and access-code initialization and navigation; BottomNav dispatches the main tabs. Screens access Supabase through a shared client, while photo selection and upload are factored into a media helper. The README is empty; several screens and backend functions are unsampled, so their internal relationships are not inferred.

Main entry points: [`lib/supabase.ts`](https://github.com/lacaba-bry/carefurapp/blob/main/lib/supabase.ts) (Supabase client), [`App.tsx`](https://github.com/lacaba-bry/carefurapp/blob/main/App.tsx) (App coordinator), [`Login/Nav/BottomNav.tsx`](https://github.com/lacaba-bry/carefurapp/blob/main/Login/Nav/BottomNav.tsx) (Main tabs), [`Login/ChatScreen.tsx`](https://github.com/lacaba-bry/carefurapp/blob/main/Login/ChatScreen.tsx) (Boarding chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and navigation"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_welcome["Welcome<br/>[WelcomeScreen.tsx]"]
  node_login["Sign in<br/>[LoginScreen.tsx]"]
  node_signup["Sign up<br/>[SignupScreen.tsx]"]
  node_code["Boarding code<br/>[CodeScreen.tsx]"]
  node_tabs["Main tabs<br/>[BottomNav.tsx]"]
end

subgraph group_stay["Boarding stay"]
  node_home["Stay dashboard<br/>[HomeScreen.tsx]"]
  node_booking["Booking history<br/>[BookingHistory.tsx]"]
  node_rooms["Room availability<br/>[Rooms.tsx]"]
  node_chat["Boarding chat<br/>[ChatScreen.tsx]"]
end

subgraph group_care["Pet care"]
  node_pets["Pet list<br/>[Pets.tsx]"]
  node_pet_profile["Pet profile<br/>[PetProfile.tsx]"]
  node_feeding["Feeding activity"]
  node_camera["Camera screen<br/>[CameraScreen.tsx]"]
end

subgraph group_account["Owner account"]
  node_profile["Owner profile<br/>[ProfileScreen.tsx]"]
  node_edit_profile["Edit profile"]
end

subgraph group_services["Backend services"]
  node_chat_read["Load chat function<br/>[index.ts]"]
  node_chat_send["Send message function<br/>[index.ts]"]
  node_media["Photo media helper<br/>[media.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase[("Supabase services")]
end

node_owner(("Pet owner"))

node_owner -->|"opens"| node_app
node_app -->|"routes to"| node_welcome
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_code
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_tabs
node_app -->|"checks session"| node_supabase_client
node_tabs -->|"dispatches"| node_home
node_tabs -->|"dispatches"| node_pets
node_tabs -->|"dispatches"| node_camera
node_tabs -->|"dispatches"| node_feeding
node_tabs -->|"dispatches"| node_profile
node_code -->|"verifies code"| node_supabase_client
node_home -->|"loads stay data"| node_supabase_client
node_chat -->|"verifies access"| node_supabase_client
node_pets -->|"loads pet data"| node_supabase_client
node_pet_profile -->|"loads pet record"| node_supabase_client
node_pet_profile -->|"uploads photo"| node_media
node_feeding -->|"loads feeding data"| node_supabase_client
node_camera -.->|"accesses backend"| node_supabase_client
node_rooms -.->|"accesses backend"| node_supabase_client
node_booking -.->|"accesses backend"| node_supabase_client
node_profile -.->|"accesses backend"| node_supabase_client
node_edit_profile -->|"loads and saves"| node_supabase_client
node_edit_profile -->|"uploads avatar"| node_media
node_media -->|"uploads images"| node_supabase
node_supabase_client -->|"connects"| node_supabase
node_chat -.->|"loads messages"| node_chat_read
node_chat -.->|"sends messages"| node_chat_send

click node_app "https://github.com/lacaba-bry/carefurapp/blob/main/App.tsx"
click node_welcome "https://github.com/lacaba-bry/carefurapp/blob/main/Login/WelcomeScreen.tsx"
click node_login "https://github.com/lacaba-bry/carefurapp/blob/main/Login/LoginScreen.tsx"
click node_signup "https://github.com/lacaba-bry/carefurapp/blob/main/Login/SignupScreen.tsx"
click node_code "https://github.com/lacaba-bry/carefurapp/blob/main/Login/CodeScreen.tsx"
click node_tabs "https://github.com/lacaba-bry/carefurapp/blob/main/Login/Nav/BottomNav.tsx"
click node_home "https://github.com/lacaba-bry/carefurapp/blob/main/Login/HomeScreen.tsx"
click node_booking "https://github.com/lacaba-bry/carefurapp/blob/main/Login/BookingHistory.tsx"
click node_rooms "https://github.com/lacaba-bry/carefurapp/blob/main/Login/Rooms.tsx"
click node_chat "https://github.com/lacaba-bry/carefurapp/blob/main/Login/ChatScreen.tsx"
click node_chat_read "https://github.com/lacaba-bry/carefurapp/blob/main/supabase/functions/get-booking-chat/index.ts"
click node_chat_send "https://github.com/lacaba-bry/carefurapp/blob/main/supabase/functions/send-booking-message/index.ts"
click node_pets "https://github.com/lacaba-bry/carefurapp/blob/main/Login/Pets.tsx"
click node_pet_profile "https://github.com/lacaba-bry/carefurapp/blob/main/Login/PetProfile.tsx"
click node_feeding "https://github.com/lacaba-bry/carefurapp/blob/main/Login/FeedingLogsScreen.tsx"
click node_camera "https://github.com/lacaba-bry/carefurapp/blob/main/Login/CameraScreen.tsx"
click node_profile "https://github.com/lacaba-bry/carefurapp/blob/main/Login/ProfileScreen.tsx"
click node_edit_profile "https://github.com/lacaba-bry/carefurapp/blob/main/Login/EditProfileScreen.tsx"
click node_media "https://github.com/lacaba-bry/carefurapp/blob/main/lib/media.ts"
click node_supabase_client "https://github.com/lacaba-bry/carefurapp/blob/main/lib/supabase.ts"

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_app,node_welcome,node_login,node_signup,node_code,node_tabs toneBlue
class node_home,node_booking,node_rooms,node_chat toneAmber
class node_pets,node_pet_profile,node_feeding,node_camera toneMint
class node_profile,node_edit_profile toneRose
class node_chat_read,node_chat_send,node_media,node_supabase_client,node_supabase,node_owner toneIndigo
```

## Components

### Access and navigation

- [App coordinator](https://github.com/lacaba-bry/carefurapp/blob/main/App.tsx): `App.tsx`
- [Welcome](https://github.com/lacaba-bry/carefurapp/blob/main/Login/WelcomeScreen.tsx): `Login/WelcomeScreen.tsx`
- [Sign in](https://github.com/lacaba-bry/carefurapp/blob/main/Login/LoginScreen.tsx): `Login/LoginScreen.tsx`
- [Sign up](https://github.com/lacaba-bry/carefurapp/blob/main/Login/SignupScreen.tsx): `Login/SignupScreen.tsx`
- [Boarding code](https://github.com/lacaba-bry/carefurapp/blob/main/Login/CodeScreen.tsx): `Login/CodeScreen.tsx`
- [Main tabs](https://github.com/lacaba-bry/carefurapp/blob/main/Login/Nav/BottomNav.tsx): `Login/Nav/BottomNav.tsx`

### Boarding stay

- [Stay dashboard](https://github.com/lacaba-bry/carefurapp/blob/main/Login/HomeScreen.tsx): `Login/HomeScreen.tsx`
- [Booking history](https://github.com/lacaba-bry/carefurapp/blob/main/Login/BookingHistory.tsx): `Login/BookingHistory.tsx`
- [Room availability](https://github.com/lacaba-bry/carefurapp/blob/main/Login/Rooms.tsx): `Login/Rooms.tsx`
- [Boarding chat](https://github.com/lacaba-bry/carefurapp/blob/main/Login/ChatScreen.tsx): `Login/ChatScreen.tsx`

### Pet care

- [Pet list](https://github.com/lacaba-bry/carefurapp/blob/main/Login/Pets.tsx): `Login/Pets.tsx`
- [Pet profile](https://github.com/lacaba-bry/carefurapp/blob/main/Login/PetProfile.tsx): `Login/PetProfile.tsx`
- [Feeding activity](https://github.com/lacaba-bry/carefurapp/blob/main/Login/FeedingLogsScreen.tsx): `Login/FeedingLogsScreen.tsx`
- [Camera screen](https://github.com/lacaba-bry/carefurapp/blob/main/Login/CameraScreen.tsx): `Login/CameraScreen.tsx`

### Owner account

- [Owner profile](https://github.com/lacaba-bry/carefurapp/blob/main/Login/ProfileScreen.tsx): `Login/ProfileScreen.tsx`
- [Edit profile](https://github.com/lacaba-bry/carefurapp/blob/main/Login/EditProfileScreen.tsx): `Login/EditProfileScreen.tsx`

### Backend services

- [Load chat function](https://github.com/lacaba-bry/carefurapp/blob/main/supabase/functions/get-booking-chat/index.ts): `supabase/functions/get-booking-chat/index.ts`
- [Send message function](https://github.com/lacaba-bry/carefurapp/blob/main/supabase/functions/send-booking-message/index.ts): `supabase/functions/send-booking-message/index.ts`
- [Photo media helper](https://github.com/lacaba-bry/carefurapp/blob/main/lib/media.ts): `lib/media.ts`
- [Supabase client](https://github.com/lacaba-bry/carefurapp/blob/main/lib/supabase.ts): `lib/supabase.ts`
- **Supabase services**

### Other components

- **Pet owner**

## Connections

- Pet owner → App coordinator: opens
- App coordinator → Welcome: routes to (evidence: `App.tsx`)
- App coordinator → Sign in: routes to (evidence: `App.tsx`)
- App coordinator → Sign up: routes to (evidence: `App.tsx`)
- App coordinator → Boarding code: routes to (evidence: `App.tsx`)
- App coordinator → Boarding chat: routes to (evidence: `App.tsx`)
- App coordinator → Main tabs: routes to (evidence: `App.tsx`)
- App coordinator → Supabase client: checks session (evidence: `App.tsx`)
- Main tabs → Stay dashboard: dispatches (evidence: `Login/Nav/BottomNav.tsx`)
- Main tabs → Pet list: dispatches (evidence: `Login/Nav/BottomNav.tsx`)
- Main tabs → Camera screen: dispatches (evidence: `Login/Nav/BottomNav.tsx`)
- Main tabs → Feeding activity: dispatches (evidence: `Login/Nav/BottomNav.tsx`)
- Main tabs → Owner profile: dispatches (evidence: `Login/Nav/BottomNav.tsx`)
- Boarding code → Supabase client: verifies code (evidence: `Login/CodeScreen.tsx`)
- Stay dashboard → Supabase client: loads stay data (evidence: `Login/HomeScreen.tsx`)
- Boarding chat → Supabase client: verifies access (evidence: `Login/ChatScreen.tsx`)
- Pet list → Supabase client: loads pet data (evidence: `Login/Pets.tsx`)
- Pet profile → Supabase client: loads pet record (evidence: `Login/PetProfile.tsx`)
- Pet profile → Photo media helper: uploads photo (evidence: `Login/PetProfile.tsx`)
- Feeding activity → Supabase client: loads feeding data (evidence: `Login/FeedingLogsScreen.tsx`)
- Camera screen → Supabase client: accesses backend (evidence: `Login/CameraScreen.tsx`)
- Room availability → Supabase client: accesses backend (evidence: `Login/Rooms.tsx`)
- Booking history → Supabase client: accesses backend (evidence: `Login/BookingHistory.tsx`)
- Owner profile → Supabase client: accesses backend (evidence: `Login/ProfileScreen.tsx`)
- Edit profile → Supabase client: loads and saves (evidence: `Login/EditProfileScreen.tsx`)
- Edit profile → Photo media helper: uploads avatar (evidence: `Login/EditProfileScreen.tsx`)
- Photo media helper → Supabase services: uploads images (evidence: `lib/media.ts`)
- Supabase client → Supabase services: connects (evidence: `lib/supabase.ts`)
- Boarding chat → Load chat function: loads messages
- Boarding chat → Send message function: sends messages
