Skip to main content

Coditect AI IDE - Multi-llm Browser IDE

Browser-Based IDE with Local llm Support, Multi-Agent Architecture, and Real-Time Collaboration

License TypeScript Built with Modern Tech React Status

πŸ§ͺ Testing Infrastructure​

CI/CD Pipeline Test Coverage Security Scan Quality Gates

Latest: 2025-10-28 - Build #18 SUCCESS - Permission Fix Deployed βœ… OPERATIONAL

Status Report: 2025-10-28T00:50:00Z - Complete Project Status πŸ“Š

MVP Scaling: 2025-10-27 - Scaling Analysis for 20 Users πŸ“ˆ

πŸ“ Architecture Evolution (2025-10-27)​

Comprehensive documentation of design evolution:

βœ… ADR-028: theia IDE Integration Evolution

  • Why we adopted Eclipse theia instead of building a custom IDE
  • 9-10 months time savings, $225K cost savings, 3x more features at MVP
  • 68 theia packages, custom branding, VS Code extension compatibility
  • Future roadmap: MCP integration, multi-llm chat panel

βœ… ADR-029: StatefulSet Persistent Storage Migration

  • Solved critical data loss problem with persistent volumes
  • Migration from Deployment β†’ StatefulSet with PVCs
  • 100 GB workspace + 10 GB config per user
  • Capacity planning for 10-20 β†’ 50-100 β†’ 500+ users

βœ… Hybrid Storage Architecture (ADR-028 Part 1, Part 2) (2025-10-28)

  • Cost Optimization: 96% savings vs NFS ($7/user vs $205/user)
  • Hybrid Approach: Shared base (Docker layers) + user-specific PVCs (10 GB)
  • Performance: <1ms latency with GCE Persistent Disk SSD
  • Scalability: 10 user slots per pod, dynamic assignment
  • Implementation: 6 phases (30-38 hours), daily backups with 7-day retention
  • Deployment YAMLs: Current (βœ… WORKING) vs Hybrid (🚧 TESTING)

Session Exports:

πŸš€ Quick Start​

# Clone the repository
git clone https://github.com/coditect-ai/Coditect-v5-multiple-llm-IDE.git
cd Coditect-v5-multiple-llm-IDE

# Install dependencies
npm install

# Start both services
./scripts/start-coditect.sh

Access the IDE:

Detailed Guide: See quickstart.md for complete instructions.

πŸ§ͺ Testing & Quality Assurance​

Comprehensive testing infrastructure with automated CI/CD

# Run all tests locally
./scripts/test-runner.sh

# Frontend tests with watch mode
npm run test:watch

# Backend tests
cd backend && cargo test

# Coverage reports
npm run test:coverage

Testing Documentation:

Quality Metrics:

  • βœ… 70%+ Test Coverage across frontend and backend
  • βœ… Automated Security Scanning for dependencies
  • βœ… Type Safety Enforcement with TypeScript
  • βœ… Code Quality Gates on all pull requests

πŸ“Š Project Status​

Current Phase: βœ… BUILD #18 OPERATIONAL - Pods Healthy, Ready for MVP Scaling

Latest Updates (2025-10-28)​

βœ… Build #18 Deployed Successfully

  • Fixed CrashLoopBackOff (permission denied errors)
  • Non-root execution working (coditect user UID 1001)
  • All pods healthy and serving traffic on GKE
  • Image: 8449bd02-7a28-4de2-8e26-7618396b3c2f

⚠️ MVP Scaling Requirement

  • Current: 3 pods (3-6 user capacity)
  • Required: 10-15 pods for 20 user MVP launch
  • Cost: $150/month β†’ $500-750/month
  • Action needed: Scale + deploy HPA before beta testing
  • Production V5 frontend build ready (dist/ folder, 1.2 MB)

βœ… Session Documentation Created

  • Docker Build Session - Complete V5+theia architecture deep dive, build strategy, testing procedures, troubleshooting guide with ~27 minute build timeline
  • Quick Reference Card - Fast command reference for Docker build, testing, and deployment
  • Checkpoint Status - Current deployment status and next steps

βœ… Combined Deployment Architecture

  • Single-container deployment strategy (V5 + theia + NGINX)
  • 9 deployment files created (Dockerfiles, NGINX config, Cloud Build, K8s manifests)
  • Complete documentation: Architecture diagrams, deployment guides, troubleshooting

Previous Updates (2025-10-08)​

βœ… Coditect AI Branding Implementation

  • Custom "Coditect AI Agents" welcome message in theia AI Chat
  • Custom robot logo (SVG)
  • Agent instructions: @Coditect-Code-Generator, @Coditect-UI-Designer, @Coditect-Code-Reviewer
  • Fixed InversifyJS "Ambiguous match" error using rebind() pattern

βœ… V5 Frontend Wrapper

  • React 18 + Vite 5 dev server running on port 5173
  • Apple-quality design system with 500+ design tokens
  • 28 complete pages (Login, Settings, Documentation, etc.)
  • Mobile-first design with 56px touch targets
  • Embeds theia IDE in workspace tab

βœ… Startup Scripts

  • scripts/start-coditect.sh - Start both services (foreground/background)
  • scripts/stop-coditect.sh - Stop all services cleanly
  • Comprehensive logging and status reporting

πŸ€– Claude Code Configuration (READ FIRST!)​

πŸ“ .claude/ Directory - Essential Claude Code setup and agent resources:

  1. .claude/CLAUDE.md - Autonomous Development Mode, Context Engineering, Project Configuration
  2. .claude/README.md - Directory structure and quick start guide

