Willful Waste - Quick Reference Card
π Quick Start (30 seconds)
# Run the automated setup
./WILLFUL_WASTE_QUICKSTART.sh
# Open in browser
open http://localhost:3000
# Start bot (optional)
docker-compose --profile bot up -d
# Start everything
docker-compose up -d
# Start with bot
docker-compose --profile bot up -d
# View logs
docker-compose logs -f
# Stop everything
docker-compose down
# Rebuild services
docker-compose up -d --build
# Deploy everything
./kubernetes/scripts/k3d-up.sh
# Port forward website
kubectl port-forward -n apollo-dash0-demo svc/willful-waste-website 3000:80
# View logs
kubectl logs -f deployment/willful-waste-website -n apollo-dash0-demo
# Scale bots
kubectl scale deployment willful-waste-bot --replicas=5 -n apollo-dash0-demo
# Website
cd website
npm install
npm run dev
# Bot
cd website-bot
npm install
npm start
# Light Load (dev/testing)
CONCURRENT_BOTS = 1
BOT_INTERVAL = 15000
SESSION_DURATION = 300000
# Medium Load (standard testing)
CONCURRENT_BOTS = 3
BOT_INTERVAL = 10000
SESSION_DURATION = 600000
# Heavy Load (stress testing)
CONCURRENT_BOTS = 10
BOT_INTERVAL = 2000
SESSION_DURATION = 1800000
Dash0 Dashboard : https://app.dash0.com
Dataset : Check .env for DASH0_DATASET value
Services to monitor :
willful-waste-website (RUM metrics)
apollo-router (request rate, latency)
apollo-dash0-demo (infrastructure)
website/ # React frontend
βββ src/ # Source code
βββ Dockerfile # Docker image
βββ README.md # Detailed docs
website-bot/ # Traffic bot
βββ bot.js # Main bot code
βββ Dockerfile # Docker image
βββ README.md # Detailed docs
kubernetes/base/
βββ website.yaml # K8s deployment
βββ website-bot.yaml # K8s deployment
βββ kustomization.yaml # K8s manifest
docker-compose.yaml # Compose config
WILLFUL_WASTE_*.md # Documentation
Website shows "Error loading products"
# Check GraphQL endpoint
curl http://localhost:4000/graphql
# Check router logs
docker-compose logs router
# Check bot logs
docker-compose logs willful-waste-bot
# Verify website is accessible
curl http://localhost:3000
# Reduce concurrent bots
# Edit docker-compose.yaml or .env
CONCURRENT_BOTS=1
docker-compose up -d willful-waste-bot
Kubernetes pods not starting
# Check pod status
kubectl get pods -n apollo-dash0-demo
# View pod events
kubectl describe pod < pod-name> -n apollo-dash0-demo
# Check logs
kubectl logs < pod-name> -n apollo-dash0-demo
BOT_INTERVAL = 20000 # 20 second delays
CONCURRENT_BOTS = 1 # Single bot
SESSION_DURATION = 300000 # 5 minute sessions
BOT_INTERVAL = 1000 # 1 second delays
CONCURRENT_BOTS = 10 # 10 concurrent bots
SESSION_DURATION = 1800000 # 30 minute sessions
Use Kubernetes (better scaling)
Use bot profile: --profile bot
Monitor in Dash0
Start with 2-3 bots, increase gradually
π GraphQL Query Examples
query {
products {
id name price category inStock
}
}
Get Product with Inventory
query {
products {
id name price
inventory {
quantity warehouse estimatedDelivery
}
}
}
query {
topProducts (limit : 5 ) {
id name price category
}
}
π οΈ Environment Variables
VITE_GRAPHQL_URL = http://localhost:4000/graphql
VITE_DASH0_API_TOKEN = auth_xxxxx
VITE_ENVIRONMENT = demo
WEBSITE_URL = http://localhost:3000
GRAPHQL_URL = http://localhost:4000/graphql
BOT_INTERVAL = 10000
SESSION_DURATION = 300000
CONCURRENT_BOTS = 2
HEADLESS = true
DASH0_AUTH_TOKEN = auth_xxxxx
DASH0_DATASET = apollo-router-demo
DASH0_METRICS_ENDPOINT = https://ingress.us-west-2.aws.dash0.com/v1/metrics
DASH0_TRACES_ENDPOINT = https://ingress.us-west-2.aws.dash0.com/v1/traces
Action
Time
Docker Compose startup
30-60s
Website load
5-10s
GraphQL query
50-200ms
Page render
100-500ms
Kubernetes deployment
2-5 minutes
Bot setup
10-20s
# Stop Docker Compose
docker-compose down
# Kill all bots
docker-compose kill willful-waste-bot
# Reset everything
docker-compose down -v
docker-compose up -d
# Kubernetes shutdown
kubectl delete namespace apollo-dash0-demo
Use --profile bot to include bot in Docker Compose
Monitor in Dash0 while bot runs for real-time metrics
Scale slowly - start with 1-2 bots, increase gradually
Check logs early - helps with troubleshooting
Use Kubernetes for production and heavy load testing
Set realistic intervals - don't overwhelm with 0 delay
Monitor resource usage - watch Docker stats or kubectl top pods
All data is demo/test data (no real products)
Bot uses public GraphQL API (no auth needed)
RUM data sent securely to Dash0
Services automatically restart on failure
Changes to .env require service restart
Last Updated : November 2024
Version : 1.0
Status : Production Ready