A Vite + React app with Tailwind, Supabase (Auth + Postgres + Storage), and a small Zustand store.
- Install deps
npm install-
Configure Supabase (required)
- Copy
.env.local.exampleto.env.localand set your Supabase keys from the Supabase project dashboard. - Required keys:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Optional:
VITE_API_BASE_URL(if you add a backend later)
- Copy
-
Run the dev server
npm run devnpm run dev— start dev servernpm run build— production buildnpm run preview— preview build locallynpm run lint— run ESLint (Supabase) Use the Supabase dashboard or CLI for DB/storage configuration.
-- src/Services/ — supabase.js (env-based), phone.service.js, api.js (Axios)
src/Stores/— authStore.js (Zustand)src/Pages/— pages (Login, Signup, Dashboards, etc.)src/Components/— UI and utilities (e.g., OtpModal, AddressPicker)src/Components/router/ProtectedRoute.jsx— auth/role guardpublic/— static assets
- Create the required tables (users, providers_clinics, providers_therapies, providers_others, etc.) and enable Row Level Security (RLS) with appropriate policies.
- Enable authentication providers you use (Email/Password; Phone if linking phone numbers) in the Supabase dashboard.
- Authorized domains (CORS) should include localhost/127.0.0.1 for local dev.
- Supabase auth errors → verify
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYare set in.env.localand restartnpm run dev. - Permission/row-level errors → ensure your Supabase tables exist and Row Level Security (RLS) policies allow the intended operations for authenticated users.
git pull
npm install
npm run dev