This is a full-stack web application that demonstrates a production-style quote service. It was built as part of a coding assignment to showcase software engineering skills across backend and frontend development, API integration, caching, reactive programming, streams and containerization.
The app fetches random inspirational quotes from external APIs and exposes them through a RESTful interface, with support for both JSON and XML responses. A modern React frontend displays the data to the user, and the application is packaged using Docker for seamless deployment.
-
✅ Random Quote Service
Returns a new quote on every request from external APIs like ZenQuotes. -
⚡ High-Performance Caching
Responses from external APIs are cached to reduce load time and improve responsiveness. -
🔁 Reactive Backend with Spring WebFlux
Asynchronous, non-blocking architecture using Spring Boot, WebFlux, and R2DBC for a fully reactive stack. -
🍪 Anonymous User Tracking
Users are identified using secure, HttpOnly browser cookies without requiring login. -
❤️ "Like" Functionality for Quotes
Users can like quotes, and their preferences are stored in a PostgreSQL database with tracking via cookies. -
🧩 Resilient API Aggregation
Handles API failures gracefully with a fallback mechanism for quote fetching. -
🧪 Content Negotiation
Supports both JSON and XML responses depending on theAcceptheader. -
🔄 Real-time Streaming
A live feed showing recently liked quotes.
- Backend: Java 21, Maven, Spring Boot, WebFlux, R2DBC, PostgreSQL
- Frontend: TypeScript, React
- DevOps: Docker, Maven
- API Sources: ZenQuotes.io
- Java 21
- Maven
- Node.js & npm
- Docker
- PostgreSQL
In the project root folder, run the following commands:
docker-compose -f java-springboot-backend/docker-compose.backend.yml up -d --build db flywayOpen spa-react-frontend/randomquotes.spa in any supported IDE to run the frontend with:
# Install dependencies
npm install
# Start the development server
npm run devcd RandomQuotes-SpringBoot-React/java-springboot-backend
# Install dependencies
mvn clean install -DskipTestsOpen java-springboot-backend in any supported IDE and start the application to run the backend.
In the project root folder, run the following commands:
docker-compose -f java-springboot-backend/docker-compose.backend.yml up -d --build
docker-compose -f spa-react-frontend/randomquotes.spa/docker-compose.frontend.yml up -d --buildThis will spin up both the backend and frontend services in detached mode, building fresh images as needed. Navigate to http://localhost:5000 to access the frontend. The backend API is available at http://localhost:8080/api/v1/.
GET /api/v1/quotes/random— Returns a random quotePOST /api/v1/quotes/{id}/like— Like a quoteDELETE /api/v1/quotes/{id}/like— Unlike a quote- Supports content negotiation:
Accept: application/jsonorapplication/xml
This project was designed to simulate real-world production code with a focus on:
- Clean architecture and modularity
- Resilience and fault tolerance
- Modern asynchronous programming patterns
This project is a demonstration of technical capabilities. Suggestions, pull requests, and constructive feedback are welcome!
