{"id":17561986,"url":"https://github.com/goldstack/static-website-boilerplate","last_synced_at":"2025-04-19T18:38:50.857Z","repository":{"id":54844220,"uuid":"486757996","full_name":"goldstack/static-website-boilerplate","owner":"goldstack","description":"Boilerplate for a serverless static website project - deployed to AWS using CloudFront and AWS.","archived":false,"fork":false,"pushed_at":"2025-03-25T08:19:44.000Z","size":369443,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T09:26:27.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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-04-28T21:49:19.000Z","updated_at":"2025-03-25T08:19:50.000Z","dependencies_parsed_at":"2025-03-25T09:34:40.409Z","dependency_job_id":null,"html_url":"https://github.com/goldstack/static-website-boilerplate","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%2Fstatic-website-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldstack%2Fstatic-website-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldstack%2Fstatic-website-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldstack%2Fstatic-website-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldstack","download_url":"https://codeload.github.com/goldstack/static-website-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246180889,"owners_count":20736459,"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-10-21T12:10:18.818Z","updated_at":"2025-03-29T11:41:56.953Z","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/202204/cloudfront.svg\" height=\"80\"\u003e\n    \u003ch1 align=\"center\"\u003eStatic Website Boilerplate\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nDevelop a static website using HTML and CSS. Test the website locally. Deploy to AWS using [CloudFront](https://aws.amazon.com/s3/) and [S3](https://aws.amazon.com/cloudfront/).\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/static-website\"\u003e\u003cimg width=\"50\" src=\"https://cdn.goldstack.party/img/202204/cloudfront.svg\"\u003e\u003c/a\u003e\u003c/p\u003e\n        \u003cp\u003e\u003ca href=\"https://goldstack.party/templates/static-website\"\u003eStatic Website\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\nGo to the folder `packages/static-website-aws` and run `yarn watch`. This will start a local development server.\n\n\u003cimg src=\"https://cdn.goldstack.party/img/202204/local-development.gif\" alt=\"VSCode Locate TypeScript\"\u003e\n\nTo make changes to the web page, edit the files in the folder `packages\\static-website-aws\\web`.\n\n\u003cimg src=\"https://cdn.goldstack.party/img/202204/edit_webpage.png\" alt=\"Edit webpage included in template\"\u003e\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/static-website-boilerplate/blob/master/packages/static-website-1/goldstack.json) in the `packages/static-website-aws` folder.\n\n```json\n{\n  \"$schema\": \"./schemas/package.schema.json\",\n  \"name\": \"static-website-1\",\n  \"template\": \"static-website-aws\",\n  \"templateVersion\": \"0.1.0\",\n  \"configuration\": {},\n  \"deployments\": [\n    {\n      \"name\": \"prod\",\n      \"awsUser\": \"goldstack-dev\",\n      \"awsRegion\": \"us-west-2\",\n      \"configuration\": {\n        \"hostedZoneDomain\": \"dev.goldstack.party\",\n        \"websiteDomain\": \"staticwebsite1-1651273869629.tests.dev.goldstack.party\",\n        \"websiteDomainRedirect\": \"www.staticwebsite1-1651273869629.tests.dev.goldstack.party\",\n        \"defaultCacheDuration\": 10\n      },\n      \"tfStateKey\": \"static-website-1-prod-0397e051cd046f2d46e7.tfstate\"\n    }\n  ]\n}\n```\n\nThe key properties you will need to update are:\n\n- `deployments[0].configuration.hostedZoneDomain`\n- `deployments[0].configuration.websiteDomain`\n\nAlso you need to _delete_ `deployments[0].tfStateKey`.\n\nFor more information on these configuration options, see [Goldstack Documentation / Static Website AWS Template / Configure](https://docs.goldstack.party/docs/templates/static-website-aws#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/static-website-aws` folder. For more information on the infrastructure commands for this project, see [Goldstack Documentation / Static Website Template / Infrastructure](https://docs.goldstack.party/docs/templates/static-website-aws#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%2Fstatic-website-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldstack%2Fstatic-website-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldstack%2Fstatic-website-boilerplate/lists"}