Skip to content

๐Ÿ๏ธ SQL Survival: An interactive adventure game where you master SQL commands to survive on a mysterious island, find resources, and uncover ancient secrets.

License

Notifications You must be signed in to change notification settings

16Prithvi/sql-survival-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

35 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


SQL Survival Logo

๐ŸŽฎ SQL Survival: The Data Isles

The only way off the island... is a query.

An interactive, story-driven adventure designed to help players master SQL in a fun and immersive way.
Stranded on the mysterious Data Isles, you must write queries to survive, gather resources, and uncover the secrets of the ancients.

Live Demo

React FastAPI MongoDB Tailwind CSS Python


๐Ÿ“– The Lore

"You awaken on the wet sands of the Data Isles โ€” a forgotten land ruled by logic and syntax.
The only tool you possess is an ancient slate glowing with code.
To survive, you must master SQL, uncover the truth of the island, and query your way to freedom."


Highlights

  • ๐Ÿง  Interactive SQL Practice Engine: Real-time query editor with data visualization and live syntax feedback.
  • ๐ŸŽจ Modern UI: Sleek dark interface with Tailwind, animations, and responsive layout.
  • โšก Instant Query Validation: Query results rendered dynamically via SQL.js.
  • ๐Ÿ—บ๏ธ World Map: Unlock new islands and progressive learning zones.
  • ๐Ÿงพ Lessons & Quests: Over 50 guided missions with tiered difficulty.
  • ๐Ÿ’พ Auto Progress Save: Player progress stored locally with resume capability.
  • ๐Ÿงฉ Query Execution Order Visualization: Interactive guide showing how SQL queries are executed step-by-step.

๐Ÿ“ธ Visual Tour

๐Ÿš€ The Adventure Begins

A beautifully animated landing experience introducing the Data Isles world.
Landing Page


๐Ÿงฉ Interactive SQL Practice Interface

A dynamic environment where players execute live SQL queries and view real-time results.
Screenshot 2025-11-28 122423


๐Ÿ—บ๏ธ The World Map

Visual progression system showing player advancement across different regions.
World Map


๐Ÿ’ป The SQL Slate (Mission Log)

The gameplay core โ€” receive tasks, execute SQL commands, and view interactive outputs.
SQL Slate


โœจ Key Features

๐ŸŽฎ Gameplay

  • ๐Ÿ๏ธ 3 Story Zones: Progress from The Beach to The Jungle and finally The Ruins.
  • ๐Ÿงฉ Challenge Missions: Unlockable tasks with increasing complexity.
  • ๐Ÿ’ฌ Real-Time Feedback: Instant query validation and error suggestions.
  • ๐ŸŽ“ Gamified Learning: Earn badges, progress levels, and leaderboard ranks.

๐Ÿ“Š Analytics & Tracking

  • ๐Ÿ“ˆ View global accuracy, query performance, and personal progression metrics.
  • ๐Ÿ•’ Track lesson completion times and learning milestones.

๐ŸŽจ Design & Aesthetics

  • Dark glassmorphism UI with smooth transitions.
  • Built using Framer Motion for immersive animations.
  • Fully responsive layout optimized for mobile and desktop.

๐Ÿ—บ๏ธ Curriculum Overview

Zone Environment Levels Concepts Mastered
๐Ÿ–๏ธ The Beach Beginner Zone 15 SELECT, WHERE, ORDER BY, LIMIT
๐ŸŒฟ The Jungle Intermediate Zone 20 JOIN, GROUP BY, HAVING, Aggregates
๐Ÿ›๏ธ The Ruins Advanced Zone 15 Subqueries, CTEs, Window Functions

๐Ÿ› ๏ธ Tech Stack

Layer Technology
Frontend React 19, Tailwind CSS, Radix UI, SQL.js, Zustand
Backend FastAPI (Python), Uvicorn
Database MongoDB (Local/Atlas)
Styling & Animation Tailwind CSS, Framer Motion
Testing Jest, Pytest
Deployment Vercel (Frontend) & Render/Heroku (Backend)

โš™๏ธ Installation & Setup

Prerequisites

Ensure you have:

  • Node.js โ‰ฅ 16.x
  • Python โ‰ฅ 3.8
  • MongoDB (Local or Cloud Instance)

Steps

# Clone the repository
git clone <your-repo-url>
cd sql-survival

Frontend Setup

cd ../frontend
npm install
cp env_frontend.txt .env
npm start
Environment Variables

Backend Setup

cd backend
python -m venv venv

Windows

venv\Scripts\activate

### macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
cp env_backend.txt .env
uvicorn server:app --reload --host 0.0.0.0 --port 8000

Backend (.env)

MONGODB_URL=mongodb://localhost:27017/sql_survival
SECRET_KEY=your_secret_key_here

Frontend (.env)

REACT_APP_API_URL=http://localhost:8000

๐Ÿงช Testing

# Backend tests
cd backend && pytest

# Frontend tests
cd frontend && npm test

About

๐Ÿ๏ธ SQL Survival: An interactive adventure game where you master SQL commands to survive on a mysterious island, find resources, and uncover ancient secrets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published