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.
- 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
- 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
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
- Java 21 JDK
- Docker and Docker Compose
- Maven (optional - wrapper included)
git clone https://github.com/jhonatademuner/studai.git
cd studaidocker-compose up -d./mvnw spring-boot:run The application will be available at http://localhost:5000
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_keyInteractive API documentation is available at:
http://localhost:5000/swagger-ui/index.html
Run all unit and integration tests:
./mvnw test This project is licensed under the MIT License - see the LICENSE file for details.