How alighailes/sakan-dz works
Sakan DZ is an Algerian property marketplace for browsing, mapping, saving, and publishing listings, with account, messaging, and property-related services. The principal flow is routed through the app shell to discovery or listing pages, then through property APIs to Supabase; publishing additionally uses location and storage services. The tree and source index show further capabilities such as valuation, contracts, collaborative favorites, and push notifications, but their internal interactions are not fully evidenced. Edges below follow explicit routes, imports, and calls in the excerpts or source index.
Main entry points: App.tsx App router · PublishPage.tsx Publish listing · supabase.ts Supabase platform · HeroSearch.tsx Search controls
Components 22
App and accounts
- App router
src/App.tsx - Shared layout
src/components/layout/Layout.tsx - Sign in and register
src/pages/Auth.tsx - Authentication state
src/stores/authStore.ts - Protected routes
src/components/layout/ProtectedRoute.tsx
Property discovery
- Marketplace home
src/pages/HomePage.tsx - Search controls
src/components/search/HeroSearch.tsx - Algerian locations
src/data/algeria-locations.ts - Listing results
src/pages/ListingsPage.tsx - Listing filters
src/components/listings/FilterBar.tsx - Map browsing
src/components/map/MapView.tsx - Search state
src/stores/searchStore.ts
Listing lifecycle
- Publish listing
src/pages/PublishPage.tsx - Listing location picker
src/components/map/LocationPicker.tsx
User engagement
- Saved searches
src/pages/SavedSearchesPage.tsx - Notifications
src/services/notifications.ts - Messaging
src/pages/MessagesPage.tsx
Data and services
- Property API
src/services/api.ts - Property data hook
src/hooks/useProperties.ts - Media storage
src/services/storage.ts - Supabase platform
src/lib/supabase.ts
Other components
- Marketplace user
Connections 25
- Marketplace user → App router: opens
src/App.tsx - App router → Shared layout: wraps routes
src/App.tsx - App router → Marketplace home: routes to
src/App.tsx - App router → Listing results: routes to
src/App.tsx - App router → Sign in and register: routes to
src/App.tsx - App router → Publish listing: guards route
src/App.tsx - App router → Messaging: routes to
src/App.tsx - Sign in and register → Authentication state: authenticates through
src/pages/Auth.tsx - Protected routes → Authentication state: checks session
src/components/layout/ProtectedRoute.tsx - Authentication state → Supabase platform: uses auth
src/stores/authStore.ts - Marketplace home → Search controls: presents search
- Search controls → Search state: updates filters
src/components/search/HeroSearch.tsx - Search controls → Algerian locations: uses location data
src/components/search/HeroSearch.tsx - Listing results → Property data hook: loads properties
- Property data hook → Property API: fetches through
src/hooks/useProperties.ts - Listing results → Listing filters: offers filtering
- App router → Map browsing: routes to
src/App.tsx - Publish listing → Property API: submits listing
src/pages/PublishPage.tsx - Publish listing → Media storage: uploads media
src/pages/PublishPage.tsx - Publish listing → Listing location picker: selects location
src/pages/PublishPage.tsx - Property API → Supabase platform: queries data
src/services/api.ts - Media storage → Supabase platform: uses storage
src/services/storage.ts - App router → Saved searches: routes to
src/App.tsx - Saved searches → Notifications: subscribes to alerts
- Notifications → Supabase platform: uses backend
src/services/notifications.ts