Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js 20+
  • Docker and Docker Compose
  • Git
  • PostgreSQL (local or cloud)
For production deployments, you’ll also need AWS CLI configured with appropriate credentials, kubectl, and Terraform installed.

Installation

1

Clone the Repository

Clone the GovTech Multicloud Platform repository:
git clone https://github.com/alexander-fq/multicloud.git
cd multicloud/platform
The repository contains two main directories:
  • platform/ - Complete demo with running application
  • skeleton/ - Template for new projects
2

Start with Docker Compose

The fastest way to get started is using Docker Compose:
docker-compose up -d
This will start:
  • PostgreSQL on port 5432
  • Backend API on port 3000
  • Frontend on port 80
Docker Compose launches three containers:
  1. postgres - PostgreSQL 15 Alpine with health checks
  2. backend - Node.js Express API with hot reload
  3. frontend - React SPA served by Nginx with API proxy
All containers are connected via the govtech-network bridge network.
3

Verify the Installation

Check that all services are healthy:
# Check container status
docker-compose ps

# Test backend health
curl http://localhost:3000/api/health

# Test database health
curl http://localhost:3000/api/health/database

# Test cloud credentials
curl http://localhost:3000/api/health/cloud
Expected response from /api/health:
{
  "status": "healthy",
  "timestamp": "2026-03-03T18:30:00.000Z",
  "provider": "aws",
  "uptime": 45.2,
  "checks": {
    "database": {
      "status": "healthy",
      "stats": { "total": 10, "idle": 4, "waiting": 0 }
    },
    "cloudCredentials": { "status": "healthy" }
  },
  "responseTime": "5ms"
}
4

Access the Platform

Open your browser and navigate to:
You should see the GovTech platform homepage with current provider information and key statistics.

Manual Setup (Without Docker)

If you prefer to run services individually:
1

Setup PostgreSQL

Install and start PostgreSQL:
# On Ubuntu/Debian
sudo apt-get install postgresql-15
sudo systemctl start postgresql

# Create database
sudo -u postgres createdb govtech_dev
2

Configure Backend

Navigate to the backend directory and install dependencies:
cd platform/app/backend
npm install
Create .env file from the example:
cp .env.example .env
Edit .env with your configuration:
.env
# General
NODE_ENV=development
PORT=3000
HOST=0.0.0.0

# Cloud Provider Selection
CLOUD_PROVIDER=aws

# AWS Configuration
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_BUCKET=govtech-documents
AWS_LOG_GROUP=/aws/govtech/api

# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/govtech_dev

# Security
JWT_SECRET=your-jwt-secret-key-change-this-in-production
API_RATE_LIMIT=100
Never commit .env files to version control. The .env.example file is provided as a template.
3

Start Backend

npm start
For development with auto-reload:
npm run dev
The backend will be available at http://localhost:3000
4

Setup Frontend

In a new terminal, navigate to the frontend directory:
cd platform/app/frontend
npm install
npm run dev
The frontend will be available at http://localhost:5173

Environment Variables

VariableDefaultDescription
NODE_ENVdevelopmentEnvironment mode
PORT3000Backend server port
HOST0.0.0.0Server bind address
VariableOptionsDescription
CLOUD_PROVIDERaws, oci, gcp, azureActive cloud provider
VariableExampleDescription
AWS_REGIONus-east-1AWS region
AWS_ACCESS_KEY_IDAKIA…AWS access key
AWS_SECRET_ACCESS_KEYsecret…AWS secret key
AWS_BUCKETgovtech-documentsS3 bucket name
AWS_LOG_GROUP/aws/govtech/apiCloudWatch log group
VariableExampleDescription
DATABASE_URLpostgresql://user:pass@host:5432/dbPostgreSQL connection string
VariableDefaultDescription
JWT_SECRET-JWT signing key (min 32 chars)
API_RATE_LIMIT100Requests per 15 minutes

Available Scripts

Backend Commands

cd app/backend
npm start

Frontend Commands

cd app/frontend
npm run dev  # Port 5173

Docker Commands

docker-compose up -d

Testing the API

# Overall health
curl http://localhost:3000/api/health

# Database health
curl http://localhost:3000/api/health/database

# Cloud credentials
curl http://localhost:3000/api/health/cloud

Troubleshooting

Symptoms: Backend fails to start or exits immediatelySolutions:
  1. Check if port 3000 is already in use:
    lsof -i :3000
    
  2. Verify DATABASE_URL is correct in .env
  3. Ensure PostgreSQL is running:
    docker-compose ps postgres
    
  4. Check backend logs:
    docker-compose logs backend
    
Symptoms: “ECONNREFUSED” or “Connection timeout” errorsSolutions:
  1. Verify PostgreSQL is running:
    docker-compose ps postgres
    
  2. Check connection string format in .env:
    DATABASE_URL=postgresql://username:password@hostname:5432/database_name
    
  3. Test connection manually:
    psql postgresql://postgres:postgres@localhost:5432/govtech_dev
    
  4. Wait for PostgreSQL to be fully ready (check health):
    docker-compose exec postgres pg_isready -U postgres
    
Symptoms: Cloud health check fails or AWS operations errorSolutions:
  1. Verify credentials in .env are correct
  2. Test AWS CLI access:
    aws sts get-caller-identity
    
  3. For local development, you can use placeholder credentials (demo mode)
  4. Ensure IAM user has necessary permissions (S3, CloudWatch, RDS)
Symptoms: Image build errors or dependency installation failsSolutions:
  1. Clear Docker cache:
    docker-compose build --no-cache
    
  2. Remove old images:
    docker system prune -a
    
  3. Check Dockerfile syntax in app/backend/Dockerfile
  4. Ensure package.json has valid dependencies

Next Steps

Platform Overview

Learn about the architecture and multi-cloud design patterns

Deploy to Kubernetes

Deploy to EKS, GKE, or AKS with Terraform

API Reference

Explore all available endpoints

Migration Guide

Learn how to migrate between cloud providers
You now have the GovTech Multicloud Platform running locally! Explore the platform features and check out the platform overview to understand the architecture.

Build docs developers (and LLMs) love