🎭 Available Agents & Commands (Updated: 2025-10-14): 3. .claude/agents/ - 6 custom agents (codebase-analyzer, codebase-locator, pattern-finder, thoughts-analyzer, web-search-researcher) 4. .claude/commands/ - 24 workflow commands (create_plan, implement_plan, research_codebase, debug, ci_commit, create_handoff, etc.) 5. .claude/agents-reference/ - 84 community agents (backend-architect, rust-pro, typescript-pro, database-architect, security-auditor, cloud-architect) - Git submodule 6. .claude/commands-reference/ - 42 development tools (security-scan, api-scaffold, db-migrate, monitoring-setup) - Git submodule

πŸ“š Reference Materials (Updated: 2025-10-14): 7. archive/coditect-v4/ - V4 Reference (19 FDB data models, 88 ADRs, agent patterns) - Git submodule

  • archive/coditect-v4/docs/reference/database-models/ - Complete V4 data model documentation
  1. archive/agents-research-plan-code/ - Agent Research (Multi-llm patterns, human-in-loop) - Git submodule
  2. docs/analysis-human-layer/ - 10 analysis documents (architecture, tech stack, llm integration strategies)

Why read .claude/ first?

  • πŸš€ Autonomous Mode: Enables multi-hour coding sessions with state tracking (DELIBERATION, RESEARCH, ACTION modes)
  • 🎯 Context Engineering: Anthropic best practices for efficient token usage and long-horizon tasks
  • πŸ€– Specialized Agents: Production-ready agents for Rust, TypeScript, FoundationDB, GCP, and more
  • πŸ› οΈ Development Tools: Security scanning, API generation, database migrations, monitoring setup
  • πŸ“š Community Knowledge: 15 multi-agent workflows and extensive examples
  • πŸ“– V4 Patterns: Complete reference for FDB data models and agent architectures
  • πŸ”¬ Research: Multi-llm integration analysis and human-in-the-loop patterns

🎯 Overview​

Coditect AI IDE is a next-generation browser-based integrated development environment that combines:

  • 🧠 16+ Local llm Models via LM Studio (no cloud required)
  • πŸ€– Multi-Agent System with MCP and A2A protocols
  • πŸ“‘ Multi-Session workspaces for parallel project work
  • πŸ’» VS Code-Like Experience built on Eclipse theia 1.65
  • πŸ”’ Privacy-First with local-only processing
  • 🌐 Browser-Based with no installation needed

Two-Service Architecture​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ V5 Frontend Wrapper (React + Vite) β”‚ Port 5173
β”‚ β”œβ”€ Header & Navigation β”‚
β”‚ β”œβ”€ 28 Complete Pages β”‚
β”‚ β”œβ”€ Settings (8 sections) β”‚
β”‚ └─ workspace Tab (embeds theia) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ theia Backend (Eclipse theia) β”‚ Port 3000
β”‚ β”œβ”€ Monaco editor β”‚
β”‚ β”œβ”€ File Explorer β”‚
β”‚ β”œβ”€ terminal (xterm.js) β”‚
β”‚ └─ AI Chat (Coditect Branding) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 Key Features​

theia Backend (Port 3000)​

  • βœ… Eclipse theia 1.65 - Complete IDE framework
  • βœ… Custom Branding - "Coditect AI Agents" with robot logo
  • βœ… Monaco editor - Full VS Code editing experience
  • βœ… AI Chat - Integrated AI assistance with custom agents
  • βœ… File Explorer - Complete file tree navigation
  • βœ… terminal - Integrated xterm.js terminal
  • βœ… Extensions - VS Code extension compatible

V5 Frontend Wrapper (Port 5173)​

  • βœ… Apple-Quality Design System - 500+ design tokens, unified theme
  • βœ… Mobile-First - Touch-friendly with 56px tap targets
  • βœ… 28 Complete Pages - Full application flow
    • Login, Register, Profile
    • Settings (8 sections with TouchFriendlyCard)
    • Documentation Hub (18 sub-pages)
    • AI Studio Tab (Loveable-style interface)
    • workspace Tab (theia iframe)
    • FAQ, Support, Status
  • βœ… React 18 + TypeScript - Modern React with full type safety
  • βœ… Vite 5 - Lightning-fast HMR and dev server
  • βœ… Chakra UI 2.8 - Accessible component library

Multi-llm Support​

  • 🧠 LM Studio - 16+ local models (Qwen, Llama, DeepSeek, etc.)
  • πŸ€– Claude Code - Anthropic's coding assistant
  • πŸ¦™ Ollama - Easy local llm deployment
  • 🌐 OpenAI - Optional cloud API
  • πŸ’Ž Gemini - Google's multimodal AI
  • ⚑ Grok - xAI's conversational AI

Agent System​

Hierarchical Agents:

Coordinator Agent
β”œβ”€β”€ Code Generation Agent (@Coditect-Code-Generator)
β”‚ β”œβ”€β”€ TypeScript Sub-Agent
β”‚ β”œβ”€β”€ Python Sub-Agent
β”‚ └── Rust Sub-Agent
β”œβ”€β”€ UI Design Agent (@Coditect-UI-Designer)
β”‚ β”œβ”€β”€ React Sub-Agent
β”‚ └── CSS Sub-Agent
└── Code Review Agent (@Coditect-Code-Reviewer)
β”œβ”€β”€ Security Review
β”œβ”€β”€ Performance Review
└── Style Review

Protocols:

  • MCP (Model Context Protocol) - Tool/resource access
  • A2A (Agent-to-Agent) - Agent collaboration

πŸš€ Deployment Status​

