An open-source cloud platform that anyone can run, modify, and own.
- Compute: Multi-backend instance management (Docker or Libvirt/KVM)
- Docker: Fast container-based instances
- Libvirt: Full VM isolation with KVM/QEMU and VNC Console access (Guide)
- RBAC: Role-Based Access Control with fine-grained permissions (Guide)
- Storage: Distributed S3-compatible object storage with Consistent Hashing and Gossip Protocol (Guide)
- Block Storage: Persistent volumes via LVM (Production) or Docker Volumes (Simulation)
- Networking: Advanced VPC with SDN (Open vSwitch), Subnet isolation, IPAM, and VPC Peering.
- Identity: API Key authentication (Guide)
- Observability: Prometheus metrics and Grafana dashboards (Guide) with Distributed Tracing (Jaeger).
- Load Balancer: Layer 7 HTTP traffic distribution (Regional)
- Global Load Balancer: Multi-region traffic steering at the DNS level (Guide)
- Auto-Scaling: Dynamic scaling of compute resources based on metrics
- Managed Databases (RDS): Launch PostgreSQL/MySQL instances with a single command (Guide)
- Managed Caches (Redis): Launch and manage Redis instances (Guide)
- Managed Kubernetes (KaaS): Provision production-ready HA clusters with automated LB setup (Guide)
- Cloud Functions (Serverless): Run logic without managing servers (Guide)
- Secrets Manager: Encrypted storage for API keys and sensitive config (Guide)
- CloudQueue: Distributed message queuing with visibility timeouts (Guide)
- CloudNotify: Pub/Sub topic and subscription service via Webhooks/Queues (Guide)
- CloudCron: Managed scheduled tasks with execution history (Guide)
- CloudGateway: API Routing and Reverse Proxy with path stripping (Guide)
- CloudContainers: Managed container deployments with replication and auto-healing (Guide)
- CloudDNS: Managed authoritative DNS with VPC auto-registration (Guide)
- Console: Interactive Next.js Dashboard for visual resource management
The Cloud uses API Key authentication with comprehensive security features.
- Register:
POST /auth/registerto create an account. - Login:
POST /auth/loginto receive your API Key. - Authenticate: Send
X-API-Key: <your-key>header with all requests.
- Request Reset:
POST /auth/forgot-passwordwith your email (rate limited: 5/min) - Reset Password:
POST /auth/reset-passwordwith token and new password
- Create Key:
POST /auth/keys(requires authentication) - List Keys:
GET /auth/keys - Rotate Key:
POST /auth/keys/:id/rotate - Regenerate Key:
POST /auth/keys/:id/regenerate - Revoke Key:
DELETE /auth/keys/:id
Manage users, roles, and granular policies via the CLI or API.
- Create Role:
cloud roles create developer --permissions "instance:read,volume:read" - Bind Role:
cloud roles bind user@example.com developer - IAM Policy:
cloud iam create ReadOnlyS3 ./policy.json - Attach Policy:
cloud iam attach user-uuid policy-uuid
- Liveness:
GET /health/live(Returns 200 OK) - Readiness:
GET /health/ready(Returns 200 if DB/Docker connected, 503 if not)
# 1. Clone & Setup
git clone https://github.com/PoyrazK/thecloud.git
cd thecloud
make run
# Or with Libvirt/KVM (Requires Linux Host):
# make run COMPUTE_BACKEND=libvirt STORAGE_BACKEND=lvm
# 2. Register & Login (Get API Key)
curl -X POST http://localhost:8080/auth/register \
-d '{"email":"user@example.com", "password":"StrongPassword123!", "name":"User"}'
curl -X POST http://localhost:8080/auth/login \
-d '{"email":"user@example.com", "password":"StrongPassword123!"}'
# Copy the "api_key" from the response
# 3. Test Access
# All protected endpoints require the X-API-Key header
curl -H "X-API-Key: YOUR_API_KEY" http://localhost:8080/instances# 1. Enter web directory
cd web
# 2. Install dependencies
npm install
# 3. Start development server
npm run dev
# 4. Open in browser
# http://localhost:3000- Frontend: Next.js 14, Tailwind CSS, GSAP
- Backend: Go (Clean Architecture, Hexagonal)
- Database: PostgreSQL (pgx)
- Infrastructure:
- Docker Engine (Containers, Networks, Volumes)
- Libvirt/KVM (Virtual Machines, QCOW2 Storage, NAT Networks)
- Open vSwitch (SDN, VXLAN, VPC Isolation, Subnets)
- Observability: Prometheus Metrics, Real-time WebSockets, OpenTelemetry (Tracing)
- CLI: Cobra (command-based) + Survey (interactive)
- Simplified Architecture: Refactored
InstanceServiceusing parameter structs and helper methods. - Enhanced Storage: Added support for LVM Block Storage and VNC Console access.
- Asynchronous Core: Refactored long-running operations (K8s clusters, instance deletions) to use a durable Redis Task Queue.
- HA Control Plane: Supported 1-click High-Availability Kubernetes clusters with 3 control plane nodes and automated API Server Load Balancers.
- VPC Peering: Implemented inter-VPC connectivity using Open vSwitch (OVS) flow rules, including automated CIDR overlap validation and VPC deletion guards.
- Distributed Storage (v2): Replaced local filesystem storage with a multi-node Distributed Object Store featuring:
- Consistent Hash Ring: Dynamic data distribution across nodes.
- Gossip Protocol: Fully decentralized node discovery and health tracking.
- Quorum-based Replication: Configurable N-way replication with write-quorum consistency.
- Clean Code: Eliminated duplicate literals and improved test security across all service layers.
- Global Load Balancing: Implemented a GeoDNS-based global steering service with multi-region health tracking and latency-optimized routing.
- Compute Modernization: Enabled ARM64 (UEFI) support for the Libvirt backend using the
virtmachine type andAAVMFfirmware. - Kubernetes Storage: Implemented a feature-complete CSI Driver for dynamic block storage provisioning in KaaS clusters, including automated device formatting and attachment.
- AI Context: Added
GEMINI.mdto provide AI assistants with project-specific hexagonal architecture rules and coding standards. - Interactive Workflows: Introduced
.agent/workflows/for rapid development:/new-service: Scaffold full hexagonal layers (Domain → Port → Service → Repo → Handler)./deploy: Automated build and deployment with integrated smoke tests./test-coverage: Detailed coverage analysis and reporting./swagger: One-click OpenAPI documentation updates.
- Quality Gates: Integrated
golangci-lint, SonarQube, and automated k6 performance testing. - Project Hygiene: Major cleanup of legacy artifacts and repository optimization.
See CHANGELOG.md for detailed changes.
| Doc | Description |
|---|---|
| Development Guide | Setup on Windows, Mac, or Linux |
| Roadmap | Project roadmap and feature status |
| Vision | Long-term strategy and goals |
| Doc | Description |
|---|---|
| Architecture Overview | System design and patterns |
| Backend Guide | Go service implementation |
| Database Guide | Schema, tables, and migrations |
| CLI Reference | All commands and flags |
| CloudQueue | Message Queue deep dive |
| CloudNotify | Pub/Sub details |
| CloudCron | Scheduler internals |
| CloudGateway | Gateway & Proxy guide |
| CloudContainers | Container Orchestration |
| CloudDNS | Managed DNS Service |
| CloudGlobalLB | Multi-Region Traffic Steering |
| Guide | Description |
|---|---|
| Libvirt Backend | KVM/QEMU virtualization setup and usage |
| RBAC Management | Roles, permissions, and bindings |
| Auto-Scaling | Scalability patterns and usage |
| Load Balancer | Traffic distribution guide |
| Managed Databases | RDS patterns and usage |
| Secrets Manager | Security and encryption guide |
| Networking | VPCs and Network isolation |
| Storage | Object and Block storage |
| Managed Caches | Redis cache management |
| Cloud Functions | Serverless execution |
| CloudDNS | Managed DNS & Auto-Registration |
- Time to Hello World: < 5 min
- API Latency (P95): < 200ms
- CLI Success Rate: > 95%
- Test Coverage: 59.7% (Unit + Integration Tests)
The Cloud has comprehensive test coverage across all layers:
- Unit Tests: Core services, handlers, and business logic
- SDK Tests: 80.1% coverage with httptest mocking
- Repository Tests: 70.1% coverage with pgxmock
- Overall Coverage: 59.7% (Services: 71.5%, Handlers: 65.8%, Repositories: 70.1%)
Run tests:
# All tests
go test ./...
# With coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
# Specific packages
go test ./pkg/sdk/... # SDK tests only
go test ./internal/core/services/... # Service tests onlyFor comprehensive testing guide, see docs/TESTING.md.