Skip to content

soumyaR5/ai-sql-tutor-using-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

AI Powered SQL Tutor Using Java

An intelligent web-based SQL learning platform built with Java and Spring Boot that helps users practice SQL queries, get AI-powered explanations, and track query history.

Features

  • AI-powered SQL tutoring and explanations using Groq API
  • User login interface
  • Execute SQL queries interactively
  • View query results in a structured format
  • Query history tracking
  • Clean web UI with HTML, CSS, and JavaScript
  • Spring Boot backend with MVC architecture
  • Database schema initialization using SQL scripts

Tech Stack

Backend

  • Java
  • Spring Boot
  • Spring MVC
  • Spring Data JPA
  • Maven

Frontend

  • HTML
  • CSS
  • JavaScript
  • Thymeleaf

Database

  • SQL database (configured via application.properties)

AI Integration

  • Groq API

Project Structure

src/main/java/com/sqltutor/
├── ai/                 # AI tutor service
├── config/             # Security and app config
├── controller/         # Controllers
├── model/              # Entity classes
├── repository/         # JPA repositories
├── service/            # Business logic
└── SqlTutorAIApplication.java

src/main/resources/
├── static/             # CSS and JS files
├── templates/          # HTML pages
├── schema.sql          # Database schema
└── application.properties

Setup Instructions

1. Clone the repository

git clone <your-repo-url>
cd "AI Powered SQL Tutor Using Java"

2. Configure environment variables

Set your Groq API key as an environment variable:

GROQ_API_KEY=your_api_key

3. Update application.properties

Configure:

  • database URL
  • username
  • password
  • Groq API key placeholder

Example:

groq.api.key=${GROQ_API_KEY}

4. Run the project

mvn spring-boot:run

5. Open in browser

http://localhost:8080

Screens

  • Login Page
  • SQL Tutor Chat Interface
  • Query History Page

Use Cases

  • SQL learning for students
  • Query debugging assistance
  • Practice database concepts
  • AI-assisted tutoring

Security Note

Do not commit:

  • application.properties with secrets
  • API keys
  • target/ folder

Use .gitignore to exclude sensitive and generated files.

Future Improvements

  • Add user authentication with roles
  • Support multiple databases
  • Add dashboard analytics
  • Improve AI prompt context
  • Add export/download history

Author

Soumya Ramchandran

About

An intelligent web-based SQL learning platform built with Java and Spring Boot that helps users practice SQL queries, get AI-powered explanations, and track query history.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors