A modular Micronaut project designed to explore, implement, and master various functionalities and database integrations. Each module is self-contained and focuses on a specific feature, built with Test-Driven Development (TDD) and Behavior-Driven Development (BDD) at its core. This project serves as a learning and demonstration platform for best practices in Micronaut development.
micronaut-box/
├── settings.gradle # Gradle settings for module management
├── build.gradle # Root Gradle configuration
├── README.md # Project documentation
├── Makefile # Simplified build and run commands
├── app-db-h2-connection/ # Module for H2 database integration
├── app-db-postgres-connection/ # Module for PostgreSQL integration
├── app-simple-micronaut-impl/ # Simple Micronaut application module
├── app-(future modules...) # Additional modules for extended functionalities
- Modular Design:
- Each module is independent and focuses on a specific feature or database.
- Enables easy experimentation and integration of new ideas.
- TDD and BDD Development:
- Writing tests first to drive the implementation.
- Ensures reliable, maintainable, and bug-free code.
- Learning-Focused:
- A sandbox for learning Micronaut features, database integrations, and advanced concepts.
- Purpose: Demonstrates integration with H2, an in-memory database.
- Features:
- Quick prototyping and testing with in-memory persistence.
- RESTful APIs for CRUD operations.
- End-to-end tests for each feature.
- Purpose: Demonstrates integration with PostgreSQL.
- Features:
- Production-grade persistence with PostgreSQL.
- Proper connection pooling and configuration.
- RESTful APIs and corresponding test cases.
- Purpose: A simple Micronaut application to showcase core framework capabilities.
- Features:
- Basic functionality using Micronaut's core features.
- Provides a foundation for extending to more complex use cases.
- Enhanced Security Integration:
- Implement JWT-based authentication and advanced authorization mechanisms.
- Reactive Programming Enhancements:
- Add R2DBC for reactive database operations.
- Advanced Functionalities:
- Explore Micronaut Data for advanced ORM features.
- Integrate monitoring and tracing tools.
- Add mutation testing with PIT (Pitest).
- Focus on integrating test automation pipelines.
- Java 17+ (or preferred version).
- Gradle (build tool).
This project uses a Makefile to simplify build, test, run, and other operations. The Makefile provides a consistent interface for managing project tasks across different environments. For Windows users, you can install make
using Chocolatey by running the following command:
choco install make
- Build and Test All Modules:
make all
- Build Modules:
make
- Clean All Build Files:
make clean
- Run the Specific Application: (e.g. h2 application)
make run-h2
- Build and Test a Specific Module:
make run-module
- Testing Run all tests for the module:
make test
- Help
make help
The project leverages OpenAPI to provide interactive API documentation. This makes it easy to explore and test the REST APIs for each module.
- Start the Micronaut application.
- Navigate to the following URL in your browser:
http://localhost:8080/swagger-ui/index.html
- Explore the API endpoints, input parameters, and responses in an interactive interface.
Contributions are welcome! Feel free to fork the repository, create a new module, or enhance the existing ones.
Vishwajeet Kotkar
- A passionate developer focused on mastering Micronaut, Test-Driven Development, and modern software practices.