Skip to content

nakshatra207/Mathpati

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kaun Banega Mathpati - Math Quiz Challenge

CI/CD Pipeline Docker License

๐Ÿ“‹ Project Overview

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.

โœจ Features

  • ๐ŸŽฎ 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

๐Ÿš€ Quick Start

Option 1: Local Development (Fastest)

# 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

Option 2: Using Make Commands

# Setup project
make setup

# Start development
make dev

# Run tests
make test

# Build for production
make build

Option 3: Docker Development

# Start development environment
make docker-dev

# Or manually
docker-compose -f docker-compose.dev.yml up

# Access at http://localhost:5173

Option 4: Production Docker

# Start all services (app + monitoring)
make docker-up

# Application: http://localhost:3000
# Grafana: http://localhost:3001
# Prometheus: http://localhost:9091

๐Ÿ“š Documentation

๐Ÿ› ๏ธ Technology Stack

Frontend

  • React 19 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool
  • TailwindCSS - Styling
  • shadcn/ui - UI components
  • React Query - Data fetching

DevOps & Infrastructure

  • Docker - Containerization
  • Kubernetes - Orchestration
  • GitHub Actions - CI/CD
  • Prometheus - Metrics
  • Grafana - Visualization
  • Terraform - Infrastructure as Code

๐Ÿ—๏ธ Project Structure

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

๐Ÿณ Docker Deployment

Build Images

# Build production images
make docker-build

# Or manually
docker build -t mathpati:latest .

Run with Docker Compose

# Start services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

โ˜ธ๏ธ Kubernetes Deployment

Prerequisites

  • Kubernetes cluster (EKS, GKE, AKS, or local)
  • kubectl configured
  • Container images in registry

Deploy

# 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

๐Ÿ”„ CI/CD Pipeline

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

Workflows

  1. main-ci-cd.yml - Complete CI/CD pipeline
  2. docker-publish.yml - Docker image publishing
  3. pr-check.yml - Pull request validation
  4. release.yml - Automated releases
  5. security.yml - Security scanning

๐Ÿ“Š Monitoring

Access Dashboards

Available Metrics

  • HTTP request duration
  • Request count by status code
  • Active connections
  • CPU and memory usage
  • Custom application metrics

๐Ÿงช Testing

# Run tests
npm test

# Run tests with coverage
make test-coverage

# Run all CI checks locally
make ci

๐Ÿ”’ Security

  • โœ… Container vulnerability scanning (Trivy)
  • โœ… Dependency vulnerability checks
  • โœ… Secret scanning (TruffleHog)
  • โœ… Non-root container user
  • โœ… Network policies
  • โœ… Security contexts

๐Ÿ“ฆ Available Commands

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

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support

๐ŸŽฏ Project Status

โœ… Production Ready - Complete DevOps infrastructure with CI/CD, monitoring, and security.

For detailed status, see PROJECT_STATUS.md


Made with โค๏ธ by the Mathpati Team

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published