A gamified SQL learning platform that helps users master database concepts through interactive challenges in themed environments.
SQL DQN (Deep Query Network) is an interactive educational platform designed to make learning SQL engaging and effective. Users progress through themed challenges while the system adapts to their skill level, presenting appropriate concepts based on mastery.
- Thematic Learning Environments: Choose between Cyberpunk, Fantasy, or Real-World themes
- Progressive Learning Path: System adapts to your mastery level
- Interactive Challenges: Solve SQL puzzles with immediate feedback
- Narrative-Driven Experience: Learn through engaging storylines
- Visual Progress Tracking: Monitor your mastery of different SQL concepts
- Install dependencies:
npm install- Create a
.envfile in the root directory with:
VITE_OPENROUTER_API_KEY=your_openrouter_api_key- Start the server:
npm run start- Open your browser and navigate to
http://localhost:5173
Backend Setup: The application requires a backend server running at
http://localhost:3000. Make sure to set up the companion backend service following its own README instructions.
- Start Game: Click "Set Up Game" on the welcome screen
- Select Theme: Choose between Cyberpunk, Fantasy or Real-World settings
- Select Concepts: Pick SQL concepts you want to practice
- Complete Challenges: Write SQL queries to solve the presented challenges
- Enjoy your journey!
- Basic SELECT and FROM
- Basic WHERE clause
- Pattern matching with LIKE
- Handling NULL values
- ORDER BY clause
- INSERT Statement
- UPDATE Statement
- DELETE Statement
- Basic GROUP BY and HAVING
- Basic JOIN usage (INNER JOIN)
- Frontend: React, TypeScript, Vite
- Styling: Tailwind CSS
- Markdown Rendering: React-Markdown with remark-gfm
- Icons: Lucide React
- API Communication: Fetch API
sql-dqn-frontend/
├── .env # Environment variables
├── .gitignore # Git ignore file
├── index.html # HTML entry point
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
├── src/
│ ├── main.tsx # Application entry point
│ ├── App.tsx # Root application component
│ ├── index.css # Static assets
| ├── types.ts # TypeScript type definitions
│ ├── components/ # React components
│ │ ├── FeedbackAnimations.tsx # Success/error animations
│ │ ├── HistoryPopup.tsx # Query history popup
│ │ ├── LoadingScreen.tsx # Initial loading screen
│ │ ├── MainUI.tsx # Main user interface
│ │ ├── MasteryProgress.tsx # Mastery level visualization
│ │ ├── OutputDisplay.tsx # Query output display
│ │ ├── QueryInputForm.tsx # SQL input form
│ │ ├── SchemaDisplay.tsx # Database schema display
│ │ ├── SetupModal.tsx # Game setup modal
│ │ ├── TaskList.tsx # List of completed tasks
│ │ └── WelcomeScreen.tsx # Welcome screen
│ ├── hooks/ # Custom React hooks
│ │ └── useTypewriter.ts # Typewriter animation hook
│ ├── styles/ # Global styles
│ │ ├── animations.ts # Animation styles
│ └── utils/ # Utility functions
│ ├── constants.ts # Game constants and data
│ ├── formatters.ts # Output formatting utilities
│ ├── llmService.ts # LLM integration service
│ └── queryHelpers.ts # SQL query generation helpers- The application presents themed SQL challenges based on selected concepts
- Users write SQL queries to solve presented challenges
- Queries are sent to the backend for validation
- The system provides immediate feedback on correctness
- User mastery levels are adjusted based on performance
- The system adapts by selecting appropriate next challenges