SQL Noir 🔍
➡️ Play the game online at sqlnoir.com
Step into the shoes of a real detective and solve crimes using SQL! SQL Noir is an interactive mystery-solving game where you crack cases by writing SQL queries.
Localizations
SQLNoir is available in:
- English — original
- Português (Brasil) — community contribution
- 简体中文 (Simplified Chinese) — adapted and culturally localized by
About
Welcome to SQL Noir, where you're a data detective solving criminal cases through the power of SQL. Each case file presents you with a unique crime scenario and a database full of evidence. Your mission is to:
- Uncover suspicious patterns in the data
- Track down missing records
- Connect the dots between suspects
- Expose fraudulent transactions
- Piece together the evidence using SQL
Getting Started
Prerequisite: Node.js 18.17+ (Next.js requirement).
- Clone this repository
- Install dependencies:
npm install
- Go to Supabase and create a new project
- Copy the generated
anon public keyandProject URLfrom the project - Create a
.env.localfile at the root of the project and set the following environment variables:
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
(Legacy VITE_ variables are still read, but using NEXT_PUBLIC_ is recommended.)
- Install Supabase CLI:
- Login to Supabase:
supabase login
- Link your project ( You need to be in the root of the project to run this command ):
supabase link
- Select the project you just created when prompted
- Run database migrations:
supabase db push
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000
Case Files
Each case in SQL Noir is a unique crime that needs solving. Cases range from simple thefts to complex murders, organized by difficulty level. Put your SQL skills to the test and climb the ranks from rookie to master detective.
Join the Detective Agency
We welcome new detectives! Whether you want to:
- Submit new cases for others to solve
- Improve existing investigations
- Fix bugs in the system
- Enhance the detective interface
- Improve documentation