Production Deployment (GCP)​

Infrastructure: serene-voltage-464305-n2

  • βœ… GKE Cluster: codi-poc-e2-cluster (us-central1-a)
  • βœ… FoundationDB: 3-node StatefulSet at 10.128.0.8:4500
  • βœ… Domain/SSL: coditect.ai with Google-managed certificate
  • βœ… Container Registry: gcr.io/serene-voltage-464305-n2

Deployment Architecture:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Docker Container (Port 80) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ NGINX β”‚
β”‚ β”œβ”€β†’ / β†’ V5 Frontend (dist/) β”‚
β”‚ └─→ /theia β†’ theia (localhost:3000)β”‚
β”‚ β”‚
β”‚ Node.js (Port 3000) β”‚
β”‚ └─→ Eclipse theia IDE β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Deployment Files:

Next Steps:

  1. Install Docker client for local testing
  2. Test build: docker build -f deployment/dockerfile.local-test -t coditect-combined:test .
  3. Deploy to Cloud Build: gcloud builds submit --config deployment/cloudbuild-combined.yaml
  4. Deploy to GKE cluster

πŸ§ͺ Deployment & Testing Infrastructure​

Created: 2025-10-14 Status: βœ… Complete and Operational

Overview​

Automated testing suite that catches ALL 9 deployment issues in < 2 minutes, BEFORE wasting 10-20 minutes on Cloud Build.

Impact:

  • ⚑ 79% faster (80-160 min β†’ 17 min per deployment)
  • πŸ’° $40-80 saved per incident (no failed builds)
  • βœ… Zero failed deployments from config issues
  • 🚨 Catches issues early (< 2 min local test vs 10-20 min Cloud Build)

Testing Infrastructure​

  1. testing-infrastructure-complete.md - Complete automated testing suite overview
  2. docs/testing-summary.md - Quick reference guide
  3. docs/testing-guide.md - Complete documentation (558 lines)

Test Scripts​

Pre-Deployment Validation:

  • scripts/test-deployment.sh - Comprehensive validation (403 lines)
    • Tests 9 categories: config, source code, build, Docker, NGINX, Cloud Build, K8s
    • Runs in < 2 minutes
    • Exit code 0 = safe to deploy, 1 = issues found

Live Endpoint Testing:

  • scripts/test-endpoints.sh - Production endpoint verification (122 lines)
    • Tests health, frontend, API paths, old path 404s
    • Runs in < 10 seconds
    • Usage: ./scripts/test-endpoints.sh https://coditect.ai

Convenient Commands:

  • Makefile - Easy-to-remember test commands (73 lines)
    make test              # Run all pre-deployment tests
    make test-config # Quick config check (< 5 sec)
    make test-build # Test build process
    make test-endpoints # Test live endpoints
    make deploy # Deploy (runs tests first!)
    make clean # Clean build artifacts

Deployment Files​

Cloud Build & CI/CD:

  • deployment/cloudbuild-combined.yaml - GCP Cloud Build with automated validation
    • Step 0: Pre-build validation (< 1 min) - catches config issues early
    • Step 1: Build + verification (~ 4 min) - validates built files

Docker & Container:

Kubernetes:

Critical Configuration Files​

⚠️ MUST be correct for successful deployment:

  1. .env.production - Environment variables

    • CRITICAL: Must have VITE_API_URL=/api/v5 (NOT /api)
    • Gets compiled into JavaScript at build time by Vite
  2. package.json - Build scripts

    • CRITICAL: Must have prototype:build script for V5 frontend
    • "prototype:build": "tsc && vite build" βœ…
    • NOT "build": "npm run theia:build" ❌

Issue Tracking​

docs/10-execution-plans/api-integration-fixes-complete.md - Complete documentation of all 9 deployment issues and fixes:

Issues #1-5 (Infrastructure):

  1. βœ… Frontend auth check missing
  2. βœ… Duplicate /v5 API paths
  3. βœ… NGINX proxy route missing
  4. βœ… Incomplete Kubernetes DNS name
  5. βœ… GCP Ingress routing to wrong backend

Issues #6-9 (Build & Config): 6. βœ… Docker layer caching (reused stale dist/) 7. βœ… npm package-lock.json sync issues 8. βœ… Wrong build script (theia:build vs prototype:build) 9. βœ… Wrong environment variable (VITE_API_URL=/api vs /api/v5)

Quick Testing Workflow​

# Before every deployment
make test-config # < 5 seconds - config check
make test # ~ 2 minutes - full validation

# If tests pass, deploy
make deploy # Automatic Cloud Build

# After deployment, verify
make test-endpoints # ~ 10 seconds - live verification

Test Demonstration​

Catches Wrong Configuration:

# Simulate wrong config
sed -i 's|/api/v5|/api|' .env.production

# Run test
make test-config
# Output: βœ— .env.production is wrong!
# Result: βœ… Test correctly prevents bad deployment

πŸ”§ Socket.IO Investigation & Troubleshooting​

Created: 2025-10-20 Status: ⏳ In Progress - Multiple root causes identified, fixes being applied

Problem Statement​

Users accessing theia IDE at https://coditect.ai/theia experience HTTP 400 Bad Request errors when establishing Socket.IO connections. This breaks real-time features including:

  • terminal sessions
  • File watching
  • Live code collaboration
  • Auto-save functionality

Investigation Findings​

