OpenSauce is organized as a monorepo with a Flask backend and Vite/React frontend.
- Database and user management: Supabase Postgres + Supabase Auth, proxied through the backend.
- Backend deployment target: Render Free Web Service from
backend/. - Frontend deployment target: Vercel with project root
frontend/. - CI/CD:
.github/workflows/deploy.ymlruns backend unit tests, frontend build, and backend Docker build on every branch push and pull request. Pushes tomaindeploy production automatically. Branches can also be manually promoted to production with the workflow'sworkflow_dispatchinputs after checks pass.
- Frontend production URL:
https://opensauce.itdogtics.com - Frontend Vercel fallback URL:
https://open-sauce-theta.vercel.app - Vercel project:
open-sauce - Backend production URL:
https://api.opensauce.itdogtics.com - Backend Render fallback URL:
https://opensauce-api.onrender.com - Render service:
opensauce-api - Supabase project URL:
https://wyshohsvlmzqhtxxkcre.supabase.co
Production runtime values:
VITE_API_BASE_URL=https://api.opensauce.itdogtics.com
PUBLIC_BASE_URL=https://api.opensauce.itdogtics.com
GITHUB_REDIRECT_URI=https://api.opensauce.itdogtics.com/oauth/github/callback
OAUTH_SUCCESS_REDIRECT=https://opensauce.itdogtics.com/oauth/callback
CORS_ALLOWED_ORIGINS=https://opensauce.itdogtics.com- Create a Supabase project and run
supabase/migrations/001_initial_schema.sql. - Enable Supabase Email/Password Auth. For GitHub login, enable the GitHub provider in Supabase Auth, add
http://localhost:8000/oauth/github/callbackto allowed redirect URLs for local Docker, and use Supabase's GitHub provider callback URL in the GitHub OAuth App. In Supabase's GitHub provider settings, paste the real GitHub OAuth App Client ID and Client Secret; the Client ID is not the app name. - Configure Render with backend env vars from
backend/.env.example. - Configure Vercel with
VITE_API_BASE_URL; the browser does not need Supabase credentials. - Add GitHub repository secrets:
VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID,RENDER_API_KEY, andRENDER_SERVICE_ID.
Docker Compose uses a local Postgres container by default, so local full-stack testing does not touch the cloud Supabase database:
cp .env.example .env
docker compose up --buildYou can also run the example file directly without copying it:
docker compose --env-file .env.example up --buildThe default root .env.example points DB_URL_TEMPLATE at the Compose db service and enables LOCAL_AUTH_ENABLED=true, so POST /user and POST /login work against local tables. The Compose Postgres container uses the matching local credentials from that URL: database/user/password are all opensauce. To test against Supabase instead, use a separate override compose file or run the backend outside this local Compose stack with the Supabase pooler DB_URL_TEMPLATE, DB_PASSWORD, SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, and LOCAL_AUTH_ENABLED=false.
Use http://localhost:3000 for the app and http://localhost:8000/health for the API. For Docker/local, keep VITE_API_BASE_URL=http://localhost:8000 so browser redirects for GitHub OAuth stay on the backend origin.
Useful local checks:
cd backend
python3 -m pytest -q
cd ../frontend
npm run buildWhen an agent works on this repository, prefer this flow:
-
Run locally with Docker Compose:
docker compose --env-file .env.example up --build
-
Validate the backend and frontend before proposing a change:
cd backend && python3 -m pytest -q cd ../frontend && npm run build
-
Commit the change on a branch and open a GitHub pull request / merge request.
-
Let CI handle verification and deployment. The workflow in
.github/workflows/deploy.ymlruns backend unit tests, frontend build, and backend Docker build on branch pushes and pull requests. -
Production deployment is handled by CI:
- pushes to
maindeploy production automatically after checks pass; - manual branch promotion is available from GitHub Actions via
workflow_dispatchwithdeploy_frontendand/ordeploy_backendset totrue.
- pushes to
Agents should not point local Docker at production Supabase unless explicitly asked. The default .env.example is intentionally safe for local full-stack testing.
See backend/README.md for backend runtime details and backend/API.md for the API endpoint reference.