3.2 KiB
3.2 KiB
/api/system/trigger-workflow endpoint).\n - Supabase: PostgreSQL Database, Supabase Auth, Supabase Storage (for temporary file hosting if needed for Play.ht, or other static assets), Supabase Functions (backend logic for the event-driven pipeline, deployed via Supabase CLI, runs on Vercel infrastructure), Database Webhooks (using pg_net or built-in functionality to trigger Supabase/Vercel functions), Supabase CLI (for local development, migrations, function deployment).\n- Infrastructure as Code (IaC):\n - Supabase Migrations: SQL migration files in supabase/migrations/ define the database schema and are managed by the Supabase CLI. This is the primary IaC for the database.\n - Vercel Configuration: vercel.json (if needed for custom configurations beyond what the Vercel dashboard and Next.js provide) and project settings via the Vercel dashboard.\n - No explicit IaC for Vercel services beyond its declarative nature and Next.js conventions is anticipated for MVP.\n- Deployment Strategy:\n - Source Control: GitHub will be used for version control.\n - CI/CD Tool: GitHub Actions (as defined in /.github/workflows/main.yml).\n - Frontend (Next.js app on Vercel): Continuous deployment triggered by pushes/merges to the main branch. Preview deployments automatically created for pull requests.\n - Backend (Supabase Functions): Deployed via Supabase CLI commands (e.g., supabase functions deploy <function_name> --project-ref <your-project-ref>), run as part of the GitHub Actions workflow.\n - Database Migrations (Supabase): Applied via CI/CD step using supabase migration up --linked or Supabase CLI against remote DB.\n- Environments:\n - Local Development: Next.js local dev server (next dev), local Supabase stack (supabase start), local .env.local.\n - Development/Preview (on Vercel): Auto-deployed per PR/dev branch push, connected to a Development Supabase instance.\n - Production (on Vercel): Deployed from the main branch, connected to a Production Supabase instance.\n- Environment Promotion: Local -> Dev/Preview (PR) -> Production (merge to main).\n- Rollback Strategy: Vercel dashboard/CLI for app/function rollbacks; Supabase migrations (revert migration) or Point-in-Time Recovery for database.