TWO Root Causes Identified:

  1. βœ… CDN Caching (FIXED) - GCP Cloud CDN was caching Socket.IO requests with stale session IDs

    • Solution: Disabled CDN in BackendConfig (k8s/backend-config-no-cdn.yaml)
    • Validation: CDN headers removed from responses
  2. ⏳ Session Affinity Missing (IN PROGRESS) - GCP backend service shows SESSION_AFFINITY: NONE

    • Problem: Service missing BackendConfig annotation (NEG requirement)
    • Solution: Annotated Service with BackendConfig reference
    • Status: Propagating to GCP load balancer (2-5 minutes)

Additional Fixes Recommended (from reference docs):

  • P0: WebSocket annotation to Ingress (85% success probability)
  • P0: Health check endpoint creation (70% success probability)
  • P1: Increased backend timeout and connection draining optimization

Comprehensive Documentation​

Investigation Package (~150 pages of analysis):

  1. socket.io-issue/analysis-troubleshooting-guide.md - START HERE (20KB)

    • Complete investigation findings and evidence chain
    • Diagnostic commands for each system layer
    • Fix procedures with validation tests
    • Integration with reference documentation
    • Success criteria and monitoring recommendations
  2. socket.io-issue/additional-research-pathways.md (19KB)

    • High-value research pathways (P0-P2)
    • Quick wins and emergency rollback procedures
    • Long-term improvements (monitoring, health checks, regression tests)
    • Learning opportunities for team
  3. socket.io-issue/README.md - Investigation package index

    • 8 comprehensive documents (~150 pages)
    • Quick navigation by role (Executive, Engineer, On-Call)
    • Quick start guide for immediate issue resolution
    • Implementation checklist
  4. Reference Documentation (from investigation package):

Quick Testing Workflow​

# Test Socket.IO inside cluster
kubectl exec -n coditect-app deployment/coditect-combined -- \
curl -s -o /dev/null -w "%{http_code}\n" \
http://localhost/theia/socket.io/?EIO=4\&transport=polling

# Test via Ingress
curl -s -o /dev/null -w "%{http_code}\n" \
https://coditect.ai/theia/socket.io/?EIO=4\&transport=polling

# Run automated diagnostics
chmod +x socket.io-issue/socketio-diagnostics.sh
./socket.io-issue/socketio-diagnostics.sh --verbose

Next Steps​

  1. βœ… Validate session affinity propagation (check GCP backend service)
  2. πŸ”„ Apply WebSocket annotation to Ingress
  3. πŸ”„ Create /health endpoint in nginx
  4. πŸ”„ Run automated diagnostic script for comprehensive validation
  5. πŸ”„ Test at https://coditect.ai/theia after all fixes applied
  6. πŸ”„ Monitor Socket.IO connection success rates for 24 hours
  7. πŸ”„ Implement long-term improvements (monitoring dashboard, automated health checks)

Configuration:

  • k8s/backend-config-no-cdn.yaml - BackendConfig with CDN disabled
  • nginx-combined.conf - NGINX routing with WebSocket support
  • docs/fixes/socket-io-cdn-fix.md - Initial CDN fix documentation

See Also:

  • CLAUDE.md - Complete status and investigation timeline
  • Testing Infrastructure - Pre-deployment validation (below)

πŸ” Deployment Archeology - Finding Previous Successful Builds​

When deployment fails, use deployment archeology to find what worked before.

Quick Process​

# 1. Get deployment creation date
kubectl get deployment <NAME> -n coditect-app -o jsonpath='{.metadata.creationTimestamp}'

# 2. Find successful builds on that date
gcloud builds list --filter="createTime>='YYYY-MM-DDT00:00:00Z'" --limit=20

# 3. Analyze successful build config
gcloud builds describe <BUILD_ID> --format="yaml(steps,options)"

# 4. Search git history for files
git log --all --full-history -- <FILENAME>

# 5. Restore archived files if needed
cp docs/99-archive/deployment-obsolete/<FILE> ./<FILE>

Real Example: Combined Service Recovery (Oct 18, 2025)​

Problem: dockerfile.combined failing to build (npm ci errors, Python missing, wrong build script)

Solution Found:

  1. Deployment created: 2025-10-13T09:58:29Z
  2. Successful build: 6e95a4d9 at 09:50:07Z (8 min before deployment)
  3. Used file: dockerfile.local-test (archived, not dockerfile.combined!)
  4. Machine: E2_HIGHCPU_32 (32 CPUs, NOT 8 CPUs)
  5. Node memory: 8GB heap (NODE_OPTIONS=--max_old_space_size=8192)
  6. Pre-requisite: Build frontend first (npm run build creates dist/)

Key Configuration:

# cloudbuild-combined.yaml
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['-f', 'dockerfile.local-test', ...] # NOT dockerfile.combined

options:
machineType: 'E2_HIGHCPU_32' # 32 CPUs for theia webpack
env:
- 'NODE_OPTIONS=--max_old_space_size=8192' # 8GB heap

Recovery Steps:

# Restore working Dockerfile
cp docs/99-archive/deployment-obsolete/dockerfile.local-test ./

# Update cloudbuild-combined.yaml
# - Change: dockerfile.combined β†’ dockerfile.local-test
# - Change: N1_HIGHCPU_8 β†’ E2_HIGHCPU_32
# - Add: NODE_OPTIONS=--max_old_space_size=8192

# Build frontend first (CRITICAL!)
npm run build # Creates dist/ folder

# Deploy with proven config
gcloud builds submit --config cloudbuild-combined.yaml .

Automation Script​

Location: .claude/skills/deployment-archeology/SKILL.md

#!/bin/bash
# deployment-archeology.sh - Find previous successful build config

DEPLOYMENT=$1
NAMESPACE=${2:-default}

echo "=== Deployment Archeology ==="

