Welcome to the The Cloud operational manual. This guide will help you set up your development environment on macOS and Windows.
- Homebrew: The missing package manager for macOS.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Go (Golang): Version 1.24 or higher (matches go.mod).
brew install go
- Node.js & npm: Version 20 or higher (for the Console).
brew install node
- Docker Desktop: Download for Mac.
- Note: Ensure "Use Docker Compose V2" is enabled in settings.
- Git:
brew install git
-
Clone the Repository:
git clone https://github.com/PoyrazK/thecloud.git cd thecloud -
Environment Variables: Create a
.envfile in the root directory:echo "DATABASE_URL=postgres://cloud:password@localhost:5432/thecloud" > .env
Optional: Configure Backends (Defaults shown)
# Compute: 'docker' (simulated) or 'libvirt' (real VMs) echo "COMPUTE_BACKEND=docker" >> .env # Storage: 'noop' (simulated) or 'lvm' (requires LVM volume group) echo "STORAGE_BACKEND=noop" >> .env
The Makefile works natively on macOS.
- Start Infrastructure:
make run
- Build CLIs:
make build
- Run Tests:
make test
- Go (Golang): Download Installer.
- Node.js & npm: Download Installer.
- Docker Desktop: Download for Windows.
- Critical: Enable WSL 2 (Windows Subsystem for Linux) backend for best performance.
- Git Bash (Recommended) or PowerShell.
- Make: Windows doesn't have
makeby default.- Option A: Install via Chocolatey:
choco install make - Option B: Use
mingw32-makeif you have MinGW. - Option C: Just run the commands manually (see below).
- Option A: Install via Chocolatey:
-
Clone the Repository:
git clone https://github.com/PoyrazK/thecloud.git cd thecloud
-
Environment Variables: Create a
.envfile manually or via PowerShell:Set-Content .env "DATABASE_URL=postgres://cloud:password@localhost:5432/thecloud"
If you don't have make, run these commands:
-
Start Database:
docker compose up -d -
Run API:
go run cmd/api/main.go
-
Build CLI (PowerShell):
mkdir bin # Build the CLI binaries using the project's cmd/cloud entrypoints go build -o bin/cloud.exe cmd/cloud/*.go
- "make: command not found": See "Prerequisites" above, or use manual commands.
- Firewall: Allow Docker access when prompted by Windows Defender.
- Line Endings: Git might change LF to CRLF. Configure git to handle this:
git config --global core.autocrlf true
The Cloud has comprehensive test coverage (59.7%) across all layers:
Unit Tests Only (no database required):
go test ./...Integration Tests (requires PostgreSQL):
# Start PostgreSQL first
docker compose up -d postgres
# Run all tests including integration tests
go test -tags=integration ./...Coverage Report:
# Generate coverage report
go test -coverprofile=coverage.out ./...
# View in browser
go tool cover -html=coverage.out
# View summary
go tool cover -func=coverage.out | grep total- Unit Tests:
internal/core/services/*_test.go,internal/handlers/*_test.go - Integration Tests:
internal/repositories/postgres/*_test.go - SDK Tests:
pkg/sdk/*_test.go(use httptest for HTTP mocking) - Mocks:
internal/core/services/shared_test.go
- Overall: 59.7%
- SDK: 80.1%
- Services: 71.5%
- Handlers: 65.8%
- Repositories: 70.1%
For detailed testing guide, see docs/TESTING.md.
Ensure your Docker Daemon is running before starting the project!
- Mac: Look for the whale icon in the menu bar.
- Windows: Look for the whale icon in the system tray.