{"id":27920274,"url":"https://github.com/amxcoding/randomquotes-springboot-react","last_synced_at":"2026-04-11T18:03:45.604Z","repository":{"id":290652516,"uuid":"975170354","full_name":"amxcoding/RandomQuotes-SpringBoot-React","owner":"amxcoding","description":"RandomQuotes is a full-stack quote service demo with a reactive Java backend and React frontend, featuring API integration, caching, user interactions, and Dockerized deployment.","archived":false,"fork":false,"pushed_at":"2025-05-04T23:27:31.000Z","size":242,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T00:26:09.594Z","etag":null,"topics":["caching","containerization","docker","java","postgresql","r2dbc","react","reactive","springboot","typescript","webflux"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amxcoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-29T22:35:55.000Z","updated_at":"2025-05-04T23:27:35.000Z","dependencies_parsed_at":"2025-05-05T00:36:22.768Z","dependency_job_id":null,"html_url":"https://github.com/amxcoding/RandomQuotes-SpringBoot-React","commit_stats":null,"previous_names":["amxcoding/randomquotes","amxcoding/randomquotes-springboot-react"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amxcoding%2FRandomQuotes-SpringBoot-React","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amxcoding%2FRandomQuotes-SpringBoot-React/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amxcoding%2FRandomQuotes-SpringBoot-React/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amxcoding%2FRandomQuotes-SpringBoot-React/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amxcoding","download_url":"https://codeload.github.com/amxcoding/RandomQuotes-SpringBoot-React/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769392,"owners_count":21801375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caching","containerization","docker","java","postgresql","r2dbc","react","reactive","springboot","typescript","webflux"],"created_at":"2025-05-06T20:57:18.466Z","updated_at":"2026-04-11T18:03:45.598Z","avatar_url":"https://github.com/amxcoding.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Randomquotes - backend assignment\n\nThis 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.\n\nThe 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.\n\n![RandomQuote](./assets/notsorandomquote2.png)\n\n---\n\n## 🌟 Features\n\n- ✅ **Random Quote Service**  \n  Returns a new quote on every request from external APIs like [ZenQuotes](https://zenquotes.io/).\n\n- ⚡ **High-Performance Caching**  \n  Responses from external APIs are cached to reduce load time and improve responsiveness.\n\n- 🔁 **Reactive Backend with Spring WebFlux**  \n  Asynchronous, non-blocking architecture using Spring Boot, WebFlux, and R2DBC for a fully reactive stack.\n\n- 🍪 **Anonymous User Tracking**  \n  Users are identified using secure, HttpOnly browser cookies without requiring login.\n\n- ❤️ **\"Like\" Functionality for Quotes**  \n  Users can like quotes, and their preferences are stored in a PostgreSQL database with tracking via cookies.\n\n- 🧩 **Resilient API Aggregation**  \n  Handles API failures gracefully with a fallback mechanism for quote fetching.\n\n- 🧪 **Content Negotiation**  \n  Supports both JSON and XML responses depending on the `Accept` header.\n\n- 🔄 **Real-time Streaming**  \n  A live feed showing recently liked quotes.\n\n---\n\n## 🧰 Tech Stack\n\n- **Backend**: Java 21, Maven, Spring Boot, WebFlux, R2DBC, PostgreSQL\n- **Frontend**: TypeScript, React\n- **DevOps**: Docker, Maven\n- **API Sources**: [ZenQuotes.io](https://zenquotes.io/)\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Java 21\n- Maven\n- Node.js \u0026 npm\n- Docker\n- PostgreSQL\n\n### Local setup\n\n#### Setup the database\n\nIn the **project root folder**, run the following commands:\n\n```bash\ndocker-compose -f java-springboot-backend/docker-compose.backend.yml up -d --build db flyway\n```\n\n#### Run frontend\n\nOpen spa-react-frontend/randomquotes.spa in any supported IDE to run the frontend with:\n\n```bash\n# Install dependencies\nnpm install\n\n# Start the development server\nnpm run dev\n```\n\n#### Run backend\n\n```bash\ncd RandomQuotes-SpringBoot-React/java-springboot-backend\n\n# Install dependencies\nmvn clean install -DskipTests\n```\n\nOpen java-springboot-backend in any supported IDE and start the application to run the backend.\n\n### Run with Docker Compose\n\nIn the **project root folder**, run the following commands:\n\n```bash\ndocker-compose -f java-springboot-backend/docker-compose.backend.yml up -d --build\ndocker-compose -f spa-react-frontend/randomquotes.spa/docker-compose.frontend.yml up -d --build\n```\n\nThis will spin up both the backend and frontend services in detached mode, building fresh images as needed.\nNavigate to http://localhost:5000 to access the frontend.\nThe backend API is available at http://localhost:8080/api/v1/.\n\n---\n\n## 📦 API Endpoints\n\n- `GET /api/v1/quotes/random` — Returns a random quote\n- `POST /api/v1/quotes/{id}/like` — Like a quote\n- `DELETE /api/v1/quotes/{id}/like` — Unlike a quote\n- Supports content negotiation: `Accept: application/json` or `application/xml`\n\n---\n\n## 📝 Notes\n\nThis project was designed to simulate real-world production code with a focus on:\n\n- Clean architecture and modularity\n- Resilience and fault tolerance\n- Modern asynchronous programming patterns\n\n---\n\n## 📬 Feedback\n\nThis project is a demonstration of technical capabilities. Suggestions, pull requests, and constructive feedback are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famxcoding%2Frandomquotes-springboot-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famxcoding%2Frandomquotes-springboot-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famxcoding%2Frandomquotes-springboot-react/lists"}