Skip to main content

Current Deployment Status - coditect.ai

Date: 2025-10-06 Environment: Production (V4) GCP Project: serene-voltage-464305-n2


🌐 Live Endpoints

Frontend (https://coditect.ai)

Status: ✅ LIVE Framework: React SPA (Vite build) Server: nginx/1.29.1 via Google Cloud Load Balancer SSL: ✅ Valid (Google-managed certificate)

Response Headers:

HTTP/2 200
server: nginx/1.29.1
content-type: text/html
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
access-control-allow-origin: *
via: 1.1 google

App Details:

  • Title: "Coditect terminal - Professional WASM-powered terminal in your browser"
  • Bundle: /assets/index-B5j2ZUuA.js (ES modules)
  • Styles: /assets/index-DZfSTC8S.css
  • Fonts: Preloaded Cascadia Code (WASM terminal font)

Features:

  • WASM-powered terminal emulator
  • React Router for client-side routing
  • All V4 pages accessible (docs, login, register, workspace, etc.)
  • Mobile-responsive (viewport meta tag configured)

API (https://api.coditect.ai)

Status: ✅ LIVE Framework: Rust/Axum (api-v2) Authentication: JWT required

Root Endpoint (/):

{
"success": false,
"data": null,
"error": {
"code": "MISSING_AUTH_HEADER",
"message": "Missing authorization header",
"details": null
},
"request_id": "c3279ed1-237e-42fa-85b2-311ba89be719"
}

Observations:

  • API requires authentication for all endpoints
  • Returns structured JSON responses
  • Request ID tracking enabled
  • Error codes standardized

Expected Endpoints (from V4):

  • POST /api/v2/auth/login - User login
  • POST /api/v2/auth/register - User registration
  • GET /api/v2/users/:id - Get user details
  • GET /api/v2/workspaces - List workspaces
  • POST /api/v2/files - File operations
  • GET /api/v2/health - Health check (404 - not implemented)

🏗️ Infrastructure

GKE Cluster

Cluster: codi-poc-e2-cluster Zone: us-central1-a Namespace: coditect-app

Deployments:

  1. coditect-frontend (React app)

    • Replicas: 2-3 (HPA enabled)
    • Image: gcr.io/serene-voltage-464305-n2/coditect-frontend:latest
    • Port: 80 (nginx serving static files)
  2. coditect-api-v2 (Rust API)

    • Replicas: 2-5 (HPA enabled)
    • Image: gcr.io/serene-voltage-464305-n2/coditect-api-v2:latest
    • Port: 8080 (Axum web server)
  3. foundationdb (StatefulSet)

    • Replicas: 3 (double redundancy)
    • Storage: 3 × 50GB PersistentVolumes
    • Internal IP: 10.128.0.8:4500 (via HAProxy)

Load Balancer

External IP: 34.8.51.57 Type: Google Cloud Load Balancer Ingress: coditect-production-ingress

SSL Certificate:

  • Type: Google-managed (automatic renewal)
  • Domains: coditect.ai, api.coditect.ai, www.coditect.ai
  • Status: Active

DNS Configuration

DomainTypeValueStatus
coditect.aiA34.8.51.57✅ Active
api.coditect.aiA34.8.51.57✅ Active
www.coditect.aiA34.8.51.57✅ Active

FoundationDB

Cluster String: coditect:production@10.128.0.8:4500 Redundancy: Double (survives 1 node failure) Storage: 150GB total (3 × 50GB)

Data Models (Active):

  • User management (tenant_id/user/{user_id})
  • Session management (tenant_id/session/{session_id})
  • workspace data (tenant_id/workspace/{workspace_id})
  • File state (tenant_id/session_file/{session_id}:{file_path})

📱 Frontend Features (V4)

Deployed Pages

Public Pages (no auth required):

  • / - Homepage (terminal demo)
  • /docs - Documentation hub
  • /docs/api - API reference
  • /docs/installation - Installation guide
  • /docs/architecture - Architecture docs
  • /docs/authentication - Auth guide
  • /docs/security - Security policy
  • /login - Login page
  • /register - Registration page
  • /terms - Terms of service
  • /privacy - Privacy policy
  • /faq - FAQ
  • /support - Support page
  • /status - System status

Protected Pages (require auth):

  • /workspace - Main IDE/workspace
  • /profile - User profile
  • /settings - User settings
  • /admin - Admin dashboard

UI Components

Navigation:

  • Header with logo, menu, theme toggle, user avatar
  • Mobile hamburger menu (responsive)
  • Footer with links and branding

terminal:

  • WASM-powered terminal emulator
  • Cascadia Code font
  • Full xterm.js feature set

Theme:

  • Dark mode (default)
  • Light mode available
  • Chakra UI component library
  • Custom brand colors (#1890ff primary)

🔐 Authentication Flow (V4)

Current Implementation

  1. User visits https://coditect.ai
  2. React app loads (SPA with React Router)
  3. Unauthenticated → Redirected to /login
  4. Login form → POST to https://api.coditect.ai/api/v2/auth/login
  5. API validates → Returns JWT token
  6. Frontend stores → JWT in localStorage
  7. Authenticated → Access to /workspace

Data Flow

Frontend (React)
↓ (JWT in Authorization header)
API (Rust/Axum)
↓ (validate JWT, get user_id/tenant_id)
FoundationDB
↓ (query: tenant_id/user/{user_id})
User Data

🚧 What's Missing for V5

Not Yet Deployed

  1. theia IDE

    • Needs to be wrapped in V4 layout
    • Should load at /workspace or /ide
    • Must integrate with existing auth
  2. CODI2 Binary

    • Built via Cloud Build
    • Needs deployment to user pods
    • File monitoring not active
  3. User workspace Pods

    • Auto-provisioning on registration not deployed
    • Kubernetes templates exist but not applied
    • Need PVC creation logic
  4. WebSocket Gateway

    • Code exists in src/v4-websocket-gateway/
    • Not deployed to GKE
    • Needed for real-time communication
  5. Multi-Session Support

    • Session model exists in FDB
    • Not integrated with theia tabs
    • No session switching UI

🎯 V5 Integration Plan

Phase 1: Add theia to Existing Deployment

Goal: Deploy theia IDE alongside V4 frontend

Steps:

  1. Build theia container with V4 wrapper
  2. Deploy to coditect-app namespace
  3. Add /ide route to existing ingress
  4. Use same auth system (JWT validation)

Expected URL: https://coditect.ai/ide

Phase 2: Migrate Frontend Routes

Current:

  • /workspace → V4 React workspace page
  • / → V4 landing page

Target:

  • /workspace → theia IDE (wrapped in V4 layout)
  • / → V4 landing page (unchanged)
  • /docs/* → V4 docs pages (unchanged)

Phase 3: Enable Features

  1. Pod Auto-Provisioning

    • Wire up registration → pod creation
    • Use existing Kubernetes client code from v4
  2. CODI2 Deployment

    • Add CODI2 to workspace pod template
    • Configure FDB connection
  3. Session Management

    • Create session on login
    • Map sessions to theia tabs
    • Persist to existing FDB

📊 Traffic & Performance

Current Metrics (Need to Query)

# Check deployment status
kubectl get deployments -n coditect-app

# Check pod metrics
kubectl top pods -n coditect-app

# Check ingress traffic
kubectl describe ingress coditect-production-ingress -n coditect-app

Expected Scaling

Current Capacity:

  • Frontend: 2-3 pods (can scale to 10+)
  • API: 2-5 pods (can scale to 20+)
  • FDB: 3 nodes (can scale to 5+ for triple redundancy)

HPA Configuration (Horizontal Pod Autoscaler):

  • Triggers: CPU > 70%, Memory > 80%
  • Min replicas: 2
  • Max replicas: 10 (frontend), 20 (API)

🔑 Access & Credentials

GCP Project

Project ID: serene-voltage-464305-n2 Project Name: Google-GCP-CLI Project Number: 1059494892139

To Access:

# Authenticate (from Docker container)
export PATH=$PATH:/home/hal/google-cloud-sdk/google-cloud-sdk/bin
gcloud auth login 1@az1.ai

# Set project
gcloud config set project serene-voltage-464305-n2

# Get cluster credentials
gcloud container clusters get-credentials codi-poc-e2-cluster --zone us-central1-a

# Verify access
kubectl get deployments -n coditect-app

Container Registry

Location: gcr.io/serene-voltage-464305-n2/

Images:

  • coditect-frontend:latest - V4 React app (currently deployed)
  • coditect-api-v2:latest - Rust API (currently deployed)
  • codi2:latest - CODI2 binary (built, not deployed)
  • t2-theia-ide:latest - theia IDE (to be built for V5)

🚀 Next Steps for V5 Deployment

Immediate (This Week)

  1. Build theia Container:

    cd /workspace/PROJECTS/t2
    docker build -f Dockerfile.theia -t gcr.io/serene-voltage-464305-n2/t2-theia-ide:latest .
    docker push gcr.io/serene-voltage-464305-n2/t2-theia-ide:latest
  2. Deploy to GKE:

    kubectl apply -f k8s/theia-deployment.yaml -n coditect-app
    kubectl patch ingress coditect-production-ingress -n coditect-app --type=json -p='[{"op": "add", "path": "/spec/rules/0/http/paths/-", "value": {"path": "/ide", "pathType": "Prefix", "backend": {"service": {"name": "t2-theia-ide", "port": {"number": 3000}}}}}]'
  3. Test:

    curl -I https://coditect.ai/ide

Short-term (Next 2 Weeks)

  1. Integrate Auth: Connect theia to existing JWT system
  2. Wrap with V4 layout: Embed theia in Header/Footer
  3. Enable Pod Provisioning: Auto-create user pods on registration
  4. Deploy CODI2: Add file monitoring to workspace pods

Medium-term (Weeks 3-4)

  1. Session Management: Multi-session tabs in theia
  2. WebSocket Gateway: Real-time communication
  3. Gradual Rollout: 10% → 50% → 100% traffic to V5

📋 Summary

V4 Production Status:

  • ✅ Frontend deployed and accessible
  • ✅ API deployed with JWT auth
  • ✅ FoundationDB cluster operational
  • ✅ SSL certificates active
  • ✅ 50+ documentation pages live
  • ✅ Login/Register functional
  • ❌ theia IDE not deployed
  • ❌ CODI2 not deployed
  • ❌ User workspace pods not provisioned
  • ❌ WebSocket gateway not deployed

Infrastructure Ready for V5:

  • ✅ GKE cluster operational
  • ✅ FDB cluster with multi-tenant schema
  • ✅ Container registry set up
  • ✅ CI/CD pipelines functional
  • ✅ DNS and SSL configured
  • ✅ Load balancer routing traffic

V5 Deployment Path:

  1. Build theia container wrapped in V4 layout
  2. Deploy alongside V4 at /ide route
  3. Integrate with existing auth system
  4. Enable pod auto-provisioning
  5. Deploy CODI2 for file monitoring
  6. Gradual traffic migration (blue-green deployment)

Timeline: 4-6 weeks to full V5 deployment with zero downtime.