| Branch | Purpose | Deployed | Merge Rule |
|---|---|---|---|---|
| main | v4 stable β LangGraph pipeline | β
Render + Vercel | Protected. PR from agentic requires review. |
| agentic | v5 experimental β custom agent loop with @tool registry | β Under development | Merges to main when stable. |
| Service | Config File | Variables |
|---|---|---|
| Render (backend) | render.yaml |
DB_URL, GROQ_API_KEY, SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_KEY, GOOGLE_API_KEY, ALLOWED_ORIGINS |
| Vercel (frontend) | Project Settings β Environment Variables | NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, NEXT_PUBLIC_API_URL |
- Create a free project at supabase.com
- Auth: Settings β Auth β Email β toggle Confirm email OFF
- SQL: Run
codex-backend/supabase/seed.sqlin Supabase SQL Editor to create tables, storage bucket, and RLS policies
- Connect your GitHub repo to Render via Blueprint (use
mainbranch for v4,agenticfor v5) - Render reads
render.yamlβ set the env vars in the dashboard or blueprint - Deploy β the service auto-starts at
https://<your-app>.onrender.com - Verify:
curl https://<your-app>.onrender.com/β{"status":"ok","app":"CodexEngine V4","version":"4.0"}
- Import the repo, set root directory to
codex-frontend - Set
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY,NEXT_PUBLIC_API_URLin Vercel project settings - Deploy β the UI is live at
https://<your-app>.vercel.app
- Update
ALLOWED_ORIGINSon Render to include your Vercel URL - Run
codex-backend/supabase/seed.sqlon the cloud DB if not done already
To prevent Render free tier spin-down (15-minute idle timeout) and Supabase auto-pause (7-day inactivity pause), CodexEngine uses a Hybrid Keep-Alive Pattern:
- Setup: Create a free HTTP monitor at UptimeRobot.com targeting
https://<your-backend>.onrender.com/(or/health) every 5 minutes. - Why Primary: Guarantees exact 5-minute precision without runner queue delays, keeps Render 100% warm 24/7, and instantly notifies via Email/Slack if the service crashes.
- Setup: Automatically enabled via
.github/workflows/keep_alive.ymlin the repository running every 14 minutes (cron: '*/14 * * * *'). - Function: Sends HTTP requests to both Render backend (
secrets.RENDER_BACKEND_URL) and Supabase REST API (secrets.SUPABASE_URL) as an in-repo automated backup.
GitHub Actions runs on every push to main:
- Spins up a local
pgvectorcontainer - Installs dependencies (includes fastembed for local/CI mode)
- Seeds the database schema
- Runs golden tests, rigorous sweep, and RAGAS eval
Required secrets (repo β Settings β Secrets and variables β Actions β Repository secrets):
| Secret | Purpose |
|---|---|
GROQ_API_KEY |
LLM inference |
GOOGLE_API_KEY |
Embeddings (used as fallback in CI) |