A Modern, Scalable Quiz Management System Built with Spring Boot
π Quick Start β’ π Documentation β’ π οΈ API Reference β’ π€ Contributing
|
|
|
|
Before you begin, ensure you have the following installed:
- β Java 21 or higher (Download)
- π¬ MySQL 8.0+ (Download)
- π¦ Maven 3.8+ (included via Maven Wrapper)
- π§ Git (Download)
-
Clone the repository
git clone https://github.com/Omar-Mega-Byte/QuizBoot.git cd QuizBoot
-
Set up the database
CREATE DATABASE quizdb; CREATE USER 'quizuser'@'localhost' IDENTIFIED BY 'quizpassword'; GRANT ALL PRIVILEGES ON quizdb.* TO 'quizuser'@'localhost'; FLUSH PRIVILEGES;
-
Configure environment variables (optional)
export MYSQL_HOST=localhost export MYSQL_PORT=3306 export MYSQL_DB=quizdb export MYSQL_USER=quizuser export MYSQL_PASSWORD=quizpassword export SERVER_PORT=8080
-
Run the application
./mvnw spring-boot:run
-
Access the application
- π Application: http://localhost:8080
- π API Documentation: http://localhost:8080/swagger-ui.html
- β€οΈ Health Check: http://localhost:8080/actuator/health
# Build and run with Docker Compose (coming soon)
docker-compose up -d
# Or build manually
docker build -t quizboot .
docker run -p 8080:8080 --env-file .env quizboot
QuizBoot provides a comprehensive RESTful API. Here are some key endpoints:
POST /api/v1/auth/register # User registration
POST /api/v1/auth/login # User login
POST /api/v1/auth/refresh # Token refresh
GET /api/v1/quizzes # List all quizzes
POST /api/v1/quizzes # Create new quiz
GET /api/v1/quizzes/{id} # Get quiz details
PUT /api/v1/quizzes/{id} # Update quiz
DELETE /api/v1/quizzes/{id} # Delete quiz
POST /api/v1/sessions # Start new quiz session
PUT /api/v1/sessions/{id}/answers # Submit answer
POST /api/v1/sessions/{id}/submit # Submit entire session
GET /api/v1/analytics/users/{id} # User analytics
GET /api/v1/analytics/quizzes/{id} # Quiz analytics
GET /api/v1/reports/user-progress # Progress reports
π Full API Documentation: Available at
/swagger-ui.html
when running the application
QuizBoot follows a modern modular architecture using Spring Modulith:
π¦ com.example.quiz_boot
βββ π€ user/ # User Management Module
βββ π quiz/ # Quiz Management Module
βββ π session/ # Session Management Module
βββ π analytics/ # Analytics & Reporting Module
βββ π§ shared/ # Shared Components & Utilities
Category | Technology | Purpose |
---|---|---|
Framework | Spring Boot 3.5.4 | Main application framework |
Security | Spring Security 6.x | Authentication & authorization |
Database | MySQL 8.0+ & Hibernate | Data persistence |
Architecture | Spring Modulith | Modular application design |
Documentation | OpenAPI/Swagger | API documentation |
Monitoring | Spring Actuator | Application monitoring |
π Detailed Architecture: See PROJECT_ARCHITECTURE.md for comprehensive technical documentation
# Compile
./mvnw compile
# Run tests
./mvnw test
# Package
./mvnw package
# Skip tests (for faster builds)
./mvnw package -DskipTests
We maintain high code quality standards:
- β 80%+ test coverage requirement
- π SonarQube integration for code analysis
- π Google Java Style Guide compliance
- π Mandatory code reviews for all changes
Profile | Purpose | Database |
---|---|---|
default |
Local development | MySQL |
test |
Testing | H2 in-memory |
staging |
Pre-production | MySQL cluster |
production |
Production | MySQL with replication |
We welcome contributions! Here's how you can help:
- Use our issue template
- Include detailed steps to reproduce
- Add relevant logs and screenshots
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes following our coding standards
- Add tests for new functionality
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/QuizBoot.git
# Add upstream remote
git remote add upstream https://github.com/Omar-Mega-Byte/QuizBoot.git
# Create development branch
git checkout -b feature/your-feature-name
This project is licensed under the MIT License - see the LICENSE file for details.
- Spring Team for the amazing Spring Boot framework
- Contributors who help make this project better
- Open Source Community for inspiration and support
- π§ Email: omar.tolis2004@gmail.com
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Made with β€οΈ by the QuizBoot Team
β Star this repo if you find it useful! β