https://github.com/tongeche/autostand-saas
https://github.com/tongeche/autostand-saas
netlify-functions parcel react supabase zustand
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tongeche/autostand-saas
- Owner: tongeche
- Created: 2025-09-02T21:47:43.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-09-16T16:28:58.000Z (about 2 months ago)
- Last Synced: 2025-09-16T16:49:36.268Z (about 2 months ago)
- Topics: netlify-functions, parcel, react, supabase, zustand
- Language: JavaScript
- Size: 661 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Modern, multi-tenant SaaS scaffold: React + Vite + Tailwind + Supabase.
## Apps
- `apps/web`: frontend (Vite)
- `apps/api`: optional functions/health (Netlify, TypeScript)
- `supabase/db/`: SQL migrations (core, RLS, seeds)
## Quick start
```bash
pnpm install
cp apps/web/.env.local.example apps/web/.env.local
pnpm -C apps/web dev
pnpm -C apps/api dev
```
## Supabase setup
1) Create a project at https://supabase.com
2) Project Settings → API: copy the Project URL and anon public key.
3) Put them in `apps/web/.env.local` as `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY`.
4) Apply database schema: open the SQL Editor in Supabase and run the files under:
- `supabase/db/migrations/schema.sql`
- `supabase/db/migrations/0003_seed.sql` (optional demo data)
Run the web app:
```bash
pnpm -C apps/web dev
```
## Push notifications (optional)
Database:
- Apply migrations creating notifications and push subscriptions:
- `supabase/db/migrations/0013_notifications.sql`
- `supabase/db/migrations/0016_notifications_delete_rls.sql`
- `supabase/db/migrations/0017_push_subscriptions.sql`
Client env:
- `apps/web/.env.local`
- `VITE_VAPID_PUBLIC_KEY` must be your VAPID public key
Server env (Netlify Functions): set in Netlify dashboard or `netlify env:import`:
- `VAPID_PUBLIC_KEY` and `VAPID_PRIVATE_KEY`
- `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`
Local test:
- Enable push in Settings → Notifications → “Enable push notifications”.
- Click “Send test notification” — should return a JSON with sent/failed counts.