CipherSqlStudio is an interactive SQL learning platform where users can practice SQL queries, receive AI-powered hints, and track their progress. The platform executes SQL queries in a secure PostgreSQL sandbox and uses AI to guide students in solving SQL problems.
- Practice SQL queries in a sandbox environment
- Execute SQL queries using PostgreSQL
- AI-powered hints for SQL problems
- Track user progress
- User authentication system
- Structured SQL assignments
- React
- Vite
- SCSS (Sass)
- Axios
- React Router
- Node.js
- Express.js
- Nodemon
- MongoDB (Users, Assignments, UserProgresses)
- PostgreSQL (SQL query execution)
- Gemini API
cipherSqlStudio
│
├── backend
│ ├── src
│ │ ├── config # Database and environment configuration
│ │ ├── controller # Request handling logic
│ │ ├── middleware # Authentication and custom middlewares
│ │ ├── models # MongoDB models
│ │ ├── routes # Express routes
│ │ ├── service # Business logic layer
│ │ ├── utils # Helper functions
│ │ └── app.js # Express app configuration
│ │
│ ├── index.js # Server entry point
│ ├── seedAssignment.js # Script to seed SQL assignments
│ ├── .env.example
│ └── package.json
│
├── frontend
│ ├── public
│ ├── src
│ │ ├── components # Reusable UI components
│ │ ├── routes # Protected route handling and route logic
│ │ ├── screens # Page components
│ │ ├── service # API communication
│ │ ├── styles # SCSS styles
│ │ ├── App.jsx
│ │ └── main.jsx
│ │
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
│
├── docs
└── README.mdgit clone https://github.com/punit-dev/CipherSQLStudio.git
cd CipherSQLStudiocd backend
npm installCreate a .env file using .env.example.
Run backend server:
npm run devThe backend uses Nodemon to automatically restart the server during development.
cd frontend
npm install
npm run devThe frontend runs using Vite development server.
Create a .env file in the backend directory.
Example:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
PG_USER=your_pg_username
PG_HOST=localhost
PG_DB=cipherSqlStudio
PG_PASS=your_pg_password
PG_PORT=5432
GEMINI_API_KEY=your_gemini_api_keyThe system architecture is represented using Data Flow Diagrams:
- DFD Level 0 (Context Diagram) – Shows interaction between the user and the CipherSqlStudio platform.
- DFD Level 1 (Detailed Diagram) – Shows internal modules such as authentication, assignment fetching, SQL execution, hint generation, and progress tracking.
- Difficulty levels for assignments
- Leaderboard system
- Query performance feedback
- More advanced AI guidance
- Admin dashboard for assignment management

