How guravamey/reactiveworkshopnew works
Main Components
• Application Entry Point: Represent the main Spring Boot application (ReactiveWorkshopApplication) which bootstraps the whole service.
• Controllers:
• PokemonController: Manages endpoints for fetching Pokémon lists, details, and summaries.
• StreamingController: Handles endpoints that demonstrate real-time reactive streaming (e.g., streaming flux data).
• Service Layer:
• PokemonService: Encapsulates business logic, such as consuming the external Pokémon API client and processing data.
• FluxAndMonoServices: Contains methods that illustrate reactive operations (using Mono and Flux).
• Client Interfaces:
• IPokemonApiClient: Acts as the interface for outbound calls to external services (e.g., https://pokeapi.co), modeling the integration point.
• Data Models:
• Models like PokemonData, PokemonList, PokemonListItem, and PokemonSummary, which represent the data structures exchanged between components.
• Configuration & Properties:
• Multiple properties files (application-development.properties, application-prod.properties, etc.) indicating environment-based configurations.
• Testing Infrastructure:
• Separate test packages and test classes (e.g., ReactiveWorkshopApplicationTests, ReactiveWorkshopControllerTest) to validate the functionality and reactive flows.
Relationships and Interactions
• Additionally, include any dependencies on configuration settings (from application.properties files) that determine the application behavior depending on the environment.
Architectural Patterns and Design Principles
• Use of reactive streams (Flux and Mono) by labeling the interactions between controllers and services as “reactive flow” to underscore asynchronous data propagation.
• If applicable, add a quick mention of the use of Lombok to reduce boilerplate in the model and service classes.
Relevant Technologies, Frameworks, and Libraries
• Java 17 as the runtime environment.
• Maven (with the Maven Wrapper in the repository) for build and dependency management.
• Spring Boot (with Webflux) as the backend framework.
• Lombok for simplifying Java model and service classes.
• External integration with https://pokeapi.co for the Pokémon API data.
• Overall Container: “Reactive Workshop Application (Spring Boot Webflux)” – show it as the outer boundary.
• Within the container, nest the Application Entry Point (ReactiveWorkshopApplication).
• Branch out to show two primary flows:
• HTTP Requests hitting the Controllers (PokemonController and StreamingController).
• Flowers from these controllers to the business logic layer — the services.
• Annotations where required to denote testing and configuration aspects.