├── .circleci └── config.yml ├── .github ├── issue_template.md └── pull_request_template.md ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── Makefile ├── README.md ├── config.mk ├── config ├── local │ └── .gitkeep └── reaction-oss │ ├── reaction-v3.0.0.mk │ ├── reaction-v3.0.1.mk │ ├── reaction-v3.0.2.mk │ ├── reaction-v3.0.3.mk │ ├── reaction-v3.0.4.mk │ ├── reaction-v3.1.0.mk │ ├── reaction-v3.10.0.mk │ ├── reaction-v3.11.0.mk │ ├── reaction-v3.11.1.mk │ ├── reaction-v3.12.0.mk │ ├── reaction-v3.13.0.mk │ ├── reaction-v3.14.0.mk │ ├── reaction-v3.14.1.mk │ ├── reaction-v3.14.2.mk │ ├── reaction-v3.2.0.mk │ ├── reaction-v3.3.0.mk │ ├── reaction-v3.4.0.mk │ ├── reaction-v3.5.0.mk │ ├── reaction-v3.6.0.mk │ ├── reaction-v3.7.0.mk │ ├── reaction-v3.8.0.mk │ ├── reaction-v3.9.0.mk │ ├── reaction-v4.0.0.mk │ ├── reaction-v4.0.1.mk │ └── reaction-v4.1.0.mk ├── docs ├── Common-Issues.md ├── graphql-playground.png ├── migration-guide-v4.md └── release-guide.md └── release.py /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | # To test this file locally, try this incantation 4 | # circleci local execute --job test --revision master --skip-checkout=false \ 5 | # --repo-url https://github.com/reactioncommerce/reaction-platform.git 6 | 7 | # The following stanza defines a map named defaults with a variable that may be 8 | # inserted using the YAML merge (<<: *) key later in the file to save some 9 | # typing. See http://yaml.org/type/merge.html for details. 10 | defaults: &defaults 11 | docker: 12 | - image: circleci/node:8-stretch 13 | 14 | jobs: 15 | test: 16 | <<: *defaults 17 | steps: 18 | - checkout 19 | - run: make list 20 | 21 | workflows: 22 | version: 2 23 | test: 24 | jobs: 25 | - test: 26 | context: reaction-validation 27 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | Are you looking for help with getting started on Reaction? Please visit our [Reaction documentation](https://mailchimp.com/developer/open-commerce/docs/fundamentals/). 2 | 3 | ## Prerequisites 4 | * [ ] What version are you running? 5 | * [ ] Are you able to consistently reproduce the issue? 6 | * [ ] Did you search the issue queue for existing issue? [Search issues](https://github.com/reactioncommerce/reaction/issues) 7 | 8 | ## Issue Description 9 | Providing a clear description of the issue will enable a developer to quickly reproduce and understand the issue. Please provide a detailed description including images, animation and/or videos. For client issues, include browser console errors, for server issues please add terminal output and stack traces. 10 | 11 | ## Steps to Reproduce 12 | Please provide starting context, i.e. logged in as a user, configure a particular payment method. 13 | 1. 14 | 2. 15 | 3. 16 | 17 | ## Possible Solution 18 | Not obligatory, but suggest a fix/reason for the bug 19 | 20 | 21 | ### Versions 22 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Resolves #issueNumber 2 | Impact: **breaking|critical|major|minor** 3 | Type: **feature|bugfix|performance|test|style|refactor|docs|chore** 4 | 5 | ## Issue 6 | Description of the issue this PR is solving, why it's happening, and how to reproduce it. This may differ from the original ticket as you now have more information at your disposal. 7 | 8 | ## Solution 9 | Summarize your solution to the problem. Please include short descriptions of any solutions you tested before arriving at your final solution. This will help reviewers know why you decided to solve this problem in this particular way and will speed up the review process. 10 | 11 | If you're solving a UIX related issue, please attach screen-caps or gifs showing how your solution differs from the issue. 12 | 13 | ## Breaking changes 14 | If you have a breaking changes, list them here, otherwise list none. 15 | 16 | Examples of breaking changes include changing file names, moving files, deleting files, renaming functions or exports, or changes to code which might cause previous versions of Reaction or third-party code not to work as expected. 17 | 18 | Note any work that you did to mitigate the effect of any breaking changes such as creating migrations, deprecation warnings, etc. 19 | 20 | 21 | ## Testing 22 | 1. List the steps needed for testing your change in this section. 23 | 2. Assume that testers already know how to start the app, and do the basic setup tasks. 24 | 3. Be detailed enough that someone can work through it without being too granular 25 | 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*/ 2 | !^.docs/ 3 | !^.github/ 4 | !config/ 5 | /config/local/ 6 | !config/local/.gitkeep 7 | config.local.mk 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # v4.1.0 2 | This release is coordinated with the release of [reaction-admin v4.0.0-beta.20](https://github.com/reactioncommerce/reaction-admin/releases/tag/v4.0.0-beta.20), [reaction v4.2.0](https://github.com/reactioncommerce/reaction/releases/tag/v4.2.0), [example-storefront v5.2.1](https://github.com/reactioncommerce/example-storefront/releases/tag/v5.2.1) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 3 | # v4.0.1 4 | This release is coordinated with the release of [reaction-admin v4.0.0-beta.5](https://github.com/reactioncommerce/reaction-admin/releases/tag/v4.0.0-beta.5), [reaction v4.0.0](https://github.com/reactioncommerce/reaction/releases/tag/v4.0.0), [example-storefront v5.0.3](https://github.com/reactioncommerce/example-storefront/releases/tag/v5.0.3) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 5 | # v4.0.0 6 | This release is coordinated with the release of [reaction-admin v4.0.0-beta.3](https://github.com/reactioncommerce/reaction-admin/releases/tag/v4.0.0-beta.3), [reaction v4.0.0](https://github.com/reactioncommerce/reaction/releases/tag/v4.0.0), [example-storefront v5.0.0](https://github.com/reactioncommerce/example-storefront/releases/tag/v5.0.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 7 | # v3.14.2 8 | This release is coordinated with the release of [reaction-admin v3.0.0-beta.22](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.22), [reaction v3.13.4](https://github.com/reactioncommerce/reaction/releases/tag/v3.13.4), [example-storefront v4.1.2](https://github.com/reactioncommerce/example-storefront/releases/tag/v4.1.2), [reaction-identity v3.3.1](https://github.com/reactioncommerce/reaction-identity/releases/tag/v3.3.1) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 9 | # v3.14.1 10 | This release is coordinated with the release of [reaction-admin v3.0.0-beta.19](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.19), [reaction v3.13.2](https://github.com/reactioncommerce/reaction/releases/tag/v3.13.2), [example-storefront v4.1.0](https://github.com/reactioncommerce/example-storefront/releases/tag/v4.1.0), [reaction-identity v3.3.1](https://github.com/reactioncommerce/reaction-identity/releases/tag/v3.3.1) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 11 | # v3.14.0 12 | This release is coordinated with the release of [reaction-admin v3.0.0-beta.18](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.18), [reaction v3.13.1](https://github.com/reactioncommerce/reaction/releases/tag/v3.13.1), [example-storefront v4.1.0](https://github.com/reactioncommerce/example-storefront/releases/tag/v4.1.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 13 | # v3.13.0 14 | This release is coordinated with the release of [reaction-admin v3.0.0-beta.15](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.15), [reaction v3.13.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.13.0), [example-storefront v4.0.2](https://github.com/reactioncommerce/example-storefront/releases/tag/v4.0.2) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 15 | # v3.12.0 16 | This release is coordinated with the release of [reaction-admin v3.0.0-beta.13(https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.13)], [example-storefront v4.0.2(https://github.com/reactioncommerce/example-storefront/releases/tag/v4.0.2)], [reaction-identity v3.3.1(https://github.com/reactioncommerce/reaction-identity/releases/tag/v3.3.1)] to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 17 | # v3.11.1 18 | 19 | This release is coordinated with the release of [Reaction v3.11.1](https://github.com/reactioncommerce/reaction/releases/tag/v3.11.1) and [Reaction Admin v3.0.0-beta.12](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.12) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 20 | 21 | # v3.11.0 22 | 23 | This release is coordinated with the release of [Reaction v3.11.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.11.0) and [Reaction Admin v3.0.0-beta.11](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.11) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 24 | 25 | # v3.10.0 26 | 27 | This release is coordinated with the release of [Reaction v3.10.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.10.0), [Reaction Admin v3.0.0-beta.10](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.10), [Reaction Identity v3.3.0](https://github.com/reactioncommerce/reaction-identity/releases/tag/v3.23.0) and [Example Storefront v4.0.0](https://github.com/reactioncommerce/example-storefront/releases/tag/v4.0.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 28 | 29 | # v3.9.0 30 | 31 | This release is coordinated with the release of [Reaction v3.9.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.9.0), [Reaction Admin v3.0.0-beta.9](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.9) and [Reaction Identity v3.2.0](https://github.com/reactioncommerce/reaction-identity/releases/tag/v3.2.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 32 | 33 | # v3.8.0 34 | 35 | This release is coordinated with the release of [Reaction Admin v3.0.0-beta.8](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.8) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 36 | 37 | # v3.7.0 38 | 39 | This release is coordinated with the release of [Reaction v3.8.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.8.0), [Example Storefront v3.1.0](https://github.com/reactioncommerce/example-storefront/releases/tag/v3.1.0) and [Reaction Identity v3.1.0](https://github.com/reactioncommerce/reaction-identity/releases/tag/v3.1.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 40 | 41 | # v3.6.0 42 | 43 | This release is coordinated with the release of [Reaction Admin v3.0.0-beta.7](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.7) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 44 | 45 | # v3.5.0 46 | 47 | This release is coordinated with the release of [Reaction v3.7.1](https://github.com/reactioncommerce/reaction/releases/tag/v3.7.1) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 48 | 49 | # v3.4.0 50 | 51 | This release is coordinated with the release of [Reaction v3.7.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.7.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 52 | 53 | # v3.3.0 54 | 55 | This release is coordinated with the release of [Reaction v3.6.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.6.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 56 | 57 | # v3.2.0 58 | 59 | This release is coordinated with the release of [Reaction v3.5.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.5.0) and [Reaction Admin v3.0.0-beta.6](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0-beta.6) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 60 | 61 | # v3.1.0 62 | 63 | This release is coordinated with the release of [Reaction v3.4.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.4.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 64 | 65 | This release bumps the version number differently than previous releases to make `reaction-development-platform` compatible with the `semantic-release` versioning style. 66 | 67 | # v3.0.4 68 | 69 | This release is coordinated with the release of [Reaction v3.3.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.3.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 70 | 71 | # v3.0.3 72 | 73 | This release is coordinated with the release of [Reaction v3.2.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.2.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 74 | 75 | # v3.0.2 76 | 77 | This release is coordinated with the release of [Reaction v3.1.0](https://github.com/reactioncommerce/reaction/releases/tag/v3.1.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 78 | 79 | # v3.0.1 80 | 81 | This release is coordinated with the release of [Reaction Admin v3.0.0-beta.5](https://github.com/reactioncommerce/reaction-admin/releases/tag/v3.0.0) to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects. 82 | 83 | # v3.0.0 84 | 85 | This is the v3.0.0 release of `reaction-development-platform`. This project is designed to be quickest way to get started with the Reaction API and its supporting services in a local development environment. 86 | 87 | *The following Reaction projects are being released one time in coordination as v3.0.0* 88 | 89 | - [Reaction API](https://github.com/reactioncommerce/reaction) 90 | - [Reaction Hydra](https://github.com/reactioncommerce/reaction-hydra) 91 | - [Reaction Identity](https://github.com/reactioncommerce/reaction-identity) 92 | - [Reaction Admin (beta)](https://github.com/reactioncommerce/reaction-admin) 93 | - [Example Storefront](https://github.com/reactioncommerce/example-storefront) 94 | - [Reaction Development Platform](https://github.com/reactioncommerce/reaction-development-platform) 95 | 96 | *After this release, Reaction releases will no longer be coordinated across all projects - we'll release each project independently, as needed. This means version numbers will no longer be in sync. The newest versions of each project will work together.* 97 | 98 | *This project, `reaction-development-platform`, will _always_ be updated when any other project is released to keep it in sync with the latest releases from all Reaction projects.* 99 | 100 | # v2.9.1 101 | This is patch version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 102 | 103 | # v2.9.0 104 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 105 | 106 | # v2.8.1 107 | This is patch version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 108 | 109 | # v2.8.0 110 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 111 | 112 | # v2.7.0 113 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 114 | 115 | # v2.6.0 116 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 117 | 118 | # v2.5.0 119 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 120 | 121 | # v2.4.0 122 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 123 | 124 | # v2.3.0 125 | This is minor version update coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 126 | 127 | # v2.2.1 128 | This is a patch versioning release coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 129 | 130 | # v2.2.0 131 | This is a minor versioning release coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 132 | 133 | # v2.1.0 134 | This is a minor versioning release coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 135 | 136 | # v2.0.0 137 | This is our first release of Reaction Platform. 138 | 139 | Reaction is API-first, real-time commerce engine built using Node.js, React, and GraphQL. It’s the second major release of our open source commerce software. 140 | 141 | This release is coordinated with [Reaction](https://github.com/reactioncommerce/reaction), our [Example Storefront](https://github.com/reactioncommerce/example-storefront) (previously Storefront Starter Kit) and [reaction-hydra](https://github.com/reactioncommerce/reaction-hydra). 142 | 143 | Reaction v2.0.0 is built as a truly headless commerce platform that decouples the Reaction backend services from the frontend. We’ve decoupled the storefront application from the API. Reaction platform now consists of the `reaction` project, which is now primarily our GraphQL API, along with our [Example Storefront](https://github.com/reactioncommerce/example-storefront), which integrates with the Reaction application via GraphQL API to provide a customer-facing storefront. 144 | 145 | ### New documentation 146 | See [this page](https://github.com/reactioncommerce/reaction-docs/releases/tag/v2.0.0) for a non-comprehensive list of new and updated docs. 147 | 148 | Some highlights: 149 | - A [Storefront UI Development guide](https://docs.reactioncommerce.com/docs/next/storefront-intro) answering "How do I build a storefront for Reaction or adapt my storefront to get its data from Reaction, without starting from an example app" 150 | - Helpful info about [GraphQL Resolvers](https://docs.reactioncommerce.com/docs/graphql-resolvers-file-structure) and [extending GraphQL to add a field](https://docs.reactioncommerce.com/docs/how-to-extend-graphql-to-add-field) 151 | - A guide for [“How To Extend the Product Schema”](https://docs.reactioncommerce.com/docs/how-to-extend-product) 152 | 153 | 154 | ### OS notes 155 | **Support for Windows.** 156 | `[reaction-platform](https://github.com/reactioncommerce/reaction-platform)` is not compatible with Windows and has not been fully tested on Windows at this time. 157 | 158 | **MacOS and Linux are supported.** 159 | Reaction will support development in a dockerized environment and will focus on tooling and documentation for installation and configuration on the macOS and Linux OSes. 160 | 161 | ### We've adopted the DCO 162 | We've adopted the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed: 163 | ``` 164 | Signed-off-by: Jane Doe 165 | ``` 166 | 167 | You can sign your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration. 168 | 169 | We ask that you use your real name (please no anonymous contributions or pseudonyms). By signing your commit you are certifying that you have the right have the right to submit it under the open source license used by that particular Reaction Commerce project. You must use your real name (no pseudonyms or anonymous contributions are allowed.) 170 | 171 | We use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit. If you forget to sign your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature. 172 | 173 | We're following in the footsteps of several other open source projects in adopting the DCO such as [Chef](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/), [Docker](https://blog.docker.com/2014/01/docker-code-contributions-require-developer-certificate-of-origin/), and [GitLab](https://about.gitlab.com/2017/11/01/gitlab-switches-to-dco-license/) 174 | 175 | ### Share your feedback 176 | We want to hear from you! Here are some good ways to get in touch. 177 | - Want to request a new feature for Reaction? There’s now a Reaction repo just for [new feature requests](https://github.com/reactioncommerce/reaction-feature-requests). 178 | - Reaction engineers and community engineers and developers are always collaborating in our [Gitter chat channel](https://gitter.im/reactioncommerce/reaction) 179 | - Ask Us Anything! Watch this space for details about an upcoming Community Q&A session with the Reaction team. 180 | 181 | 182 | # v2.0.0-rc.12 183 | This is our fourth official release candidate for this project. This project should be considered pre-release until we've released the final 2.0.0 version. 184 | 185 | # v2.0.0-rc.11 186 | This is our third official release candidate for this project. This project should be considered pre-release until we've released the final 2.0.0 version. 187 | 188 | # v2.0.0-rc.10 189 | This is our second official release candidate for this project. This project should be considered pre-release until we've released the final 2.0.0 version. 190 | 191 | # v2.0.0-rc.9 192 | This is our first official release candidate for this project - we're going to be synchronizing releases across the differents parts of the Reaction Commerce ecosystem, so that's why we're starting with rc.9. This project should be considered pre-release until we've released the final 2.0.0 version. 193 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Reaction Commerce Code of Conduct 2 | 3 | All Community Guidelines content is licensed under a [Creative Commons Attribution](https://creativecommons.org/licenses/by/3.0/) license. 4 | 5 | Like the technical community as a whole, the Reaction team and community is made up of a mixture of professionals and volunteers from all over the world, working on every aspect of the mission - including mentorship, teaching, and connecting people. 6 | 7 | Diversity is one of our huge strengths, but it can also lead to communication issues and unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This code applies equally to founders, mentors, and those seeking help and guidance. 8 | 9 | This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the broader communities in which we participate. 10 | 11 | This code of conduct applies to all spaces managed by Reaction Commerce. This includes our [development chat room](https://discord.gg/Bwm63tBcQY), [forums](https://forums.reactioncommerce.com), [blog](https://blog.reactioncommerce.com), mailing lists, [issue tracker](https://github.com/reactioncommerce/reaction/issues), [project boards](https://github.com/reactioncommerce/reaction/projects), Reaction events and meetups, and any other forums or service created by the core project team which the community uses for communication. In addition, violations of this code outside these spaces may affect a person's ability to participate within them. 12 | 13 | If you believe someone is violating the code of conduct, we ask that you report it by emailing . For more details, please see our [Reporting Guidelines](https://docs.reactioncommerce.com/reaction-docs/master/reporting-guide). 14 | 15 | - **Be friendly and patient.** 16 | 17 | - **Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. 18 | 19 | - **Be considerate.** Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language. 20 | 21 | - **Be respectful.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the Reaction community should be respectful when dealing with other members as well as with people outside the Reaction community. 22 | 23 | - **Be careful in the words that you choose.** We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to: 24 | 25 | - Violent threats or language directed against another person. 26 | - Discriminatory jokes and language. 27 | - Posting sexually explicit or violent material. 28 | - Posting (or threatening to post) other people's personally identifying information ("doxing"). 29 | - Personal insults, especially those using racist or sexist terms. 30 | - Unwelcome sexual attention. 31 | - Advocating for, or encouraging, any of the above behavior. 32 | - Repeated harassment of others. In general, if someone asks you to stop, then stop. 33 | 34 | - **When we disagree, try to understand why.** Disagreements, both social and technical, happen all the time and Reaction is no exception. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of Reaction comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. 35 | 36 | ## Questions? 37 | 38 | If you have questions, please see the [FAQs](https://docs.reactioncommerce.com/reaction-docs/master/guideline-faqs). If that doesn't answer your questions, feel free to [contact us](mailto:hello@reactioncommerce.com). 39 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | At Mailchimp Open Commerce (from now MOC for brevity) we're dedicated to the open source community. In fact, we've designed our entire platform and business to grow from the passion and creativity that an open source community ignites. 4 | 5 | ## At a glance 6 | 7 | We've already attracted a small, dedicated team of open source contributors, and there's always room for more. If you'd like to join us, here's how to get started. 8 | 9 | ### Step 1: Get MOC running 10 | 11 | If you haven't already, get MOC running locally. 12 | 13 | Instructions are [here](/developer/open-commerce/guides/quick-start) for Windows, Mac OSX and Linux. 14 | 15 | ### Step 2: Find or open an issue 16 | 17 | There are two ways to go about contributing to MOC: file a bug or work on an issue that is already created and vetted by the team. 18 | 19 | #### File a bug 20 | Before you file a bug, please search existing issues first. 21 | Are you looking for support instead? Please go to our [Discord chat](https://discord.gg/Bwm63tBcQY) instead. 22 | Make sure to follow the issue template. 23 | Once your bug issue is filed, the community team will evaluate and prioritize using the following label/criteria: 24 | 25 | - **impact-critical** (do now): Blocks core functionality which would include checking out, processing orders, adding a product, etc. 26 | - **impact-major** (do next): Blocks important functionality but there is a workaround or the problem doesn't inhibit shopping/purchasing. 27 | - **impact-minor** (do eventually): Impacts peripheral functionality or there is a reasonable workaround (UI glitches, etc). 28 | Once it's been triaged and verified, a Community Engineering team member will work on it according the above criteria. 29 | 30 | #### Find an issue and claim it 31 | Explore the *Help Wanted* or *Good First Issue* issues on our GitHub repos. 32 | If you find something you want to work on, let us know right there in the comment with how you want to approach the problem. 33 | If you are a first-time contributor, also mention the @reactioncommerce/community team in the comment so you can request to be made a contributor. 34 | 35 | 36 | ### Step 3: Prepare a pull request for review 37 | Branch off `trunk` for your PR branch, unless you're fixing an urgent issue to a specific release that is still supported. 38 | 39 | Once your branch fulfills the issue it tackles, you are ready to create a pull request (PR). 40 | 41 | Select `trunk` as the base branch (the branch you want your changes pulled into). 42 | 43 | Fill out the pull request template 44 | Before you are ready for a team code review, you will also have to fill out the following sections in the template: 45 | 46 | - **Resolves** - Note issue number: Link to the GitHub issue number. 47 | If you're resolving an unreported bug, note: Resolves unreported issue. 48 | We do not accept PRs for features without issues. 49 | - **Impact** - Choose from one of the following: 50 | - **breaking**: introduces breaking changes to the app. 51 | - **critical**: resolves a critical bug blocking core functionality. Examples include browsing products, adding products to cart, checking out, processing orders, etc. 52 | - **major**: resolves a major bug or introduces significant new feature. 53 | - **minor**: resolves a minor bug, minor changes to the app, or minor new feature 54 | 55 | - **Type** - Choose from one of the following: 56 | - **feature**: A new feature or functionality 57 | - **bugfix**: A bug fix 58 | - **performance**: A code change that improves performance 59 | - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) 60 | - **test**: Adding missing or correcting existing tests 61 | - **refactor**: A code change that neither fixes a bug nor adds a feature 62 | - **docs**: Documentation only changes 63 | - **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation 64 | 65 | - **Issue Description** - Describe the issue this PR is solving with the knowledge you've gained by fixing it. This may differ from the original ticket as you now have more information at your disposal. 66 | Include additional information gathered during the process of resolving the ticket that might be helpful to reviewers or other users who might encounter the same problem. 67 | Include all information necessary to understand the issue this PR resolves so that the reviewer does not need to look at the original ticket. 68 | - **Solution** - Summarize your solution to the problem. Please include short descriptions of any solutions you tested before arriving at your final solution. This will help reviewers know why you decided to solve this problem in this particular way and will speed up the review process. 69 | Note new dependencies: If you have introduced any new dependencies, please list them, explain how they are used in your solution and any other libs that you considered. 70 | - **Breaking changes** - List breaking changes, or otherwise list none. 71 | - Changing file names 72 | - Moving files 73 | - Deleting files 74 | - Renaming functions or exports 75 | - Changes to code which might cause previous versions of MOC or third-party code not to work as expecteNote any work that you did to mitigate the effect of any breaking changes such as creating migrations, deprecation warnings, etc. 76 | 77 | - **Testing Instructions** - Write instructions for testing your changes. You can assume that reviewers know how to start the app and how to perform basic setup tasks. For any task where there may be multiple ways to do something, be explicit. (e.g. there are several ways to "Create a Product" and many options once created before a product is published). 78 | The steps you list should guide the reviewer through testing the feature or fix you've implemented. These steps will generally be very similar to the reproduction steps in the issue. 79 | 80 | #### Pass all tests 81 | As soon as your PR is pushed, automated tests run to ensure: 82 | 83 | `npm run lint`: Code style is correct 84 | `npm run test`: All unit and integration tests pass 85 | 86 | ### Step 4: PR review process begins 87 | The Community team triages all new pull requests as soon as the PR is complete. 88 | 89 | #### PR gets reviewed 90 | The team reviews code quality rules including: 91 | 92 | - **PR template**: If the PR doesn't follow the our template, reject and point the author of the PR to this doc. 93 | 94 | - **Issue description**: Use this information as the starting point for your review. If something is not clear, reject the PR and ask for clarity by requesting changes. While the original issue may have useful information, the PR should contain the most up to date representation of the issue. 95 | 96 | - **Solution**: Use this information to help determine a path to test this PR. Research any included packages or techniques that may have been used that you're not familiar with. Ask questions if you're confused. 97 | 98 | - **Breaking changes**: Test by applying this patch to an existing install of MOC with existing users, orders, carts, etc. Specifically, test any parts of the app where the breaking change is involved and any data set that is involved in a migration. 99 | 100 | - **Testing**: Run through the author's steps to verify that it works as they've tested it. Then run through the app on your own as you would test it. Run through the app as many times as you feel comfortable before approving or requesting changes. 101 | 102 | - **Readability**: the linter will help with this, but call out anything that is difficult to understand or that you feel needs comments 103 | 104 | - **Documentation**: all code added or touched should have proper JSDoc, any new functionality should be documented, as outlined in JSDoc Style Guide. 105 | 106 | - **Security**: Code should only be usable by users with the correct roles. Any data published should be filtered to ensure that only users with the correct roles for the correct shops have access to it. 107 | 108 | - **Performance**: Code should be written with performance in mind. Data publications should only publish data necessary to accomplish the specific goal at hand. 109 | 110 | - **Tests**: Any new functionality should include tests 111 | 112 | - **Dependencies**: Any newly introduced dependencies should be updated to the latest version. No Meteor dependencies. 113 | 114 | - **i18n**: All static copy should use i18next. Include definitions in the appropriate en.json file. 115 | 116 | - **a11y**: Code should be accesibility compliant. 117 | 118 | Reviewers will note any changes that they will want to QA in the app, even if they aren't listed in the testing steps (e.g if the code changes a cart button, ensure that the button still works). 119 | 120 | #### PR is ready to merge 121 | Congrats - Once you have all the green lights with an approved PR, you are ready to merge. 122 | 123 | Does your new feature require new user documentation or developer documentation? Make an issue for that in *reaction-docs*. 124 | 125 | ### Step 5: Congrats! It's merged. What happens next? 126 | Now that your PR is merged, the feature will be released in the next release. -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # GNU GENERAL PUBLIC LICENSE 2 | 3 | Version 3, 29 June 2007 4 | 5 | Copyright © 2007 Free Software Foundation, Inc. <> 6 | 7 | Everyone is permitted to copy and distribute verbatim copies of this license 8 | document, but changing it is not allowed. 9 | 10 | ## Preamble 11 | 12 | The GNU General Public License is a free, copyleft license for software and other 13 | kinds of works. 14 | 15 | The licenses for most software and other practical works are designed to take away 16 | your freedom to share and change the works. By contrast, the GNU General Public 17 | License is intended to guarantee your freedom to share and change all versions of a 18 | program--to make sure it remains free software for all its users. We, the Free 19 | Software Foundation, use the GNU General Public License for most of our software; it 20 | applies also to any other work released this way by its authors. You can apply it to 21 | your programs, too. 22 | 23 | When we speak of free software, we are referring to freedom, not price. Our General 24 | Public Licenses are designed to make sure that you have the freedom to distribute 25 | copies of free software (and charge for them if you wish), that you receive source 26 | code or can get it if you want it, that you can change the software or use pieces of 27 | it in new free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you these rights or 30 | asking you to surrender the rights. Therefore, you have certain responsibilities if 31 | you distribute copies of the software, or if you modify it: responsibilities to 32 | respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether gratis or for a fee, 35 | you must pass on to the recipients the same freedoms that you received. You must make 36 | sure that they, too, receive or can get the source code. And you must show them these 37 | terms so they know their rights. 38 | 39 | Developers that use the GNU GPL protect your rights with two steps: (1) assert 40 | copyright on the software, and (2) offer you this License giving you legal permission 41 | to copy, distribute and/or modify it. 42 | 43 | For the developers' and authors' protection, the GPL clearly explains that there is 44 | no warranty for this free software. For both users' and authors' sake, the GPL 45 | requires that modified versions be marked as changed, so that their problems will not 46 | be attributed erroneously to authors of previous versions. 47 | 48 | Some devices are designed to deny users access to install or run modified versions of 49 | the software inside them, although the manufacturer can do so. This is fundamentally 50 | incompatible with the aim of protecting users' freedom to change the software. The 51 | systematic pattern of such abuse occurs in the area of products for individuals to 52 | use, which is precisely where it is most unacceptable. Therefore, we have designed 53 | this version of the GPL to prohibit the practice for those products. If such problems 54 | arise substantially in other domains, we stand ready to extend this provision to 55 | those domains in future versions of the GPL, as needed to protect the freedom of 56 | users. 57 | 58 | Finally, every program is threatened constantly by software patents. States should 59 | not allow patents to restrict development and use of software on general-purpose 60 | computers, but in those that do, we wish to avoid the special danger that patents 61 | applied to a free program could make it effectively proprietary. To prevent this, the 62 | GPL assures that patents cannot be used to render the program non-free. 63 | 64 | The precise terms and conditions for copying, distribution and modification follow. 65 | 66 | ## TERMS AND CONDITIONS 67 | 68 | ### 0. Definitions. 69 | 70 | “This License” refers to version 3 of the GNU General Public License. 71 | 72 | “Copyright” also means copyright-like laws that apply to other kinds of 73 | works, such as semiconductor masks. 74 | 75 | “The Program” refers to any copyrightable work licensed under this 76 | License. Each licensee is addressed as “you”. “Licensees” and 77 | “recipients” may be individuals or organizations. 78 | 79 | To “modify” a work means to copy from or adapt all or part of the work in 80 | a fashion requiring copyright permission, other than the making of an exact copy. The 81 | resulting work is called a “modified version” of the earlier work or a 82 | work “based on” the earlier work. 83 | 84 | A “covered work” means either the unmodified Program or a work based on 85 | the Program. 86 | 87 | To “propagate” a work means to do anything with it that, without 88 | permission, would make you directly or secondarily liable for infringement under 89 | applicable copyright law, except executing it on a computer or modifying a private 90 | copy. Propagation includes copying, distribution (with or without modification), 91 | making available to the public, and in some countries other activities as well. 92 | 93 | To “convey” a work means any kind of propagation that enables other 94 | parties to make or receive copies. Mere interaction with a user through a computer 95 | network, with no transfer of a copy, is not conveying. 96 | 97 | An interactive user interface displays “Appropriate Legal Notices” to the 98 | extent that it includes a convenient and prominently visible feature that (1) 99 | displays an appropriate copyright notice, and (2) tells the user that there is no 100 | warranty for the work (except to the extent that warranties are provided), that 101 | licensees may convey the work under this License, and how to view a copy of this 102 | License. If the interface presents a list of user commands or options, such as a 103 | menu, a prominent item in the list meets this criterion. 104 | 105 | ### 1. Source Code. 106 | 107 | The “source code” for a work means the preferred form of the work for 108 | making modifications to it. “Object code” means any non-source form of a 109 | work. 110 | 111 | A “Standard Interface” means an interface that either is an official 112 | standard defined by a recognized standards body, or, in the case of interfaces 113 | specified for a particular programming language, one that is widely used among 114 | developers working in that language. 115 | 116 | The “System Libraries” of an executable work include anything, other than 117 | the work as a whole, that (a) is included in the normal form of packaging a Major 118 | Component, but which is not part of that Major Component, and (b) serves only to 119 | enable use of the work with that Major Component, or to implement a Standard 120 | Interface for which an implementation is available to the public in source code form. 121 | A “Major Component”, in this context, means a major essential component 122 | (kernel, window system, and so on) of the specific operating system (if any) on which 123 | the executable work runs, or a compiler used to produce the work, or an object code 124 | interpreter used to run it. 125 | 126 | The “Corresponding Source” for a work in object code form means all the 127 | source code needed to generate, install, and (for an executable work) run the object 128 | code and to modify the work, including scripts to control those activities. However, 129 | it does not include the work's System Libraries, or general-purpose tools or 130 | generally available free programs which are used unmodified in performing those 131 | activities but which are not part of the work. For example, Corresponding Source 132 | includes interface definition files associated with source files for the work, and 133 | the source code for shared libraries and dynamically linked subprograms that the work 134 | is specifically designed to require, such as by intimate data communication or 135 | control flow between those subprograms and other parts of the work. 136 | 137 | The Corresponding Source need not include anything that users can regenerate 138 | automatically from other parts of the Corresponding Source. 139 | 140 | The Corresponding Source for a work in source code form is that same work. 141 | 142 | ### 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of copyright on the 145 | Program, and are irrevocable provided the stated conditions are met. This License 146 | explicitly affirms your unlimited permission to run the unmodified Program. The 147 | output from running a covered work is covered by this License only if the output, 148 | given its content, constitutes a covered work. This License acknowledges your rights 149 | of fair use or other equivalent, as provided by copyright law. 150 | 151 | You may make, run and propagate covered works that you do not convey, without 152 | conditions so long as your license otherwise remains in force. You may convey covered 153 | works to others for the sole purpose of having them make modifications exclusively 154 | for you, or provide you with facilities for running those works, provided that you 155 | comply with the terms of this License in conveying all material for which you do not 156 | control copyright. Those thus making or running the covered works for you must do so 157 | exclusively on your behalf, under your direction and control, on terms that prohibit 158 | them from making any copies of your copyrighted material outside their relationship 159 | with you. 160 | 161 | Conveying under any other circumstances is permitted solely under the conditions 162 | stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 163 | 164 | ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 165 | 166 | No covered work shall be deemed part of an effective technological measure under any 167 | applicable law fulfilling obligations under article 11 of the WIPO copyright treaty 168 | adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention 169 | of such measures. 170 | 171 | When you convey a covered work, you waive any legal power to forbid circumvention of 172 | technological measures to the extent such circumvention is effected by exercising 173 | rights under this License with respect to the covered work, and you disclaim any 174 | intention to limit operation or modification of the work as a means of enforcing, 175 | against the work's users, your or third parties' legal rights to forbid circumvention 176 | of technological measures. 177 | 178 | ### 4. Conveying Verbatim Copies. 179 | 180 | You may convey verbatim copies of the Program's source code as you receive it, in any 181 | medium, provided that you conspicuously and appropriately publish on each copy an 182 | appropriate copyright notice; keep intact all notices stating that this License and 183 | any non-permissive terms added in accord with section 7 apply to the code; keep 184 | intact all notices of the absence of any warranty; and give all recipients a copy of 185 | this License along with the Program. 186 | 187 | You may charge any price or no price for each copy that you convey, and you may offer 188 | support or warranty protection for a fee. 189 | 190 | ### 5. Conveying Modified Source Versions. 191 | 192 | You may convey a work based on the Program, or the modifications to produce it from 193 | the Program, in the form of source code under the terms of section 4, provided that 194 | you also meet all of these conditions: 195 | 196 | - **a)** The work must carry prominent notices stating that you modified it, and giving a 197 | relevant date. 198 | - **b)** The work must carry prominent notices stating that it is released under this 199 | License and any conditions added under section 7. This requirement modifies the 200 | requirement in section 4 to “keep intact all notices”. 201 | - **c)** You must license the entire work, as a whole, under this License to anyone who 202 | comes into possession of a copy. This License will therefore apply, along with any 203 | applicable section 7 additional terms, to the whole of the work, and all its parts, 204 | regardless of how they are packaged. This License gives no permission to license the 205 | work in any other way, but it does not invalidate such permission if you have 206 | separately received it. 207 | - **d)** If the work has interactive user interfaces, each must display Appropriate Legal 208 | Notices; however, if the Program has interactive interfaces that do not display 209 | Appropriate Legal Notices, your work need not make them do so. 210 | 211 | A compilation of a covered work with other separate and independent works, which are 212 | not by their nature extensions of the covered work, and which are not combined with 213 | it such as to form a larger program, in or on a volume of a storage or distribution 214 | medium, is called an “aggregate” if the compilation and its resulting 215 | copyright are not used to limit the access or legal rights of the compilation's users 216 | beyond what the individual works permit. Inclusion of a covered work in an aggregate 217 | does not cause this License to apply to the other parts of the aggregate. 218 | 219 | ### 6. Conveying Non-Source Forms. 220 | 221 | You may convey a covered work in object code form under the terms of sections 4 and 222 | 5, provided that you also convey the machine-readable Corresponding Source under the 223 | terms of this License, in one of these ways: 224 | 225 | - **a)** Convey the object code in, or embodied in, a physical product (including a 226 | physical distribution medium), accompanied by the Corresponding Source fixed on a 227 | durable physical medium customarily used for software interchange. 228 | - **b)** Convey the object code in, or embodied in, a physical product (including a 229 | physical distribution medium), accompanied by a written offer, valid for at least 230 | three years and valid for as long as you offer spare parts or customer support for 231 | that product model, to give anyone who possesses the object code either (1) a copy of 232 | the Corresponding Source for all the software in the product that is covered by this 233 | License, on a durable physical medium customarily used for software interchange, for 234 | a price no more than your reasonable cost of physically performing this conveying of 235 | source, or (2) access to copy the Corresponding Source from a network server at no 236 | charge. 237 | - **c)** Convey individual copies of the object code with a copy of the written offer to 238 | provide the Corresponding Source. This alternative is allowed only occasionally and 239 | noncommercially, and only if you received the object code with such an offer, in 240 | accord with subsection 6b. 241 | - **d)** Convey the object code by offering access from a designated place (gratis or for 242 | a charge), and offer equivalent access to the Corresponding Source in the same way 243 | through the same place at no further charge. You need not require recipients to copy 244 | the Corresponding Source along with the object code. If the place to copy the object 245 | code is a network server, the Corresponding Source may be on a different server 246 | (operated by you or a third party) that supports equivalent copying facilities, 247 | provided you maintain clear directions next to the object code saying where to find 248 | the Corresponding Source. Regardless of what server hosts the Corresponding Source, 249 | you remain obligated to ensure that it is available for as long as needed to satisfy 250 | these requirements. 251 | - **e)** Convey the object code using peer-to-peer transmission, provided you inform 252 | other peers where the object code and Corresponding Source of the work are being 253 | offered to the general public at no charge under subsection 6d. 254 | 255 | A separable portion of the object code, whose source code is excluded from the 256 | Corresponding Source as a System Library, need not be included in conveying the 257 | object code work. 258 | 259 | A “User Product” is either (1) a “consumer product”, which 260 | means any tangible personal property which is normally used for personal, family, or 261 | household purposes, or (2) anything designed or sold for incorporation into a 262 | dwelling. In determining whether a product is a consumer product, doubtful cases 263 | shall be resolved in favor of coverage. For a particular product received by a 264 | particular user, “normally used” refers to a typical or common use of 265 | that class of product, regardless of the status of the particular user or of the way 266 | in which the particular user actually uses, or expects or is expected to use, the 267 | product. A product is a consumer product regardless of whether the product has 268 | substantial commercial, industrial or non-consumer uses, unless such uses represent 269 | the only significant mode of use of the product. 270 | 271 | “Installation Information” for a User Product means any methods, 272 | procedures, authorization keys, or other information required to install and execute 273 | modified versions of a covered work in that User Product from a modified version of 274 | its Corresponding Source. The information must suffice to ensure that the continued 275 | functioning of the modified object code is in no case prevented or interfered with 276 | solely because modification has been made. 277 | 278 | If you convey an object code work under this section in, or with, or specifically for 279 | use in, a User Product, and the conveying occurs as part of a transaction in which 280 | the right of possession and use of the User Product is transferred to the recipient 281 | in perpetuity or for a fixed term (regardless of how the transaction is 282 | characterized), the Corresponding Source conveyed under this section must be 283 | accompanied by the Installation Information. But this requirement does not apply if 284 | neither you nor any third party retains the ability to install modified object code 285 | on the User Product (for example, the work has been installed in ROM). 286 | 287 | The requirement to provide Installation Information does not include a requirement to 288 | continue to provide support service, warranty, or updates for a work that has been 289 | modified or installed by the recipient, or for the User Product in which it has been 290 | modified or installed. Access to a network may be denied when the modification itself 291 | materially and adversely affects the operation of the network or violates the rules 292 | and protocols for communication across the network. 293 | 294 | Corresponding Source conveyed, and Installation Information provided, in accord with 295 | this section must be in a format that is publicly documented (and with an 296 | implementation available to the public in source code form), and must require no 297 | special password or key for unpacking, reading or copying. 298 | 299 | ### 7. Additional Terms. 300 | 301 | “Additional permissions” are terms that supplement the terms of this 302 | License by making exceptions from one or more of its conditions. Additional 303 | permissions that are applicable to the entire Program shall be treated as though they 304 | were included in this License, to the extent that they are valid under applicable 305 | law. If additional permissions apply only to part of the Program, that part may be 306 | used separately under those permissions, but the entire Program remains governed by 307 | this License without regard to the additional permissions. 308 | 309 | When you convey a copy of a covered work, you may at your option remove any 310 | additional permissions from that copy, or from any part of it. (Additional 311 | permissions may be written to require their own removal in certain cases when you 312 | modify the work.) You may place additional permissions on material, added by you to a 313 | covered work, for which you have or can give appropriate copyright permission. 314 | 315 | Notwithstanding any other provision of this License, for material you add to a 316 | covered work, you may (if authorized by the copyright holders of that material) 317 | supplement the terms of this License with terms: 318 | 319 | - **a)** Disclaiming warranty or limiting liability differently from the terms of 320 | sections 15 and 16 of this License; or 321 | - **b)** Requiring preservation of specified reasonable legal notices or author 322 | attributions in that material or in the Appropriate Legal Notices displayed by works 323 | containing it; or 324 | - **c)** Prohibiting misrepresentation of the origin of that material, or requiring that 325 | modified versions of such material be marked in reasonable ways as different from the 326 | original version; or 327 | - **d)** Limiting the use for publicity purposes of names of licensors or authors of the 328 | material; or 329 | - **e)** Declining to grant rights under trademark law for use of some trade names, 330 | trademarks, or service marks; or 331 | - **f)** Requiring indemnification of licensors and authors of that material by anyone 332 | who conveys the material (or modified versions of it) with contractual assumptions of 333 | liability to the recipient, for any liability that these contractual assumptions 334 | directly impose on those licensors and authors. 335 | 336 | All other non-permissive additional terms are considered “further 337 | restrictions” within the meaning of section 10. If the Program as you received 338 | it, or any part of it, contains a notice stating that it is governed by this License 339 | along with a term that is a further restriction, you may remove that term. If a 340 | license document contains a further restriction but permits relicensing or conveying 341 | under this License, you may add to a covered work material governed by the terms of 342 | that license document, provided that the further restriction does not survive such 343 | relicensing or conveying. 344 | 345 | If you add terms to a covered work in accord with this section, you must place, in 346 | the relevant source files, a statement of the additional terms that apply to those 347 | files, or a notice indicating where to find the applicable terms. 348 | 349 | Additional terms, permissive or non-permissive, may be stated in the form of a 350 | separately written license, or stated as exceptions; the above requirements apply 351 | either way. 352 | 353 | ### 8. Termination. 354 | 355 | You may not propagate or modify a covered work except as expressly provided under 356 | this License. Any attempt otherwise to propagate or modify it is void, and will 357 | automatically terminate your rights under this License (including any patent licenses 358 | granted under the third paragraph of section 11). 359 | 360 | However, if you cease all violation of this License, then your license from a 361 | particular copyright holder is reinstated (a) provisionally, unless and until the 362 | copyright holder explicitly and finally terminates your license, and (b) permanently, 363 | if the copyright holder fails to notify you of the violation by some reasonable means 364 | prior to 60 days after the cessation. 365 | 366 | Moreover, your license from a particular copyright holder is reinstated permanently 367 | if the copyright holder notifies you of the violation by some reasonable means, this 368 | is the first time you have received notice of violation of this License (for any 369 | work) from that copyright holder, and you cure the violation prior to 30 days after 370 | your receipt of the notice. 371 | 372 | Termination of your rights under this section does not terminate the licenses of 373 | parties who have received copies or rights from you under this License. If your 374 | rights have been terminated and not permanently reinstated, you do not qualify to 375 | receive new licenses for the same material under section 10. 376 | 377 | ### 9. Acceptance Not Required for Having Copies. 378 | 379 | You are not required to accept this License in order to receive or run a copy of the 380 | Program. Ancillary propagation of a covered work occurring solely as a consequence of 381 | using peer-to-peer transmission to receive a copy likewise does not require 382 | acceptance. However, nothing other than this License grants you permission to 383 | propagate or modify any covered work. These actions infringe copyright if you do not 384 | accept this License. Therefore, by modifying or propagating a covered work, you 385 | indicate your acceptance of this License to do so. 386 | 387 | ### 10. Automatic Licensing of Downstream Recipients. 388 | 389 | Each time you convey a covered work, the recipient automatically receives a license 390 | from the original licensors, to run, modify and propagate that work, subject to this 391 | License. You are not responsible for enforcing compliance by third parties with this 392 | License. 393 | 394 | An “entity transaction” is a transaction transferring control of an 395 | organization, or substantially all assets of one, or subdividing an organization, or 396 | merging organizations. If propagation of a covered work results from an entity 397 | transaction, each party to that transaction who receives a copy of the work also 398 | receives whatever licenses to the work the party's predecessor in interest had or 399 | could give under the previous paragraph, plus a right to possession of the 400 | Corresponding Source of the work from the predecessor in interest, if the predecessor 401 | has it or can get it with reasonable efforts. 402 | 403 | You may not impose any further restrictions on the exercise of the rights granted or 404 | affirmed under this License. For example, you may not impose a license fee, royalty, 405 | or other charge for exercise of rights granted under this License, and you may not 406 | initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging 407 | that any patent claim is infringed by making, using, selling, offering for sale, or 408 | importing the Program or any portion of it. 409 | 410 | ### 11. Patents. 411 | 412 | A “contributor” is a copyright holder who authorizes use under this 413 | License of the Program or a work on which the Program is based. The work thus 414 | licensed is called the contributor's “contributor version”. 415 | 416 | A contributor's “essential patent claims” are all patent claims owned or 417 | controlled by the contributor, whether already acquired or hereafter acquired, that 418 | would be infringed by some manner, permitted by this License, of making, using, or 419 | selling its contributor version, but do not include claims that would be infringed 420 | only as a consequence of further modification of the contributor version. For 421 | purposes of this definition, “control” includes the right to grant patent 422 | sublicenses in a manner consistent with the requirements of this License. 423 | 424 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license 425 | under the contributor's essential patent claims, to make, use, sell, offer for sale, 426 | import and otherwise run, modify and propagate the contents of its contributor 427 | version. 428 | 429 | In the following three paragraphs, a “patent license” is any express 430 | agreement or commitment, however denominated, not to enforce a patent (such as an 431 | express permission to practice a patent or covenant not to sue for patent 432 | infringement). To “grant” such a patent license to a party means to make 433 | such an agreement or commitment not to enforce a patent against the party. 434 | 435 | If you convey a covered work, knowingly relying on a patent license, and the 436 | Corresponding Source of the work is not available for anyone to copy, free of charge 437 | and under the terms of this License, through a publicly available network server or 438 | other readily accessible means, then you must either (1) cause the Corresponding 439 | Source to be so available, or (2) arrange to deprive yourself of the benefit of the 440 | patent license for this particular work, or (3) arrange, in a manner consistent with 441 | the requirements of this License, to extend the patent license to downstream 442 | recipients. “Knowingly relying” means you have actual knowledge that, but 443 | for the patent license, your conveying the covered work in a country, or your 444 | recipient's use of the covered work in a country, would infringe one or more 445 | identifiable patents in that country that you have reason to believe are valid. 446 | 447 | If, pursuant to or in connection with a single transaction or arrangement, you 448 | convey, or propagate by procuring conveyance of, a covered work, and grant a patent 449 | license to some of the parties receiving the covered work authorizing them to use, 450 | propagate, modify or convey a specific copy of the covered work, then the patent 451 | license you grant is automatically extended to all recipients of the covered work and 452 | works based on it. 453 | 454 | A patent license is “discriminatory” if it does not include within the 455 | scope of its coverage, prohibits the exercise of, or is conditioned on the 456 | non-exercise of one or more of the rights that are specifically granted under this 457 | License. You may not convey a covered work if you are a party to an arrangement with 458 | a third party that is in the business of distributing software, under which you make 459 | payment to the third party based on the extent of your activity of conveying the 460 | work, and under which the third party grants, to any of the parties who would receive 461 | the covered work from you, a discriminatory patent license (a) in connection with 462 | copies of the covered work conveyed by you (or copies made from those copies), or (b) 463 | primarily for and in connection with specific products or compilations that contain 464 | the covered work, unless you entered into that arrangement, or that patent license 465 | was granted, prior to 28 March 2007. 466 | 467 | Nothing in this License shall be construed as excluding or limiting any implied 468 | license or other defenses to infringement that may otherwise be available to you 469 | under applicable patent law. 470 | 471 | ### 12. No Surrender of Others' Freedom. 472 | 473 | If conditions are imposed on you (whether by court order, agreement or otherwise) 474 | that contradict the conditions of this License, they do not excuse you from the 475 | conditions of this License. If you cannot convey a covered work so as to satisfy 476 | simultaneously your obligations under this License and any other pertinent 477 | obligations, then as a consequence you may not convey it at all. For example, if you 478 | agree to terms that obligate you to collect a royalty for further conveying from 479 | those to whom you convey the Program, the only way you could satisfy both those terms 480 | and this License would be to refrain entirely from conveying the Program. 481 | 482 | ### 13. Use with the GNU Affero General Public License. 483 | 484 | Notwithstanding any other provision of this License, you have permission to link or 485 | combine any covered work with a work licensed under version 3 of the GNU Affero 486 | General Public License into a single combined work, and to convey the resulting work. 487 | The terms of this License will continue to apply to the part which is the covered 488 | work, but the special requirements of the GNU Affero General Public License, section 489 | 13, concerning interaction through a network will apply to the combination as such. 490 | 491 | ### 14. Revised Versions of this License. 492 | 493 | The Free Software Foundation may publish revised and/or new versions of the GNU 494 | General Public License from time to time. Such new versions will be similar in spirit 495 | to the present version, but may differ in detail to address new problems or concerns. 496 | 497 | Each version is given a distinguishing version number. If the Program specifies that 498 | a certain numbered version of the GNU General Public License “or any later 499 | version” applies to it, you have the option of following the terms and 500 | conditions either of that numbered version or of any later version published by the 501 | Free Software Foundation. If the Program does not specify a version number of the GNU 502 | General Public License, you may choose any version ever published by the Free 503 | Software Foundation. 504 | 505 | If the Program specifies that a proxy can decide which future versions of the GNU 506 | General Public License can be used, that proxy's public statement of acceptance of a 507 | version permanently authorizes you to choose that version for the Program. 508 | 509 | Later license versions may give you additional or different permissions. However, no 510 | additional obligations are imposed on any author or copyright holder as a result of 511 | your choosing to follow a later version. 512 | 513 | ### 15. Disclaimer of Warranty. 514 | 515 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 516 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 517 | PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER 518 | EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 519 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE 520 | QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE 521 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 522 | 523 | ### 16. Limitation of Liability. 524 | 525 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY 526 | COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS 527 | PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, 528 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 529 | PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE 530 | OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE 531 | WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 532 | POSSIBILITY OF SUCH DAMAGES. 533 | 534 | ### 17. Interpretation of Sections 15 and 16. 535 | 536 | If the disclaimer of warranty and limitation of liability provided above cannot be 537 | given local legal effect according to their terms, reviewing courts shall apply local 538 | law that most closely approximates an absolute waiver of all civil liability in 539 | connection with the Program, unless a warranty or assumption of liability accompanies 540 | a copy of the Program in return for a fee. 541 | 542 | END OF TERMS AND CONDITIONS 543 | 544 | ## How to Apply These Terms to Your New Programs 545 | 546 | If you develop a new program, and you want it to be of the greatest possible use to 547 | the public, the best way to achieve this is to make it free software which everyone 548 | can redistribute and change under these terms. 549 | 550 | To do so, attach the following notices to the program. It is safest to attach them 551 | to the start of each source file to most effectively state the exclusion of warranty; 552 | and each file should have at least the “copyright” line and a pointer to 553 | where the full notice is found. 554 | 555 | 556 | Copyright (C) 557 | 558 | This program is free software: you can redistribute it and/or modify 559 | it under the terms of the GNU General Public License as published by 560 | the Free Software Foundation, either version 3 of the License, or 561 | (at your option) any later version. 562 | 563 | This program is distributed in the hope that it will be useful, 564 | but WITHOUT ANY WARRANTY; without even the implied warranty of 565 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 566 | GNU General Public License for more details. 567 | 568 | You should have received a copy of the GNU General Public License 569 | along with this program. If not, see . 570 | 571 | Also add information on how to contact you by electronic and paper mail. 572 | 573 | If the program does terminal interaction, make it output a short notice like this 574 | when it starts in an interactive mode: 575 | 576 | Copyright (C) 577 | This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. 578 | This is free software, and you are welcome to redistribute it 579 | under certain conditions; type 'show c' for details. 580 | 581 | The hypothetical commands 'show w' and 'show c' should show the appropriate parts of 582 | the General Public License. Of course, your program's commands might be different; 583 | for a GUI interface, you would use an “about box”. 584 | 585 | You should also get your employer (if you work as a programmer) or school, if any, to 586 | sign a “copyright disclaimer” for the program, if necessary. For more 587 | information on this, and how to apply and follow the GNU GPL, see 588 | <>. 589 | 590 | The GNU General Public License does not permit incorporating your program into 591 | proprietary programs. If your program is a subroutine library, you may consider it 592 | more useful to permit linking proprietary applications with the library. If this is 593 | what you want to do, use the GNU Lesser General Public License instead of this 594 | License. But first, please read 595 | <>. 596 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #gnu makefile 2 | # This Makefile provides macro control of the Reaction Platform microservice 3 | # ecosystem. It performs tasks like: 4 | # 5 | # * Verify dependencies are present 6 | # * Clone git projects, checkout a particular reference 7 | # * Preconfiguration and subproject bootstrapping 8 | # * Launching subprojects 9 | # * Teardown tasks with varying destructiveness 10 | # 11 | # 12 | # Exit codes: 13 | # 14 | # All failures should exit with a detailed code that can be used for 15 | # troubleshooting. The current exit codes are: 16 | # 17 | # 0: Success! 18 | # 101: Github is not configured correctly. 19 | # 102: Required dependency is not installed. 20 | # 21 | 22 | ############################################################################### 23 | ### Common Configuration 24 | ############################################################################### 25 | HOOK_DIR=.reaction/project-hooks 26 | 27 | ############################################################################### 28 | ### Loaded Configuration 29 | ### Load configuration from external files. Configuration variables defined in 30 | ### later files have precedent and will overwrite those defined in previous 31 | ### files. The -include directive ensures that no error is thrown if a file is 32 | ### not found, which is the case if config.local.mk does not exist. 33 | ############################################################################### 34 | -include config.mk config.local.mk 35 | 36 | SUBPROJECTS=$(foreach rr,$(SUBPROJECT_REPOS),$(shell echo $(rr) | cut -d , -f 2)) 37 | 38 | 39 | ############################################################################### 40 | ### Tasks 41 | ############################################################################### 42 | all: init 43 | 44 | ############################################################################### 45 | ### Init-Project 46 | ### Initializes a project in production mode. 47 | ### Does not do common tasks shared between projects. 48 | ############################################################################### 49 | define init-template 50 | init-$(1): $(1) network-create dev-unlink-$(1) prebuild-$(1) build-$(1) post-build-$(1) start-$(1) post-project-start-$(1) 51 | endef 52 | $(foreach p,$(SUBPROJECTS),$(eval $(call init-template,$(p)))) 53 | 54 | ############################################################################### 55 | ### Init-Dev-Project 56 | ### Initializes a project in development mode. 57 | ### Does not do common tasks shared between projects. 58 | ############################################################################### 59 | define init-dev-template 60 | init-dev-$(1): $(1) network-create dev-link-$(1) prebuild-$(1) build-$(1) post-build-$(1) start-$(1) post-project-start-$(1) 61 | endef 62 | $(foreach p,$(SUBPROJECTS),$(eval $(call init-dev-template,$(p)))) 63 | 64 | ############################################################################### 65 | ### Init-With-System 66 | ### Init project and run the post-system hook script. This is useful for 67 | ### initializing a single project. 68 | ### Assumes dependencies are already started. 69 | ############################################################################### 70 | define init-with-system-template 71 | init-with-system-$(1): init-$(1) post-system-start-$(1) 72 | endef 73 | $(foreach p,$(SUBPROJECTS),$(eval $(call init-with-system-template,$(p)))) 74 | 75 | ############################################################################### 76 | ### Init-Dev-with-System 77 | ### Init project and run the post-system hook script. This is useful for 78 | ### initializing a single project in development mode. 79 | ### Assumes dependencies are already started. 80 | ############################################################################### 81 | define init-dev-with-system-template 82 | init-dev-with-system-$(1): init-dev-$(1) post-system-start-$(1) 83 | endef 84 | $(foreach p,$(SUBPROJECTS),$(eval $(call init-dev-with-system-template,$(p)))) 85 | 86 | .PHONY: init 87 | init: $(foreach p,$(SUBPROJECTS),init-$(p)) post-system-start 88 | 89 | .PHONY: init-dev 90 | init-dev: $(foreach p,$(SUBPROJECTS),init-dev-$(p)) post-system-start 91 | 92 | ############################################################################### 93 | ### Targets to verify Github is configured correctly. 94 | ############################################################################### 95 | github-configured: dependencies 96 | @(ssh -T git@github.com 2>&1 \ 97 | | grep "successfully authenticated" >/dev/null \ 98 | && echo "Github login verified.") \ 99 | || (echo "You need to configure an ssh key with access to github" \ 100 | && echo "See https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ for instructions" \ 101 | && exit 101) 102 | 103 | 104 | ############################################################################### 105 | ### Verify prerequisite software is installed. 106 | ############################################################################### 107 | is-not-installed=! (command -v $(1) >/dev/null) 108 | 109 | define dependency-template 110 | dependency-$(1): 111 | @if ( $(call is-not-installed,$(1)) ); \ 112 | then \ 113 | echo "Dependency" $(1) " not found in path." \ 114 | && exit 102; \ 115 | else \ 116 | echo "Dependency" $(1) "found."; \ 117 | fi; 118 | endef 119 | $(foreach pkg,$(REQUIRED_SOFTWARE),$(eval $(call dependency-template,$(pkg)))) 120 | 121 | .PHONY: dependencies 122 | dependencies: $(foreach pkg,$(REQUIRED_SOFTWARE),dependency-$(pkg)) 123 | 124 | ############################################################################### 125 | ### Create Docker Networks 126 | ### Create all networks defined in the DOCKER_NETWORKS variable. 127 | ### Networks provide a way to loosely couple the projects and allow them to 128 | ### communicate with each other. We'll use dependencies on external networks 129 | ### rather than dependencies on other projects. Networks are lightweight and 130 | ### easy to create. 131 | ############################################################################### 132 | define network-create-template 133 | network-create-$(1): 134 | @docker network create "$(1)" || true 135 | endef 136 | $(foreach p,$(DOCKER_NETWORKS),$(eval $(call network-create-template,$(p)))) 137 | 138 | .PHONY: network-create 139 | network-create: $(foreach p,$(DOCKER_NETWORKS),network-create-$(p)) 140 | 141 | ############################################################################### 142 | ### Remove Docker Networks 143 | ### Remove all networks defined in the DOCKER_NETWORKS variable. 144 | ############################################################################### 145 | define network-remove-template 146 | network-remove-$(1): 147 | @docker network rm "$(1)" || true 148 | endef 149 | $(foreach p,$(DOCKER_NETWORKS),$(eval $(call network-remove-template,$(p)))) 150 | 151 | .PHONY: network-remove 152 | network-remove: $(foreach p,$(DOCKER_NETWORKS),network-remove-$(p)) 153 | 154 | ############################################################################### 155 | ### Git cloning 156 | ############################################################################### 157 | define git-clone-template 158 | $(2): 159 | if [ ! -d "$(2)" ] ; then \ 160 | git clone "$(1)" "$(2)"; \ 161 | cd $(2) && git checkout "$(3)"; \ 162 | fi 163 | endef 164 | $(foreach rr,$(SUBPROJECT_REPOS),$(eval $(call git-clone-template,$(shell echo $(rr) | cut -d , -f 1),$(shell echo $(rr) | cut -d , -f 2),$(shell echo $(rr) | cut -d , -f 3)))) 165 | 166 | .PHONY: clone 167 | clone: github-configured $(foreach p,$(SUBPROJECTS),$(p)) 168 | 169 | ############################################################################### 170 | ### Git clone all API plugins 171 | ############################################################################### 172 | .PHONY: clone-api-plugins 173 | clone-api-plugins: 174 | if [ ! -d api-plugins ] ; then \ 175 | mkdir api-plugins; \ 176 | fi; \ 177 | cd api-plugins; \ 178 | for repo in $(API_PLUGIN_REPOS); do \ 179 | git clone $$repo || true; \ 180 | done; 181 | 182 | ############################################################################### 183 | ### Git Verify Clean 184 | ### Checks that the project has a clean workspace and changes won't be lost. 185 | ############################################################################### 186 | define git-ensure-clean-diff-template 187 | git-ensure-clean-diff-$(2): $(2) 188 | @cd "$(2)" \ 189 | && git diff --stat --quiet \ 190 | || (echo "There are uncommitted changes in './$(2)'. Commit or discard changes before performing this operation."; exit 1) 191 | endef 192 | $(foreach rr,$(SUBPROJECT_REPOS),$(eval $(call git-ensure-clean-diff-template,$(shell echo $(rr) | cut -d , -f 1),$(shell echo $(rr) | cut -d , -f 2),$(shell echo $(rr) | cut -d , -f 3)))) 193 | 194 | .PHONY: git-ensure-clean-diff 195 | git-ensure-clean-diff: $(foreach p,$(SUBPROJECTS),git-ensure-clean-diff-$(p)) 196 | 197 | ############################################################################### 198 | ### Git checkout 199 | ### Checkout the branch configured in the platform settings. 200 | ### Does not gracefully deal with conflicts or other problems. 201 | ############################################################################### 202 | define git-checkout-template 203 | checkout-$(2): $(2) 204 | cd $(2) && git fetch && git checkout "$(3)" 205 | endef 206 | $(foreach rr,$(SUBPROJECT_REPOS),$(eval $(call git-checkout-template,$(shell echo $(rr) | cut -d , -f 1),$(shell echo $(rr) | cut -d , -f 2),$(shell echo $(rr) | cut -d , -f 3)))) 207 | 208 | .PHONY: checkout 209 | checkout: clone $(foreach p,$(SUBPROJECTS),checkout-$(p)) 210 | 211 | 212 | ############################################################################### 213 | ### Git Update Checkouts 214 | ### Will check out the configured branch for all projects. This can be used to 215 | ### get an installation in sync with the configuration file. 216 | ### Fails on conflicts so the developer can properly commit or discard work. 217 | ### 218 | ### It is important to keep the `git-ensure-clean-diff` dependency, else 219 | ### WORK WILL BE LOST!! 220 | ############################################################################### 221 | define git-update-checkout-template 222 | update-checkout-$(2): git-ensure-clean-diff-$(2) 223 | cd $(2) \ 224 | && git fetch --tags \ 225 | && git checkout $(3) \ 226 | && git pull origin $(3) --ff-only 227 | endef 228 | $(foreach rr,$(SUBPROJECT_REPOS),$(eval $(call git-update-checkout-template,$(shell echo $(rr) | cut -d , -f 1),$(shell echo $(rr) | cut -d , -f 2),$(shell echo $(rr) | cut -d , -f 3)))) 229 | 230 | .PHONY: update-checkouts 231 | update-checkouts: $(foreach p,$(SUBPROJECTS),update-checkout-$(p)) 232 | 233 | ############################################################################### 234 | ### Pre Build Hook 235 | ### Invokes the pre-build hook in the child project directory if it exists. 236 | ### Invoked before the Docker Compose build. 237 | ############################################################################### 238 | define prebuild-template 239 | prebuild-$(1): $(1) 240 | @if [ -e "$(1)/$(HOOK_DIR)/pre-build" ]; then \ 241 | echo "Running pre-build hook script for $(1)." \ 242 | && "$(1)/$(HOOK_DIR)/pre-build"; \ 243 | else \ 244 | echo "No pre-build hook script for $(1). Skipping."; \ 245 | fi; 246 | endef 247 | $(foreach p,$(SUBPROJECTS),$(eval $(call prebuild-template,$(p)))) 248 | 249 | .PHONY: prebuild 250 | prebuild: $(foreach p,$(SUBPROJECTS),prebuild-$(p)) 251 | 252 | 253 | ############################################################################### 254 | ### Docker Build 255 | ### Performs `docker-compose build --no-cache --pull` 256 | ### This is a very conservative build strategy to avoid cache related build 257 | ### issues. 258 | ############################################################################### 259 | define build-template 260 | build-$(1): prebuild-$(1) 261 | @cd $(1) \ 262 | && docker-compose build --no-cache --pull 263 | endef 264 | $(foreach p,$(SUBPROJECTS),$(eval $(call build-template,$(p)))) 265 | 266 | .PHONY: build 267 | build: $(foreach p,$(SUBPROJECTS),build-$(p)) 268 | 269 | 270 | ############################################################################### 271 | ### Post Build Hook 272 | ### Invokes the post-build hook in the child project if existent. 273 | ### Invoke after all services in a project have been built. 274 | ############################################################################### 275 | define post-build-template 276 | post-build-$(1): build-$(1) 277 | @if [ -e "$(1)/$(HOOK_DIR)/post-build" ]; then \ 278 | echo "Running post-build hook script for $(1)." \ 279 | && "$(1)/$(HOOK_DIR)/post-build"; \ 280 | else \ 281 | echo "No post-build hook script for $(1). Skipping."; \ 282 | fi; 283 | endef 284 | $(foreach p,$(SUBPROJECTS),$(eval $(call post-build-template,$(p)))) 285 | 286 | .PHONY: post-build 287 | post-build: $(foreach p,$(SUBPROJECTS),post-build-$(p)) 288 | 289 | ############################################################################### 290 | ### dev-unlink 291 | ### Removes the symlinks for docker-compose development 292 | ############################################################################### 293 | define dev-unlink-template 294 | dev-unlink-$(1): 295 | @cd $(1) \ 296 | && rm -f docker-compose.override.yml \ 297 | && echo "Removed docker development symlink for $(1)" 298 | endef 299 | $(foreach p,$(SUBPROJECTS),$(eval $(call dev-unlink-template,$(p)))) 300 | 301 | .PHONY: dev-unlink 302 | dev-unlink: $(foreach p,$(SUBPROJECTS),dev-unlink-$(p)) 303 | 304 | ############################################################################### 305 | ### dev-link 306 | ### Overrides default symlinks for `docker-compose` using `docker-compose.dev.yml` 307 | ############################################################################### 308 | define dev-link-template 309 | dev-link-$(1): 310 | @if [ -e "$(1)/docker-compose.dev.yml" ]; then \ 311 | cd $(1) \ 312 | && ln -sf docker-compose.dev.yml docker-compose.override.yml \ 313 | && echo "Created docker development symlink for $(1)"; \ 314 | fi; 315 | endef 316 | $(foreach p,$(SUBPROJECTS),$(eval $(call dev-link-template,$(p)))) 317 | 318 | .PHONY: dev-link 319 | dev-link: $(foreach p,$(SUBPROJECTS),dev-link-$(p)) 320 | 321 | ############################################################################### 322 | ### dev 323 | ### Starts services in development mode with 324 | ### `ln -s docker-compose.dev.yml docker-compose.override.yml; docker-compose up -d` 325 | ############################################################################### 326 | define dev-template 327 | dev-$(1): stop-$(1) dev-link-$(1) start-$(1) 328 | endef 329 | $(foreach p,$(SUBPROJECTS),$(eval $(call dev-template,$(p)))) 330 | 331 | ############################################################################### 332 | ### Start 333 | ### Starts services with `docker-compose up -d` 334 | ### 335 | ### Pull the specified image tags every time. Tags are constantly being updated 336 | ### to point to different image IDs, and there is less to debug if we can be 337 | ### reasonably to make sure that you're always starting the latest image with that tag. 338 | ### 339 | ### We are purposely running dc up even if dc pull fails. Our Meteor project DC 340 | ### config uses `image` as a desired image tag for `build` when in dev mode. But 341 | ### `dc pull` seems to have a bug where it doesn't treat it this way and tries 342 | ### to pull it. 343 | ############################################################################### 344 | define start-template 345 | start-$(1): 346 | @cd $(1) && docker-compose pull; docker-compose up -d 347 | endef 348 | $(foreach p,$(SUBPROJECTS),$(eval $(call start-template,$(p)))) 349 | 350 | .PHONY: start 351 | start: $(foreach p,$(SUBPROJECTS),start-$(p)) 352 | 353 | 354 | ############################################################################### 355 | ### Post Project Start Hook 356 | ### Invokes the post-project-start hook in the child project if existent. 357 | ### Invoked after all services in a project have been started. 358 | ############################################################################### 359 | define post-project-start-template 360 | post-project-start-$(1): 361 | @if [ -e "$(1)/$(HOOK_DIR)/post-project-start" ]; then \ 362 | echo "Running post-project-start hook script for $(1)." \ 363 | && "$(1)/$(HOOK_DIR)/post-project-start"; \ 364 | else \ 365 | echo "No post-project-start hook script for $(1). Skipping."; \ 366 | fi; 367 | endef 368 | $(foreach p,$(SUBPROJECTS),$(eval $(call post-project-start-template,$(p)))) 369 | 370 | ############################################################################### 371 | ### Post System Start Hook 372 | ### Invokes the post-system-start hook in the child projects if existent. 373 | ### Invoked after all services in the system have been started. 374 | ### 375 | ### Note: The final echo is required otherwise output of post-system-hook is 376 | ### not output. 377 | ############################################################################### 378 | define post-system-start-template 379 | post-system-start-$(1): 380 | @if [ -e "$(1)/$(HOOK_DIR)/post-system-start" ]; then \ 381 | echo "Running post-system-start hook script for $(1)." \ 382 | && "$(1)/$(HOOK_DIR)/post-system-start" \ 383 | && echo ""; \ 384 | else \ 385 | echo "No post-system-start hook script for $(1). Skipping."; \ 386 | fi; 387 | endef 388 | $(foreach p,$(SUBPROJECTS),$(eval $(call post-system-start-template,$(p)))) 389 | 390 | .PHONY: post-system-start 391 | post-system-start: $(foreach p,$(SUBPROJECTS),post-system-start-$(p)) 392 | 393 | 394 | ############################################################################### 395 | ### Stop 396 | ### Stops services with `docker-compose stop` 397 | ############################################################################### 398 | define stop-template 399 | stop-$(1): 400 | @cd $(1) \ 401 | && docker-compose stop 402 | endef 403 | $(foreach p,$(SUBPROJECTS),$(eval $(call stop-template,$(p)))) 404 | 405 | .PHONY: stop 406 | stop: $(foreach p,$(SUBPROJECTS),stop-$(p)) 407 | 408 | ############################################################################### 409 | ### rm 410 | ### Remove containers with `docker-compose rm` 411 | ### Does not remove volumes. 412 | ############################################################################### 413 | define rm-template 414 | rm-$(1): 415 | @cd $(1) \ 416 | && docker-compose rm --stop --force 417 | endef 418 | $(foreach p,$(SUBPROJECTS),$(eval $(call rm-template,$(p)))) 419 | 420 | .PHONY: rm 421 | rm: $(foreach p,$(SUBPROJECTS),rm-$(p)) 422 | 423 | ############################################################################### 424 | ### Clean 425 | ### Clean services with `docker-compose rm` 426 | ### Removes all containers, volumes and local networks. 427 | ############################################################################### 428 | define clean-template 429 | clean-$(1): 430 | @cd $(1) \ 431 | && docker-compose down -v --rmi local --remove-orphans 432 | endef 433 | $(foreach p,$(SUBPROJECTS),$(eval $(call clean-template,$(p)))) 434 | 435 | .PHONY: clean 436 | clean: $(foreach p,$(SUBPROJECTS),clean-$(p)) network-remove 437 | 438 | ############################################################################### 439 | ### Destroy 440 | ### Deletes project directories after removing running containers. 441 | ### WARNING: This is extremely destructive. It will remove local project 442 | ### directories. Any work that is not pushed to a remote git 443 | ### repository will be lost! 444 | ### 445 | ############################################################################### 446 | define destroy-template 447 | destroy-$(1): clean 448 | @rm -Rf $(1) 449 | endef 450 | $(foreach p,$(SUBPROJECTS),$(eval $(call destroy-template,$(p)))) 451 | 452 | .PHONY: destroy 453 | destroy: network-remove $(foreach p,$(SUBPROJECTS),destroy-$(p)) 454 | 455 | ############################################################################### 456 | ### Dynamically list all targets. 457 | ### See: https://stackoverflow.com/a/26339924 458 | ############################################################################### 459 | .PHONY: list 460 | list: 461 | @$(MAKE) -pRrq -f $(MAKEFILE_LIST) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs -n 1 462 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NOTE: THIS PROJECT IS DEPRECATED 2 | 3 | **No further work is being done to maintain or improve this project** 4 | 5 | You should use the [Reaction CLI](https://github.com/reactioncommerce/cli) to start working with the project 6 | 7 | 8 | Consult the [Open Commerce Quick Start Guide](https://mailchimp.com/developer/open-commerce/guides/quick-start/) for 9 | more information 10 | 11 | ## Overview 12 | 13 | Reaction Platform is a customizable, real-time, reactive commerce solution. This repository is the quickest way to get started with the [Reaction API][10] and its supporting services in a local development environment. 14 | 15 | ## Features 16 | 17 | - A modern, enterprise-ready, real-time commerce platform. 18 | - A microservices based architecture. 19 | - Docker based development environment. 20 | - Launched and configured with a single CLI command. 21 | 22 | ## Prerequisites 23 | 24 | - [GNU Make](https://www.gnu.org/software/make/) 25 | - MacOS and Linux users will have a suitable version bundled with the OS 26 | - Bourne Shell and POSIX tools (sh, grep, sed, awk, etc) 27 | - MacOS and Linux users will have a suitable version bundled with the OS 28 | - [Git][5] 29 | - [Docker][0] | [Docker for Mac][1] | [Docker for Windows][2] 30 | - A [GitHub][6] account with a [configured SSH key][7] is not required by 31 | default, but necessary when using custom, private Github repositories. 32 | 33 | ## Getting started 34 | 35 | Clone this repository, and then run `make` in the `reaction-development-platform` directory. If all goes well, it will take some time to download and start all of the components, but when it's done you'll have the entire Reaction application running on your computer through Docker. Individual services are cloned as child directories within this project. 36 | 37 | ```sh 38 | git clone git@github.com:reactioncommerce/reaction-development-platform.git 39 | cd reaction-development-platform 40 | make 41 | ``` 42 | 43 | Behind the scenes `make` is 44 | 45 | - checking that dependencies are present 46 | - cloning sub-projects from GitHub 47 | - downloading Docker images 48 | - starting services 49 | 50 | These services will be running when the initial `make` command is complete: 51 | 52 | | Service | Description | 53 | | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 54 | | [Reaction API][10] (http://localhost:3000) | The Reaction API, which includes [a GraphQL endpoint](http://localhost:3000/graphql). See [GraphQL Playground](https://www.apollographql.com/docs/apollo-server/features/graphql-playground/). | 55 | | [Reaction Admin][19] (http://localhost:4080) | A user interface for administrators and shop managers to configure shops, manage products, and process orders. | 56 | | [Example Storefront][13] (http://localhost:4000) | An example Reaction storefront UI built with [Next.JS](https://github.com/zeit/next.js/). | 57 | 58 | If the `make` command fails at some point, you can run or rerun it for specific services with: 59 | 60 | ```sh 61 | make init- 62 | ``` 63 | 64 | Example: 65 | 66 | ```sh 67 | make init-example-storefront 68 | ``` 69 | 70 | ## Migrating from v3.x.x to v4.x.x 71 | 72 | Look at the detailed guide [here](docs/migration-guide-v4.md) 73 | 74 | ## Ongoing Support for v3.x 75 | 76 | We'll continue to provide v3.x support for 6 months from the v4.0 release. That marks 3/1/2022 as the date when we officially end support to 3.x versions and below. Beyond that date we'll be fully dedicated to the new version and will not be taking any v3.x issues into discussion/development. 77 | 78 | ## Project Commands 79 | 80 | These are the available `make` commands in the `reaction-platform` root directory. 81 | 82 | | Command | Description | 83 | | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 84 | | `make` | Bootstraps the entire Reaction development environment in Docker. Projects will use production Docker images and code. | 85 | | `make init-` | Example: `make init-example-storefront`. Does clone/setup for a single project. | 86 | | `make init-dev` | Bootstraps the entire Reaction development environment in Docker. Projects will use development configuration. | 87 | | `make init-dev-` | Example: `make init-dev-example-storefront`. Does clone/setup for a single project and configures it with a development configuration. | 88 | | `make stop` | Stops all containers. | 89 | | `make stop-` | Example: `make stop-example-storefront`. Stops all containers for a single project. | 90 | | `make start` | Starts all containers. | 91 | | `make start-` | Example: `make start-example-storefront`. Starts all containers for a single project. | 92 | | `make dev-` | Example: `make dev-example-storefront`. Starts all containers for a single project in development mode. | 93 | | `make dev-link` | Creates `docker-compose.override.yml` symlinks for development in all projects. | 94 | | `make dev-link-` | Example: `make dev-link-example-storefront`. Creates development symlinks for a single project. | 95 | | `make dev-unlink` | Removes `docker-compose.override.yml` symlinks from all projects. | 96 | | `make dev-unlink-` | Example: `make dev-unlink-example-storefront`. Removes the `docker-compose.override.yml` symlink for a single project. | 97 | | `make rm` | Removes all containers. Volumes are not removed. | 98 | | `make rm-` | Example: `make rm-example-storefront`. Removes all containers for a single project. Volumes are not removed. | 99 | | `make checkout- ` | Example: `make checkout-example-storefront release-v3.0.0`. Does `git checkout` for a sub-project. See "Running Particular Git Branches" below. | 100 | | `make clean` | Removes all containers, networks, and volumes. Any volume data will be lost. | 101 | | `make clean-` | Example: `make clean-example-storefront`. Removes all containers, networks, and volumes for a single project. Any volume data will be lost. | 102 | | `make update-checkouts` | Example: `make update-checkouts`. Updates git checkouts on all projects. Useful for syncing dev env to config file. Safe, fails on uncommitted changes. | 103 | | `make update-checkout-` | Example: `make update-checkout-example-storefront`. Checks out branch in config file and pulls. Useful for syncing dev env to config file. Safe, fails on uncommitted changes. | 104 | | `make clone-api-plugins` | If you are going to make changes to the default plugins, this is a quick way to clone them all into an `api-plugins` subdirectory of this project. | 105 | 106 | ## Customizing Configuration 107 | 108 | The development platform runs the latest version of Reaction by default, but 109 | it's possible to select a specific version, or to customize an existing release 110 | version. 111 | 112 | ### How Configuration Works 113 | 114 | The Reaction development platform uses `make` to run tasks. `make` is aware of 115 | the task dependency tree and ensures that all required dependencies are met 116 | when running a task. The main tasks and functionality for `make` are 117 | configured in `Makefile`. 118 | 119 | Configurations that may change are extracted into `config.mk`. This file is 120 | checked in to source control and should not be modified. It is always configured 121 | for the latest Reaction release. 122 | 123 | If a file named `config.local.mk` exists then it will be loaded after 124 | `config.mk`. Settings in `config.local.mk` will override those set in 125 | `config.mk`. It is ignored by source control. 126 | 127 | ### Running a Specific Reaction Release Version 128 | 129 | Configurations for specific Reaction releases (since v3.0.0) are located in 130 | `config/reaction-oss`. You may symlink or copy any release configuration to 131 | `config.local.mk`. 132 | 133 | For example, this command will configure the platform to run `v3.0.4`: 134 | 135 | ```sh 136 | ln -s config/reaction-oss/reaction-v3.0.4.mk config.local.mk 137 | make 138 | ``` 139 | 140 | ### Running A Customized Installation 141 | 142 | You may customize your Reaction installation by modifying `config.local.mk`. 143 | It's easiest to start with an existing release configuration file and modify it 144 | as needed. In this way you can: 145 | 146 | - Add new sub-projects 147 | - Remove sub-projects 148 | - Update the git origin for a sub-project 149 | - Change the default branch for a sub-project 150 | - Customize the lifecycle hooks directory to run custom scripts for automation 151 | 152 | Configuration files store in `config/local` are ignored by git. It's a 153 | convenient place to store local files for quick development. If you are sharing 154 | files with a team then you may want to keep your configuration files in a 155 | separate git repository or in shared network storage. 156 | 157 | The only requirement to override configuration is that you need to put a file 158 | into place at `config.local.mk`, so it is possible to copy or symlink a file 159 | from anywhere in your system. 160 | 161 | Examples: 162 | 163 | ```sh 164 | # Use a file in the config/local directory 165 | ln -s config/local/my-custom-config.mk config.local.mk 166 | make 167 | ``` 168 | 169 | ```sh 170 | # Use a file in the config/local directory 171 | ln -s /path/on/my/system/reactionconfig.mk config.local.mk 172 | make 173 | ``` 174 | 175 | ### Updating Local Branches to Match Config 176 | 177 | If you are using the Reaction development platform for development, then you 178 | will need to update your local branch to get the latest at some point. The 179 | `update-checkouts` command will perform this operation. 180 | 181 | ``` 182 | make update-checkouts 183 | ``` 184 | 185 | The command is safe. It will halt if there are uncommitted changes in 186 | git before doing anything. You may commit, stash or drop those changes. 187 | 188 | ## Running Particular Git Branches 189 | 190 | After you've done the "Getting Started" steps and have the latest Reaction system running, you may need to switch to and run a certain branch/tag in one or more of the sub-projects. 191 | 192 | To check out and run a certain branch or tag for a project, stop the project, run `make checkout- `, and then init the project again. 193 | 194 | Example: 195 | 196 | ```sh 197 | make stop-example-storefront 198 | make checkout-example-storefront release-v3.0.0 199 | make init-example-storefront 200 | ``` 201 | 202 | If you're getting unexpected results, `cd` into the sub-project directory and do a `git pull` to verify you're on the latest commit from that branch. If you're changing code files, see the "Running From Code For Development" section below. 203 | 204 | ### Running From Code For Development 205 | 206 | To ensure they start quickly, all Reaction projects are configured (in their `docker-compose.yml` file) to run from the latest published Docker image. This means that if you change code files, you will not see your changes reflected in the running application. 207 | 208 | ##### To install the whole platform in development mode: 209 | 210 | Run `make init-dev` (instead of `make`). 211 | 212 | Doing this takes time to install and will consume more resources. 213 | 214 | ##### To switch over to development mode for a single project: 215 | 216 | ```sh 217 | make stop- 218 | make dev-link- 219 | make 220 | ``` 221 | 222 | If you run into trouble with the above command, run `make clean-` and then `make init-dev-`. 223 | 224 | ##### To switch back to production mode for a single project: 225 | 226 | ```sh 227 | make stop- 228 | make dev-unlink- 229 | make 230 | ``` 231 | 232 | If you run into trouble with the above command, run `make clean-` and then `make init-`. 233 | 234 | ## Networked Services 235 | 236 | User-defined Docker networks are used to connect the Reaction services that run 237 | as separate Docker Compose projects. With this configuration, each of the 238 | projects can be launched independently using Docker Compose. 239 | 240 | While the projects can be launched independently they may have network 241 | dependencies that are required to function correctly. The platform Makefile 242 | will launch services for you if you start it all together. You are free to 243 | manually start a single service but you will need to ensure dependencies are 244 | running. 245 | 246 | ### Network Naming Strategy 247 | 248 | All projects must list `reaction.localhost` as an external network in their docker-compose configuration. The `make` commands will ensure that this network exists. Choose a unique enough name for your service that you can be reasonably sure it won't conflict with another Reaction service. 249 | 250 | When you need to communicate with one service from another over the internal Docker network, use `.reaction.localhost` as the hostname. 251 | 252 | ## Documentation 253 | 254 | You may refer to each sub-project's README for additional operation details. 255 | 256 | | Sub-project | Description | Documentation | 257 | | -------------------------- | ------------------ | -------------------------------- | 258 | | [`reaction`][10] | GraphQL API | [Reaction API Documentation][14] | 259 | | [`reaction-admin`][19] | Classic Admin UI | [Reaction Admin Readme][20] | 260 | | [`example-storefront`][13] | Example Storefront | [Example Storefront docs][15] | 261 | 262 | For tips on developing with Docker, read our [Docker docs](https://docs.reactioncommerce.com/docs/installation-docker-development). 263 | 264 | ## Latest Releases 265 | 266 | The following table provides the most current version of each project used by this platform: 267 | 268 | | Project | Latest release / tag | 269 | | ----------------------------------- | ---------------------------------------------------------------------------------------- | 270 | | [reaction-development-platform][10] | [`4.0.1`](https://github.com/reactioncommerce/reaction-development-platform/tree/v4.0.1) | 271 | | [reaction][10] | [`4.0.0`](https://github.com/reactioncommerce/reaction/tree/v4.0.0) | 272 | | [example-storefront][13] | [`5.0.3`](https://github.com/reactioncommerce/example-storefront/tree/v5.0.3) | 273 | | [reaction-admin (beta)][19] | [`4.0.0-beta.5`](https://github.com/reactioncommerce/reaction-admin/tree/v4.0.0-beta.5) | 274 | 275 | ### [Release Process](docs/release-guide.md) 276 | 277 | ### Developer Certificate of Origin 278 | 279 | We use the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) in lieu of a Contributor License Agreement for all contributions to Reaction Commerce open source projects. We request that contributors agree to the terms of the DCO and indicate that agreement by signing-off all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed: 280 | 281 | ``` 282 | Signed-off-by: Jane Doe 283 | ``` 284 | 285 | You can sign-off your commit automatically with Git by using `git commit -s` if you have your `user.name` and `user.email` set as part of your Git configuration. 286 | 287 | We ask that you use your real full name (please no anonymous contributions or pseudonyms) and a real email address. By signing-off your commit you are certifying that you have the right to submit it under the [GNU GPLv3 Licensed](./LICENSE.md). 288 | 289 | We use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO sign-offs of every commit. 290 | 291 | If you forget to sign-off your commits, the DCO bot will remind you and give you detailed instructions for how to amend your commits to add a signature. 292 | 293 | ## License 294 | 295 | Copyright © [GNU General Public License v3.0](./LICENSE.md) 296 | 297 | [0]: https://www.docker.com/get-docker "Docker" 298 | [1]: https://www.docker.com/docker-mac "Docker for Mac" 299 | [2]: https://www.docker.com/docker-windows "Docker for Windows" 300 | [5]: https://git-scm.com/ "Git" 301 | [6]: https://github.com/ "GitHub" 302 | [7]: https://github.com/settings/keys "GitHub SSH Keys" 303 | [8]: https://github.com/reactioncommerce/reaction-platform "Reaction Platform" 304 | [9]: https://github.com/graphcool/graphql-playground "GraphQL Playground" 305 | [10]: https://github.com/reactioncommerce/reaction "Reaction API" 306 | [13]: https://github.com/reactioncommerce/example-storefront "Example Storefront" 307 | [14]: https://docs.reactioncommerce.com "Reaction Documentation" 308 | [15]: https://github.com/reactioncommerce/example-storefront/tree/master/docs "Example Storefront docs" 309 | [19]: https://github.com/reactioncommerce/reaction-admin "Reaction Admin" 310 | [20]: https://github.com/reactioncommerce/reaction-admin/blob/trunk/README.md "Reaction Admin Readme" 311 | [20]: https://github.com/reactioncommerce/api-migrations "API Migrations" 312 | -------------------------------------------------------------------------------- /config.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction Platform Configuration 3 | ### 4 | ### This file defines configuration used in the Makefile. 5 | ### You may add and/or override these values with your own custom configuration 6 | ### in `config.local.mk`. 7 | ### 8 | ### Please see GNU Makes multi-line variable documentation for more info. 9 | ### https://www.gnu.org/software/make/manual/html_node/Multi_002dLine.html 10 | ############################################################################### 11 | 12 | 13 | # List of tools that must be installed. 14 | # A simple check to determine the tool is available. No version check, etc. 15 | define REQUIRED_SOFTWARE 16 | docker \ 17 | docker-compose \ 18 | git \ 19 | node \ 20 | yarn 21 | endef 22 | 23 | # Defined here are the subprojects in a comma-separated format 24 | # GIT_REPO_URL,SUBDIR_NAME,TAG 25 | # GIT_REPO_URL is the URL of the git repository 26 | # SUBDIR_NAME is just the directory name itself 27 | # TAG is the git tag or branch to checkout 28 | # Projects will be started in this order 29 | define SUBPROJECT_REPOS 30 | https://github.com/reactioncommerce/reaction.git,reaction,v4.2.0 \ 31 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v4.0.0-beta.20 \ 32 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v5.2.1 33 | endef 34 | 35 | # These are all the plugins that `make clone-api-plugins` will clone. 36 | # `api-core` is not technically a plugin but is useful to have in the 37 | # same place. 38 | define API_PLUGIN_REPOS 39 | https://github.com/reactioncommerce/api-core.git \ 40 | https://github.com/reactioncommerce/api-plugin-accounts.git \ 41 | https://github.com/reactioncommerce/api-plugin-address-validation-test.git \ 42 | https://github.com/reactioncommerce/api-plugin-address-validation.git \ 43 | https://github.com/reactioncommerce/api-plugin-authentication.git \ 44 | https://github.com/reactioncommerce/api-plugin-authorization-simple.git \ 45 | https://github.com/reactioncommerce/api-plugin-carts.git \ 46 | https://github.com/reactioncommerce/api-plugin-catalogs.git \ 47 | https://github.com/reactioncommerce/api-plugin-discounts-codes.git \ 48 | https://github.com/reactioncommerce/api-plugin-discounts.git \ 49 | https://github.com/reactioncommerce/api-plugin-email-smtp.git \ 50 | https://github.com/reactioncommerce/api-plugin-email-templates.git \ 51 | https://github.com/reactioncommerce/api-plugin-email.git \ 52 | https://github.com/reactioncommerce/api-plugin-files.git \ 53 | https://github.com/reactioncommerce/api-plugin-i18n.git \ 54 | https://github.com/reactioncommerce/api-plugin-inventory-simple.git \ 55 | https://github.com/reactioncommerce/api-plugin-inventory.git \ 56 | https://github.com/reactioncommerce/api-plugin-job-queue.git \ 57 | https://github.com/reactioncommerce/api-plugin-navigation.git \ 58 | https://github.com/reactioncommerce/api-plugin-notifications.git \ 59 | https://github.com/reactioncommerce/api-plugin-orders.git \ 60 | https://github.com/reactioncommerce/api-plugin-payments-example.git \ 61 | https://github.com/reactioncommerce/api-plugin-payments-stripe.git \ 62 | https://github.com/reactioncommerce/api-plugin-payments.git \ 63 | https://github.com/reactioncommerce/api-plugin-pricing-simple.git \ 64 | https://github.com/reactioncommerce/api-plugin-products.git \ 65 | https://github.com/reactioncommerce/api-plugin-settings.git \ 66 | https://github.com/reactioncommerce/api-plugin-shipments-flat-rate.git \ 67 | https://github.com/reactioncommerce/api-plugin-shipments.git \ 68 | https://github.com/reactioncommerce/api-plugin-shops.git \ 69 | https://github.com/reactioncommerce/api-plugin-simple-schema.git \ 70 | https://github.com/reactioncommerce/api-plugin-sitemap-generator.git \ 71 | https://github.com/reactioncommerce/api-plugin-surcharges.git \ 72 | https://github.com/reactioncommerce/api-plugin-system-information.git \ 73 | https://github.com/reactioncommerce/api-plugin-tags.git \ 74 | https://github.com/reactioncommerce/api-plugin-taxes-flat-rate.git \ 75 | https://github.com/reactioncommerce/api-plugin-taxes.git \ 76 | https://github.com/reactioncommerce/api-plugin-translations.git 77 | endef 78 | 79 | # List of user defined networks that should be created. 80 | define DOCKER_NETWORKS 81 | reaction.localhost 82 | endef 83 | -------------------------------------------------------------------------------- /config/local/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactioncommerce/reaction-development-platform/2232e9561e3a63c564755559e173ee4f5581c959/config/local/.gitkeep -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.0.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.0.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.0.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.4 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.0.1.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.0.1 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.0.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.5 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.0.2.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.0.2 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.1.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.5 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.0.3.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.0.3 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.1.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.5 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.0.4.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.0.4 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.3.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.5 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.1.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.1.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.4.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.5 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.10.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.7.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.10.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.10 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.11.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.11.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.11.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.11 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.11.1.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.11.1 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.11.1 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.12 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.12.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.12.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.11.1 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.1 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.13 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.0.2 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.13.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.13.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.13.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.1 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.15 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.0.2 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.14.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.14.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.13.1 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.1 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.18 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.1.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.14.1.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.14.1 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.13.2 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.1 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.19 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.1.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.14.2.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.14.2 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.13.4 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.3.1 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.22 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v4.1.2 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.2.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.2.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.5.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.6 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.3.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.3.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.6.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.6 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.4.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.4.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.7.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.6 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.5.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.5.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.7.1 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.6 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.6.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.6.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.7.1 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.0.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.7 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.0.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.7.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.7.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.8.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.1.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.7 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.1.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.8.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.7.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.8.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.1.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.8 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.1.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v3.9.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v3.7.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction-hydra.git,reaction-hydra,v3.0.0 \ 25 | https://github.com/reactioncommerce/reaction.git,reaction,v3.9.0 \ 26 | https://github.com/reactioncommerce/reaction-identity.git,reaction-identity,v3.2.0 \ 27 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v3.0.0-beta.9 \ 28 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v3.1.0 29 | endef 30 | 31 | # List of user defined networks that should be created. 32 | define DOCKER_NETWORKS 33 | reaction.localhost 34 | endef 35 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v4.0.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v4.0.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction.git,reaction,v4.0.0 \ 25 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v4.0.0-beta.3 \ 26 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v5.0.0 27 | endef 28 | 29 | # List of user defined networks that should be created. 30 | define DOCKER_NETWORKS 31 | reaction.localhost 32 | endef 33 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v4.0.1.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v4.0.1 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction.git,reaction,v4.0.0 \ 25 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v4.0.0-beta.5 \ 26 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v5.0.3 27 | endef 28 | 29 | # List of user defined networks that should be created. 30 | define DOCKER_NETWORKS 31 | reaction.localhost 32 | endef 33 | -------------------------------------------------------------------------------- /config/reaction-oss/reaction-v4.1.0.mk: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ### Reaction OSS v4.1.0 3 | ### 4 | ### See: `/config.mk` for documentation. 5 | ############################################################################### 6 | 7 | # List of tools that must be installed. 8 | # A simple check to determine the tool is available. No version check, etc. 9 | define REQUIRED_SOFTWARE 10 | docker \ 11 | docker-compose \ 12 | git \ 13 | node \ 14 | yarn 15 | endef 16 | 17 | # Defined here are the subprojects in a comma-separated format 18 | # GIT_REPO_URL,SUBDIR_NAME,TAG 19 | # GIT_REPO_URL is the URL of the git repository 20 | # SUBDIR_NAME is just the directory name itself 21 | # TAG is the git tag or branch to checkout 22 | # Projects will be started in this order 23 | define SUBPROJECT_REPOS 24 | https://github.com/reactioncommerce/reaction.git,reaction,v4.2.0 \ 25 | https://github.com/reactioncommerce/reaction-admin.git,reaction-admin,v4.0.0-beta.20 \ 26 | https://github.com/reactioncommerce/example-storefront.git,example-storefront,v5.2.1 27 | endef 28 | 29 | # List of user defined networks that should be created. 30 | define DOCKER_NETWORKS 31 | reaction.localhost 32 | endef 33 | -------------------------------------------------------------------------------- /docs/Common-Issues.md: -------------------------------------------------------------------------------- 1 | # Common Issues 2 | 3 | ## port is already located 4 | 5 | ### Description 6 | 7 | You are unable to start a service and see an error similar to: 8 | 9 | 10 | > ERROR: for reactionusers_web_1 Cannot start service web: driver failed programming external connectivity on endpoint reactionusers_web_1 11 | (0f45bf5f404e3ebe06f814a77324d4bd596110617105757d68754fb98834d8ed): Bind for 12 | 0.0.0.0:4000 failed: port is already allocated 13 | 14 | The name of the service and the port number will vary. 15 | 16 | 17 | ### Fix 18 | 19 | Another process is bound to the port specified in the error message. Stop the 20 | service that's running on the port and start the service again. 21 | 22 | ## could not find an available address pool 23 | 24 | ### Description 25 | 26 | * If you are using certain VPNs under linux, you may see the following error from docker 27 | * ` ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network` 28 | 29 | ### Fix 30 | 31 | To work around this, disconnect your VPN, then retry your make command 32 | 33 | ## connect: no route to host 34 | 35 | ### Description 36 | 37 | You may encounter networking errors of several types when starting reaction services. Common causes of these issues include a host level firewall (such as `firewalld`) is blocking connections, the dependent services are not running, or inter-service links are misconfigured. 38 | 39 | **Example** 40 | 41 | The following error message was seen when firewalld prevented the hydra application server from connecting to the postgresql database server. 42 | 43 | > time="2018-09-30T17:24:22Z" level=info msg="Unable to connect to database" error="Could not Connect to SQL: dial tcp 172.25.0.2:5432: connect: no route to host" 44 | 45 | ### Fix 46 | 47 | Disable the firewall or configure specific rules to allow the connection. Confirm that services are running and that the values in use for inter-service URLs are correct. 48 | -------------------------------------------------------------------------------- /docs/graphql-playground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reactioncommerce/reaction-development-platform/2232e9561e3a63c564755559e173ee4f5581c959/docs/graphql-playground.png -------------------------------------------------------------------------------- /docs/migration-guide-v4.md: -------------------------------------------------------------------------------- 1 | # Reaction v4.0.0 2 | 3 | ## Changes: 4 | 5 | We are removing support for hydra and identity from the product that is being shipped by default. The auth APIs are now part of the GraphQL server and are implemented using [accounts-js](https://www.accountsjs.com/). 6 | There is a new UI to handle login/signup and related functions. Instead of being redirected to the Identity page, users will be shown a modal. 7 | Now instead of using `reaction-hydra` to validate the authentication token, we will be using [accounts-js](https://www.accountsjs.com/). Earlier, an API request was made to Hydra from the API-server to validate the token and return the associated user. This is now handled by the accounts-js APIs, which are bundled with the core APIs. 8 | 9 | ## Motivation: 10 | 11 | Identity and Hydra were mostly introduced to enable OAuth 2 authentication and also to create a single service handling the authentication of both storefront and admin. But this also brought the task of maintaining these repos. The authentication was an overkill for developers who just wanted to get the service up and running. These services were very hard to deploy. 12 | 13 | Starting 5 services doesn't seem user-friendly for a beginner. By reducing the number of services, we believe the product would become easier to use and extend. Also removing these services makes the software run faster and consume less memory on the machine. 14 | 15 | Getting rid of Hydra and Identity reduces the footprint of Meteor in our application. This aligns with the target of getting rid of Meteor completely. 16 | 17 | Also with our future plan to move to libraries providing UI layers for admin and storefront, we no more have the need for our own login service. We only need to provide the integration layer which is what this new structure would help with. 18 | 19 | ## Migration from v3.x.x: 20 | 21 | This is a **BREAKING CHANGE**. 22 | 23 | ### If you want to upgrade to v4.x.x using account-js 24 | 25 | - Users don't have to update their password. Their old credentials will work. 26 | - Any "password reset" emails that were sent from `v3.x.x` would not work in `v4.x.x`. But the users can use `v4.x.x` to reset their passwords again. 27 | - The `reaction-development-platform` will not start Hydra and Identity. If you are using any custom script to deploy/start these services, they are no longer needed. 28 | - A new environment variable `STORE_URL` which points to the URL of the storefront is needed. 29 | - A new environment variable `TOKEN_SECRET` which will be used to [hash the JWT token](https://www.accountsjs.com/docs/api/server/interfaces/accountsserveroptions/#tokensecret) should be added. 30 | - All users will be logged out since their old token (created by Hydra) won't be recognized by `accounts-js`. 31 | 32 | #### For users who have custom implementation of storefront: 33 | 34 | You have to use [accounts-js](https://www.accountsjs.com/) to create a login/signup UI. A good example for that is [this PR](https://github.com/reactioncommerce/reaction-admin/pull/385/files) that adds the same functionality to storefront and admin. 35 | **Note:** You have to encrypt the password before calling the API like [here](https://github.com/reactioncommerce/reaction-admin/pull/385/files#diff-8a6b10d412269cc540e290da1ce1eb94f2b481b0520daf916d47550fcb914c99R55) and [here](https://github.com/reactioncommerce/reaction-admin/pull/385/files#diff-b288f3325f14d44d0c915c764b6b94110cadb6ae6a170ad5453c184a01858ca1R3). 36 | 37 | ### If you want to upgrade to v4.x.x but keep using Hydra 38 | 39 | This upgrade is not for you right now. Our suggestion would be to keep using `v3.x.x`. We will release the functionality to use any OAuth provider with `4.x.x` in the future. Please wait for that feature to make the upgrade. 40 | -------------------------------------------------------------------------------- /docs/release-guide.md: -------------------------------------------------------------------------------- 1 | # Release Guide 2 | 3 | This guide assumes that you have the write access to the repositories and that you are using macOS. 4 | 5 | ## Prerequisite 6 | 7 | 1. Clone the repository in a separate folder using `git clone git@github.com:reactioncommerce/reaction-development-platform.git release-reaction-development-platform` 8 | 2. Use python3 to install the following libraries `semantic_version`, `gitpython`, `PyGithub` 9 | 3. Install [github command line](https://cli.github.com/) and [login](https://cli.github.com/manual/gh_auth_login) 10 | 4. Make sure all the remote links in the repos are of the format `git@github.com:reactioncommerce/...`. To check this: 11 | - `cd reaction` 12 | - `git remote -v` 13 | - To update use, `git remote set-url origin git@github.com:reactioncommerce/reaction.git` 14 | 15 | ## Release Process 16 | 17 | 1. Make sure you are on the trunk branch and have pulled the latest changes. 18 | 2. Run the script using `python3 release.py`. 19 | 3. Wait for the QA team to approve the PR. 20 | 4. Once approved, [create a new release](https://github.com/reactioncommerce/reaction-development-platform/releases/new) using the version and changelog from the PR in the above step. 21 | 5. Publish the release 22 | -------------------------------------------------------------------------------- /release.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Make sure you follow the repos from this page: https://app.circleci.com/projects/project-dashboard/github/reactioncommerce/ 3 | ''' 4 | import subprocess 5 | import semantic_version 6 | import os 7 | from collections import defaultdict 8 | from git import Repo 9 | import fileinput 10 | import time 11 | from shutil import copyfile 12 | import sys 13 | import requests 14 | from github import Github 15 | import re 16 | 17 | CORE_MEMBERS = ['akarshitwal@gmail.com', 'support@github.com'] 18 | QA = 'manueldelreal' 19 | 20 | repos = [ 21 | 'reaction-admin', 22 | 'reaction', 23 | 'example-storefront', 24 | ] 25 | 26 | previousReleaseVersion = { 27 | 'reaction-admin': '', 28 | 'reaction': '', 29 | 'example-storefront': '', 30 | } 31 | 32 | dockerRepoDict = { 33 | 'reaction-admin': 'admin', 34 | 'reaction': 'reaction', 35 | 'example-storefront': 'example-storefront', 36 | } 37 | 38 | repoVersions = {} 39 | # list of commits across all repos 40 | allCommits = [] 41 | 42 | class cd: 43 | """Context manager for changing the current working directory""" 44 | def __init__(self, newPath): 45 | self.newPath = os.path.expanduser(newPath) 46 | 47 | def __enter__(self): 48 | self.savedPath = os.getcwd() 49 | os.chdir(self.newPath) 50 | 51 | def __exit__(self, etype, value, traceback): 52 | os.chdir(self.savedPath) 53 | 54 | def line_prepender(filename, line): 55 | with open(filename, 'r+') as f: 56 | content = f.read() 57 | f.seek(0, 0) 58 | f.write(line + content) 59 | 60 | def getBump(commits): 61 | level = 'patch' 62 | for author, commit, pullNumber in commits: 63 | if commit.lower().startswith('feat'): 64 | ## its minor if not already major 65 | if level != 'major': 66 | level = 'minor' 67 | if 'BREAKING CHANGE:' in commit: 68 | return 'major' 69 | return level 70 | 71 | def getVersion(prevVersion, commits): 72 | if prevVersion.prerelease: 73 | # only increment the build version 74 | nextVersion = semantic_version.Version(major=prevVersion.major, minor=prevVersion.minor, patch=prevVersion.patch, prerelease=(prevVersion.prerelease[0], str(int(prevVersion.prerelease[1]) + 1) )) 75 | else: 76 | bump = getBump(commits) 77 | if bump == 'minor': 78 | nextVersion = prevVersion.next_minor() 79 | elif bump == 'major': 80 | nextVersion = prevVersion.next_major() 81 | else: 82 | nextVersion = prevVersion.next_patch() 83 | return str(nextVersion) 84 | 85 | def generateChangelog(commits, version, bump, prevVersion, repo): 86 | categoriesOrder = { 87 | 'Feature': 0, 88 | 'Fixes': 0, 89 | 'Refactors': 0, 90 | 'Tests': 0, 91 | 'Chore': 0, 92 | 'Docs': 0, 93 | 'Style': 0, 94 | 'Performance': 0, 95 | } 96 | categoriesDict = { 97 | 'feat': 'Feature', 98 | 'fix': 'Fixes', 99 | 'docs': 'Docs', 100 | 'style': 'Style', 101 | 'refactor': 'Refactors', 102 | 'perf': 'Performance', 103 | 'test': 'Tests', 104 | 'chore': 'Chore', 105 | } 106 | changelogDict = defaultdict(str) 107 | contributors = set([]) 108 | for author, commit, pullNumber in commits: 109 | authorEmail = author.email.lower() 110 | if not (authorEmail.endswith('@mailchimp.com') or authorEmail in CORE_MEMBERS or 'dependabot' in authorEmail): 111 | contributors.add(author.name) 112 | key = commit.split(':')[0].lower() 113 | if '(' in key: 114 | # if the key has a scope 115 | key = key.split('(')[0] 116 | if key not in categoriesDict.keys(): 117 | # anything that is not in above is a fix 118 | key = 'fix' 119 | changelogDict[key] += '\n - ' + commit.split('\n')[0] + f' [#{pullNumber}](https://github.com/reactioncommerce/{repo}/pull/{pullNumber})' 120 | 121 | changelogDoc = sorted(map(lambda item: (categoriesOrder[categoriesDict[item[0]]], f'\n\n## {categoriesDict[item[0]]}\n{item[1]}'), changelogDict.items())) 122 | changelogDoc = ''.join([v for k, v in changelogDoc]) 123 | if contributors: 124 | changelogDoc += f'\n\n## Contributors\n\n Special thanks to {", ".join(contributors)} for contributing to the release!' 125 | 126 | return f'# v{version}\n\n{repo} v{version} adds {bump} features or bug fixes and contains no breaking changes since v{str(prevVersion)}.{changelogDoc}\n\n' 127 | 128 | def getLatestVersion(): 129 | # Get latest relase tag name 130 | process = subprocess.Popen(['git', 'describe', '--abbrev=0', '--tags'], 131 | stdout=subprocess.PIPE, 132 | stderr=subprocess.PIPE) 133 | tag, stderr = process.communicate() 134 | tag = tag.decode("utf-8").strip('\n') 135 | version = semantic_version.Version(tag[1:]) 136 | 137 | if stderr: 138 | print(stderr) 139 | print("Error getting tag") 140 | return version 141 | 142 | def prepareTrunk(branch='trunk'): 143 | # Stashing the changes 144 | print("## Stashing the changes") 145 | process = subprocess.Popen('git stash', 146 | stdout=subprocess.PIPE, 147 | stderr=subprocess.PIPE, shell=True) 148 | stdout, stderr = process.communicate() 149 | print(stdout) 150 | print(stderr) 151 | 152 | # Change branch to trunk 153 | print(f"## Running git checkout {branch}") 154 | process = subprocess.Popen(['git', 'checkout', branch], 155 | stdout=subprocess.PIPE, 156 | stderr=subprocess.PIPE) 157 | stdout, stderr = process.communicate() 158 | print(stdout) 159 | print(stderr) 160 | 161 | # Pull the latest changes 162 | print("## Running git pull") 163 | process = subprocess.Popen(['git', 'pull', 'origin'], 164 | stdout=subprocess.PIPE, 165 | stderr=subprocess.PIPE) 166 | stdout, stderr = process.communicate() 167 | print(stdout) 168 | print(stderr) 169 | 170 | def restoreTrunk(): 171 | # unstashing the changes 172 | print("## Un-stashing the changes") 173 | process = subprocess.Popen('git stash apply', 174 | stdout=subprocess.PIPE, 175 | stderr=subprocess.PIPE, shell=True) 176 | stdout, stderr = process.communicate() 177 | print(stdout) 178 | print(stderr) 179 | 180 | def createPR(repo, version, files, changelogDoc, reviewer='reactioncommerce/oc', branch='trunk'): 181 | # create new brach 182 | print("## Creating release branch locally") 183 | process = subprocess.Popen(f'git checkout -b release-next-v{version}', 184 | stdout=subprocess.PIPE, 185 | stderr=subprocess.PIPE, shell=True) 186 | stdout, stderr = process.communicate() 187 | print(stdout) 188 | print(stderr) 189 | if 'fatal' in str(stderr): 190 | exit() 191 | 192 | # staging files 193 | print("## Staging files") 194 | process = subprocess.Popen(f'git add {" ".join(files)}', 195 | stdout=subprocess.PIPE, 196 | stderr=subprocess.PIPE, shell=True) 197 | stdout, stderr = process.communicate() 198 | print(stdout) 199 | print(stderr) 200 | if 'fatal' in str(stderr): 201 | exit() 202 | 203 | # commiting files 204 | print("## Comitting files") 205 | process = subprocess.Popen(f'git commit -m "ci: v{version}" --signoff', 206 | stdout=subprocess.PIPE, 207 | stderr=subprocess.PIPE, shell=True) 208 | stdout, stderr = process.communicate() 209 | print(stdout) 210 | print(stderr) 211 | 212 | 213 | # pushing the branch to github 214 | print("## Pushing the branch to github") 215 | process = subprocess.Popen(f'git push origin HEAD', 216 | stdout=subprocess.PIPE, 217 | stderr=subprocess.PIPE, shell=True) 218 | stdout, stderr = process.communicate() 219 | print(stdout) 220 | print(stderr) 221 | print(f'gh pr create --title "Release v{version}" --base {branch} --body {changelogDoc} --reviewer {reviewer}') 222 | # Making PR on github 223 | print("## Making PR on github") 224 | process = subprocess.Popen(f'gh pr create --title "Release v{version}" --base {branch} --body "{changelogDoc}" --reviewer {reviewer}', 225 | stdout=subprocess.PIPE, 226 | stderr=subprocess.PIPE, shell=True) 227 | stdout, stderr = process.communicate() 228 | print(stdout) 229 | print(stderr) 230 | return str(stdout).strip('\n') 231 | 232 | def getCommits(repo, prevVersion): 233 | gitRepo = Repo() 234 | user = Github(os.environ['GITHUB_TOKEN_RELEASE']) 235 | repo = user.get_repo(f'reactioncommerce/{repo}') 236 | bareCommits = list(gitRepo.iter_commits(f'HEAD...v'+str(prevVersion))) 237 | commits = [] 238 | for index, c in enumerate(bareCommits): 239 | try: 240 | commit = repo.get_commit(sha=str(c)) 241 | except: 242 | continue 243 | commitPulls = commit.get_pulls() 244 | pullNumber = 0 245 | for pull in commitPulls: 246 | pullNumber = pull.number 247 | if not pullNumber: 248 | continue 249 | message = '\n'.join(filter(lambda msg: 'Signed-off-by:' not in msg, c.message.strip('\n').strip('\t').split('\n'))) 250 | if message.startswith("Merge "): 251 | # these are generate when PRs are merged. 252 | pass 253 | else: 254 | commits.append((c.author, message, pullNumber)) 255 | return commits 256 | 257 | def createRelease(version, changelogDoc): 258 | print("## Creating release on github") 259 | process = subprocess.Popen(f'gh release create v{version} -d -t v{version} -n "{changelogDoc}"', 260 | stdout=subprocess.PIPE, 261 | stderr=subprocess.PIPE, shell=True) 262 | stdout, stderr = process.communicate() 263 | print(stdout) 264 | print(stderr) 265 | 266 | def getCurrentRepoVersion(): 267 | print(os.getcwd()) 268 | for line in fileinput.FileInput('config.mk'): 269 | res = re.search("^https://github.com/reactioncommerce/.*,",line) 270 | if res: 271 | lineArr = line.split(",") 272 | previousReleaseVersion[lineArr[-2]]=lineArr[-1].replace('\\','').replace('v','').strip() 273 | 274 | def prepareRepos(): 275 | getCurrentRepoVersion() 276 | for repo in repos: 277 | # Go inside the repo 278 | with cd(repo): 279 | prepareTrunk() 280 | latestVersion = getLatestVersion() 281 | print("Latest version of {0} is {1}".format(repo,latestVersion)) 282 | 283 | # Get commits 284 | commits = getCommits(repo, previousReleaseVersion[repo]) 285 | if not commits: 286 | continue 287 | allCommits.extend(commits) 288 | repoVersions[repo] = (str(previousReleaseVersion[repo]), str(latestVersion)) 289 | 290 | def updateDevPlatform(): 291 | print("Starting Reaction Development Platform update.") 292 | prepareTrunk() 293 | prevVersion = getLatestVersion() 294 | version = getVersion(prevVersion, allCommits) 295 | bump = getBump(allCommits) 296 | print("Next version of reaction-dev-platform is", version) 297 | 298 | allRepos = list(repoVersions.items()) + [('reaction-development-platform', (prevVersion, version))] 299 | # add dev platform to all repos 300 | for repo, (prevVersion, ver) in allRepos: 301 | print(f'Updating {repo} from {prevVersion} to {ver}') 302 | with fileinput.FileInput('README.md', inplace=True) as file: 303 | for line in file: 304 | print(line.replace(f'[`{prevVersion}`](https://github.com/reactioncommerce/{repo}/tree/v{prevVersion})', f'[`{ver}`](https://github.com/reactioncommerce/{repo}/tree/v{ver})'), end='') 305 | releases = ", ".join(map(lambda repoVersionTuple: f'[{repoVersionTuple[0]} v{repoVersionTuple[1][1]}](https://github.com/reactioncommerce/{repoVersionTuple[0]}/releases/tag/v{repoVersionTuple[1][1]})', repoVersions.items())) 306 | changelogDoc = f'# v{str(ver)}\nThis release is coordinated with the release of {releases} to keep the `reaction-development-platform` up-to-date with the latest version of all our development platform projects.\n' 307 | 308 | # Send changelog to the file 309 | print("## Writing changelog to file") 310 | line_prepender('CHANGELOG.md', changelogDoc) 311 | 312 | destConfig = f'./config/reaction-oss/reaction-v{str(version)}.mk' 313 | 314 | print("## Copying config file") 315 | copyfile(f'./config/reaction-oss/reaction-v{str(prevVersion)}.mk', destConfig) 316 | 317 | ## replacing version number at the top of the file 318 | with fileinput.FileInput(destConfig, inplace=True) as file: 319 | for line in file: 320 | if "Reaction OSS" in line: 321 | print(f'### Reaction OSS v{version}') 322 | else: 323 | print(line, end='') 324 | 325 | for repo, (prevVersion, ver) in repoVersions.items(): 326 | with fileinput.FileInput(destConfig, inplace=True) as file: 327 | for line in file: 328 | print(line.replace(f'{repo},v{str(prevVersion)}', f'{repo},v{str(ver)}'), end='') 329 | 330 | # updating the config file 331 | print("## updating config file") 332 | for repo, (prevVersion, ver) in repoVersions.items(): 333 | with fileinput.FileInput('config.mk', inplace=True) as file: 334 | for line in file: 335 | print(line.replace(f'{repo},v{str(prevVersion)}', f'{repo},v{str(ver)}'), end='') 336 | 337 | files = ['README.md', 'CHANGELOG.md', 'config.mk', destConfig] 338 | createPR('reaction-development-platform', version, files, changelogDoc, QA) 339 | 340 | restoreTrunk() 341 | return version 342 | 343 | def prerequisite(): 344 | # Current directory should be reaction-development-platform 345 | pwd = os.getcwd() 346 | if not pwd.endswith('reaction-development-platform'): 347 | print("Error: Please run the script from reaction-development-platform") 348 | sys.exit() 349 | 350 | process = subprocess.Popen('gh --version', 351 | stdout=subprocess.PIPE, 352 | stderr=subprocess.PIPE, shell=True) 353 | stdout, stderr = process.communicate() 354 | if stderr: 355 | print("Error: github command line not installed. Please install gh") 356 | sys.exit() 357 | 358 | process = subprocess.Popen('gh auth status', 359 | stdout=subprocess.PIPE, 360 | stderr=subprocess.PIPE, shell=True) 361 | stdout, stderr = process.communicate() 362 | if "Logged in" not in str(stderr): 363 | print(stderr) 364 | print("Error: Please login into github using command line") 365 | sys.exit() 366 | 367 | if not os.environ['CIRCLE_TOKEN']: 368 | print("Error: Please export yout CircleCI key as CIRCLE_TOKEN") 369 | sys.exit() 370 | 371 | if not os.environ['GITHUB_TOKEN_RELEASE']: 372 | print("Error: Please export yout GithubKey key as GITHUB_TOKEN_RELEASE") 373 | sys.exit() 374 | 375 | 376 | def main(): 377 | prerequisite() 378 | prepareRepos() 379 | devVersion = updateDevPlatform() 380 | 381 | if __name__ == "__main__": 382 | main() --------------------------------------------------------------------------------