Kaun Banega Mathpati is an interactive math quiz game that tests your mathematical skills with challenging questions. Built with modern web technologies and production-ready DevOps infrastructure.
- ๐ฎ Interactive math quiz game
- ๐จ Modern UI with TailwindCSS and shadcn/ui
- ๐ Real-time metrics and monitoring
- ๐ณ Docker containerization
- โธ๏ธ Kubernetes-ready deployment
- ๐ Automated CI/CD pipeline
- ๐ Prometheus metrics & Grafana dashboards
- ๐ Security scanning and best practices
# Clone the repository
git clone https://github.com/nakshatra207/Mathpati.git
cd Mathpati
# Install dependencies
npm install
# Start development server
npm run dev
# Open http://localhost:5173
# Setup project
make setup
# Start development
make dev
# Run tests
make test
# Build for production
make build
# Start development environment
make docker-dev
# Or manually
docker-compose -f docker-compose.dev.yml up
# Access at http://localhost:5173
# Start all services (app + monitoring)
make docker-up
# Application: http://localhost:3000
# Grafana: http://localhost:3001
# Prometheus: http://localhost:9091
- Quick Start Guide - Get started in minutes
- Complete DevOps Guide - Comprehensive deployment guide
- Project Status - Current implementation status
- Deployment Summary - Deployment overview
- Monitoring Guide - Monitoring and observability
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- TailwindCSS - Styling
- shadcn/ui - UI components
- React Query - Data fetching
- Docker - Containerization
- Kubernetes - Orchestration
- GitHub Actions - CI/CD
- Prometheus - Metrics
- Grafana - Visualization
- Terraform - Infrastructure as Code
Mathpati/
โโโ .github/workflows/ # CI/CD pipelines
โโโ k8s/ # Kubernetes manifests
โโโ scripts/ # Deployment scripts
โโโ server/ # Metrics server
โโโ src/ # Application source
โโโ terraform/ # Infrastructure as Code
โโโ docker-compose.yml # Production stack
โโโ Dockerfile # Production image
โโโ Makefile # Command shortcuts
โโโ README.md # This file
# Build production images
make docker-build
# Or manually
docker build -t mathpati:latest .
# Start services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
- Kubernetes cluster (EKS, GKE, AKS, or local)
- kubectl configured
- Container images in registry
# Using deployment script
./scripts/deploy.sh production production latest
# Or using make
make k8s-deploy
# Check status
make k8s-status
# View logs
make k8s-logs
The project includes automated CI/CD with GitHub Actions:
- Push to
develop
โ Deploy to staging - Push to
main
โ Deploy to production - Pull Request โ Run tests and security scans
- Tag
v*.*.*
โ Create release
- main-ci-cd.yml - Complete CI/CD pipeline
- docker-publish.yml - Docker image publishing
- pr-check.yml - Pull request validation
- release.yml - Automated releases
- security.yml - Security scanning
- Grafana: http://localhost:3001 (admin/admin)
- Prometheus: http://localhost:9091
- Metrics API: http://localhost:9090/metrics
- HTTP request duration
- Request count by status code
- Active connections
- CPU and memory usage
- Custom application metrics
# Run tests
npm test
# Run tests with coverage
make test-coverage
# Run all CI checks locally
make ci
- โ Container vulnerability scanning (Trivy)
- โ Dependency vulnerability checks
- โ Secret scanning (TruffleHog)
- โ Non-root container user
- โ Network policies
- โ Security contexts
Command | Description |
---|---|
make help |
Show all available commands |
make dev |
Start development server |
make build |
Build for production |
make test |
Run tests |
make docker-up |
Start Docker stack |
make k8s-deploy |
Deploy to Kubernetes |
make ci |
Run CI checks locally |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Vite
- UI components from shadcn/ui
- Styled with TailwindCSS
- Issues: GitHub Issues
- Documentation: Check the docs in this repository
- Discussions: GitHub Discussions
โ Production Ready - Complete DevOps infrastructure with CI/CD, monitoring, and security.
For detailed status, see PROJECT_STATUS.md
Made with โค๏ธ by the Mathpati Team