0e4910805a19b333a931038b717aa33e48b660d4
Leads4Less
Leads4Less is a React + Vite app for finding local business leads, saving them in Supabase, and browsing them in dashboard and map views.
Stack
- React 19 + Vite
- Supabase Auth + Postgres + Edge Functions
- Google Maps Platform for maps, geocoding, and Places search
Local App Setup
- Install dependencies:
npm install - Copy
.env.exampleto.env.localand fill in:VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_GOOGLE_MAPS_PLATFORM_KEY
- Run the app:
npm run dev
Supabase Setup
- Create a Supabase project.
- Enable email/password auth in Supabase Auth.
- Apply the SQL migration in
supabase/migrations/20260322120000_init.sql. - Deploy the Edge Function in
supabase/functions/run-search/index.ts. - Set these Edge Function secrets in Supabase:
SUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYGOOGLE_MAPS_SERVER_KEY
Google Maps Requirements
Enable these Google Cloud APIs for the keys you use:
- Maps JavaScript API
- Places API
- Geocoding API
Use a browser-restricted key for VITE_GOOGLE_MAPS_PLATFORM_KEY and a server-side key for GOOGLE_MAPS_SERVER_KEY.
Current Flow
- User signs in with Supabase email/password auth.
- The app submits a search request to the
run-searchEdge Function. - The function geocodes the location, calls Google Places, upserts businesses, and stores job results in Supabase.
- The dashboard and map load saved leads from Postgres.
Description
Languages
TypeScript
98.3%
PLpgSQL
1.3%
Dockerfile
0.2%
HTML
0.1%