Skip to content

Latest commit

 

History

197 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Snake Game with Leaderboard

Play Now Vue.js FastAPI License: MIT

A modern take on the classic snake game with real-time competitive features! Challenge yourself and compete with players worldwide on our global leaderboard.

✨ Features

  • 🎮 Classic snake gameplay with modern controls and smooth animations
  • 🏆 Real-time global leaderboard with live score updates
  • 📊 Personal best tracking and performance analytics
  • 📱 Fully responsive design optimized for desktop
  • 🔒 Advanced anti-cheat system with request validation and replay protection
  • 🤫 Hidden auto-play cheat for those who can find it!

🛠️ Tech Stack

Frontend

  • Vue.js 3 - Progressive JavaScript Framework
  • Vite - Next Generation Frontend Tooling
  • Axios - HTTP Client
  • Modern responsive UI design

Backend

  • FastAPI - Modern Python Web Framework
  • SQLAlchemy - SQL Toolkit and ORM
  • Pydantic - Data Validation
  • SSE (Server-Sent Events) for real-time updates

🚀 Getting Started

Frontend Development

cd frontend
npm install
npm run dev    # Start development server
npm run build  # Build for production
npm test       # Run unit tests

Backend Development

cd backend
uv sync
sudo mkdir -p /data && sudo touch /data/score.db  # Create database file
uv run uvicorn main:app --host 0.0.0.0 --port 8000  # Start development server

🐳 Docker Deployment

The backend can be deployed using Docker:

# Create data directory
mkdir -p /mnt/snake-game

# Start the service
docker-compose up -d

The service includes:

  • 🔄 Automatic container health checks
  • 💾 Persistent data storage
  • 🔄 Automatic image updates

📦 Deployment

  • Frontend: Automatically deployed to GitHub Pages on push to main branch
  • Backend: Deployed via Docker with automatic health checks and updates

📄 License

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

🤝 Contributing

Contributions are welcome! Feel free to open issues and pull requests.

About

A classic snake game with a competitive twist! Climb the ranks and compete with others.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages