Skip to content

Repository files navigation

DataPilot v2 🚀

A Modern SQL Learning Platform for Students

DataPilot v2 is a web-based SQL learning environment that provides each student with an isolated SQLite database for safe, independent practice. Built to solve the pain points of shared database systems in educational settings.

✨ Features

Core Functionality

  • 🔐 User Authentication - Secure JWT-based authentication with bcrypt password hashing
  • 🗄️ Isolated Databases - Each user gets their own SQLite database with sample data
  • 💻 SQL Editor - Monaco editor with syntax highlighting and autocompletion
  • ⚡ Query Execution - Fast query execution with 10-second timeout protection
  • 📊 Results Display - Clean table view of query results with success/error indicators
  • 📜 Query History - Automatic tracking of all executed queries with timestamps
  • 🔄 Database Reset - One-click reset to restore sample data
  • 💾 Database Download - Export your database as SQLite file
  • 🏗️ Schema Viewer - Quick view of all tables and column counts

Sample Database

Each user starts with a pre-populated database containing:

  • students table (3 sample students)
  • courses table (3 sample courses)
  • enrollments table (4 sample enrollments)

Perfect for practicing:

  • Basic SELECT queries
  • Joins (INNER, LEFT, RIGHT)
  • Aggregations (COUNT, AVG, SUM)
  • Filtering and sorting
  • Subqueries

🛠️ Technology Stack

Backend

  • Django - Modern Python web framework
  • Motor - Async MongoDB driver
  • aiosqlite - Async SQLite operations
  • JWT - Token-based authentication
  • Bcrypt - Password hashing

Frontend

  • React 19 - UI framework
  • Monaco Editor - Code editor
  • Shadcn/UI - Component library
  • Tailwind CSS - Styling
  • Axios - HTTP client
  • Sonner - Toast notifications

Database

  • MongoDB - User data and query history
  • SQLite - Individual user databases

🎯 Use Cases

For Students

  • Practice SQL queries in a safe environment
  • Learn from query history
  • Experiment without fear of breaking shared databases
  • Download database for offline practice

For Instructors

  • Assign SQL exercises
  • Monitor student progress through query history
  • Provide isolated environments for exams
  • Easy setup for entire class

For Self-Learners

  • Follow SQL tutorials with real data
  • Test query variations
  • Track learning progress
  • Build portfolio of SQL skills

🔐 Security Features

  • Database Isolation - Each user has separate SQLite file
  • Query Timeout - 10-second limit prevents infinite loops
  • JWT Authentication - Secure token-based auth
  • Password Hashing - Bcrypt with automatic salt
  • CORS Protection - Configured for specific origins

📊 API Endpoints

Authentication

  • POST /v2/auth/register - Create account
  • POST /v2/auth/login - Login
  • GET /v2/auth/me - Get user info

SQL Operations

  • POST /v2/sql/execute - Execute query
  • GET /v2/sql/history - Get query history
  • DELETE /v2/sql/history - Clear history

Database Management

  • POST /v2/db/reset - Reset database
  • GET /v2/db/download - Download database
  • GET /v2/db/schema - Get schema info

Made with ❤️ for students learning SQL

About

DataPilot is a web application developed using the Django web framework. It provides users with a simple web-based interface to execute SQL queries and view the results. The application includes user authentication, and user-specific database assignment to ensure a secure and personalized experience.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages