{"id":17561983,"url":"https://github.com/goldstack/cognito-nodejs-template","last_synced_at":"2025-04-12T12:12:09.146Z","repository":{"id":65684188,"uuid":"581932138","full_name":"goldstack/cognito-nodejs-template","owner":"goldstack","description":"User Management with Cognito with Node.js / React","archived":false,"fork":false,"pushed_at":"2025-04-12T02:39:28.000Z","size":259580,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T12:11:59.853Z","etag":null,"topics":["authentication","cognito","nodejs","react","serverless"],"latest_commit_sha":null,"homepage":"https://goldstack.party/templates/user-management","language":"HTML","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/goldstack.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":"2022-12-24T23:19:58.000Z","updated_at":"2025-04-12T02:39:31.000Z","dependencies_parsed_at":"2025-04-07T06:37:45.960Z","dependency_job_id":null,"html_url":"https://github.com/goldstack/cognito-nodejs-template","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/goldstack%2Fcognito-nodejs-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldstack%2Fcognito-nodejs-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldstack%2Fcognito-nodejs-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldstack%2Fcognito-nodejs-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldstack","download_url":"https://codeload.github.com/goldstack/cognito-nodejs-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565078,"owners_count":21125417,"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":["authentication","cognito","nodejs","react","serverless"],"created_at":"2024-10-21T12:10:13.789Z","updated_at":"2025-04-12T12:12:09.118Z","avatar_url":"https://github.com/goldstack.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\u003cimg src=\"https://cdn.goldstack.party/img/202203/goldstack_icon.png\" height=\"12\"\u003e Generated with \u003ca href=\"https://goldstack.party\"\u003eGoldstack\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://goldstack.party/templates/static-website\"\u003e\n    \u003cimg src=\"https://cdn.goldstack.party/img/202212/cognito.svg\" height=\"80\"\u003e\n    \u003ch1 align=\"center\"\u003eCognito Node.js Template\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nAdd the capability to your application to sign up and sign in users. Provides server-side utilities for authentication and ready-to-go hosted user interface for sign up and sign in. Implemented using [Amazon Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html).\n\nThis boilerplate has been automatically generated using the template:\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cp align=\"center\"\u003e\u003ca href=\"https://goldstack.party/templates/user-management\"\u003e\u003cimg width=\"50\" src=\"https://cdn.goldstack.party/img/202212/cognito.svg\"\u003e\u003c/a\u003e\u003c/p\u003e\n        \u003cp\u003e\u003ca href=\"https://goldstack.party/templates/user-management\"\u003eUser Management\u003c/a\u003e\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nFeel free to fork this repository and modify it for your needs, or use the [Goldstack project builder](https://goldstack.party/build) to generate a boilerplate specifically configured for your project.\n\n# Getting Started\n\nThank you for using this boilerplate. For any questions or feedback, please be welcome to [raise an issue on GitHub](https://github.com/goldstack/goldstack/issues) 🤗 .\n\n## 1. Fork and clone the repository\n\n[Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and then [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the fork your local machine.\n\n## 2. Install required local dependencies\n\nA few dependencies need to be available in your development system. Please verify they are present or install them.\n\n- Node v20+\n- Yarn v1.22.5+\n- Docker v20+\n\nOpen a terminal and run the following commands:\n\n```bash\nnode -v\nyarn -v\ndocker --version\n```\n\nThis should produce the following output:\n\n![Confirming versions in the console](https://cdn.goldstack.party/img/202203/confirm_versions.png)\n\nIf you need to install or update any of the dependencies, please see the following guides:\n\n- [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)\n- [Yarn Installation](https://yarnpkg.com/getting-started/install)\n- [Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/) / [Install Docker for Mac](https://docs.docker.com/docker-for-mac/install/)\n\n## 3. Initialise project and install NPM Dependencies\n\nRun `yarn` in your project directory to install and download all dependencies.\n\nThe installation process should take around 3-10 minutes depending on the dependencies that need to be downloaded.\n\n![Installing project dependencies](https://cdn.goldstack.party/img/202203/install_project.gif)\n\nYou can confirm everything was installed correctly by running `yarn -v`. This should show a yarn version of `3.0.0+`.\n\n![Confirming Yarn Version after install](https://cdn.goldstack.party/img/202203/confirm_yarn_version_after_install.png)\n\n## 4. Build modules\n\nMake sure that the project compiles correctly by running `yarn build` your project directory:\n\n![Building your project](https://cdn.goldstack.party/img/202203/build_project.gif)\n\nNote that this command also ensures that all TypeScript project references are configured correctly.\n\n## 5. Configure VSCode\n\nIn order to setup VSCode, open the project in VSCode.\n\nVSCode may prompt you to ask if you trust the authors of the workspace. Respond with Yes.\n\n\u003cimg src=\"https://cdn.goldstack.party/img/202201/trust_authors.png\" width=\"300\" alt=\"VSCode Prompt trust authors\"\u003e\n\nYou may also be asked if you want to install recommended extensions for this workspace. We recommend to do so since the template will be optimised to work with the suggested extensions.\n\n![VSCode Prompt install extensions](https://cdn.goldstack.party/img/202201/install_extensions.png)\n\nIf you want to install the necessary extensions manually, here are links to the extensions required:\n\n- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)\n- [ZipFS](https://marketplace.visualstudio.com/items?itemName=arcanis.vscode-zipfs) (optional)\n\n## 6. Initialise TypeScript\n\nLocate a `.ts` or `.tsx` file in the workspace and open it. When asked whether to use the workspace TypeScript version, click _Allow_.\n\n\u003cimg src=\"https://cdn.goldstack.party/img/202201/allow_typescript.gif\"  alt=\"VSCode Locate TypeScript\"\u003e\n\nIn the status bar on the bottom right-hand corner of the VSCode editor you should now see _TypeScript_.\n\n![TypeScript status icon in VSCode](https://cdn.goldstack.party/img/202203/typescript_init.png)\n\n## 7. Local Development\n\nThe code provided in this project works best in combination with client- and server-side application code defined in other packages.\n\nFor this, simply import the package provided in `packages/user-management-1` in your client- and/or server-side logic.\n\nFor more information, see the Goldstack documentation:\n\n- [User Management / Development (Client)](https://docs.goldstack.party/docs/templates/user-management#3-development-client-1)\n- [User Management / Development (Server)](https://docs.goldstack.party/docs/templates/user-management#4-development-server-1)\n\n## 8. Deploy to AWS\n\nIf you want to deploy your project to AWS, you will need to make some changes to the configuration files included in this project.\n\nSpecifically, the [goldstack.json](https://github.com/goldstack/cognito-nodejs-template/blob/master/packages/user-management-1/goldstack.json) in the `packages/user-management-1` folder.\n\n```json\n{\n  \"$schema\": \"./schemas/package.schema.json\",\n  \"name\": \"user-management\",\n  \"template\": \"user-management\",\n  \"templateVersion\": \"0.1.0\",\n  \"configuration\": {},\n  \"deployments\": [\n    {\n      \"name\": \"prod\",\n      \"awsRegion\": \"us-west-2\",\n      \"awsUser\": \"goldstack-dev\",\n      \"configuration\": {\n        \"cognitoDomain\": \"\",\n        \"userPoolName\": \"\",\n        \"hostedZoneDomain\": \"\",\n        \"callbackUrl\": \"\"\n      },\n      \"tfStateKey\": \"user-management-prod-xxxxxxx.tfstate\"\n    }\n  ]\n}\n```\n\nThe key properties you will need to update are:\n\n- `deployments[0].configuration.cognitoDomain`\n- `deployments[0].configuration.userPoolName`\n- `deployments[0].configuration.hostedZoneDomain`\n- `deployments[0].configuration.callbackUrl`\n\nAlso you need to _delete_ `deployments[0].tfStateKey`.\n\nFor more information on these configuration options, see [Goldstack Documentation / User Management / Configure](https://docs.goldstack.party/docs/templates/user-management#configure).\n\nYou will also need to ensure that you have a valid AWS user configure to deploy to AWS. For this, create a file in `/config/infra/config.json` (relative to project root).\n\n    {\n      \"users\": [\n        {\n          \"name\": \"goldstack-dev\",\n          \"type\": \"apiKey\",\n          \"config\": {\n            \"awsAccessKeyId\": \"...\",\n            \"awsSecretAccessKey\": \"...\",\n            \"awsDefaultRegion\": \"us-west-2\"\n          }\n        },\n        {\n          \"name\": \"goldstack-prod\",\n          \"type\": \"apiKey\",\n          \"config\": {\n            \"awsAccessKeyId\": \"...\",\n            \"awsSecretAccessKey\": \"\",\n            \"awsDefaultRegion\": \"us-west-2\"\n          }\n        }\n      ]\n    }\n\nFor more information on configuring your local AWS users, please see [Goldstack Documentation / AWS Configuration](https://docs.goldstack.party/docs/goldstack/configuration#aws-configuration).\n\nOnce your AWS user is configured you can run `yarn infra up prod` in the `/packages/user-management-1` folder. For more information on the infrastructure commands for this project, see [Goldstack Documentation / User Management / Infrastructure](https://docs.goldstack.party/docs/templates/user-management#infrastructure).\n\n## 9. Contribute to Goldstack\n\nHave questions or ideas or want to contribute to the project? Please head over to [github.com/goldstack/goldstack](https://github.com/goldstack/goldstack).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldstack%2Fcognito-nodejs-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldstack%2Fcognito-nodejs-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldstack%2Fcognito-nodejs-template/lists"}