Reaction is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.

Overview

Reaction Commerce

Circle CI Gitter Open Source Helpers

Reaction is a headless commerce platform built using Node.js, React, and GraphQL. It plays nicely with npm, Docker and Kubernetes.

Reaction Admin

Getting started

Follow the documentation to install Reaction with Reaction Platform for all supported operating systems.

Start App in Docker Container (Recommended)

bin/setup # do this after initial clone and after every pull or checkout
docker-compose up -d # starts a MongoDB container and a Reaction API container
docker-compose logs -f api # view Reaction API container logs

To stop the API and the MongoDB server, enter docker-compose down.

Start App Without Docker (Not Recommended)

nvm use
# nvm install if prompted
npm i -g npm
npm install
bin/setup # do this after initial clone and after every pull or checkout
npm run start:dev

CTRL+C to stop.

Run Integration Tests in Docker Container (Recommended)

bin/setup
docker-compose run --rm api npm run test:integration # Test all mutations and queries
docker-compose run --rm api npm run test:integration:query # OR test queries only
docker-compose run --rm api npm run test:integration:mutation # OR test mutations only
docker-compose run --rm api npm run test:integration:file:watch -- <filename> # OR test one file

CTRL+C to interrupt the test run.

Run Integration Tests on Local Computer

docker-compose up -d mongo
npm install
npm run test:integration # Test all mutations and queries
npm run test:integration:query # OR test queries only
npm run test:integration:mutation # OR test mutations only
npm run test:integration:file:watch -- <filename> # OR test one file

CTRL+C to interrupt the test run.

Build and Test a Production Image

Build:

docker build . -t test-api

Run:

dc up -d mongo
docker run --env-file ./.env -p 3000:3000 --network reaction.localhost -it test-api:latest

Use an external GraphQL client to test http://localhost:3000/graphql. GraphQL Playground isn't served on GET requests because it's in production mode.

Get involved

Tutorials, docs & developer tools

Get help & contact the team

Contribute

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!

Want to request a feature? Use our Reaction Feature Requests repository to file a request.

We love your pull requests! Check our our Good First Issue and Help Wanted tags for good issues to tackle.

Pull Request guidelines

Pull requests should pass all automated tests, style, and security checks.

Your code should pass all acceptance tests and unit tests. Run docker-compose run --rm reaction npm run test to run the test suites in containers. If you're adding functionality to Reaction, you should add tests for the added functionality.

We require that all code contributed to Reaction follows Reaction's ESLint rules. You can run docker-compose run --rm reaction npm run lint to run ESLint against your code locally.

Please follow the Reaction Code Style Guide. Check out our guides to JSDoc, Git, error handling, logging, and React.

We also request that you follow the our pull request template

Get more details in our Contributing Guide.

Developer Certificate of Origin

We use the Developer Certificate of Origin (DCO) 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:

Signed-off-by: Jane Doe <[email protected]>

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.

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 License.

We use the Probot DCO GitHub app to check for DCO sign-offs of every commit.

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.

License

Reaction is GNU GPLv3 Licensed

