A comprehensive DevOps teaching platform demonstrating modern containerization, orchestration, and CI/CD practices with a beautiful 1970s retro-futurist design.
- Beautiful Web Interface: 1970s retro-futurist design with burnt orange gradient
- Message Board: Interactive data entry with real database persistence
- State Indicator: Visual demonstration of ephemeral vs. persistent storage
- Complete DevOps Stack: Docker, Kubernetes, CI/CD, Terraform
- Frontend: React 19, Tailwind CSS 4, TypeScript
- Backend: Express 4, tRPC 11, Node.js 22
- Database: MySQL 8.0
- Testing: Vitest
- Build Tool: Vite, esbuild
- Package Manager: npm
Before getting started, ensure you have the following installed:
- Node.js 18+ - Download from nodejs.org (npm comes with Node.js)
- Docker & Docker Compose (optional, for containerization topics)
- MySQL 8.0 (optional, for local database without Docker)
# Clone the repository
git clone https://github.com/yourusername/landmark-devops-demo.git
cd landmark-devops-demo
# Install dependencies with npm
npm install# Copy the example environment file
cp .env.example .env
# Edit .env with your values (optional for local development)
# Default values are pre-configured for local developmentThe default .env includes:
NODE_ENV=development- Development environmentDATABASE_URL=mysql://landmark:landmark123@localhost:3306/landmark_devops- Local MySQL connection
For local development with hot module reloading:
# Start the development server
npm run devThe application will start on http://localhost:3000 with automatic reload on file changes.
To create an optimized production build:
# Build the application
npm run build
# Start the production server
npm run startThe production build includes:
- Optimized React frontend bundled with Vite
- Compiled Express backend with esbuild
- Tree-shaking and minification
- Output in
dist/directory
The build process consists of two stages:
-
Frontend Build (Vite)
- Compiles React components
- Bundles CSS with Tailwind
- Optimizes JavaScript
- Output:
dist/client/
-
Backend Build (esbuild)
- Compiles TypeScript to JavaScript
- Bundles dependencies
- Creates standalone server
- Output:
dist/index.js
# Run test suite with Vitest
npm test# Watch for file changes and re-run tests
npm test -- --watch# Run tests for a specific file
npm test -- server/auth.logout.test.ts# Generate coverage report
npm test -- --coverageThe project includes an example test in server/auth.logout.test.ts:
import { describe, expect, it } from "vitest";
import { appRouter } from "./routers";
import { COOKIE_NAME } from "../shared/const";
describe("auth.logout", () => {
it("clears the session cookie and reports success", async () => {
// Test implementation
});
});If you prefer to run MySQL locally without Docker:
# Install MySQL (macOS with Homebrew)
brew install mysql
# Start MySQL service
brew services start mysql
# Create database and user
mysql -u root -e "CREATE DATABASE landmark_devops;"
mysql -u root -e "CREATE USER 'landmark'@'localhost' IDENTIFIED BY 'landmark123';"
mysql -u root -e "GRANT ALL PRIVILEGES ON landmark_devops.* TO 'landmark'@'localhost';"
mysql -u root -e "FLUSH PRIVILEGES;"
# Update DATABASE_URL in .env
DATABASE_URL=mysql://landmark:landmark123@localhost:3306/landmark_devopsUsing Docker Compose for database:
# Start only the database service
docker-compose up db
# In another terminal, run the application
npm run dev# Terminal 1: Start the development server
npm run dev
# Terminal 2 (optional): Start database with Docker
docker-compose up dbAccess the application at http://localhost:3000
# Build the application
npm run build
# Start the production server
npm run startVerify TypeScript types without building:
# Run TypeScript type checker
npm run checkFormat code with Prettier:
# Format all files
npm run formatlandmark-devops-demo/
├── client/ # React frontend
│ ├── src/
│ │ ├── pages/ # Page components
│ │ │ ├── Home.tsx # Landing page
│ │ │ └── MessageBoard.tsx # Message board
│ │ ├── components/ # Reusable UI components
│ │ ├── lib/ # Utilities and helpers
│ │ ├── App.tsx # Main application
│ │ ├── main.tsx # React entry point
│ │ └── index.css # Global styles
│ ├── index.html # HTML template
│ └── public/ # Static assets
├── server/ # Express backend
│ ├── routers.ts # tRPC procedure definitions
│ ├── db.ts # Database helpers
│ ├── auth.logout.test.ts # Example test
│ └── _core/ # Framework internals
├── drizzle/ # Database schema
│ └── schema.ts # Table definitions
├── docker/ # Docker documentation
│ └── README.md # Docker guide
├── k8s/ # Kubernetes manifests
│ ├── 01-namespace.yaml
│ ├── 02-configmap-secret.yaml
│ ├── 03-deployment.yaml
│ ├── 04-service.yaml
│ ├── 05-statefulset.yaml
│ └── README.md
├── .github/workflows/ # GitHub Actions
│ ├── ci-cd.yml
│ └── README.md
├── .circleci/ # CircleCI
│ └── config.yml
├── terraform/ # Infrastructure as Code
│ ├── main.tf
│ ├── variables.tf
│ ├── outputs.tf
│ └── README.md
├── Dockerfile # Container image
├── docker-compose.yml # Multi-container setup
├── Jenkinsfile # Jenkins pipeline
├── .env.example # Environment variables
├── package.json # Dependencies
├── tsconfig.json # TypeScript config
├── vite.config.ts # Vite config
└── README.md # This file
The Docker setup supports teaching Docker as separate topics:
Learn containerization with a simple Dockerfile:
# Build the Docker image
docker build -t landmark-devops:latest .
# Run the container (requires external MySQL)
docker run -p 3000:3000 \
-e DATABASE_URL=mysql://landmark:landmark123@host.docker.internal:3306/landmark_devops \
landmark-devops:latest
# Access the application
# http://localhost:3000Teaching Points:
- Image layers and caching
- Dockerfile syntax
- Container ports and networking
- Environment variables
- Running containers
Learn container orchestration with Docker Compose:
# Start all services (app + database)
docker-compose up
# View running services
docker-compose ps
# View logs
docker-compose logs -f
# Stop services
docker-compose downTeaching Points:
- Service orchestration
- Container networking
- Volume management
- Environment configuration
- Service dependencies
- Multi-container applications
Learn image optimization techniques:
# Check image size
docker images landmark-devops:latest
# View image layers
docker history landmark-devops:latest
# Build with BuildKit for better caching
DOCKER_BUILDKIT=1 docker build -t landmark-devops:latest .Deploy to Kubernetes cluster:
# Apply all Kubernetes manifests
kubectl apply -f k8s/
# Verify deployment
kubectl get pods -n landmark-devops
# Port forward to access
kubectl port-forward svc/landmark-app-lb 3000:80 -n landmark-devops
# Access the application
# http://localhost:3000See k8s/README.md for detailed Kubernetes instructions.
Three CI/CD implementations are provided:
- GitHub Actions (
.github/workflows/ci-cd.yml) - CircleCI (
.circleci/config.yml) - Jenkins (
Jenkinsfile)
See .github/workflows/README.md for detailed pipeline instructions.
Deploy to AWS with Terraform:
cd terraform
terraform init
terraform plan
terraform applySee terraform/README.md for detailed Terraform instructions.
# Find process using port 3000
lsof -i :3000
# Use different port
PORT= 3001# Check if MySQL is running
docker-compose ps
# Start database
docker-compose up db
# Verify connection
mysql -u landmark -p -h localhost landmark_devops# Clear cache and reinstall
rm -rf node_modules npm run-lock.yaml
npm run install
# Check TypeScript errors
npm run check
# Run build again
npm run build# Run tests with verbose output
npm run test -- --reporter=verbose
# Run specific test file
npm run test server/auth.logout.test.ts| Topic | File/Directory | Teaching Focus |
|---|---|---|
| Docker | Dockerfile, docker-compose.yml |
Containerization, image building, multi-container apps |
| Kubernetes | k8s/ |
Orchestration, deployments, services, state management |
| GitHub Actions | .github/workflows/ci-cd.yml |
CI/CD automation, GitHub integration |
| CircleCI | .circleci/config.yml |
CI/CD pipelines, workflow orchestration |
| Jenkins | Jenkinsfile |
Declarative pipelines, job orchestration |
| Terraform | terraform/ |
Infrastructure as code, AWS provisioning |
| Node.js | server/, package.json |
Backend development, Express, tRPC |
| React | client/, vite.config.ts |
Frontend development, component architecture |
| Database | drizzle/schema.ts |
Schema design, ORM, migrations |
- Clone repository
- Install dependencies (
npm run install) - Start development server (
npm run dev) - Explore the application
- Run tests (
npm run test)
- Review Dockerfile
- Build image (
docker build -t landmark-devops:latest .) - Run container (
docker run -p 3000:3000 landmark-devops:latest) - Discuss image layers and caching
- Review docker-compose.yml
- Start services (
docker-compose up) - Explore multi-container networking
- Discuss service dependencies
- Review Kubernetes manifests
- Deploy to cluster (
kubectl apply -f k8s/) - Explore pods, services, deployments
- Discuss state persistence
- Review pipeline configuration
- Trigger pipeline (push to main)
- Monitor build stages
- Discuss automation benefits
- Review Terraform configuration
- Plan deployment (
terraform plan) - Deploy infrastructure (
terraform apply) - Discuss infrastructure automation
MIT
For questions or issues, refer to the specific topic README files:
- Docker:
docker/README.md - Kubernetes:
k8s/README.md - CI/CD:
.github/workflows/README.md - Terraform:
terraform/README.md