A modern RESTful Todo application built with Quarkus, following best practices in software architecture including layered design, proper separation of concerns, and comprehensive testing.
This application demonstrates a well-structured Quarkus application with:
- Layered architecture (resource, service, repository, entity, DTO layers)
- RESTful API patterns with proper validation
- Reactive programming with Quarkus
- Integration with PostgreSQL database
- Comprehensive test coverage
This application could be enhanced with Model Context Protocol (MCP) servers to extend its capabilities and enable AI assistants to interact with various services directly.
- GitHub MCP Server
- Repository management and file operations
- Pull request and issue handling
- Issues creation and more
Find more MCP servers and resources at:
- MCP.so - The official directory of MCP servers
- MCPServers.net - Comprehensive MCP server navigation platform
- GitHub MCP Servers Repository - Collection of reference implementations
GitHub Copilot in VS Code provides several ways to reference code and context in your prompts using hash (#) commands.
-
#file: Reference specific files in your workspace
Explain the validation in #file:src/main/java/io/avios/entity/Todo.java -
#selection: Reference your currently selected code
Generate a test for this method: #selection -
#editor: Reference code in the active editor
Refactor this: #editor -
#terminalOutput: Reference output from the terminal
Explain this error: #terminalOutput
-
#websearch: Search the web for current information
#websearch Quarkus best practices for validation -
#fetch: Fetch and analyze content from a specific URL
#fetch https://quarkus.io/guides/validation
-
Writing Tests First:
/testsThis slash command generates tests for methods in your editor
-
Setting Up Test Framework:
/setupTestsThis slash command helps configure a testing framework for your project
-
Implementing Features:
Implement the TodoService method to pass this test: #selection -
Researching Implementation Methods:
#websearch efficient SQL query for filtering todos by multiple criteria in Quarkus -
Checking Documentation:
#fetch https://quarkus.io/guides/hibernate-orm-panache
To implement a "search todos by keyword" feature:
-
Research First:
#websearch PostgreSQL text search with Quarkus Panache -
Check Documentation:
#fetch https://quarkus.io/guides/hibernate-orm-panache#query-methods -
Create Test: Use the
/testscommand to generate tests for your search feature -
Implement Feature:
Implement the search method in TodoService based on this test: #selection -
Add Endpoint:
Add a REST endpoint in TodoResource for this search feature: #selection -
Document the API:
Update the OpenAPI documentation for the new search endpoint: #selection -
Learn Best Practices:
#websearch RESTful API pagination best practices with Quarkus
You can run your application in dev mode that enables live coding using:
./mvnw quarkus:devNOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
The application can be packaged using:
./mvnw packageIt produces the quarkus-run.jar file in the target/quarkus-app/ directory.
Be aware that it's not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
./mvnw package -Dquarkus.package.jar.type=uber-jarThe application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar.
Run the tests using:
./mvnw testThe application uses TestContainers for integration tests, ensuring tests run against a real PostgreSQL database.
When running in dev mode, access the Swagger UI at:
http://localhost:8080/q/swagger-ui/
- Hibernate ORM with Panache (guide): Simplify your persistence code for Hibernate ORM via the active record or the repository pattern
- RESTEasy Reactive (guide): A Jakarta REST implementation utilizing build time processing and Vert.x.
- JDBC Driver - PostgreSQL (guide): Connect to the PostgreSQL database via JDBC
- GitHub Copilot (documentation): AI pair programming tool