Comments
  • Windows incompatibility/compile issue

    Windows incompatibility/compile issue

    W20150409-11:48:47.530(-4)? (STDERR) W20150409-11:48:47.532(-4)? (STDERR) C:\Users\tsmith\AppData\Local.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245 W20150409-11:48:47.532(-4)? (STDERR) throw(ex); W20150409-11:48:47.532(-4)? (STDERR) ^ W20150409-11:48:47.532(-4)? (STDERR) Error: %1 is not a valid Win32 application. W20150409-11:48:47.532(-4)? (STDERR) W20150409-11:48:47.532(-4)? (STDERR) C:\Users\tsmith\AppData\Local.meteor\packages\npm-node-aes-gcm\0.1.3_6\npm\node_modules\node-aes-gcm\build\Release\node_aes_gcm.node W20150409-11:48:47.532(-4)? (STDERR) at Module.load (module.js:356:32) W20150409-11:48:47.532(-4)? (STDERR) at Function.Module._load (module.js:312:12) W20150409-11:48:47.532(-4)? (STDERR) at Module.require (module.js:364:17) W20150409-11:48:47.533(-4)? (STDERR) at require (module.js:380:17) W20150409-11:48:47.533(-4)? (STDERR) at Object.Npm.require (C:\Users\tsmith\WebstormProjects\chaos-box.meteor\local\build\programs\server\boot.js:142:18) W20150409-11:48:47.533(-4)? (STDERR) at Package (packages/npm-node-aes-gcm/wrapper.js:2:1) W20150409-11:48:47.533(-4)? (STDERR) at C:\Users\tsmith\WebstormProjects\chaos-box.meteor\local\build\programs\server\packages\npm-node-aes-gcm.js:33:4 W20150409-11:48:47.533(-4)? (STDERR) at C:\Users\tsmith\WebstormProjects\chaos-box.meteor\local\build\programs\server\packages\npm-node-aes-gcm.js:42:3 W20150409-11:48:47.533(-4)? (STDERR) at C:\Users\tsmith\WebstormProjects\chaos-box.meteor\local\build\programs\server\boot.js:222:10 W20150409-11:48:47.533(-4)? (STDERR) at Array.forEach (native)

    opened by taylorsmithgg 151
  • [Marketplace] Orders line items refund

    [Marketplace] Orders line items refund

    Resolves #2377

    Notes

    • Include shipping option doesn't work as of now coz there isn't a way to have separate shipping costs for individual line items

    What to test

    • The whole invoice card (Converted most of this into react) Make sure it works/looks as it did before
    • The line items popover: Designs https://app.zeplin.io/project/58af8900737c137280322bd6/screen/59360096eecad57cedd7c9a2 https://app.zeplin.io/project/58af8900737c137280322bd6/screen/5936009418216793598a3118 https://app.zeplin.io/project/58af8900737c137280322bd6/screen/5936009344d012c633a30693

    How to test

    • Clone branch
    • Log in as an admin
    • Make an order with more than 2 items (of the same variant) on your cart
    • Navigate to orders dashboard

    Part 1:

    • Make sure invoice card works as it did before
    • Approve, Capture and apply refund to make sure it still works

    Part 2:

    • Select a line item
    • Note popover opens
    • Edit line items to return some of the items ordered
    • Go over designs to make sure workflow matches
    • Check order on mongo billing.paymentMethod/status should be partialRefund
    • Select all items for refund and refund.
    • Check order on mongo billing.paymentMethod/status should be refunded
    opened by joykare 73
  • Add default parcel size setting

    Add default parcel size setting

    Resolves #3019 Add a settings panel within the shipping dashboard that permits defining default parcel sizes for products and variants that don't have dimensions defined. Also include sensible defaults for the default parcel size so that it's never null which could cause Shippo or other shipment providers to fail to calculate shipping correctly.

    Fix
    • Create component and container for new setting
    • Create new package reaction-shipping-parcel-size to manage parcel size setting
    • Add default values. Reference: USPS
    • Update Shops.json with default parcel size values
    • Update Shops and Product Variant schemas
    • Update core translation
    • Write unit tests for new setting
    • Update cart-create.app.test

    Test

    • Reset and start reaction
    • Run meteor mongo and 'use meteor in terminal (or start Robomongo)
    • db.Shops.find({}, {"defaultParcelSize": 1, "_id": 0}) should give { "defaultParcelSize" : { "weight" : 7, "length" : 11.25, "width" : 8.75, "height" : 6 } }
    • Login as admin and enable payment
    • Go to shipping setting
    • Enable Shippo (refresh methods if no values are shown)
    • Check values shown in Default parcel size form fields. They should be the same values in the database
    • Add a product
    • Check the product dimensions. They should be the same values in the database
    • Publish product, add to cart, and checkout (Shipping rates should be displayed)
    • Check Orders in database. items.parcel should be the same value of product dimensions
    • Change product dimensions and repeat step 10.
    • Check Orders in database and verify that items.parcel is equal to the new dimensions saved for the product
    • Create another product and add a variant option. Variant dimensions should be equal to the values in the database
    • Publish product, add variant option to cart, and checkout
    • Check Orders in database. items.parcel should be the same value of variant option dimensions
    • Change variant option dimensions and repeat steps 15 - 16
    • Add a new product and edit dimension values
    • Repeat steps 10 - 13
    • Add a new product
    • Repeat step 18 with zero dimension values (i.e: weight = 0, length = 0, width = 0, height = 0)
    • Check Orders in database and verify that items.parcel is equal to the value for default parcel size
    • Remove defaultParcelSize value in Shops.json
    • Reset and run reaction
    • Repeat above steps
    opened by efalayi 58
  • Fix cart icon display on small screens

    Fix cart icon display on small screens

    opened by efalayi 52
  • Meteor 1.6

    Meteor 1.6

    • update to Meteor 1.6
    • update all npm dependencies (except React/ReactDOM)
    • remove unused (?) BlazeLayout component to fix build/compile issue
    • update Docker base to v3.0.0 (which added Meteor 1.6 support)

    Outstanding issues:

    • evaluate whether we need to support BlazeLayout anymore. cc: @mikemurray

    Other than the one remaining discussion above, builds work and tests pass. We should be pretty close here (if not already good to go).

    To test this PR:

    reaction init -b meteor-1.6 reaction-1.6
    cd reaction-1.6
    reaction
    
    opened by jshimko 51
  • Completed orders should break items out by Shop

    Completed orders should break items out by Shop

    Closes #2308 and #2245

    My first React component replacement from scratch so I open to input on layout, structure, etc. Layout is responsive thanks to help from @kieckhafer. Also first time I have done any HTML of significance so there might be problems there.

    To Test

    Single Shop (for just the completed page functionality)

    1. Place an order
    2. Proceed to the completed order page

    Multi-shop

    [Update] Slightly shorter instructions now that you can see products from both shops w/o switching shops.

    1. Login as admin (Marketplace admin)
    2. Set up shipping (I've only been testing with Flat Rate but YMMV)
    3. Enable/Configure Stripe (keys are in reaction.json)
    4. Click on "Shop" settings in the Dashboard
    5. Click on "Marketplace"
    6. Enter a name and email in the "Invite Owner Form" and click "Send Invitation"
    7. Copy the URL from the invite email
    8. Open that URL in an incognito window (you will want to keep your logged in session)
    9. Open "My Shop Settings"
    10. Click on "Start Accepting Payment". You will be taken to Stripe's site
    11. Don't fill out this form. Click on the "Skip this account form" link at the top, this will return you to your local site and Stripe is now connected
    12. While still a Shop Admin, create a product and publish
    13. In your non-incognito browser window as Marketplace admin, place a Reaction item in your cart
    14. Add your newly created Shop product to your cart
    15. Checkout as normal

    **Note that "Estimated Ship Date" is not implemented on the back end so that's why it doesn't display here.

    Another Note There is currently an issue with the way that discounts are being stored on multi-shop orders so that discounts are doubled (once per shop).

    opened by zenweasel 50
  • Fix for accounts and orders search results

    Fix for accounts and orders search results

    Resolves #2802.

    This PR fixes a bug that stopped the search modal from functioning properly. In summary, the bug was due to an improper import/export of a certain component.

    Test Instructions

    • Make sure that your instance of RC has multiple users and orders.
    • Log in as admin.
    • Open the search modal using the search icon in the navigation bar.
    • Enter a simple search query and check its results in the ACCOUNTS tabs of the search results section.
    • Open your browser console. Observe that the errors reported in #2802 are no longer there.

    Updated Test Instructions

    • Do a new search using a simple search query and click any of the accounts results except the one for your account.
    • Observe that you're taken to the profiles page i.e localhost:3000/account/profile.
    • Observe that you only see that account's name, email and order history.
    • Perform an accounts search again, and this time click your own account.
    • Observe that you are presented with the complete profile page, with forms for changing your email etc.
    • Lastly, search for an account and click an account that isn't yours.
    • Delete part of the userId in the path in the address bar e.g change http://localhost:3000/account/profile?userId=hfTACbZmD8qzJpCGh to http://localhost:3000/account/profile?userId=hfT.
    • Observe that you're shown the error message below:
    screen shot 2017-10-04 at 4 52 01 pm
    opened by foladipo 46
  • React milestone 57 - Product Grid

    React milestone 57 - Product Grid

    Resolves #2050

    Product Grid Milestone

    • Merge the search and product grid to share components

    Search Resolves #2051

    1. Click on search button on the navbar
    2. Enter searchQuery under products/accounts/orders tabs as an admin
    3. Repeat above using a guest account _ Expect not to see tabs
    4. On search under products click on tags that pop up _ Expect them to change active status
    5. Select orders, accounts or products and expect modal to close
    6. Check out the code.

    Product Resolves #2050

    1. Visit homepage of app As Admin:
    2. Click on a product to open grid settings sidebar
    3. Double click on product to open PDP
    4. Navigate the product, note it works as before As Guest/not logged in:
    5. Click on product to open PDP
    6. Navigate through and note that it works as well as before
    7. Check out code
    opened by joykare 46
  • Fix 4089: Taxcloud with marketplace setup.

    Fix 4089: Taxcloud with marketplace setup.

    Resolves #4089 Resolves #3973
    Impact: minor
    Type: feature

    Issue

    1. Tax calculation in TaxCloud didn't support marketplace setup. It was using the address of the primary shop as origin.
    2. Tax calculation was not working because, the tax calculation was happening in async, during which the default value of tax(0) was being used.
    3. TaxCloud needs pincode in form of { Zip5: "12345", Zip4: "1234" }, but we were sending it the pincode we had from the user.
    4. Tax rate was not stored per shop(as this was not ready for marketplace.)
    5. Taxcodes were not being fetched from TaxCloud's API. The job doing this was commented out. Also the tax-cloud API is now changed.

    Solution

    1. A API call is made per shop, with all the items of the shop that were bought. So origin address changes with every shop's API call. Hence marketplace is supported
    2. Tax calculation happens in sync.
    3. This was not a major issue. To fix this used a regex to split the pincode and passed that to the API call.
    4. Tax rate is stored per shop. But should we do this? Shouldn't it be per item?
    5. Restored the job that fetches the taxcode and modified that code to reconcile the fetched taxcode with TaxCode schema.
    6. Modified the code to reconcile with the new taxcloud API for tax-codes.

    Also I have removed the code which used to set tax to 0 by default. Because this was resetting the tax to 0, whenever cart was updated. I have looked into the side-effects and couldn't spot any. But it would be better if someone can also think on this once.

    Breaking changes

    None

    Testing

    MarketPlace Setup

    1. Login as admin(A), enable TaxCloud.
    2. Invite a marketplace user(M).
    3. Login as M and create a product, publish it.
    4. Enable TaxCloud.
    5. Set up your shop's address.
    6. Add the product you created, and a product from the primary shop(Reaction Example Product) to the cart.
    7. Go to checkout screen. See the tax are being calculated correctly.
    8. Buy the products.
    9. Change either of the shop's address.
    10. Again repeat the above steps.
    11. See that the tax calculated is different.
    12. Try checkout with different pincodes format(1234-12345, 12345, 123456789), see that all of them work.
    13. Place the orders and see that tax is mentioned on the summary screen.
    14. Enter wrong credentials for tax-cloud and save
    15. Now add a product to the cart and checkout with it.
    16. Go to the orders in the Action Bar. Notice it is marked with a red dot and is labelled Tax not calculated.

    Fetching of tax rates

    1. Enable tax-cloud.
    2. Set refresh period to every 1 min
    3. Wait for 1 minute and after that the tax-code will be fetched.
    4. To see this, go to PDP and edit product, select the title and go to Tax field.
    5. The dropdown for tax-codes should now be populated with the fetched tax codes.
    6. Go back to tax-cloud settings, set the refresh period to every 5 mins, now tax-codes will be fetched every 5 mins.
    opened by Akarshit 45
  • Converting Avalara Setting page to React

    Converting Avalara Setting page to React

    I am posting the screenshots of old and new for the community to do a design-review.

    Old ->

    screen shot 2017-11-20 at 9 37 33 pm ---------------------- screen shot 2017-11-20 at 9 37 43 pm =============================

    New ->

    screen shot 2017-11-24 at 1 51 23 am -------------------------- screen shot 2017-11-24 at 1 52 02 am
    opened by Akarshit 45
  • Order dashboard search by orderId, customer info, order product info

    Order dashboard search by orderId, customer info, order product info

    Resolves #2353, #2354 and #2355

    How To Test

    • Create a few orders

    • Search the orders using the Search Bar at the top with: ** OrderId ** Customer info (name, email, phone, card - last 4 digits) ** Product title, Variant title, Variant option title

    • Confirm that all these search and any active filter takes effect on the results being displayed by the table.

    • Confirm that clearing all filters and using search alone also works.

    . The only part of this pending is opening up the order summary action view if exactly one match/result is present in the table. Currently working on making Sortable not prevent the opening, but, I think reviews can start on this. I'll get the opening in before review completion.

    Update: There is a blocker to sliding out the table when there's only one matching item because the data fetching & rendering is happening within the table itself. Since we'll be moving the fetching #2768, that seem a better time to achieve this.

    opened by impactmass 40
  • Filter for Promotions

    Filter for Promotions

    Signed-off-by: Sujith [email protected]

    Resolves #6689 Impact: minor Type: feature

    Issue

    Add filtering for Promotions collection like was done for Customer/Orders (Ticket #6689)

    Solution

    Added new query endpoint filterPromotions which will provide the requested feature. To get a list of available fields and their type, the UI could use the new query end-point introspectSchema (currently in PR status).

    Breaking changes

    None. But for passing the validate permissions, we need an entry ["reaction:legacy:promotions", "read"] which is handled in the PR #6732

    Testing

    Unit test for the common query function is already included in the Filter PR (6684). This PR is only adding the new end-point in the same format

    opened by sujithvn 1
  • feat: improve docker release flow

    feat: improve docker release flow

    Resolves #6714 Impact: major Type: feature

    Issue

    To ensure that we have a docker image that starts properly we need to release packages before we release the docker image, so instead of our current 1 step process we would have a process like:

    Current Step 1 that versions all packages and releases the app and publishes to npm and creates a PR for the docker release A PR that when merged will release the docker file to Docker hub

    Solution

    Create second step for Docker image release

    opened by vanpho93 1
  • feat: add migration for promotion permissions

    feat: add migration for promotion permissions

    Resolves #6722 Impact: minor Type: feature

    Issue

    Missing new permissions for the promotion in database.

    Solution

    Add migration for Promotion permissions

    opened by vanpho93 1
Releases(v4.2.7)
Owner
Reaction Commerce
Open source JavaScript commerce platform.
Reaction Commerce
The most powerful headless CMS for Node.js — built with GraphQL and React

A scalable platform and CMS to build Node.js applications. schema => ({ GraphQL, AdminUI }) Keystone Next is a preview of the next major release of Ke

KeystoneJS 7.3k Dec 31, 2022
ApostropheCMS is a full-featured, open-source CMS built with Node.js that seeks to empower organizations by combining in-context editing and headless architecture in a full-stack JS environment.

ApostropheCMS ApostropheCMS is a full-featured, open source CMS built with Node.js that seeks to empower organizations by combining in-context editing

Apostrophe Technologies 3.9k Jan 4, 2023
ApostropheCMS is a full-featured, open-source CMS built with Node.js that seeks to empower organizations by combining in-context editing and headless architecture in a full-stack JS environment.

ApostropheCMS ApostropheCMS is a full-featured, open source CMS built with Node.js that seeks to empower organizations by combining in-context editing

Apostrophe Technologies 3.9k Jan 4, 2023
👻 The #1 headless Node.js CMS for professional publishing

Ghost.org | Features | Showcase | Forum | Docs | Contributing | Twitter Love open source? We're hiring Node.js Engineers to work on Ghost full-time Th

Ghost 42.1k Jan 5, 2023
🚀 Open source Node.js Headless CMS to easily build customisable APIs

API creation made simple, secure and fast. The most advanced open-source headless CMS to build powerful APIs with no effort. Try live demo Strapi is a

strapi 50.8k Dec 27, 2022
👻 The #1 headless Node.js CMS for professional publishing

Ghost.org | Features | Showcase | Forum | Docs | Contributing | Twitter Love open source? We're hiring Node.js Engineers to work on Ghost full-time Th

Ghost 37k Apr 5, 2021
Drag and drop page builder and CMS for React, Vue, Angular, and more

Drag and drop page builder and CMS for React, Vue, Angular, and more Use your code components and the stack of your choice. No more being pestered for

Builder.io 4.3k Jan 9, 2023
Tina is an open source editor that brings visual editing into React websites. Tina empowers developers to give their teams a contextual and intuitive editing experience without sacrificing code quality.

Tina is an open source editor that brings visual editing into React websites. Tina empowers developers to give their teams a contextual and intuitive editing experience without sacrificing code quality.

Tina 8.3k Jan 9, 2023
We.js, extensible Node.js MVC framework - CLI

We.js ;) We.js is a extensible node.js MVC framework For information and documentation see: http://wejs.org This repository (wejs/we) have the We.js C

We.js 208 Nov 10, 2022
A Node.js CMS written in CoffeeScript, with a user friendly backend

Nodizecms A Node.js CMS written in CoffeeScript, with a user friendly backend Status NodizeCMS is still under heavy development, there's a ton of unim

Nodize CMS 176 Sep 24, 2022
Javascript Content Management System running on Node.js

Cody CMS A Javascript Content Management System running on Node.js We finally took upon the task, we are happy to announce the transition to Express 4

Johan Coppieters 669 Oct 31, 2022
Business class content management for Node.js (plugins, server cluster management, data-driven pages)

PencilBlue A full featured Node.js CMS and blogging platform (plugins, server cluster management, data-driven pages) First and foremost: If at any poi

PencilBlue, LLC. 1.6k Dec 30, 2022
Business class content management for Node.js (plugins, server cluster management, data-driven pages)

PencilBlue A full featured Node.js CMS and blogging platform (plugins, server cluster management, data-driven pages) First and foremost: If at any poi

PencilBlue, LLC. 1.6k Dec 30, 2022
Minimalistic, lean & mean, node.js cms

enduro.js Enduro is minimalistic, lean & mean, node.js cms. See more at enduro.js website Other repositories: Enduro • samples • Enduro admin • enduro

Martin Gottweis 688 Dec 31, 2022
We.js, extensible Node.js MVC framework - CLI

We.js ;) We.js is a extensible node.js MVC framework For information and documentation see: http://wejs.org This repository (wejs/we) have the We.js C

We.js 208 Nov 10, 2022
AdminBro is an admin panel for apps written in node.js

Admin Bro AdminBro is An automatic admin interface which can be plugged into your application. You, as a developer, provide database models (like post

Software Brothers 6.5k Jan 2, 2023
A Node.js Express backend for a Stackoverflow like answering forum, with RESTful endpoints

A Node.js Express backend for a Stackoverflow like answering forum, with RESTful endpoints, written in es6 style with linted and comprehensively unit-tested code. Utilizes a local json database using fs but has full separation of concern to implement anything else.

Dhiman Seal 3 Jan 9, 2022
Use the Google Drive API as a Content Management System

Google Drive CMS This shared Google Drive folder serves as the backend for this sample webpage. Quick links: Github / NPM / Dockerhub / Heroku NPM npm

Nathan Babcock 40 Nov 22, 2022
FOSS app for the Diatum self-hosting network, supporting messaging and media sharing.

FOSS app for the Diatum self-hosting network, supporting messaging and media sharing.

Roland Osborne 23 Dec 23, 2022