How bla573/betview works
BetView is a real-estate application whose public workflow presents listings for browsing, map viewing, comparison, and agent contact; its admin workflow manages listings and other operational areas. The frontend uses Supabase directly, while the tree also contains a separate Express authentication API. README-described password-reset and EmailJS capabilities are retained, but their detailed frontend implementation is not sampled, so those connections are documented rather than inferred from unseen code.
Main entry points: App.tsx Route application · BrowseSection.tsx Listing discovery · AdminLayout.tsx Admin shell · client.ts Supabase client
Components 33
Public experience
- Route application
src/App.tsx - Landing page
src/pages/Index.tsx - Landing sections
src/components/landing/BookingForm.tsx - Browse page
src/pages/Browse.tsx - Listing discovery
src/components/landing/BrowseSection.tsx - Property data
src/components/browse/propertyData.ts - Listing cards
src/components/browse/PropertyCard.tsx - Property map
src/components/browse/PropertyMap.tsx - Listing details
src/components/browse/PropertyModal.tsx - Compare listings
src/components/browse/CompareDrawer.tsx - Contact agent
src/components/browse/ContactAgentModal.tsx - Demo requests
src/components/landing/BookingForm.tsx
Identity
- Sign in and signup
src/pages/Auth.tsx - Session and roles
src/contexts/AuthContext.tsx - Admin route guard
src/components/auth/AdminRouteGuard.tsx
Admin operations
- Admin shell
src/components/admin/AdminLayout.tsx - Listing management
src/pages/admin/AdminListings.tsx - Listing editor
src/components/admin/PropertyFormModal.tsx - Inquiry management
src/pages/admin/AdminInquiriesPage.tsx - Reports
src/pages/admin/AdminReports.tsx - User management
src/pages/admin/AdminUsers.tsx - Admin overview
src/pages/admin/AdminOverview.tsx - Activity logs
src/pages/admin/AdminActivityLogs.tsx - Admin settings
src/pages/admin/AdminSettings.tsx
Data services
- Supabase client
src/integrations/supabase/client.ts - Supabase Auth and database
Server authentication
- Express API
server/src/index.js - Auth endpoints
server/src/routes/auth.js - Session middleware
server/src/middleware/auth.js - Server Supabase clients
server/src/lib/supabase.js - Auth cookies
server/src/lib/cookies.js
Other components
- Visitor
- EmailJS
Connections 43
- Visitor → Route application: opens
src/App.tsx - Route application → Landing page: routes to
src/App.tsx - Route application → Browse page: routes to
src/App.tsx - Route application → Sign in and signup: routes to
src/App.tsx - Route application → Admin route guard: guards admin
src/App.tsx - Route application → Admin overview: routes to
src/App.tsx - Route application → Listing management: routes to
src/App.tsx - Route application → User management: routes to
src/App.tsx - Route application → Inquiry management: routes to
src/App.tsx - Route application → Reports: routes to
src/App.tsx - Route application → Activity logs: routes to
src/App.tsx - Route application → Admin settings: routes to
src/App.tsx - Landing page → Landing sections: renders
src/pages/Index.tsx - Landing page → Listing discovery: renders
src/pages/Index.tsx - Landing page → Demo requests: renders
src/pages/Index.tsx - Browse page → Listing discovery: renders
src/pages/Browse.tsx - Listing discovery → Property data: uses
src/components/landing/BrowseSection.tsx - Listing discovery → Listing cards: renders
src/components/landing/BrowseSection.tsx - Listing discovery → Property map: renders
src/components/landing/BrowseSection.tsx - Listing discovery → Listing details: opens
src/components/landing/BrowseSection.tsx - Listing discovery → Compare listings: opens
src/components/landing/BrowseSection.tsx - Listing details → Contact agent: opens
src/components/browse/PropertyModal.tsx - Listing discovery → Supabase client: queries listings
src/components/landing/BrowseSection.tsx - Listing editor → Supabase client: reads and writes
src/components/admin/PropertyFormModal.tsx - Listing management → Admin shell: uses shell
src/pages/admin/AdminListings.tsx - Listing management → Listing editor: opens editor
src/pages/admin/AdminListings.tsx - Inquiry management → Admin shell: uses shell
src/pages/admin/AdminInquiriesPage.tsx - Reports → Admin shell: uses shell
src/pages/admin/AdminReports.tsx - User management → Admin shell: uses shell
src/pages/admin/AdminUsers.tsx - Sign in and signup → Supabase client: authenticates
src/pages/Auth.tsx - Session and roles → Supabase client: tracks session
src/contexts/AuthContext.tsx - Admin route guard → Session and roles: checks access
src/components/auth/AdminRouteGuard.tsx - Admin shell → Session and roles: checks role
src/components/admin/AdminLayout.tsx - Supabase client → Supabase Auth and database: connects
src/integrations/supabase/client.ts - Demo requests → EmailJS: sends requests
README.md - Route application → Express API: may use API
- Express API → Auth endpoints: mounts routes
server/src/index.js - Auth endpoints → Server Supabase clients: auth operations
server/src/routes/auth.js - Auth endpoints → Session middleware: requires session
server/src/routes/auth.js - Session middleware → Server Supabase clients: validates session
server/src/middleware/auth.js - Auth endpoints → Auth cookies: sets and clears
server/src/routes/auth.js - Session middleware → Auth cookies: reads cookies
server/src/middleware/auth.js - Server Supabase clients → Supabase Auth and database: connects