This commit captures the current state before implementing the composable monorepo template system. Key changes included: Infrastructure: - Add CockroachDB provisioner adapter for database provisioning - Add Redis provisioner adapter for cache provisioning - Add build events system with PostgreSQL storage - Add WebSocket endpoint for real-time build progress Code agent improvements: - Fix Claude Code adapter to use default allowed tools instead of dangerously-skip-permissions - Add context-aware stream closing for cancellation support - Improve parser tests for edge cases Build system: - Add build event constants and metrics - Remove deprecated git_operations.go (replaced by pod_git_operations.go) - Add rollback logic for multi-step provisioning operations Documentation: - Add composable-monorepo feature documentation - Add DNS/Cloudflare service documentation - Update deployment and troubleshooting guides Cookbooks: - Add fullstack-app cookbook - Refactor landing-test with shared library Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
DNS Management (Cloudflare)
Last Updated: 2026-01 Confidence: High
Summary
DNS for threesix.ai domains is managed via Cloudflare API. Projects get auto-generated subdomains on creation, and users can add custom subdomains or external domain aliases. The Cloudflare adapter implements the DNSProvider port interface.
Key Facts:
- Auto-provisioned subdomains:
{random}.threesix.aicreated on project creation - Custom subdomains: User-chosen
{name}.threesix.aiauto-configured via API - External aliases: User manages DNS, rdev only configures ingress
- Credentials:
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ZONE_IDin.secrets→ loaded to PostgreSQL
Credential Keys: internal/domain/credential.go:23-24
Domain Types
| Type | Example | Auto-DNS |
|---|---|---|
primary_auto |
k7m2x9p4.threesix.ai |
Yes |
primary_custom |
my-app.threesix.ai |
Yes |
alias |
www.myapp.com |
No |
Architecture
Port Interface: internal/port/dns_provider.go
CreateRecord, UpdateRecord, UpsertRecord, DeleteRecord
DeleteRecordByName, GetRecord, ListRecords, FindRecord
Adapter: internal/adapter/cloudflare/client.go
- Uses Cloudflare API v4 with Bearer token auth
- 3-attempt retry on UpsertRecord for race conditions
- Auto-normalizes subdomain names
Service: internal/service/project_infra_domains.go
- AddDomain, RemoveDomain, ListDomains, GetPrimaryDomain
- Coordinates between Cloudflare, database, and K8s ingress
Handler: internal/handlers/infrastructure_domains.go
- REST endpoints: GET/POST/DELETE
/projects/{id}/domains
Database Schema
Table: project_domains
project_idUUID → cascade deletedomainVARCHAR(255) UNIQUEtypeCHECK (primary_auto|primary_custom|alias)dns_record_idVARCHAR(64) - Cloudflare record ID for cleanupverifiedBOOLEAN
API Endpoints
GET /projects/{id}/domains - List all domains
POST /projects/{id}/domains - Add domain
DELETE /projects/{id}/domains/{domain} - Remove domain
Related Topics
- Infrastructure Management - Broader infra context
- Credentials Guide - Loading secrets