Minimal React + Vite + Supabase Auth starter from @open-templates — Google OAuth, email/password flows, protected routes, and JWT calls to a paired Cloudflare Worker API.
- Google OAuth —
signInWithOAuth({ provider: 'google' })via Supabase - Email auth — login, signup, password recovery, and reset
- Auth routing — guest-only and authenticated route guards
- Session handling —
AuthContextwith access token mirrored for API calls - API health indicator — header polls
GET /healthevery 30s - Protected home —
GET /mewith the Supabase JWT on the authenticated landing page - Backend pairing — shared contract with cf-hono-supabase-api-template
- Init wizard —
./scripts/init-from-template.shpersonalizes repo metadata fromtemplates/
- React 19, TypeScript, Vite 7
- Supabase Auth (
@supabase/supabase-js) - Tailwind CSS, shadcn-style UI primitives
- Bun (package manager)
- Use this template on GitHub, then clone your repo.
- Personalize from
templates/:
./scripts/init-from-template.sh- Install and run:
bun install
cp .env.example .env.local
bun run devStart the API worker first (cf-hono-supabase-api-template on port 8787) so health and /me work locally.
See templates/ABOUT_TEMPLATES.md and docs/INIT_TEMPLATE.md.
| Variable | Required | Purpose |
|---|---|---|
VITE_SUPABASE_URL |
Yes | Supabase project URL |
VITE_SUPABASE_PUBLISHABLE_KEY |
Yes | Supabase anon/publishable key |
VITE_API_BASE_URL |
No | Worker URL (default http://localhost:8787) |
Supabase + Google OAuth setup: docs/SUPABASE_SETUP.md
| Script | Purpose |
|---|---|
bun run dev |
Development server |
bun run build / bun run ci |
Production build |
bun run lint / bun run typecheck |
Quality checks |
bun run init |
Copy templates/ → root (after fork) |
Target: Cloudflare Pages. Build command bun run build, output directory dist. Set the same VITE_* variables in the Pages project settings.
| Doc | Description |
|---|---|
index.md |
OKF bundle — routes, API contracts, extension notes |
INSTRUCTIONS.md |
Maintainer and adopter guide |
docs/SUPABASE_SETUP.md |
Supabase project + Google OAuth |
docs/INIT_TEMPLATE.md |
Init wizard reference |
.agents/skills/ |
Cursor agent skills catalog |
CHANGELOG.md |
Release history |
Supabase Auth pack: pairs with cf-hono-supabase-api-template (Hono), or any backend implementing the same GET /health and JWT GET /me contract.
Maintained by @open-templates · Charlie Rios (@xarlizard)
MIT — see LICENSE.
README | INSTRUCTIONS | CHANGELOG | CONTRIBUTING | SECURITY | CODE_OF_CONDUCT
