Reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built u...

README

  Mailchimp Open Commerce (formerly Reaction Commerce)

Open Commerce Website | Twitter | Documentation | Discord | Discussions


Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, MongoDB, and GraphQL. It plays nicely with npm, Docker and Kubernetes.

MOC Admin


Features


FastReturns data in split seconds, and faster queries mean faster web pages
ProvenOpen Commerce fuels sites doing 10's of thousands of orders per day with 100's of thousands of products
ComposableA flexible plugin system allows you to pick and choose which integrations work best for you
Multi-tenantHost multiple shops in the same installation
ScalableStart out with a single server and scale up to hundreds
Flexible ProductsAllows Products, with options and variants to fit a wide variety of needs
InventoryTrack inventory, allow or disallow backorders and more
ShippingIntegrate with a shipping rate provider or build your own custom table
TaxesIntegrate with a tax rate provider or build your own custom tax table
FulfillmentFlexible fulfillment system allows you create your own fulfillment methods
Order TrackingView and manage your orders in the included admin system
EmailsCustomizable templates for Order confirmations and more
OpenFully open source. Never be locked in again


Getting started


To start working with your own project built on Mailchimp Open Commerce you can start by using our new CLI. The CLI is
the quickest and easiest way to develop on Open Commerce. It allows you to create and work with API, Admin, and Storefront projects all via the command line.

What you need

- We recommend installing nvm
- Git

  In addition, you need to have your system setup for SSH authentication with GitHub

Install the CLI

First install the cli by running:
  1. ```
  2. npm install -g reaction-cli
  3. ```

You can test to see if it has worked here by running:

  1. ```
  2. reaction help
  3. ```

Creating a project


You can create your Open Commerce project by running:
  1. ```
  2. reaction create-project api <your-project-name>
  3. ```
This will create an Open Commerce project in the directory .
Once this is complete, navigate to the project directory:
  1. ```
  2. cd <your-project-name>
  3. ```
Install the project dependencies:
  1. ```
  2. npm install
  3. ```
Finally, start the server in development mode:
  1. ```
  2. reaction develop api
  3. ```

Note: Optionally, from within the project-directory you may issue the above command without mentioning the project type and the CLI would check your package.json for the "projectType" and pick it up from there. This expects that the project itself was built using the latest version of the CLI as explained in the above steps.

Example, instead of the above command, you may skip mentioning 'api' and just use:
  1. ```
  2.   reaction develop
  3. ```

This will start the Open Commerce GraphQL server and Mongo Server. Press Ctrl+C to stop.

- A sample custom plugin has been installed, and you should see its output in the logs. (Your Sample Plugin)
- To add a new plugin based on our plugin template run:
  1. ```
  2. reaction create-plugin api <your-plugin-name>
  3. ```
Validate whether the plugin was created in the custom-packages
  1. ```
  2. cd custom-packages
  3. ```
  1. ```
  2. cd <your-plugin-name>
  3. ```
  1. ```
  2. npm install
  3. ```
You now need to change back up to the root:
  1. ```
  2. cd ../../
  3. ```
now you can run:
  1. ```
  2. reaction develop
  3. ```
This plugin will now be loaded the next time you start Open Commerce.

Congratulations!! You're ready to start developing with Open Commerce


See the Complete CLI instructions for how to create your local storefront and admin.


Go to the complete installation instructions to see how to set up your store

API development

If you are working on core plugins (not developing plugins for your own installation) you should follow these
instructions

What you need



Install PNPM

  1. ``` sh
  2. npm i -g pnpm@latest
  3. ```

Clone and Start the source


  1. ``` sh
  2. git clone https://github.com/reactioncommerce/reaction.git
  3. cd reaction
  4. pnpm install
  5. cp apps/reaction/.env.example apps/reaction/.env
  6. ```

Start dev-server with mongo on local:

  1. ``` sh
  2. ## you must change MONGO_URL in the .env to mongodb://localhost:27017/reaction before start
  3. pnpm run start:dev
  4. ```

Start dev-server with mongodb on docker

  1. ``` sh
  2. docker-compose up -d
  3. pnpm run start:dev
  4. ```

Development Flow


1. Make some changes in one or more packages.
2. Add a changeset in that same PR.
3. Repeat the process of making changes and adding changesets.
4. Create PR

How to release


1. Run release action to create Version PR. This PR will remove all changeset files, bump up packages versions, update CHANGELOG files.
2. Merge Version PR into trunk, CircleCI will publish all the packages into npm.

Get involved

Contribute


:star: If you like what you see, star us on GitHub.

Find a bug, a typo, or something that’s not documented well? We’d love for you to open an issue telling us what we can improve! This project uses commitlint, please use their commit message format.

We love your pull requests! Check out our [Good First Issue](https://github.com/reactioncommerce/reaction/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) and [Help Wanted](https://github.com/reactioncommerce/reaction/issues?q=label%3A%22help+wanted%22) tags for good issues to tackle.
Check out our contributors guide for more information

License


Reaction is GNU GPLv3 Licensed