How v-spnz/locallink-capstone works
LocalLink is a React portal for customers and businesses, backed by Supabase and using Geoapify for address search. Users enter through the routed app and register or sign in; customers can discover deals and loyalty programmes, post service jobs, and review account history, while businesses manage deals, loyalty programmes, and marketplace leads, quotes, and jobs. The graph highlights those product stages and the feature hooks that coordinate API operations. Several feature implementations were not sampled, so their internal links are included only where the SOURCE INDEX establishes them.
Main entry points: supabase.js Supabase client · App.jsx App routing · BusinessProvider.jsx Business identity · useAllHistory.js Account history
Components 23
App and identity
- App routing
src/app/App.jsx - Authentication
src/auth/AuthProvider.jsx - Registration
src/pages/auth/RegisterPage.jsx
Customer features
- Customer portal
src/pages/customer/CustomerPortal.jsx - Deal discovery
src/pages/customer/Deals.jsx - Deal claims
src/features/deals/api/customerDeals.js - Loyalty discovery
src/features/loyalty/hooks/useLoyaltyDiscovery.js - Account history
src/pages/customer/hooks/useAllHistory.js
Business features
- Business portal
src/pages/business/BusinessPortal.jsx - Business identity
src/business/BusinessProvider.jsx - Deal management
src/features/deals/hooks/useBusinessDeals.js - Deal redemption
src/features/deals/hooks/useBusinessDealRedemption.js - Loyalty management
src/features/loyalty/hooks/useBusinessLoyaltyProgrammes.js - Business dashboard
src/features/dashboard/api/businessDashboard.js
Service marketplace
- Marketplace workspace
src/pages/business/ServiceMarketplacePage.jsx - Lead and quote workflow
src/features/service-marketplace/hooks/useBusinessMarketplace.js - Customer job workflow
src/features/service-marketplace/hooks/useCustomerJobs.js - Job requests API
src/features/service-marketplace/api/customerJobs.js
Shared services
- Address and maps
src/features/location/components/AddressAutocomplete.jsx - Supabase client
src/lib/supabase.js
Other components
- Customer or business
- Supabase
- Geoapify
Connections 27
- Customer or business → App routing: opens
- App routing → Authentication: wraps routes
src/main.jsx - App routing → Customer portal: routes to
src/app/App.jsx - App routing → Business portal: routes to
src/app/App.jsx - App routing → Registration: routes to
src/app/App.jsx - Authentication → Supabase client: uses
src/auth/AuthProvider.jsx - Registration → Address and maps: uses address search
src/pages/auth/RegisterPage.jsx - Registration → Supabase client: uses
src/pages/auth/RegisterPage.jsx - Customer portal → Deal discovery: hosts
- Deal discovery → Deal claims: loads claims
- Account history → Deal claims: fetches claims
src/pages/customer/hooks/useAllHistory.js - Account history → Job requests API: reads completed jobs
src/pages/customer/hooks/useAllHistory.js - Account history → Supabase client: queries jobs
src/pages/customer/hooks/useAllHistory.js - Account history → Supabase client: loads loyalty records
src/pages/customer/hooks/useAllHistory.js - Customer portal → Loyalty discovery: hosts
- Business portal → Business identity: provides business context
- Deal management → Business identity: reads business
src/features/deals/hooks/useBusinessDeals.js - Loyalty management → Business identity: reads business
src/features/loyalty/hooks/useBusinessLoyaltyProgrammes.js - Deal management → Deal claims: manages deals
- Deal redemption → Business identity: reads business
src/features/deals/hooks/useBusinessDealRedemption.js - Business portal → Business dashboard: hosts
- Marketplace workspace → Lead and quote workflow: uses workflow
src/pages/business/ServiceMarketplacePage.jsx - Lead and quote workflow → Business identity: reads business
src/features/service-marketplace/hooks/useBusinessMarketplace.js - Customer job workflow → Job requests API: calls job operations
src/features/service-marketplace/hooks/useCustomerJobs.js - Job requests API → Supabase client: queries data
src/features/service-marketplace/api/customerJobs.js - Address and maps → Geoapify: searches addresses
README.md - Supabase client → Supabase: connects
src/lib/supabase.js