{"id":13580773,"url":"https://github.com/vendure-ecommerce/storefront-angular-starter","last_synced_at":"2025-04-06T16:14:39.519Z","repository":{"id":39802321,"uuid":"151769415","full_name":"vendure-ecommerce/storefront-angular-starter","owner":"vendure-ecommerce","description":"An example storefront PWA for Vendure built with Angular","archived":false,"fork":false,"pushed_at":"2024-02-13T11:26:43.000Z","size":2867,"stargazers_count":171,"open_issues_count":25,"forks_count":138,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-29T21:29:14.474Z","etag":null,"topics":["angular","e-commerce","pwa","storefront"],"latest_commit_sha":null,"homepage":"https://angular-storefront.vendure.io","language":"TypeScript","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/vendure-ecommerce.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}},"created_at":"2018-10-05T19:38:55.000Z","updated_at":"2024-10-27T08:09:10.000Z","dependencies_parsed_at":"2024-01-11T19:14:47.687Z","dependency_job_id":"f64db724-bdd0-4fe7-8ed1-9ca1a9670c6e","html_url":"https://github.com/vendure-ecommerce/storefront-angular-starter","commit_stats":{"total_commits":260,"total_committers":8,"mean_commits":32.5,"dds":0.04230769230769227,"last_synced_commit":"732800e4b4a63e71be78cd42089c540732c162c4"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendure-ecommerce%2Fstorefront-angular-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendure-ecommerce%2Fstorefront-angular-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendure-ecommerce%2Fstorefront-angular-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendure-ecommerce%2Fstorefront-angular-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vendure-ecommerce","download_url":"https://codeload.github.com/vendure-ecommerce/storefront-angular-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294514,"owners_count":20915340,"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":["angular","e-commerce","pwa","storefront"],"created_at":"2024-08-01T15:01:54.959Z","updated_at":"2025-04-06T16:14:39.489Z","avatar_url":"https://github.com/vendure-ecommerce.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Vendure Angular Storefront\n\nThis is an e-commerce storefront application which is designed to be used with the [Vendure ecommerce framework](https://github.com/vendure-ecommerce/vendure) as a back end.\n\nIt is a progressive web application (PWA) which also uses Angular Universal for server-side rendering.\n\nThe app is built with the [Angular CLI](https://github.com/angular/angular-cli), with the data layer being handled by [Apollo Client](https://github.com/apollographql/apollo-client).\n\n## Development\n\n0. Clone this repo\n1. Run `npm install` or `yarn` in the root dir\n2. Run `npm start` or `yarn start` to build in development mode.\n3. Make sure you have a local Vendure instance running a `http://localhost:3000`.\n4. Open `http://localhost:4201` to see the storefront app running.\n\n## Code generation\n\nThis project uses [graphql-code-generator](https://www.graphql-code-generator.com/) to generate TypeScript types based on the Vendure GraphQL API. To update the types, first change the `schema` property of [codegen.yml](./codegen.yml) to point to your local Vendure server, and then run the `generate-types` npm script.\n\n## Deployment\n\nTo deploy this storefront in a production environment, take the following steps:\n\n1. Open the [environment.prod.ts file](./src/environments/environment.prod.ts) and change the values to match your deployed Vendure server. You also probably want to set the `baseHref` value to `'/'` rather than `'/storefront/'`.\n2. Open the [angular.json file](./angular.json) and set the baseHref values to point to root:\n    ```diff\n      \"production\": {\n    -    \"baseHref\": \"/storefront/\",\n    -    \"deployUrl\": \"/storefront/\", \n    +    \"baseHref\": \"/\",\n    +    \"deployUrl\": \"/\", \n    ```\n3. You then need to build for production using the `build:ssr` npm script. This can be done either locally or on your production server, depending on your preferred workflow.\n4. The built artifacts will be found in the `dist/` directory. The command to run the storefront as a server-rendered app is `node dist/server/main.js`. This will start a node server running on port 4000. You should configure your webserver to pass requests arriving on port 80 to `localhost:4000`.\n5. In the Vender server config, configure the `EmailPlugin` to point to the correct routes used by this storefront:\n   ```ts\n   EmailPlugin.init({\n     // ...\n     globalTemplateVars: {\n       fromAddress: '\"Example_Server\" \u003cnoreply@example.com\u003e',\n       verifyEmailAddressUrl: 'https://your-domain.com/account/verify',\n       passwordResetUrl: 'https://your-domain.com/account/reset-password',\n       changeEmailAddressUrl: 'https://your-domain.com/account/change-email-address',\n     }\n   })\n   ```\n\n### Deploying the demo\n\nThis project is used in the [angular-storefront.vendure.io](https://angular-storefront.vendure.io) demo. There is a [GitHub Actions workflow](./.github/workflows/build.yml) which is triggered whenever a new tag is added. The tag should be of the format `\"vX.Y.Z\"`. The workflow will run the `build:ssr` script and upload the compiled output to an Amazon S3 bucket, from which the vendure-demo project will pull the artifacts.\n\n1. Update the version in package.json \u0026 Dockerfile\n2. Commit the changes \"Bump version to vX.Y.Z\"\n3. Create a tag with the same version number:\n   ```sh\n   git tag -a v1.2.3 -m \"v1.2.3\"\n   ```\n4. Push the tag to GitHub:\n   ```sh\n   git push origin master --follow-tags\n   ```\n\nOnce the GitHub action workflow has completed and the built artifacts have been successfully uploaded to the S3 bucket, the app can be deployed with `git push dokku master`.\n\n## License\n\nMIT\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendure-ecommerce%2Fstorefront-angular-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvendure-ecommerce%2Fstorefront-angular-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendure-ecommerce%2Fstorefront-angular-starter/lists"}