Infrastructure Ops Skill
This skill governs the backend and deployment integrity of THE LOST+UNFOUNDS.
Database & Supabase Standards
1. Migrations (SQL)
- •Pattern: Every migration must be idempotent.
- •Check-and-Execute: Use
DO $$blocks to check for existence beforeINSERTorCREATE. - •Constraint Safety: Never assume a column is UNIQUE. Always check by slug or ID before inserting.
2. RLS (Row Level Security)
- •Default Deny: New tables should have RLS enabled and a
service_roleorauthenticatedpolicy. - •Service Role: Sensitive operations (like newsletter sending) should use the
SUPABASE_SERVICE_ROLE_KEYvia server-side handlers.
Environment Management
- •Local .env: Always check
.env.localfor local development. - •Vercel: Use the
set-vercel-env.shscript to sync environment variables. - •Secrets: NEVER hardcode API keys. Use the
lib/api-handlerspattern to fetch secrets.
Zoho Mail Integration
- •OAuth: Use the
_zoho-mail-handler.tsand associated refresh token logic. - •Error Handling: Surface specific Zoho status codes if a send fails.
Deployment Verification
- •Build Logs: After deployment, ALWAYS check Vercel logs for "Silent Failures" or JSON parsing errors.
- •URL Check: Verify the
https://www.thelostandunfounds.com/sqlpage correctly lists new scripts.