A professional Quarkus-based Java backend project to study and master modern backend development concepts with Quarkus.
- Features
- Project Structure
- Technologies Used
- Getting Started
- API Documentation
- Testing
- Contributing
- License
- RESTful API implementation
- Dependency Injection with CDI
- Database integration with Hibernate ORM and Panache
- Exception handling and custom error responses
- Unit and integration testing
- Docker support for containerization
- CI/CD integration with GitHub Actions
The project is organized as follows:
master-quarkus/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── example/
│ │ │ ├── config/ # Configuration classes
│ │ │ ├── controller/ # REST endpoints
│ │ │ ├── service/ # Business logic
│ │ │ ├── repository/ # Data access layer
│ │ │ ├── model/ # Entity classes (e.g., JPA, DTOs)
│ │ │ ├── exception/ # Custom exceptions
│ │ │ ├── filter/ # Filters (e.g., JAX-RS filters)
│ │ │ ├── util/ # Utility classes
│ │ │ └── Application.java # Main application class
│ │ └── resources/
│ │ ├── application.properties # Configuration properties
│ │ ├── META-INF/
│ │ │ └── resources/
│ │ │ └── index.html # Optional: Static frontend
│ │ └── db/ # Database migration scripts (e.g., Flyway)
│ └── test/
│ └── java/
│ └── com/
│ └── example/
│ ├── controller/ # Tests for REST endpoints
│ ├── service/ # Tests for business logic
│ └── repository/ # Tests for data access layer
├── .github/ # GitHub-specific files (e.g., workflows)
│ └── workflows/
│ └── ci.yml # CI/CD pipeline
├── .gitignore # Git ignore rules
├── README.md # Project documentation
├── pom.xml # Maven build configuration
└── Dockerfile # Docker configuration
- Quarkus: Supersonic Subatomic Java framework
- Java: Primary programming language
- Maven: Build automation tool
- Hibernate ORM: Object-relational mapping
- RESTEasy: JAX-RS implementation for RESTful APIs
- Docker: Containerization
- GitHub Actions: CI/CD pipeline
- Flyway: Database migrations
- Java 17 or higher
- Maven 3.8.x or higher
- Docker (optional)
- Clone the repository:
git clone https://github.com/jawherr/master-quarkus.git
- Navigate to the project directory:
cd master-quarkus
- Build the project:
mvn clean install
- Run the application in development mode:
mvn quarkus:dev
- Run the application in production mode:
mvn quarkus:build java -jar target/quarkus-app/quarkus-run.jar
- Run with Docker:
docker build -t master-quarkus . docker run -p 8080:8080 master-quarkus
- Swagger UI: http://localhost:8080/q/swagger-ui
- OpenAPI Schema: http://localhost:8080/q/openapi
- Run unit tests:
mvn test
- Run integration tests:
mvn verify
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.