An interactive web-based game to help beginners learn MySQL through hands-on exercises and tutorials.
- 🎮 Interactive SQL query exercises
- 📚 Step-by-step tutorials
- 🎯 Progressive difficulty levels
- 🔄 Real-time query execution
- 💡 Helpful hints and explanations
- Node.js (v14 or higher)
- MySQL Server (v5.7 or higher)
- npm or yarn package manager
mysql-learning-game/
├── src/
│ ├── frontend/ # Frontend assets and components
│ │ ├── css/ # Stylesheets
│ │ ├── js/ # JavaScript modules
│ │ └── index.html # Main HTML file
│ └── backend/ # Backend server and API
│ ├── content/ # Tutorial and level content
│ ├── config/ # Configuration files
│ ├── routes/ # API routes
│ └── controllers/ # Request handlers
├── exercises/ # SQL exercise files
├── node_modules/ # Dependencies (git-ignored)
├── .env.example # Example environment variables
├── .gitignore # Git ignore patterns
├── package.json # Project metadata and dependencies
└── README.md # Project documentation
-
Clone the repository:
git clone <repository-url> cd mysql-learning-game
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Edit .env with your database credentials -
Initialize the database:
# Run the setup script mysql -u your_username -p < exercises/setup.sql
-
Start the server:
npm start
-
Open
http://localhost:3000in your web browser
- Frontend files are in
src/frontend/ - Backend API is in
src/backend/ - Add new tutorials in
src/backend/content/tutorials/ - Add new levels in
src/backend/content/levels/
Create a src/backend/config/database.js file with your MySQL credentials:
module.exports = {
host: 'localhost',
user: 'your_username',
password: 'your_password',
database: 'mysql_learning_game'
};- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Bootstrap for the UI components
- MySQL community for documentation and resources
- Contributors who help improve the game