A full-stack math problem-solving application built as a teaching resource for a lecture series about the principles and main working methods in software quality assurance.
Each branch contains the examples of the topics for each lecture in the series talks.
The application consists of 5 services:
- frontend (React): User interface with pixel art theme
- web-server (Go): RESTful API server
- database (PostgreSQL): Persistent storage
- message-queue (NATS): Event broker
- history-worker (Go): Async event processor
- Docker (>= 20.10)
- Kind (>= 0.20)
- kubectl (>= 1.28)
- Go (>= 1.22) - for running tests locally
- Node.js (>= 18) - for frontend development
- Docker: https://docs.docker.com/get-docker/
- Kind: https://kind.sigs.k8s.io/docs/user/quick-start/#installation
- kubectl: https://kubernetes.io/docs/tasks/tools/
- Go: https://golang.org/doc/install
- Node.js: https://nodejs.org/
git clone <repository-url>
cd MathWizzchmod +x setup-kind.sh
./setup-kind.shThis script will:
- Create a Kind cluster
- Build all Docker images
- Load images into Kind
- Deploy all services to Kubernetes
- Frontend: http://localhost:3000
- API: http://localhost:8080
- Register a new account
- Login with your credentials
- Solve a math problem (e.g., "25+75")
- Check your history to see the solved problem
cd web-server
# Run all tests
ginkgo -r
# Run unit tests only
ginkgo -r --skip-package=*integration*
# Run integration tests only
ginkgo -r --focus-file=*integration*cd history-worker
# Run all tests
ginkgo -r
# Run unit tests only
ginkgo -r --skip-package=*integration*
# Run integration tests only
ginkgo -r --focus-file=*integration*cd frontend
# Run unit and component tests
npm test
# Run E2E tests (requires running backend)
npm run e2e# Web-server
cd web-server
golangci-lint run
# History-worker
cd history-worker
golangci-lint runcd frontend
npm run lintMathWizz/
├── frontend/ # React application
├── web-server/ # Go API server
├── database/ # PostgreSQL configuration
├── message-queue/ # NATS configuration
├── history-worker/ # Go async worker
├── k8s/ # Kubernetes manifests
└── scripts/ # Deployment scripts
# Database
docker build -t mathwizz/database:latest ./database
# Message Queue
docker build -t mathwizz/message-queue:latest ./message-queue
# Web-Server
docker build -t mathwizz/web-server:latest ./web-server
# History-Worker
docker build -t mathwizz/history-worker:latest ./history-worker
# Frontend
docker build -t mathwizz/frontend:latest ./frontend# List all pods
kubectl get pods -n mathwizz
# View logs for a specific pod
kubectl logs -f <pod-name> -n mathwizz
# View web-server logs
kubectl logs -f deployment/web-server -n mathwizz
# View history-worker logs
kubectl logs -f deployment/history-worker -n mathwizz# Describe a pod
kubectl describe pod <pod-name> -n mathwizz
# Get events
kubectl get events -n mathwizz --sort-by='.lastTimestamp'
# Execute commands in a pod
kubectl exec -it <pod-name> -n mathwizz -- /bin/shTo delete the Kind cluster and all resources:
chmod +x teardown-kind.sh
./teardown-kind.shSee TESTING.md for detailed information about the testing approach.
See ARCHITECTURE.md for detailed architecture documentation.
GitHub Actions pipeline runs on every push and pull request:
- Runs all unit and integration tests
- Runs linters for all services
- Builds Docker images
- Reports test coverage
This project is designed to work on:
- Linux (Fedora CSB OS and other distributions)
- macOS (Intel and Apple Silicon)
If ports 3000 or 8080 are already in use, modify the kind-config.yaml port mappings.
Ensure Docker is running and you have built the images:
./build-images.sh
./load-images-to-kind.shCheck pod status and logs:
kubectl get pods -n mathwizz
kubectl describe pod <pod-name> -n mathwizz
kubectl logs <pod-name> -n mathwizzThis is a teaching resource. For improvements or bug fixes, please create a pull request.
This project is for educational purposes.