# Step 1: Get deployment date
DEPLOY_DATE=$(kubectl get deployment $DEPLOYMENT -n $NAMESPACE -o jsonpath='{.metadata.creationTimestamp}')
SEARCH_DATE=$(date -d $DEPLOY_DATE '+%Y-%m-%d')

echo "Deployment created: $DEPLOY_DATE"
echo "Searching builds on: $SEARCH_DATE"

# Step 2: Find builds on that date
gcloud builds list \
--filter="createTime>='${SEARCH_DATE}T00:00:00Z' AND createTime<='${SEARCH_DATE}T23:59:59Z'" \
--format="table(id,status,createTime)" \
--limit=20

# Step 3: Show git commits around that date
git log --since="$SEARCH_DATE" --until="$(date -d "$SEARCH_DATE + 1 day" '+%Y-%m-%d')" --oneline --all | head -20

echo ""
echo "Next steps:"
echo "1. Identify successful build ID (STATUS=SUCCESS)"
echo "2. Run: gcloud builds describe <BUILD_ID> --format='yaml(steps,options)'"
echo "3. Check for archived files: find . -name 'Dockerfile*' | grep archive"
echo "4. Compare current config vs successful build config"

Common Gotchas​

  • ❌ Assuming current files match deployed version
  • ❌ Not checking environment variables in Cloud Build options
  • ❌ Forgetting to check for archived/moved files
  • ❌ Using wrong Dockerfile (may have multiple variants)
  • ❌ Missing build prerequisites (like pre-built dist/ directory)

See Also​

  • Skill Documentation: .claude/skills/deployment-archeology/SKILL.md
  • CLAUDE.md: Deployment archeology section with detailed examples
  • Testing Guide: docs/testing-guide.md for pre-deployment validation

πŸ“ Project Structure​

