|
1 | 1 | # Example Storefront |
2 | 2 |
|
3 | | -[Reaction Commerce](https://reactioncommerce.com/) is building a headless event-driven e-commerce ecosystem that empowers businesses to create a variety of dynamic shopping experiences. This Example Storefront is to serve as a reference on how to implement a web based storefront using the Reaction Commerce GraphQL API. You can fork this project as a jumping off point or create your own custom experience using your prefered client-side technology. While we feel our example storefront is full featured enough to use in production, it may be missing features your shop requires at this time. |
| 3 | +[Reaction Commerce](http://reactioncommerce.com) is an API-first, headless commerce platform built using Node.js, React, and GraphQL. It plays nicely with npm, Docker and Kubernetes. |
| 4 | + |
| 5 | +This Example Storefront is to serve as a reference on how to implement a web based storefront using the Reaction Commerce GraphQL API. You can fork this project as a jumping off point or create your own custom experience using your prefered client-side technology. While we feel our example storefront is full featured enough to use in production, it may be missing features your shop requires at this time. |
4 | 6 |
|
5 | 7 | ## Features |
| 8 | +Reaction comes with a robust set of core commerce capabilities right out of the box. And since anything in our codebase can be extended, overwritten, or installed as a package, you may also customize anything on our platform. |
| 9 | + |
| 10 | +Check out the full list of Reaction [features](https://www.reactioncommerce.com/features) and [release history](https://reactioncommerce.com/roadmap) for more info. |
| 11 | + |
| 12 | +This example storefront is built with [Next.js](https://nextjs.org/), [React](https://reactjs.org/), [MobX](https://mobx.js.org/getting-started.html), [GraphQL](https://graphql.org/), and [Apollo Client](https://www.apollographql.com/docs/react/) |
6 | 13 |
|
7 | | -- Headless ecommerce example storefront built with [Next.js](https://nextjs.org/), [React](https://reactjs.org/), [MobX](https://mobx.js.org/getting-started.html), [GraphQL](https://graphql.org/), [Apollo Client](https://www.apollographql.com/docs/react/) |
8 | | -- [Reaction GraphQL API](https://github.com/reactioncommerce/reaction/tree/master/imports/plugins/core/graphql) integration |
9 | | -- Server-side rendering |
10 | | -- Payments with [Stripe](https://stripe.com/) |
11 | | -- Analytics with [Segment](https://segment.com/) or any other provider |
12 | | -- Reusable, customizable, themeable ecommerce React components from the new [Reaction Component Library](https://github.com/reactioncommerce/reaction-component-library/) with [Styled Components](https://www.styled-components.com/) |
13 | | -- Fully-configured test suite: Jest snapshot testing, Mocha integration testing |
14 | | -- Written in ES6, configured with ES6 |
15 | | -- Containerized with Docker |
| 14 | +We've integrated payments with [Stripe](https://stripe.com/) and analytics with [Segment](https://segment.com/) |
| 15 | + |
| 16 | +This project is written in ES6, containerized with Docker, and there's a fully-configured test suite using Jest snapshot testing and Mocha integration testing |
16 | 17 |
|
17 | 18 | ## Getting Started |
18 | 19 |
|
@@ -192,6 +193,60 @@ To stop the Docker container after starting it with the above command, use: |
192 | 193 | docker stop reaction-storefront |
193 | 194 | ``` |
194 | 195 |
|
| 196 | +## Contribute |
| 197 | + |
| 198 | +Find a bug, a typo, or something that’s not documented well? We’d love for you to [open an issue](https://github.com/reactioncommerce/example-storefront/issues) telling us what we can improve! |
| 199 | + |
| 200 | +Want to request a feature? Use our [Reaction Feature Requests repository](https://github.com/reactioncommerce/reaction-feature-requests) to file a request. |
| 201 | + |
| 202 | +We love your pull requests! Check our our [`Good First Issue`](https://github.com/reactioncommerce/example-storefront/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) and [`Help Wanted`](https://github.com/reactioncommerce/example-storefront/issues?q=label%3A%22help+wanted%22) tags for good issues to tackle. |
| 203 | + |
| 204 | +### Pull Request guidelines |
| 205 | +Pull requests should pass all automated tests, style, and security checks. |
| 206 | + |
| 207 | +#### Automated Tests |
| 208 | +Your code should pass all [acceptance tests and unit tests](https://docs.reactioncommerce.com/reaction-docs/master/testing-reaction). Run |
| 209 | +```sh |
| 210 | +docker-compose run --rm web yarn test |
| 211 | +``` |
| 212 | +to run the test suites locally. If you're adding functionality to Reaction, you should add tests for the added functionality. You can run the tests locally without cache if necessary by passing the `--no-cache` flag. This can be helpful if changes aren't showing up. |
| 213 | +```sh |
| 214 | +docker-compose run --rm web yarn test --no-cache |
| 215 | +``` |
| 216 | + |
| 217 | +To update a failing snapshot (if you've made changes to a component) |
| 218 | +```sh |
| 219 | +docker-compose run --rm web yarn test -u |
| 220 | +``` |
| 221 | + |
| 222 | +#### Eslint |
| 223 | +We require that all code contributed to Reaction follows [Reaction's ESLint rules](https://github.com/reactioncommerce/reaction-eslint-config). You can run |
| 224 | +``` |
| 225 | +docker-compose run --rm web eslint src |
| 226 | +``` |
| 227 | +to run ESLint against your code locally. |
| 228 | + |
| 229 | +Please follow the [Reaction Code Style Guide](https://docs.reactioncommerce.com/docs/styleguide). Check out our guides to [JSDoc](https://docs.reactioncommerce.com/docs/jsdoc-style-guide), [Git](https://docs.reactioncommerce.com/docs/git-style-guide), [error handling](https://docs.reactioncommerce.com/docs/error-handling-guide), [logging](https://docs.reactioncommerce.com/docs/logging), and [React](https://docs.reactioncommerce.com/docs/react-best-practices). |
| 230 | + |
| 231 | +We also request that you follow the our [pull request template](https://docs.reactioncommerce.com/docs/contributing-to-reaction#fill-out-the-pull-request-template) |
| 232 | + |
| 233 | +Get more details in our [Contributing Guide](https://docs.reactioncommerce.com/docs/contributing-to-reaction). |
| 234 | + |
| 235 | +### Developer Certificate of Origin |
| 236 | +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 all commits made to Reaction Commerce projects by adding a line with your name and email address to every Git commit message contributed: |
| 237 | +``` |
| 238 | +Signed-off-by: Jane Doe <[email protected]> |
| 239 | +``` |
| 240 | + |
| 241 | +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. |
| 242 | + |
| 243 | +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.) |
| 244 | + |
| 245 | +We use the [Probot DCO GitHub app](https://github.com/apps/dco) to check for DCO signoffs of every commit. |
| 246 | + |
| 247 | +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. |
| 248 | + |
| 249 | + |
195 | 250 | ## License |
196 | 251 | Copyright 2018 Reaction Commerce |
197 | 252 |
|
|
0 commit comments