CloudPulse is a production-ready application and educational repository designed to teach you how to deploy and scale modern infrastructure across multiple cloud paradigms.
Whether you want to learn traditional server deployments, container orchestration, Serverless Functions, or Infrastructure as Code, this repository provides a working codebase to practice it all.
This repository is split into the Application Code and the Infrastructure & Learnings that power it.
CloudPulse is a real-time analytics and task management dashboard built with a microservice architecture:
frontend/: A modern web interface built with Next.js and TypeScript.backend/: A robust REST API built in Go that handles business logic, user authentication, and data persistence. It includes:cmd/api/: The main HTTP server.cmd/worker/: A background worker process.cmd/simulator/: An activity simulator to generate mock traffic for observability testing.
This directory contains an 11-day, step-by-step curriculum that walks you through deploying the CloudPulse application using different cloud strategies:
- Days 1-3: Docker Compose, Nginx, and single-node deployments.
- Days 4-5: Managed Databases (PostgreSQL, Redis) and Object Storage (S3/Spaces).
- Days 6-7: CI/CD via GitHub Actions and Horizontal Scaling (Load Balancers).
- Day 8: Kubernetes orchestration.
- Day 9: Infrastructure as Code with Terraform.
- Day 10-11: Platform as a Service (PaaS) and Serverless Functions.
Contains production-grade Terraform configurations to automate the provisioning of the entire cloud environment (VPCs, Firewalls, Load Balancers, Droplets/EC2, Databases, Object Storage).
Contains standard Kubernetes manifests to deploy the entire CloudPulse stack to a managed Kubernetes cluster. Includes Deployments, Services, ConfigMaps, Secrets, and Nginx Ingress Controller configurations.
A complete observability stack configured for Docker Compose and easily translatable to cloud environments.
- Prometheus: Time-series metrics collection. It actively scrapes metrics from the Go backend (
/metrics) and infrastructure nodes (via Node Exporter). - Grafana: The centralized UI dashboard. It acts as the single pane of glass to query metrics from Prometheus, logs from Loki, and traces from Tempo.
- Loki: Highly efficient log aggregation. It automatically collects
stdoutandstderrlogs from all Docker containers using the Docker Loki driver, making them searchable in Grafana. - Tempo: Distributed tracing via OpenTelemetry. It receives span data from the Go backend to help you trace request latency across database and cache calls.
- Alertmanager: Handles alerts generated by Prometheus (e.g., High CPU, Container Down) and routes them to external receivers like Slack or Email.
To run the entire CloudPulse stack and observability tools on your local machine using Docker Compose:
- Environment Variables:
- Find all
.env.examplefiles in the project (e.g., inbackend/andfrontend/) and copy them to.envfor local development. - For production deployments, you must manually create a
.env.productionor.env.prodfile yourself using the.envfile as a template, filling in your secure production secrets.
- Find all
- Start the core application:
docker-compose up -d --build
- Start the monitoring stack:
docker-compose -f docker-compose.monitoring.yml up -d
- Access the application at
http://localhost:3000.
To begin your journey into cloud deployments, open Roadmap_to_follow.md and start from Day 1!
docker-compose.yml: The local development environment. Uses live-reloading where possible.docker-compose.monitoring.yml: The local observability stack (Grafana, Prometheus, etc.).docker-compose.prod.yml: Designed for single-server production deployments. Uses pre-built images from a container registry and implements restart policies.backend/Dockerfile&frontend/Dockerfile: Optimized multi-stage Dockerfiles designed to produce the smallest possible image sizes for production.