# piyush-eon/react-native-course architecture

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

- Interactive diagram: https://gitdiagram.com/piyush-eon/react-native-course
- Repository: https://github.com/piyush-eon/react-native-course

## Overview

Kribb is a mobile real-estate listings app. Users browse featured and searchable properties, refine results, view listing details and map locations, and save homes; admins can create listings and manage their status. Authentication is backed by Clerk-integrated Supabase access, with user/admin synchronization and saved-property state supporting gated actions. The graph includes the documented profile, saved-list, map, and listing-management areas; those routes were not sampled in full, so their internal calls are not asserted.

Main entry points: [`hooks/useSupabase.ts`](https://github.com/piyush-eon/react-native-course/blob/master/hooks/useSupabase.ts) (Authenticated Client Hook), [`app/(root)/(tabs)/search.tsx`](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/search.tsx) (Property Search), [`components/PropertyCard.tsx`](https://github.com/piyush-eon/react-native-course/blob/master/components/PropertyCard.tsx) (Property Cards), [`lib/supabase.ts`](https://github.com/piyush-eon/react-native-course/blob/master/lib/supabase.ts) (Public Supabase Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Property Discovery"]
  node_home["Featured Listings<br/>[index.tsx]"]
  node_search["Property Search<br/>[search.tsx]"]
  node_filters["Filter Controls<br/>[FilterModal.tsx]"]
  node_filter_state["Filter State<br/>[filterStore.ts]"]
  node_property_cards["Property Cards<br/>[PropertyCard.tsx]"]
  node_featured_card["Featured Card<br/>[FeaturedCard.tsx]"]
  node_detail["Property Detail<br/>[&#91;id&#93;.tsx]"]
  node_map["Property Map<br/>[map.tsx]"]
  node_saved_list["Saved Listings<br/>[saved.tsx]"]
end

subgraph group_listing["Listing Management"]
  node_create["Create Listing<br/>[create.tsx]"]
end

subgraph group_identity["Identity and Saves"]
  node_profile["User Profile<br/>[profile.tsx]"]
  node_auth["Sign In and Up<br/>[sign-in.tsx]"]
  node_user_sync["User Sync<br/>[useUserSync.ts]"]
  node_save_hook["Saved-Property Logic"]
  node_user_state["Admin State<br/>[userStore.ts]"]
end

subgraph group_shared["Shared Runtime"]
  node_public_client["Public Supabase Client<br/>[supabase.ts]"]
  node_auth_hook["Authenticated Client Hook<br/>[useSupabase.ts]"]
end

node_visitor(("App User"))
node_supabase[("Supabase")]
node_clerk["Clerk Identity"]

node_visitor -->|"browses"| node_home
node_visitor -->|"searches"| node_search
node_search -->|"queries listings"| node_public_client
node_search -->|"reads and updates"| node_filter_state
node_filters -->|"updates"| node_filter_state
node_search -->|"opens"| node_filters
node_search -->|"renders results"| node_property_cards
node_home -->|"reads listings"| node_public_client
node_home -->|"renders featured"| node_featured_card
node_home -->|"renders listings"| node_property_cards
node_property_cards -->|"opens listing"| node_detail
node_detail -->|"fetches listing"| node_public_client
node_visitor -->|"views locations"| node_map
node_visitor -->|"views saved homes"| node_saved_list
node_saved_list -->|"renders saved homes"| node_property_cards
node_property_cards -->|"uses save logic"| node_save_hook
node_detail -->|"uses save logic"| node_save_hook
node_save_hook -->|"uses authenticated client"| node_auth_hook
node_auth_hook -->|"creates client"| node_public_client
node_user_sync -->|"uses authenticated client"| node_auth_hook
node_user_sync -->|"sets admin flag"| node_user_state
node_auth -.->|"authenticates"| node_clerk
node_clerk -->|"provides token"| node_auth_hook
node_auth_hook -->|"sends authenticated requests"| node_supabase
node_public_client -->|"sends public queries"| node_supabase
node_visitor -->|"admin creates listing"| node_create
node_create -->|"uses authenticated client"| node_auth_hook
node_detail -->|"admin updates listing"| node_auth_hook
node_visitor -->|"views profile"| node_profile

click node_home "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/index.tsx"
click node_search "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/search.tsx"
click node_filters "https://github.com/piyush-eon/react-native-course/blob/master/components/FilterModal.tsx"
click node_filter_state "https://github.com/piyush-eon/react-native-course/blob/master/store/filterStore.ts"
click node_property_cards "https://github.com/piyush-eon/react-native-course/blob/master/components/PropertyCard.tsx"
click node_featured_card "https://github.com/piyush-eon/react-native-course/blob/master/components/FeaturedCard.tsx"
click node_detail "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/property/%5Bid%5D.tsx"
click node_map "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/property/map.tsx"
click node_saved_list "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/saved.tsx"
click node_create "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/create.tsx"
click node_profile "https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/profile.tsx"
click node_auth "https://github.com/piyush-eon/react-native-course/blob/master/app/(auth)/sign-in.tsx"
click node_user_sync "https://github.com/piyush-eon/react-native-course/blob/master/hooks/useUserSync.ts"
click node_save_hook "https://github.com/piyush-eon/react-native-course/blob/master/hooks/useSavedProperty.ts"
click node_user_state "https://github.com/piyush-eon/react-native-course/blob/master/store/userStore.ts"
click node_public_client "https://github.com/piyush-eon/react-native-course/blob/master/lib/supabase.ts"
click node_auth_hook "https://github.com/piyush-eon/react-native-course/blob/master/hooks/useSupabase.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_home,node_search,node_filters,node_filter_state,node_property_cards,node_featured_card,node_detail,node_map,node_saved_list,node_visitor toneBlue
class node_create,node_supabase toneAmber
class node_profile,node_auth,node_user_sync,node_save_hook,node_user_state toneMint
class node_public_client,node_auth_hook toneRose
class node_clerk toneIndigo
```

## Components

### Property Discovery

- [Featured Listings](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/index.tsx): `app/(root)/(tabs)/index.tsx`
- [Property Search](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/search.tsx): `app/(root)/(tabs)/search.tsx`
- [Filter Controls](https://github.com/piyush-eon/react-native-course/blob/master/components/FilterModal.tsx): `components/FilterModal.tsx`
- [Filter State](https://github.com/piyush-eon/react-native-course/blob/master/store/filterStore.ts): `store/filterStore.ts`
- [Property Cards](https://github.com/piyush-eon/react-native-course/blob/master/components/PropertyCard.tsx): `components/PropertyCard.tsx`
- [Featured Card](https://github.com/piyush-eon/react-native-course/blob/master/components/FeaturedCard.tsx): `components/FeaturedCard.tsx`
- [Property Detail](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/property/%5Bid%5D.tsx): `app/(root)/property/[id].tsx`
- [Property Map](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/property/map.tsx): `app/(root)/property/map.tsx`
- [Saved Listings](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/saved.tsx): `app/(root)/(tabs)/saved.tsx`

### Listing Management

- [Create Listing](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/create.tsx): `app/(root)/(tabs)/create.tsx`

### Identity and Saves

- [User Profile](https://github.com/piyush-eon/react-native-course/blob/master/app/(root)/(tabs)/profile.tsx): `app/(root)/(tabs)/profile.tsx`
- [Sign In and Up](https://github.com/piyush-eon/react-native-course/blob/master/app/(auth)/sign-in.tsx): `app/(auth)/sign-in.tsx`
- [User Sync](https://github.com/piyush-eon/react-native-course/blob/master/hooks/useUserSync.ts): `hooks/useUserSync.ts`
- [Saved-Property Logic](https://github.com/piyush-eon/react-native-course/blob/master/hooks/useSavedProperty.ts): `hooks/useSavedProperty.ts`
- [Admin State](https://github.com/piyush-eon/react-native-course/blob/master/store/userStore.ts): `store/userStore.ts`

### Shared Runtime

- [Public Supabase Client](https://github.com/piyush-eon/react-native-course/blob/master/lib/supabase.ts): `lib/supabase.ts`
- [Authenticated Client Hook](https://github.com/piyush-eon/react-native-course/blob/master/hooks/useSupabase.ts): `hooks/useSupabase.ts`

### Other components

- **App User**
- **Supabase**
- **Clerk Identity**

## Connections

- App User → Featured Listings: browses (evidence: `README.md`)
- App User → Property Search: searches (evidence: `app/(root)/(tabs)/search.tsx`)
- Property Search → Public Supabase Client: queries listings (evidence: `app/(root)/(tabs)/search.tsx`)
- Property Search → Filter State: reads and updates (evidence: `app/(root)/(tabs)/search.tsx`)
- Filter Controls → Filter State: updates (evidence: `components/FilterModal.tsx`)
- Property Search → Filter Controls: opens (evidence: `app/(root)/(tabs)/search.tsx`)
- Property Search → Property Cards: renders results (evidence: `app/(root)/(tabs)/search.tsx`)
- Featured Listings → Public Supabase Client: reads listings (evidence: `app/(root)/(tabs)/index.tsx`)
- Featured Listings → Featured Card: renders featured (evidence: `app/(root)/(tabs)/index.tsx`)
- Featured Listings → Property Cards: renders listings (evidence: `app/(root)/(tabs)/index.tsx`)
- Property Cards → Property Detail: opens listing (evidence: `components/PropertyCard.tsx`)
- Property Detail → Public Supabase Client: fetches listing (evidence: `app/(root)/property/[id].tsx`)
- App User → Property Map: views locations (evidence: `README.md`)
- App User → Saved Listings: views saved homes (evidence: `README.md`)
- Saved Listings → Property Cards: renders saved homes (evidence: `app/(root)/(tabs)/saved.tsx`)
- Property Cards → Saved-Property Logic: uses save logic (evidence: `components/PropertyCard.tsx`)
- Property Detail → Saved-Property Logic: uses save logic (evidence: `app/(root)/property/[id].tsx`)
- Saved-Property Logic → Authenticated Client Hook: uses authenticated client (evidence: `hooks/useSavedProperty.ts`)
- Authenticated Client Hook → Public Supabase Client: creates client (evidence: `hooks/useSupabase.ts`)
- User Sync → Authenticated Client Hook: uses authenticated client (evidence: `hooks/useUserSync.ts`)
- User Sync → Admin State: sets admin flag (evidence: `hooks/useUserSync.ts`)
- Sign In and Up → Clerk Identity: authenticates
- Clerk Identity → Authenticated Client Hook: provides token (evidence: `hooks/useSupabase.ts`)
- Authenticated Client Hook → Supabase: sends authenticated requests
- Public Supabase Client → Supabase: sends public queries (evidence: `lib/supabase.ts`)
- App User → Create Listing: admin creates listing (evidence: `README.md`)
- Create Listing → Authenticated Client Hook: uses authenticated client (evidence: `app/(root)/(tabs)/create.tsx`)
- Property Detail → Authenticated Client Hook: admin updates listing (evidence: `app/(root)/property/[id].tsx`)
- App User → User Profile: views profile (evidence: `README.md`)
