Skip to content

Gaurav2693/Plotsync-website

Repository files navigation

Design PlotSync AI Homepage

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.

Supabase-backed full-stack setup

This project includes an Express backend in server/index.js that now stores data in Supabase (Postgres + Supabase Auth).

1. Install dependencies

npm i

2. Create your Supabase project

  1. Go to Supabase and create a new project.
  2. Open SQL Editor.
  3. Paste and run /supabase/schema.sql.
  4. In Supabase project settings, copy:
  • Project URL
  • anon public key
  • service_role key

3. Configure environment variables

cp .env.example .env

Set these values in .env:

SUPABASE_URL=...
SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
PORT=8787

4. Run frontend + backend together

npm run dev

This 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.

Useful test calls

curl http://localhost:5173/health
curl http://localhost:5173/api/v1/plots
curl http://localhost:5173/api/plots/availability

Auth examples

curl -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"}'

Notes

  • Data now persists in Supabase.
  • If /health returns "supabaseConfigured": false, check your .env values.
  • The backend uses SUPABASE_SERVICE_ROLE_KEY, so do not expose that key in frontend code.

About

PlotSync — real estate SaaS marketing site

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages