This is a code bundle for Design PlotSync AI Homepage. The original project is available at https://www.figma.com/design/tknfqjcdyp4VmiNBwMESpn/Design-PlotSync-AI-Homepage.
This project includes an Express backend in server/index.js that now stores data in Supabase (Postgres + Supabase Auth).
npm i- Go to Supabase and create a new project.
- Open SQL Editor.
- Paste and run
/supabase/schema.sql. - In Supabase project settings, copy:
- Project URL
anonpublic keyservice_rolekey
cp .env.example .envSet these values in .env:
SUPABASE_URL=...
SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
PORT=8787npm run devThis starts:
- frontend (Vite):
http://localhost:5173 - backend (Express):
http://localhost:8787
Vite proxies /api and /health to the backend, so from frontend code you can call relative URLs like /api/v1/plots.
curl http://localhost:5173/health
curl http://localhost:5173/api/v1/plots
curl http://localhost:5173/api/plots/availabilitycurl -X POST http://localhost:5173/api/auth/register \
-H "Content-Type: application/json" \
-d '{"name":"Demo User","email":"demo@example.com","password":"secret123","company":"PlotSync","phone":"+1-555-111-2222"}'
curl -X POST http://localhost:5173/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"demo@example.com","password":"secret123"}'- Data now persists in Supabase.
- If
/healthreturns"supabaseConfigured": false, check your.envvalues. - The backend uses
SUPABASE_SERVICE_ROLE_KEY, so do not expose that key in frontend code.