Skip to content

Repository files navigation

cf-fastapi-supabase-api-template

Minimal Cloudflare Worker API built with FastAPI, Pydantic, and Supabase (workers-py) from @open-templates. Pairs with react-supabase-auth-template.

Alternative to cf-fastapi-supabase-api-template for teams preferring Python.

Quick start

Prerequisites: uv, Node.js (for Wrangler via pywrangler).

./scripts/init-from-template.sh   # optional personalization
uv sync
cp .env.example .dev.vars
uv run pywrangler dev

Test:

curl http://localhost:8787/health

Out-of-the-box features

Endpoint Auth Description
GET /health Public Liveness check for frontend online/offline indicator
GET /me Bearer JWT Returns the authenticated Supabase user profile

See index.md for detailed behavior and extension guidance.

Agent docs: INSTRUCTIONS.md · .agents/skills/

Environment variables

Variable Required Purpose
SUPABASE_URL Yes Supabase project URL
SUPABASE_ANON_KEY Yes Anon key for JWT-scoped client
SUPABASE_SERVICE_ROLE_KEY Yes Reserved for future admin operations
ALLOWED_ORIGINS No Comma-separated CORS origins
ENVIRONMENT No development / staging / production

License

MIT

About

Cloudflare Python Worker with FastAPI + Pydantic + Supabase — same /health and /me contract as the Hono auth backend.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Contributors

Languages