{"id":18607348,"url":"https://github.com/addono/serverless-ops-frontend","last_synced_at":"2025-11-02T15:30:25.360Z","repository":{"id":82277199,"uuid":"270587768","full_name":"Addono/serverless-ops-frontend","owner":"Addono","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-08T08:39:14.000Z","size":2578,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T00:27:26.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Addono.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-06-08T08:21:08.000Z","updated_at":"2021-05-27T08:07:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcf5fb31-8228-4766-b342-f74feb1ea84f","html_url":"https://github.com/Addono/serverless-ops-frontend","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/Addono%2Fserverless-ops-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fserverless-ops-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fserverless-ops-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Addono%2Fserverless-ops-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Addono","download_url":"https://codeload.github.com/Addono/serverless-ops-frontend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239395830,"owners_count":19631333,"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-07T02:29:09.817Z","updated_at":"2025-11-02T15:30:25.304Z","avatar_url":"https://github.com/Addono.png","language":"JavaScript","readme":"\n# Production Ready Serverless Ops Bolerplate - Frontend\n\n\nThis is the second part of [the boilerplate](https://github.com/eficode/serverless-ops-boilerplate). This app uses Amazon cognito [Hosted UI](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html) for sign-inand sign-up. This app leverages [Weatherapp](https://github.com/mrako/weatherapp) as well as  [Amazon Cognito Auth SDK for JavaScript](https://www.npmjs.com/package/amazon-cognito-auth-js) to handle authentication. To make the application work, user needs supply following environmental variables:\n\n    UserPoolAppClientId, UserPoolDomain, RedirectUriSignIn, RedirectUriSignOut, UserPoolId\n\nThese environmental variables supply Amazon Cognito details and will be used by `initCognitoSDK()` located `./src/index.jsx` file. If you follow the instructions on [the boilerplate](https://github.com/eficode/serverless-ops-boilerplate), the template creates frontend pipeline and supplies these environmental variables into the corresponding Codebuild project. So you don't need to do anything manual. However, you can set these variables on your machine to test the authentication locally. To do that, you need to set RedirectUriSignIn, RedirectUriSignOut to `http://localhost:8000`. Also you need to whitelist `http://localhost:8000` in [Callback URL and Logout URL of your Cognito User Pool app](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-idp-settings.html). Then you can run the application and it should work:\n\n    yarn install\n\n    yarn start\n\nOnce the app is running, you need to press the button \"Sin-in to get the weather\":\n\n![Sign in button](https://user-images.githubusercontent.com/21277296/77577864-3a6a5c00-6ee0-11ea-845f-b5353bfdb07a.png)\n\n\nThe app will redirect you to Cognito hosted UI. For troubleshooting, you can also access hosted UI [manually](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html) with following URL:\n\n    https://\u003cyour_domain\u003e/login?response_type=code\u0026client_id=\u003cyour_app_client_id\u003e\u0026redirect_uri=\u003cyour_callback_url\u003e\n\nYou can get your domain, user pool app client id and callback url from cloudformation output of the app created [by backend pipeline](https://github.com/eficode/serverless-ops-boilerplate) (i.e. `app/template.yaml`).\n\nCreate a new user in Cognito user pool, if you havn't yet, so you can sign-in:\n\n![Cognito hosted UI](https://user-images.githubusercontent.com/21277296/77577849-33dbe480-6ee0-11ea-958f-8544a68b5f02.png)\n\n\n Then you can see weather report; something like this:\n\n![Weather report after sign in](https://user-images.githubusercontent.com/21277296/77543316-31619680-6eb0-11ea-9e95-c491d943fe7d.png)\n\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddono%2Fserverless-ops-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faddono%2Fserverless-ops-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddono%2Fserverless-ops-frontend/lists"}