/workspace/PROJECTS/t2/
β”œβ”€β”€ quickstart.md # ⭐ Quick start guide
β”œβ”€β”€ README.md # This file
β”œβ”€β”€ CLAUDE.md # Claude Code instructions
β”œβ”€β”€ checkpoint-docker-setup.md # ⭐ Current deployment status
β”œβ”€β”€ start-coditect.sh # Start both services
β”œβ”€β”€ stop-coditect.sh # Stop all services
β”‚
β”œβ”€β”€ dockerfile.local-test # πŸš€ Production Docker build
β”œβ”€β”€ dockerfile.combined # Alternative build (has Python issue)
β”œβ”€β”€ nginx-combined.conf # NGINX routing config
β”œβ”€β”€ start-combined.sh # Container startup script
β”œβ”€β”€ cloudbuild-combined.yaml # Google Cloud Build config
β”œβ”€β”€ k8s-combined-deployment.yaml # Kubernetes manifests
β”œβ”€β”€ DEPLOYMENT-architecture.md # Architecture documentation
β”œβ”€β”€ deployment-summary.md # Quick reference
β”œβ”€β”€ deploy-combined.md # Deployment guide
β”‚
β”œβ”€β”€ .claude/ # πŸ€– CLAUDE CODE CONFIGURATION (READ THIS!)
β”‚ β”œβ”€β”€ CLAUDE.md # Autonomous mode, context engineering, project config
β”‚ β”œβ”€β”€ README.md # Directory structure and quick start
β”‚ β”œβ”€β”€ CLAUDE-GLOBAL-REFERENCE.md # Reference from global .claude repo
β”‚ β”œβ”€β”€ settings.local.json # Auto-approved commands, MCP servers
β”‚ β”œβ”€β”€ agents/ # 8 custom project-specific agents
β”‚ β”‚ β”œβ”€β”€ orchestrator.md # 🎯 Multi-agent orchestrator (production workflows)
β”‚ β”‚ β”œβ”€β”€ codebase-analyzer.md
β”‚ β”‚ β”œβ”€β”€ codebase-locator.md
β”‚ β”‚ β”œβ”€β”€ codebase-pattern-finder.md
β”‚ β”‚ β”œβ”€β”€ project-organizer.md
β”‚ β”‚ β”œβ”€β”€ thoughts-analyzer.md
β”‚ β”‚ β”œβ”€β”€ thoughts-locator.md
β”‚ β”‚ └── web-search-researcher.md
β”‚ β”œβ”€β”€ skills/ # ⚑ 15 AUTOMATION SKILLS (CHECK FIRST!)
β”‚ β”‚ β”œβ”€β”€ REGISTRY.json # πŸ” Fast skill lookup index
β”‚ β”‚ β”œβ”€β”€ README.md # Skill discovery documentation
β”‚ β”‚ β”œβ”€β”€ build-deploy-workflow/ # Build + Deploy + Document (saves 40 min)
β”‚ β”‚ β”œβ”€β”€ gcp-resource-cleanup/ # Clean legacy GCP (saves 28 min, $50-100/mo)
β”‚ β”‚ β”œβ”€β”€ git-workflow-automation/ # Git operations (saves 8 min)
β”‚ β”‚ β”œβ”€β”€ cross-file-documentation-update/ # Sync 4 docs (saves 13 min)
β”‚ β”‚ β”œβ”€β”€ deployment-archeology/ # Find previous successful deployments
β”‚ β”‚ β”œβ”€β”€ foundationdb-queries/ # FDB patterns + tenant isolation
β”‚ β”‚ β”œβ”€β”€ rust-backend-patterns/ # Actix-web patterns
β”‚ β”‚ β”œβ”€β”€ search-strategies/ # Grep/Glob optimization
β”‚ β”‚ β”œβ”€β”€ framework-patterns/ # Event-driven, FSM patterns
β”‚ β”‚ β”œβ”€β”€ evaluation-framework/ # llm-as-judge patterns
β”‚ β”‚ β”œβ”€β”€ production-patterns/ # Circuit breakers, error handling
β”‚ β”‚ β”œβ”€β”€ communication-protocols/ # Multi-agent handoff
β”‚ β”‚ β”œβ”€β”€ google-cloud-build/ # Cloud Build optimization
β”‚ β”‚ β”œβ”€β”€ internal-comms/ # Team communication
β”‚ β”‚ └── multi-agent-workflow/ # Token management, orchestration
β”‚ β”œβ”€β”€ scripts/ # πŸ› οΈ Automation scripts
β”‚ β”‚ └── build-skill-registry.py # Generate REGISTRY.json
β”‚ β”œβ”€β”€ commands/ # 52 workflow commands (24 custom + 28 reference)
β”‚ β”‚ β”œβ”€β”€ create_plan.md, implement_plan.md, research_codebase.md
β”‚ β”‚ β”œβ”€β”€ ci_commit.md, debug.md, local_review.md
β”‚ β”‚ β”œβ”€β”€ create_handoff.md, resume_handoff.md
β”‚ β”‚ └── ... (52 total commands)
β”‚ β”œβ”€β”€ hooks/ # Pre/post execution hooks
β”‚ β”‚ └── README.md
β”‚ β”œβ”€β”€ agents-reference/ # Git submodule: 84 specialized agents
β”‚ β”‚ β”œβ”€β”€ agents/ # backend-architect, rust-pro, typescript-pro, etc.
β”‚ β”‚ β”œβ”€β”€ workflows/ # Multi-agent orchestration (15 workflows)
β”‚ β”‚ └── tools/ # Development utilities
β”‚ └── commands-reference/ # Git submodule: 42 development tools
β”‚ β”œβ”€β”€ tools/ # security-scan, api-scaffold, db-migrate, etc.
β”‚ β”œβ”€β”€ workflows/ # Command coordination patterns
β”‚ └── examples/ # Usage examples
β”‚
β”œβ”€β”€ theia-app/ # theia Backend (Port 3000)
β”‚ β”œβ”€β”€ coditect-branding-solution.md # Branding implementation guide
β”‚ β”œβ”€β”€ src/browser/
β”‚ β”‚ β”œβ”€β”€ coditect-branding-frontend-module.ts # Custom branding
β”‚ β”‚ └── coditect-chat-welcome-provider.tsx # Custom AI Chat
β”‚ β”œβ”€β”€ src-gen/frontend/ # Generated theia code
β”‚ β”œβ”€β”€ lib/ # Compiled JavaScript
β”‚ └── package.json # theia dependencies
β”‚
β”œβ”€β”€ src/ # V5 Frontend Source (Port 5173)
β”‚ β”œβ”€β”€ components/ # React components
β”‚ β”‚ β”œβ”€β”€ theia/ # theia widget wrappers
β”‚ β”‚ β”œβ”€β”€ ai-studio/ # AI Studio Tab
β”‚ β”‚ └── workspace/ # workspace Tab
β”‚ β”œβ”€β”€ pages/ # 28 complete pages
β”‚ β”œβ”€β”€ theme/ # Apple-quality design system
β”‚ β”œβ”€β”€ services/ # API integration
β”‚ β”œβ”€β”€ stores/ # Zustand state management
β”‚ β”œβ”€β”€ agents/ # Custom agent definitions
β”‚ β”œβ”€β”€ app.tsx # Main app with 28 routes
β”‚ └── main.tsx # Entry point
β”‚
β”œβ”€β”€ docs/ # Documentation
β”‚ β”œβ”€β”€ DEFINITIVE-V5-architecture.md # ⭐ Complete V5 design
β”‚ β”œβ”€β”€ apple-quality-design-system.md # Design principles
β”‚ β”œβ”€β”€ v5-frontend-build-verification.md # Build status
β”‚ β”œβ”€β”€ theia-ai-research-findings.md # theia 1.65 capabilities
β”‚ β”œβ”€β”€ 01-getting-started/ # Quick start guides
β”‚ β”œβ”€β”€ 02-architecture/ # SDD, TDD, architecture
β”‚ β”œβ”€β”€ 03-infrastructure/ # GCP, FoundationDB
β”‚ β”œβ”€β”€ 04-security/ # Security hardening
β”‚ β”œβ”€β”€ 07-adr/ # Architecture decisions
β”‚ β”œβ”€β”€ 08-v4-reference/ # V4 reference materials
β”‚ β”œβ”€β”€ 10-execution-plans/ # Deployment tracking
β”‚ β”œβ”€β”€ 11-analysis/ # System analysis & provisioning strategies
β”‚ β”‚ └── monitor-codi-container-provisioning-strategy.md # πŸš€ File monitoring & agent coordination (HYBRID approach)
β”‚ └── analysis-human-layer/ # πŸ“š Multi-llm integration analysis (NEW)
β”‚ β”œβ”€β”€ 01-executive-summary.md
β”‚ β”œβ”€β”€ 02-architectural-deep-dive.md
β”‚ β”œβ”€β”€ 08-multi-llm-technical-implementation-details.md
β”‚ └── llm-implementations/ # Claude, Gemini, Grok, OpenAI patterns
β”‚
β”œβ”€β”€ archive/ # πŸ“¦ Reference Materials & Research (NEW)
β”‚ β”œβ”€β”€ coditect-v4/ # Git submodule: V4 reference
β”‚ β”‚ β”œβ”€β”€ docs/reference/database-models/ # 19 FDB data models
β”‚ β”‚ β”œβ”€β”€ docs/07-adr/ # 88 ADRs from V4
β”‚ β”‚ └── agents/ # V4 agent system patterns
β”‚ └── agents-research-plan-code/ # Git submodule: Agent research
β”‚ β”œβ”€β”€ .claude/ # Agent and command templates
β”‚ └── docs/ # Research documentation
β”‚
β”œβ”€β”€ backend/ # Rust Backend (GCP Deployment)
β”‚ β”œβ”€β”€ src/ # Actix-web API
β”‚ β”œβ”€β”€ Dockerfile # Production Docker image
β”‚ └── cloudbuild.yaml # GCP Cloud Build config
β”‚
β”œβ”€β”€ scripts/ # Utility scripts
β”‚ └── fix-doc-links.sh # Fix documentation links
β”‚
β”œβ”€β”€ .backup/ # Backup files
β”œβ”€β”€ package.json # Root dependencies
β”œβ”€β”€ vite.config.ts # Vite configuration
└── tsconfig.json # TypeScript configuration

