CODITECT Cloud Infrastructure - Project Structure
Production-Ready Directory Organization
Last Updated: November 23, 2025
π Directory Structure Overviewβ
coditect-cloud-infra/
βββ .coditect/ # Symlink to distributed intelligence
βββ .claude/ # Symlink for Claude Code compatibility
βββ .github/ # GitHub Actions workflows
β βββ workflows/
β β βββ tofu-plan.yml # PR validation
β β βββ tofu-apply.yml # Deployment automation
β βββ ISSUE_TEMPLATE/
βββ docs/ # Comprehensive documentation
β βββ README.md # Documentation index β START HERE
β βββ architecture/ # C1-C3 architecture diagrams
β β βββ c1-system-context.md
β β βββ c2-container-diagram.md
β βββ workflows/ # Sequence diagrams (5 files)
β β βββ user-registration-flow.md
β β βββ license-acquisition-workflow.md
β β βββ heartbeat-mechanism.md
β β βββ zombie-session-cleanup.md
β β βββ graceful-license-release.md
β βββ project-management/ # Project planning documents
β β βββ checkpoints/
β β βββ P1-T01-COMPLETION-SUMMARY.md
β β βββ P1-T02-COMPLETION-SUMMARY.md
β β βββ PHASE-0-COMPLETION-SUMMARY.md
β βββ critical-path-analysis.md # 6-7 day roadmap to MVP
β βββ gap-analysis.md # Current vs target state
β βββ implementation-roadmap.md # 5-phase development plan
β βββ gcp-infrastructure-inventory.md # Deployed resources
β βββ gcp-setup.md # Initial GCP configuration
β βββ security-advisory-2025-11-23.md # Security best practices
β βββ coditect-application-integration.md # End-to-end system docs
βββ diagrams/ # Visual diagrams (future)
βββ kubernetes/ # Kubernetes manifests
β βββ base/
β βββ overlays/
β β βββ dev/
β β βββ staging/
β β βββ prod/
β βββ helm/
βββ opentofu/ # Infrastructure as Code (OpenTofu/OpenTofu)
β βββ modules/ # Reusable OpenTofu modules
β β βββ networking/
β β βββ gke/
β β βββ database/
β β βββ redis/
β βββ environments/ # Environment configurations
β βββ dev/
β βββ staging/
β βββ prod/
βββ research/ # Research documents and planning
βββ scripts/ # Utility scripts
β βββ bootstrap.sh
β βββ deploy.sh
β βββ update_tasklist.py
β βββ teardown.sh
βββ tests/ # Infrastructure tests (Terratest)
βββ .env.example # Environment variable template
βββ .gitignore # Git ignore patterns
βββ .gitmessage # Git commit message template
βββ .pre-commit-config.yaml # Pre-commit hooks
βββ CLAUDE.md # AI agent configuration
βββ CODE_OF_CONDUCT.md # Community guidelines
βββ CODEOWNERS # GitHub code ownership
βββ CONTRIBUTING.md # Contribution guidelines
βββ docker-compose.yml # Local development environment
βββ Dockerfile # Container image definition
βββ LICENSE # License file
βββ project-plan.md # 59KB comprehensive project plan
βββ pyproject.toml # Python project configuration
βββ README.md # Project overview
βββ requirements.txt # Python dependencies
βββ requirements-dev.txt # Development dependencies
βββ tasklist.md # Simplified task tracking
βββ tasklist-with-checkboxes.md # Detailed progress tracking (91KB)
π File Categoriesβ
Root Configuration Filesβ
| File | Purpose | Update Frequency |
|---|---|---|
.env.example | Environment variable template | As needed |
.gitignore | Git ignore patterns | Rarely |
.gitmessage | Commit message template | Rarely |
.pre-commit-config.yaml | Pre-commit hooks configuration | Monthly |
docker-compose.yml | Local development stack | As needed |
Dockerfile | Container image build | As needed |
pyproject.toml | Python project metadata | As needed |
requirements.txt | Production dependencies | Weekly |
requirements-dev.txt | Development dependencies | Weekly |
Project Management Filesβ
| File | Purpose | Size | Update Frequency |
|---|---|---|---|
project-plan.md | Complete project plan & roadmap | 59KB | Weekly |
tasklist.md | Simplified task list | 9KB | Daily |
tasklist-with-checkboxes.md | Detailed progress tracking | 91KB | Daily |
README.md | Project overview | 9KB | As needed |
Documentation Filesβ
Located in docs/ directory (see below)
Community & Legalβ
| File | Purpose |
|---|---|
LICENSE | Software license |
CODE_OF_CONDUCT.md | Community guidelines |
CONTRIBUTING.md | Contribution process |
CODEOWNERS | GitHub code ownership |
π Documentation Structureβ
Primary Entry Pointβ
docs/README.md - Complete documentation index
- Quick status overview
- Documentation navigation
- Getting started guides
- Cross-reference table
Architecture Documentationβ
Level 1: System Context
docs/architecture/c1-system-context.md- System boundaries and actors
Level 2: Container Architecture
docs/architecture/c2-container-diagram.md- All containers and technology stack
Level 3: Component Diagrams (Planned)
- License API components
- Admin dashboard components
- Database schema
Workflow Documentationβ
Complete end-to-end flows with code examples:
-
- Google/GitHub OAuth integration
- Tenant and license creation
- Email verification
-
license-acquisition-workflow.md
- Check-on-start pattern
- Hardware fingerprinting
- License signing (Cloud KMS)
-
- Background thread implementation
- TTL management (5min/6min)
- Offline mode with grace period
-
- Redis keyspace notifications
- Automatic seat reclamation
- Cleanup worker implementation
-
- Signal handlers (SIGINT, SIGTERM)
- Shutdown sequence
- Immediate seat reclaim
Planning Documentsβ
| Document | Purpose | Size |
|---|---|---|
| critical-path-analysis.md | 6-7 day roadmap to MVP | Comprehensive |
| gap-analysis.md | Current vs target state | Detailed |
| implementation-roadmap.md | 5-phase development plan | Detailed |
Infrastructure Documentsβ
| Document | Purpose |
|---|---|
| gcp-infrastructure-inventory.md | All deployed GCP resources |
| gcp-setup.md | Initial GCP project setup |
| security-advisory-2025-11-23.md | Security best practices |
Integration Documentsβ
| Document | Purpose |
|---|---|
| coditect-application-integration.md | Complete end-to-end system architecture |
ποΈ Infrastructure as Code Structureβ
OpenTofu/OpenTofu Modulesβ
opentofu/
βββ modules/ # Reusable modules
β βββ networking/
β β βββ main.tf # VPC, subnets, firewall
β β βββ variables.tf # Input variables
β β βββ outputs.tf # Output values
β βββ gke/
β β βββ main.tf # GKE cluster configuration
β β βββ node_pools.tf # Node pool definitions
β β βββ addons.tf # GKE addons
β βββ database/
β β βββ main.tf # Cloud SQL instance
β β βββ users.tf # Database users
β βββ redis/
β βββ main.tf # Memorystore Redis
βββ environments/ # Environment-specific configs
βββ dev/
β βββ main.tf # Dev environment
β βββ backend.tf # State backend config
β βββ tofu.tfvars # Variable values
βββ staging/
βββ prod/
Kubernetes Manifestsβ
kubernetes/
βββ base/ # Base configurations
β βββ deployment.yaml
β βββ service.yaml
β βββ ingress.yaml
β βββ configmap.yaml
βββ overlays/ # Kustomize overlays
β βββ dev/
β β βββ kustomization.yaml
β βββ staging/
β βββ prod/
βββ helm/ # Helm chart values
βββ values-dev.yaml
βββ values-staging.yaml
βββ values-prod.yaml
π§ Scripts Directoryβ
| Script | Purpose |
|---|---|
bootstrap.sh | Initial project setup |
deploy.sh | Deployment automation |
teardown.sh | Infrastructure cleanup |
update_tasklist.py | Task list synchronization |
π§ͺ Tests Directoryβ
Infrastructure testing (Terratest):
tests/
βββ networking_test.go
βββ gke_test.go
βββ database_test.go
βββ redis_test.go
π Project Statusβ
Current Completionβ
| Component | Status | Completion |
|---|---|---|
| Infrastructure | β Deployed | 100% |
| Documentation | β Complete | 95% |
| Backend Application | β Pending | 0% |
| Deployment | β Pending | 0% |
| Client SDK | β Pending | 0% |
| Overall | π In Progress | 35% |
Next Milestonesβ
- This Week: Cloud KMS + Identity Platform (2-3 days)
- Next Week: Backend development (5-7 days)
- Week After: Deployment to GKE (2-3 days)
- Target MVP: December 6, 2025
π― Directory Organization Guidelinesβ
Keeping the Root Cleanβ
Files that MUST stay in root:
- Configuration files (
.env.example,pyproject.toml,docker-compose.yml) - Documentation entry points (
README.md,project-plan.md,tasklist.md) - License and community files (
LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md)
Files that should be in subdirectories:
- Architecture diagrams β
docs/architecture/ - Workflow diagrams β
docs/workflows/ - Planning documents β
docs/project-management/ - Completion summaries β
docs/project-management/checkpoints/ - Utility scripts β
scripts/ - Infrastructure code β
opentofu/orkubernetes/ - Tests β
tests/
Naming Conventionsβ
Files:
- Use
UPPERCASE-WITH-DASHES.mdfor top-level documents - Use
lowercase-with-dashes.mdfor subdirectory documents - Use descriptive names (not generic like
doc1.md)
Directories:
- Use lowercase with dashes or underscores
- Be specific:
project-managementnotdocs/misc - Group related files logically
π Supportβ
Questions? See docs/README.md for complete documentation index
Contributing? Read CONTRIBUTING.md for guidelines
Last Updated: November 23, 2025 Status: Production-Ready Organization Owner: AZ1.AI INC