{"id":18457611,"url":"https://github.com/amwebexpert/hangman-backend-api","last_synced_at":"2025-07-07T15:38:56.913Z","repository":{"id":53566747,"uuid":"348342504","full_name":"amwebexpert/hangman-backend-api","owner":"amwebexpert","description":"Hangman REST API - Spring Boot implementation","archived":false,"fork":false,"pushed_at":"2021-03-30T11:29:47.000Z","size":705,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T15:16:16.122Z","etag":null,"topics":[],"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/amwebexpert.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}},"created_at":"2021-03-16T12:39:57.000Z","updated_at":"2021-04-14T11:29:40.000Z","dependencies_parsed_at":"2022-09-21T11:50:29.672Z","dependency_job_id":null,"html_url":"https://github.com/amwebexpert/hangman-backend-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fhangman-backend-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fhangman-backend-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fhangman-backend-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fhangman-backend-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amwebexpert","download_url":"https://codeload.github.com/amwebexpert/hangman-backend-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338245,"owners_count":21414150,"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":[],"created_at":"2024-11-06T08:15:02.627Z","updated_at":"2025-04-22T23:19:59.990Z","avatar_url":"https://github.com/amwebexpert.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hangman backend API\n\nHangman application backend REST API.\n\n## Configuration and instructions\n\n### Setup Security for authenticating user against GitHub or Facebook\n\nYou must create your Github and/or Facebook clientId and clientSecret. Any users may use the link to authenticate (available inside server welcome page `index.html`).\nNext you have to define these environment variables before deploying or before starting locally:\n\n    export ENV_VAR_WEB_APP_BASE_URL=\u003chere your home page URL used by OAuth2 protocol\u003e\n\n    export ENV_VAR_CLIENT_ID_GITHUB=\u003chere your client id\u003e\n    export ENV_VAR_CLIENT_SECRET_GITHUB=\u003chere your client secret\u003e\n\n    export ENV_VAR_CLIENT_ID_FACEBOOK=\u003chere your client id\u003e\n    export ENV_VAR_CLIENT_SECRET_FACEBOOK=\u003chere your client secret\u003e\n\n### Start locally\n\nStarts the server locally and listen on port `8080`. \n\n    ./gradlew bootRun\n\nThen open the browser at http://localhost:8080 which will display the welcome page (`index.html`).\n\n### Deploy on GCP\n\nThe following script builds the war and deploy it to GAE by calling `./gradlew appengineDeploy`:\n\n    ./deploy-to-Google-Cloud-Platform.sh\n\nOverride the project name under `build.gradle` (see `appengine.deploy.projectId`). For instance if the projectId is `esighclouddemo` then the following links\nwill allow you to see final results:\n\n* https://esighclouddemo.appspot.com/\n* https://console.cloud.google.com/logs/query?project=esighclouddemo\n\n# Gradle tasks\n\nGradle will automatically fetch all required dependencies for you.\n\nLong story short:\n\n    mvn update        ~= ./gradlew build --refresh-dependencies\n    mvn clean install ~= ./gradlew clean build\n\nTo force Gradle to re-download dependencies you can execute:\n\n    ./gradlew build --refresh-dependencies\n\nTo assemble you project without executing tests:\n\n    ./gradlew assemble\n\nTo completely build you project with test execution:\n\n    ./gradlew build\n\nYou can skip certain tasks by providing `-x` argument:\n\n    ./gradlew build -x test\n\n\n## Steps to support GAE\n\n1. Make app boot with servlet (war, not jar) by the mean of `SpringBootServletInitializer` (see `HangmanApplication`)\n2. add `app.yaml` to the project\n3. add `buildScript` section to `build.gradle`:\n```groovy\n    buildscript {\n        repositories {\n            mavenCentral()\n        }\n    \n        dependencies {\n            classpath 'com.google.cloud.tools:appengine-gradle-plugin:2.2.0'\n        }\n    }\n```\n4. Add `appengineDeploy` section to `build.gradle`:\n```groovy\n    apply plugin: 'com.google.cloud.tools.appengine'\n    appengine {  // App Engine tasks configuration\n        deploy {   // deploy configuration\n            projectId = 'esighclouddemo' // gcloud config set project\n            version = 'GCLOUD_CONFIG'   // gcloud to generate a version\n            stopPreviousVersion = true\n            promote = true\n        }\n    }\n```\n5. Run `./gradlew appengineDeploy` (see `./deploy-to-Google-Cloud-Platform.sh`)\n\n# Tutorial for GAE SpringBoot deploy\n\n* https://wkrzywiec.medium.com/how-to-publish-a-spring-boot-app-with-a-database-on-the-google-cloud-platform-614b88613ce3\n* https://www.baeldung.com/spring-boot-google-app-engine\n\n## Commands that helped fixing issues\n\n    sudo apt install python3-distutils -y\n    gcloud app update --split-health-checks --project esighclouddemo\n\n# Resources for OAuth2 and JWT\n\n* https://spring.io/guides/tutorials/spring-boot-oauth2/\n* https://jwt.io/\n* https://www.youtube.com/watch?v=X80nJ5T7YpE\n* https://github.com/koushikkothagal/spring-security-jwt\n\n# Resources on privacy policy + terms and conditions\n\n* https://github.com/nisrulz/app-privacy-policy-generator\n* https://app-privacy-policy-generator.nisrulz.com/\n\n# Other resources\n\n* https://springdoc.org/faq.html\n\n# Getting Started\n\n### Reference Documentation\nFor further reference, please consider the following sections:\n\n* [Official Gradle documentation](https://docs.gradle.org)\n* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.4.3/gradle-plugin/reference/html/)\n* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.4.3/gradle-plugin/reference/html/#build-image)\n* [Spring Web](https://docs.spring.io/spring-boot/docs/2.4.3/reference/htmlsingle/#boot-features-developing-web-applications)\n* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.4.3/reference/htmlsingle/#using-boot-devtools)\n* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.4.3/reference/htmlsingle/#boot-features-jpa-and-spring-data)\n* [Flyway Migration](https://docs.spring.io/spring-boot/docs/2.4.3/reference/htmlsingle/#howto-execute-flyway-database-migrations-on-startup)\n* [Spring HATEOAS](https://docs.spring.io/spring-boot/docs/2.4.3/reference/htmlsingle/#boot-features-spring-hateoas)\n* [Spring cache abstraction](https://docs.spring.io/spring-boot/docs/2.4.3/reference/htmlsingle/#boot-features-caching)\n\n### Guides\nThe following guides illustrate how to use some features concretely:\n\n* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)\n* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)\n* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)\n* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)\n* [Building a Hypermedia-Driven RESTful Web Service](https://spring.io/guides/gs/rest-hateoas/)\n* [Caching Data with Spring](https://spring.io/guides/gs/caching/)\n\n### Additional Links\nThese additional references should also help you:\n\n* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famwebexpert%2Fhangman-backend-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famwebexpert%2Fhangman-backend-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famwebexpert%2Fhangman-backend-api/lists"}