πŸš€ Getting Started​

Prerequisites​

  • Node.js 20+ (LTS recommended)
  • npm or yarn
  • LM Studio (optional, for local llm support)
  • Git for version control

Installation​

# 1. Clone repository
git clone https://github.com/coditect-ai/Coditect-v5-multiple-llm-IDE.git
cd Coditect-v5-multiple-llm-IDE

# 2. Install dependencies
npm install

# 3. Install theia dependencies
cd theia-app
npm install
cd ..

Running the Application​

# Start both services in background
./scripts/start-coditect.sh

# OR start in foreground (Ctrl+C stops both)
./scripts/start-coditect.sh --foreground

# Stop all services
./scripts/stop-coditect.sh

Option 2: Manual Start​

# terminal 1: Start theia backend
cd theia-app
npm start
# Runs on http://localhost:3000

# terminal 2: Start V5 frontend wrapper
cd ..
npm run prototype:dev
# Runs on http://localhost:5173

Accessing the IDE​

  • ⭐ V5 Frontend (Main): http://localhost:5173

    • Complete Coditect UI with all pages
    • workspace tab embeds theia IDE
  • theia Direct: http://localhost:3000

    • Direct access to Eclipse theia
    • AI Chat with Coditect branding
    • Useful for testing theia features

πŸ› οΈ Development​

Build Commands​

# V5 Frontend (Vite has HMR - auto-reload on changes)
npm run prototype:dev # Start dev server
npm run prototype:build # Production build
npm run prototype:preview # Preview production build

# theia Backend (requires manual rebuild)
cd theia-app
npm run theia:build # Build theia
npm run theia:watch # Watch mode
npm run theia:start # Start server

Rebuilding theia After Changes​

If you modify theia source files (branding, extensions):

cd theia-app/src/browser
npx tsc # Compile TypeScript

cd ../..
npx webpack --config gen-webpack.config.js # Rebuild bundle

npm start # Restart theia

Type Checking​

# V5 Frontend
npm run type-check

# theia
cd theia-app && npm run type-check

🐳 Development Modes​

Coditect AI IDE supports multiple deployment modes for different development scenarios:

ModeBest ForterminalGit Integration
Container-OnlyProduction, Cloud (GKE)Container OS (Debian)Manual setup required
Volume MountLocal developmentContainer + Host filesHost config (automatic)
Remote SSH (Future)Remote dev serversRemote machineNative on remote
Native DesktopSingle-user localHost OS nativeNative

Quick Start by Mode​

Production Mode (Container-Only)​

# Build Docker image
docker build -f deployment/dockerfile.local-test -t coditect-combined:prod .

# Run container
docker run -d -p 8080:80 --name coditect-prod coditect-combined:prod

# Access:
# - V5 Frontend: http://localhost:8080/
# - theia IDE: http://localhost:8080/theia/

Git Setup:

# Enter container
docker exec -it coditect-prod bash

# Configure git
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Local Development Mode (Volume Mount)​

Windows (PowerShell):

docker run -d `
-p 8080:80 `
-v C:\Users\YourUser\Projects:/workspace `
-v C:\Users\YourUser\.gitconfig:/root/.gitconfig:ro `
-v C:\Users\YourUser\.ssh:/root/.ssh:ro `
--name coditect-dev `
coditect-combined:test

Mac/Linux (Bash):

docker run -d \
-p 8080:80 \
-v ~/projects:/workspace \
-v ~/.gitconfig:/root/.gitconfig:ro \
-v ~/.ssh:/root/.ssh:ro \
--name coditect-dev \
coditect-combined:test

Benefits:

  • βœ… Edit files on your machine
  • βœ… Git works automatically (uses host config)
  • βœ… Files persist after container restart
  • βœ… Fast development iteration

terminal & workspace Connectivity​

Where does the theia terminal connect?

  • Container-Only: terminal runs inside Docker container (Debian Linux)

    • Isolated from host system
    • Complete security isolation
    • Best for production/multi-tenant
  • Volume Mount: terminal runs in container but accesses host files

    • Edit local files while using container runtime
    • Git automatically uses host SSH keys
    • Best for local development
  • Remote SSH (Future): terminal connects to remote machine via SSH

    • Access powerful remote dev servers
    • Run commands on production-like environments
    • Requires theia SSH extension
  • Native Desktop: terminal runs on host OS (Windows/Mac/Linux)

    • Direct OS integration
    • Best for single-user local installs

Documentation​

For detailed configuration, troubleshooting, and platform-specific instructions:

