Skip to content

jhonatademuner/studai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

129 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Studai - AI Powered Quiz Creator

Java Spring Boot PostgreSQL License: MIT

This repository contains the backend service for the Studai project, an AI-driven quiz creation platform. The backend handles core functionalities including user authentication, quiz management, and integration with the studai-assistant microservice for quiz generation.

✨ Key Features

  • JWT Authentication - Secure user management with role-based access control
  • Quiz Management - Create, retrieve, and delete quizzes from various sources
  • Attempt Tracking - Record quiz attempts with scoring and time tracking
  • Database Migrations - Automatic schema management with Flyway
  • API Documentation - Interactive Swagger UI for endpoint exploration

🚀 Technology Stack

  • Java 21 - Core application language
  • Spring Boot 3.3.4 - Application framework
  • PostgreSQL - Primary database
  • Flyway - Database migration management
  • JWT - Stateless authentication
  • Docker - Containerization and deployment

📂 Project Structure

studai/
├── src/
│   ├── main/java/com/studai
│   │   ├── client/             # Microservice communication
│   │   ├── config/             # Security and application configuration
│   │   ├── controller/         # API endpoints
│   │   ├── domain/             # Data models and DTOs
│   │   ├── repository/         # Database access layer
│   │   ├── service/            # Business logic
│   │   └── utils/              # Helper classes and exception handling
│   ├── resources/
│   │   └── db/migration        # Database schema migrations
├── test/                       # Comprehensive test suite
├── Dockerfile                  # Container configuration
├── docker-compose.yml          # Local development setup
└── mvnw                        # Maven wrapper

🛠️ Getting Started

Prerequisites

  • Java 21 JDK
  • Docker and Docker Compose
  • Maven (optional - wrapper included)

Local Setup

1. Clone the repository:

git clone https://github.com/jhonatademuner/studai.git
cd studai

2. Start PostgreSQL database:

docker-compose up -d

3. Build and run the application:

./mvnw spring-boot:run 

The application will be available at http://localhost:5000

Configuration

Application properties can be configured in src/main/resources/application.yml:

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/devdb
    username: devuser
    password: devpassword

assistant:
  base-uri: http://127.0.0.1:8000  # studai-assistant service
  security-key: dev_key

🌐 API Documentation

Interactive API documentation is available at: http://localhost:5000/swagger-ui/index.html

✅ Running Tests

Run all unit and integration tests:

./mvnw test 

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Backend for StudAI, an AI-powered quiz platform. Handles persistence, auth, and connects to a microservice for generating quizzes. Built with Spring Boot, PostgreSQL, and Swagger.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors