
Quote of the Day API
A RESTful quote service built with Micronaut and Java 21, demonstrating Hexagonal Architecture with a clean separation between business logic and infrastructure.
Project Overview
Quote of the Day API is a RESTful service for managing and retrieving inspirational quotes. The project was built to demonstrate Hexagonal Architecture, also known as the Ports and Adapters Pattern, with a strong focus on keeping the domain and business logic independent from technical infrastructure.
The API supports adding quotes, retrieving all quotes, and fetching a random quote through a simple REST interface. The architecture separates incoming requests, application use cases, domain logic, and persistence concerns into clearly defined components.

Technical Challenges
The main focus of the project was designing a clean architecture where the domain core does not depend directly on the web framework or database implementation.
The inbound side exposes REST endpoints through QuoteController and connects them to application use cases such as adding a quote, retrieving all quotes, and retrieving a random quote. On the outbound side, the domain depends on the QuoteRepository port rather than directly interacting with the persistence layer.
This separation makes individual parts of the application easier to replace and test. For example, the persistence adapter can be changed without modifying the core business logic.
The service also includes validation and business rules such as rejecting empty quote text, preventing duplicate quotes, and returning a default quote when no quotes are available.
Project Gallery

Key Highlights
The project demonstrates several backend engineering concepts:
- Hexagonal Architecture using Ports and Adapters
- Domain logic isolated from framework and infrastructure concerns
- Micronaut 4 with Java 21
- REST API endpoints for quote management
- Hibernate JPA for persistence
- H2 in-memory database
- Flyway database migrations
- HikariCP connection pooling
- Input validation and duplicate prevention
- Separate inbound and outbound application ports
- Swappable persistence adapters
- Structured error handling for invalid requests
Quote of the Day APIA clean and modular REST service designed to demonstrate Hexagonal Architecture and separation of business logic from infrastructure.

The project provides a small but complete example of applying Hexagonal Architecture to a Java backend. Its domain-independent core, replaceable adapters, and separation of concerns make it easier to test, maintain, and extend as the system grows.