{"id":22381862,"url":"https://github.com/googleinterns/recomator","last_synced_at":"2025-07-31T02:33:03.839Z","repository":{"id":40283533,"uuid":"276082971","full_name":"googleinterns/recomator","owner":"googleinterns","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-19T09:58:23.000Z","size":4377,"stargazers_count":6,"open_issues_count":15,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-06-25T11:04:57.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleinterns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/code-of-conduct.md","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":"2020-06-30T11:44:08.000Z","updated_at":"2023-07-03T17:23:07.000Z","dependencies_parsed_at":"2024-04-19T10:58:18.066Z","dependency_job_id":"83c4a04d-cc09-4272-bda8-2e15424d1c7a","html_url":"https://github.com/googleinterns/recomator","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/googleinterns%2Frecomator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Frecomator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Frecomator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Frecomator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleinterns","download_url":"https://codeload.github.com/googleinterns/recomator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228209947,"owners_count":17885595,"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-12-05T00:10:46.128Z","updated_at":"2024-12-05T00:10:46.903Z","avatar_url":"https://github.com/googleinterns.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recomator\n\n**This is not an officially supported Google product.**\n\nGoogle Cloud Platform shows recommendations for underutilized/overutilized resources. Recomator extends these functionalities by\nallowing to also apply recommendations with one click and by giving an overview of recommendations for all projects. \nCustomers will be able to deploy a premade package on one of the serverless solutions and run it in AppEngine in their own GCP account.\n\n\u003c!-- This table of contents is auto-generated using Markdown All in One (VS Code extension). If you have it installed, it updates on saves. --\u003e\n- [Recomator](#recomator)\n  - [Frontend config](#frontend-config)\n  - [Frontend commands](#frontend-commands)\n    - [Install dependencies](#install-dependencies)\n    - [Compile and hot-reload for development](#compile-and-hot-reload-for-development)\n    - [Compile and minify for production](#compile-and-minify-for-production)\n    - [Run your unit tests](#run-your-unit-tests)\n    - [Lint and fix files](#lint-and-fix-files)\n    - [Customize Vue configuration](#customize-vue-configuration)\n  - [How to deploy](#how-to-deploy)\n    - [Create your application on App Engine](#create-your-application-on-app-engine)\n    - [Install Google Cloud SDK](#install-google-cloud-sdk)\n    - [Create the directory](#create-the-directory)\n    - [Create credentials](#create-credentials)\n    - [Deploy the app](#deploy-the-app)\n  - [Source Code Headers](#source-code-headers)\n\n## Frontend config\n\n`src/config.ts` contains two web addresses that you should provide:\nFor testing purposes (using `npm run serve`), use the first one. \nFor production (`npm run build`), use the second one. \n```typescript\n  public static DEVELOPMENT_BACKEND_ADDRESS = \"http://dev.yourbackend.com\";\n  public static PRODUCTION_BACKEND_ADDRESS = \"http://yourbackend.com\";\n```\n\n## Frontend commands\nNote: The following commands need to be run in the `./frontend/` directory:\n\n### Install dependencies\n\n```\nnpm install\n```\n\n### Compile and hot-reload for development\n```\nnpm run serve\n```\n\n### Compile and minify for production\n```\nnpm run build\n```\n\n### Run your unit tests\n```\nnpm run test:unit\n```\n\n### Lint and fix files\n```\nnpm run lint\n```\n\n### Customize Vue configuration\nSee [Configuration Reference](https://cli.vuejs.org/config/).\n\n## How to deploy\n\n### Create your application on App Engine\n\n- Create a [project on GCP](https://console.cloud.google.com/projectcreate).\n\n- Make sure that the APIs listed below are **Enabled**:\n  - [Cloud Resource Manager API](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com), \n  - [Recommender API](https://console.cloud.google.com/apis/library/recommender.googleapis.com),\n  - [Service Usage API](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com), \n  - [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com).\n  \n- Go to [App Engine](http://console.cloud.google.com/appengine) page.\n\n- Click `create application`.\n\n![](docs/create-application.png)\n\n- Choose preferred region, language - `Go`, environment - `standard`.\n\n### Install Google Cloud SDK\n\nNote that you don’t need to install it, if you are using [Cloud Shell](https://cloud.google.com/shell).\nOtherwise, to install you need to follow this tutorial https://cloud.google.com/sdk/docs/install\n\n### Create the directory\n\nRun the following commands:\n```\ngit clone https://github.com/googleinterns/recomator\n```\n```\ncd recomator\n```\n```\ngcloud init \n```\nYou will be asked to choose an account and project. Choose the project in which you created the app.\n\nNow run \n```\ngcloud app describe | grep defaultHostname\n```\nYou will see the value of defaultHosthame (your future app address).\n\nCopy it, you’ll need it in the next step.\n\n### Create credentials\n - Go to APIs \u0026 Services -\u003e [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent).\n \n - Choose your app’s name, support email.\n \n - Click `Add domain` and add the address of your app (from previous section, last step).\n \n - Add developer’s email address and click `Save \u0026 continue`.\n \n - Add scopes: \n```\n.../auth/userinfo.email\n.../auth/cloud-platform\n```\n\n- Click `Save`, then `Back to dashboard`.\n\n- Go to Credentials-\u003e Create Credentials -\u003e [OAuth client ID](https://console.cloud.google.com/apis/credentials/oauthclient)\n\n- Choose `Web application`\n\n- Add authorized URI: `https://\u003cYOUR APP ADDRESS\u003e/auth`, where `\u003cYOUR APP ADDRESS\u003e` is the address of your application.\n\n- Copy clientID and clientSecret.\n\n### Deploy the app\n\n- Install npm https://www.npmjs.com/get-npm\n- Go to your app directory (the one where you cloned the recomator repository).\n- Set up some environmental variables:\n```\nexport CLIENT_ID=\u003cYOUR CLIENT ID\u003e\n```\n```\nexport CLIENT_SECRET=\u003cYOUR CLIENT SECRET\u003e\n```\n```\nexport APP_ADDRESS=\u003cYOUR ADDRESS\u003e\n```\n\n- Set up configs:\n```\necho \"{\\\"clientID\\\":\\\"$CLIENT_ID\\\",\\\"clientSecret\\\":\\\"$CLIENT_SECRET\\\",\\\"redirectURL\\\":\\\"https://$APP_ADDRESS/auth\\\"}\" \u003e config.json\n```\n```\necho \"VUE_APP_BACKEND_ADDRESS=https://$APP_ADDRESS/api\" \u003e frontend/.env\n```\n\n- Build frontend:\n\n```\ncd frontend\n```\n```\nnpm install\n```\n```\nnpm run build\n```\n \n- Deploy the app:\n```\ncd ..\n```\n```\ncat deploy_gcloudignore.txt \u003e\u003e .gcloudignore\n```\n```\ngcloud app deploy\n```\n\n\n## Source Code Headers\n\nEvery file containing source code must include copyright and license\ninformation. This includes any JS/CSS files that you might be serving out to\nbrowsers. (This is to help well-intentioned people avoid accidental copying that\ndoesn't comply with the license.)\n\nApache header:\n\n    Copyright 2020 Google LLC\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        https://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleinterns%2Frecomator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleinterns%2Frecomator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleinterns%2Frecomator/lists"}