πŸ“š Documentation​

Essential Reading​

  1. quickstart.md - Get started in 5 minutes
  2. CLAUDE.md - Instructions for Claude Code
  3. docs/DEFINITIVE-V5-architecture.md - Complete V5 design
  4. docs/apple-quality-design-system.md - Design principles
  5. theia-app/coditect-branding-solution.md - Branding implementation

Documentation Index​

  • Architecture: docs/02-architecture/ - SDD, TDD, system design
  • Infrastructure: docs/03-infrastructure/ - GCP, FoundationDB, deployment
  • Security: docs/04-security/ - Security hardening plans
  • ADRs: docs/07-adr/ - Architecture Decision Records (ADR-001 to ADR-024)
  • V4 Reference: docs/08-v4-reference/ - V4 patterns (reference only)
  • Execution Plans: docs/10-execution-plans/ - Deployment tracking

Full documentation index: docs/DOCUMENTATION-index.md

πŸ—οΈ Architecture​

Technology Stack​

LayerTechnologyVersionPurpose
FrontendReact18.3UI framework
TypeScript5.3Type safety
Vite5.4Dev server & build
Chakra UI2.8Component library
IDEEclipse theia1.65IDE framework
Monaco editor0.45Code editor
xterm.js5.3terminal
BackendRust (Actix-web)LatestAPI server
FoundationDB7.1+Database
llmLM StudioLatestLocal llm inference
Claude CodeLatestAI assistance
StateZustand4.4State management

Infrastructure (GCP)​

Project: serene-voltage-464305-n2

ComponentStatusDetails
GKE Clusterβœ… Livecodi-poc-e2-cluster (us-central1-a)
FoundationDBβœ… Live3-node StatefulSet at 10.128.0.8:4500
Domain/SSLβœ… Activecoditect.ai (Google-managed cert)
Container Registryβœ… Readygcr.io/serene-voltage-464305-n2
CI/CDβœ… ReadyCloud Build pipelines

πŸ€– llm Workflows​

Supported Modes​

  1. Single Mode - One llm at a time
  2. Parallel Mode - Side-by-side comparison
  3. Sequential Mode - Chained processing (LM Studio β†’ Claude)
  4. Consensus Mode - Synthesized best answer from multiple llms

For AMD Ryzen AI Max+ 395 (128GB RAM):

ModelSizeRAMBest For
Meta Llama 3.3 70BQ4_K_M~40GBGeneral coding, reasoning
Qwen2.5 72BQ4_K_M~40GBMultilingual, math
DeepSeek-Coder-V2Q4_K_M~40GBCode generation
Mixtral 8x22BQ4_K_M~35GBFast inference, MoE

πŸ” Security​

  • JWT Authentication - Secure session management
  • RBAC - Role-based access control
  • Audit Logging - Comprehensive event tracking
  • Local-First - No data leaves your machine (except optional cloud providers)
  • GDPR/SOC2 Ready - Compliance-ready architecture

πŸ“Š Current Status​

Completed Features βœ…β€‹

Development (Local):

  • βœ… Coditect AI branding in theia AI Chat
  • βœ… Custom robot logo and agent instructions
  • βœ… V5 Frontend wrapper with 28 pages
  • βœ… Apple-quality design system (500+ tokens)
  • βœ… Mobile-first design (56px touch targets)
  • βœ… Startup/shutdown scripts
  • βœ… Two-service architecture working (ports 5173 + 3000)

Deployment (GCP):

  • βœ… V5 Frontend production build (dist/ folder ready)
  • βœ… Combined deployment architecture designed
  • βœ… 9 deployment files created (Dockerfiles, configs, manifests)
  • βœ… Complete documentation (architecture, guides, troubleshooting)
  • βœ… GKE infrastructure ready (codi-poc-e2-cluster)
  • βœ… FoundationDB ready (3-node StatefulSet)
  • βœ… Domain/SSL configured (coditect.ai)

In Progress πŸ”„β€‹

  • ⏸️ Docker Installation: Need Docker client for local testing
  • πŸ”„ Local Docker Build Test: Test dockerfile.local-test (~27 min build)
  • πŸ”„ Cloud Build Deployment: Deploy to GCP after local test succeeds
  • πŸ”„ GKE Deployment: Deploy to Kubernetes cluster
  • πŸ”„ WebSocket integration: Test theia terminal in production
  • πŸ”„ Agent system implementation: Custom agents for code generation

Roadmap πŸš§β€‹

  • 🚧 Auth Backend: JWT + FoundationDB sessions (Phase 3)
  • 🚧 WebSocket Sidecar: Real-time communication layer (Phase 4)
  • 🚧 Pod auto-provisioning: User workspace isolation (Phase 5)
  • 🚧 Full Integration: End-to-end testing (Phase 6)
  • 🚧 Blue-green rollout: Zero-downtime deployment (Phase 7)
  • 🚧 Production monitoring: Prometheus + Grafana dashboards

🀝 Contributing​

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Workflow​

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'feat: Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License​

This project is licensed under the Eclipse Public License 2.0 (EPL-2.0).

Eclipse theia is EPL-2.0 licensed, which allows free commercial use without licensing fees.

See LICENSE for details.

πŸ“ž Support​

πŸŽ‰ Acknowledgments​

  • Eclipse theia Team - Amazing IDE framework
  • Anthropic - Claude Code and MCP protocol
  • LM Studio - Local llm inference
  • Contributors - Everyone who helped build this

Made with ❀️ by the Coditect AI Team

Last Updated: 2025-10-12 | Status: Deployment architecture ready, awaiting Docker installation