{"id":16618068,"url":"https://github.com/gtiwari333/spring-boot-keycloak-angular-quote-app","last_synced_at":"2025-03-21T14:31:30.671Z","repository":{"id":38459745,"uuid":"143665149","full_name":"gtiwari333/spring-boot-keycloak-angular-quote-app","owner":"gtiwari333","description":"Spring Boot + Keycloak Backend / Angular Web App","archived":false,"fork":false,"pushed_at":"2023-03-04T16:28:27.000Z","size":7567,"stargazers_count":5,"open_issues_count":27,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T02:12:16.263Z","etag":null,"topics":["angular","heroku","java","jsoup","keycloak","spring-boot","web-crawler","web-scraper"],"latest_commit_sha":null,"homepage":"http://ganeshtiwaridotcomdotnp.blogspot.com/","language":"TypeScript","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/gtiwari333.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}},"created_at":"2018-08-06T02:15:03.000Z","updated_at":"2023-01-03T22:42:53.000Z","dependencies_parsed_at":"2024-10-28T10:36:58.405Z","dependency_job_id":"c5dec776-2019-4331-abb0-6f0d5a3c19db","html_url":"https://github.com/gtiwari333/spring-boot-keycloak-angular-quote-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtiwari333%2Fspring-boot-keycloak-angular-quote-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtiwari333%2Fspring-boot-keycloak-angular-quote-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtiwari333%2Fspring-boot-keycloak-angular-quote-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtiwari333%2Fspring-boot-keycloak-angular-quote-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gtiwari333","download_url":"https://codeload.github.com/gtiwari333/spring-boot-keycloak-angular-quote-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244815199,"owners_count":20514912,"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":["angular","heroku","java","jsoup","keycloak","spring-boot","web-crawler","web-scraper"],"created_at":"2024-10-12T02:19:00.983Z","updated_at":"2025-03-21T14:31:30.260Z","avatar_url":"https://github.com/gtiwari333.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot REST API + Keycloak and Angular Web App\n\n#### Web Scrapping using JSoup blog: https://ganeshtiwaridotcomdotnp.blogspot.com/2018/12/web-scrapping-in-java-using-jsoup.html\n\n## Overview\n- A sample app to demonstrate Spring Boot - Angular Web App\n- The server scraps the websites (uses JSoup) to read Quotes and store into db.\n    - see `WebScraper` interface\n    - see also `GoodReadsScrapper`\n- The client (web app) has option to subscribe to receive random quotes daily\n- The logged in user can manage the quotes, view all    \n- The client (mobile app in branch `mobile-ionic-app`) also pulls and displays the quotes\n\n# Keycloak Setup\n- Run using docker\n    - $cd _config\n    - $docker-compose up\n    - note that two users will be already loaded from realm-export.json\n        - username/passwords are: user1/pass, user2/pass\n- Or run manually:\n    - Create a realm named 'quote-app'\n    - Manually create users with role = 'user'\n\n# How to run Locally?\n- Start Server : \n    - Import project into your IDE and run QuoteApplication inside server module\n    - OR navigate to server module and run 'mvnw or ./mvnw'. The default goal is spring-boot:run which starts the app automatically\n- Start client : Navigate to web module and run  'npm install' for one time to install dependencies and then `npm start` afterwards to run the ap\n- Start keycloak docker. Run ``docker run -p 8082:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin quay.io/keycloak/keycloak:15.0.2``\n\n- Open http://localhost:4200\n\n### Server: Spring Boot\n- Uses JSoup to parse the quote websites and stores into H2 database at startup\n- Quotes can be retrieved by REST apis `HOST/quotes` \n- Deploy to Heroku \n- Did below updates for Heroku. Since its a multi module Maven app: \n    - Added file: Procfile `web: java -jar server/target/server-0.0.1-SNAPSHOT.jar -Dserver.port=$PORT`\n    - Added server.port entry on application.yml   ` server: port: ${PORT:8080}`\n\n\n# Angular Web App\n- Install Dependencies: `npm install`\n- Start locally:  `npm start`.\n- Proxy is configured to handle cors request. Review 'start' scripts at  `web/package.json` \n- Prod build : `ng build --prod`\n- Run in production: using express/node : `node server.js`\n- Note the following dependencies\n\n```\n    \"cors\": \"^2.8.5\",\n    \"express-http-proxy\": \"^1.6.0\",\n    \"port\": \"^0.8.1\",\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtiwari333%2Fspring-boot-keycloak-angular-quote-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgtiwari333%2Fspring-boot-keycloak-angular-quote-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtiwari333%2Fspring-boot-keycloak-angular-quote-app/lists"}