Deployment Strategy
Relevant source files
The following files were used as context for generating this wiki page:
The deployment strategy for the Tuturuuu platform is built upon a multi-cloud, serverless architecture that prioritizes automation, quality gates, and high availability. The system leverages a monorepo structure managed by Turborepo, allowing for synchronized deployments across web applications, edge functions, and specialized microservices.
The primary objective of this strategy is to ensure that all code reaching production has passed rigorous automated testing and manual verification protocols. By utilizing Vercel for web hosting and Supabase for backend infrastructure, the platform achieves a non-interactive, CI-aware deployment flow that supports rapid iteration while maintaining stability.
Sources: conductor/workflow.md:1-15, GEMINI.md:5-20, README.md:1-15
Infrastructure and Hosting
The platform's infrastructure is distributed across several specialized providers to optimize for performance and cost-effectiveness. The core web applications are hosted on Vercel, utilizing Next.js for server-side rendering and edge computing capabilities.
Hosting Providers
| Category | Provider | Purpose |
|---|---|---|
| Web Applications | Vercel | Hosting for apps/web, apps/nova, and apps/rewise |
| Database & Auth | Supabase Cloud | PostgreSQL database, Auth (GoTrue), and Storage |
| AI & Python Services | Modal | Serverless GPU execution and job management for Python services |
| Edge Computing | Vercel/Supabase | Global distribution of logic via Edge Functions |
Sources: conductor/tech-stack.md:30-45, README.md:130-150
Regional Optimization
To minimize latency for the core user base, the platform prefers specific regions for edge execution. For instance, the AI chat routes are configured to run in the sin1 (Singapore) region with a maximum duration of 60 seconds for long-running stream responses.
Sources: packages/ai/src/chat/google/route.ts:25-26, packages/ai/src/chat/google-vertex/route.ts:18-19
Deployment Workflow
The deployment process is strictly managed through a series of "Quality Gates" and a task-driven lifecycle documented in the project's workflow principles.
Pre-Deployment Lifecycle
Every change must follow a Test-Driven Development (TDD) cycle before being merged into the main branch. This ensures that the deployment package is always in a "ready" state.
The diagram above illustrates the path a code change takes from task selection to final deployment.
Sources: conductor/workflow.md:20-60, conductor/workflow.md:330-345
Verification Protocol
A critical phase of the deployment strategy is the "Phase Completion Verification and Checkpointing Protocol". This requires automated tests, type checks, and explicit user feedback before a phase is considered complete and ready for production merging.
- Automated Checks: Execution of
bun type-checkandCI=true npm test. - Manual Verification: Step-by-step instructions for human verification in development environments.
- Checkpointing: Auditable verification reports attached via
git notesto checkpoint commits.
Sources: conductor/workflow.md:110-160, GEMINI.md:35-45
CI/CD and Quality Gates
The platform utilizes GitHub Actions to automate the verification and deployment pipeline. Continuous Integration (CI) is configured to be non-interactive and aware of the environment, often using the CI=true flag to prevent watch-mode hangs.
Mandatory Quality Gates
Before any task or phase is marked complete for deployment, it must pass several gates:
- Test Coverage: All new code must aim for >80% coverage.
- Type Safety: TypeScript must pass the
bun type-checkcommand. - Linting: Code must conform to Biome linting and formatting rules.
- Mobile Verification: Changes affecting the mobile application must pass
bun check:mobile.
Sources: conductor/workflow.md:200-220, GEMINI.md:95-110
Deployment Execution
The actual deployment involves merging to the main branch, which triggers the production platform workflow on Vercel.
This sequence diagram shows the automated transition from code merge to live deployment.
Sources: conductor/workflow.md:340-355, README.md:1-10
Emergency Procedures
The deployment strategy includes protocols for rapid response to production incidents to minimize downtime and data loss.
- Hotfixes: Critical bugs require a hotfix branch from
main, a failing test implementation, a minimal fix, and immediate deployment. - Data Integrity: In cases of data loss, all write operations are stopped, and the system is restored from the latest backup before verifying integrity.
- Security Breaches: Immediate rotation of all secrets and patching of vulnerabilities, followed by updated security documentation.
Sources: conductor/workflow.md:370-390
Summary
The Tuturuuu deployment strategy integrates TDD, high-coverage requirements, and multi-cloud infrastructure to deliver a resilient platform. By enforcing quality gates at every step—from local development to automated CI checks—the project maintains a high standard of reliability. The use of specialized services like Modal for AI tasks and Vercel for edge-optimized web delivery ensures the platform can scale efficiently across its diverse set of applications.