Reaction Platform is a customizable, real-time, reactive commerce solution. This repository is the quickest way to get started with Reaction and its supporting services in a local development environment.
- An ultra modern, enterprise-ready, real-time commerce platform.
- A microservices based architecture.
- Docker based development environment.
- Launched and configured with a single CLI command.
Reaction Platform is built with a microservices architecture. This project provides the tooling to easily orchestrate the services in a local development environment.
Platform services will be cloned as child directories within this project.
- GNU Make
- macos and linux users will have a suitable version bundled with the OS
- Bourne Shell and POSIX tools (sh, grep, sed, awk, etc)
- macos and linux users will have a suitable version bundled with the OS
- Git
- Docker | Docker for Mac | Docker for Windows
- Node.js
- Yarn
- A GitHub account with a configured SSH key
First, clone this repository.
git clone [email protected]:reactioncommerce/reaction-platform.git
cd reaction-platform
From within the project directory run:
make
This process may take some time. Behind the scenes make
is
- checking that dependencies are present
- cloning the sub projects from GitHub:
reaction
,reaction-hydra
, and theexample-storefront
- downloading Docker images
- building custom, project Docker images
- starting services
If the make
command fails at some point, you can run or rerun it for specific services with:
make init-<project-name>
Example:
make init-example-storefront
Bootstrapping with Particular Git Branches
The normal bootstrapping process will give you the latest released versions of the platform subprojects and is the recommended configuration for regular development. However, if you know you require a particular previous release or alternative git branch, you can take the following steps to bring up the platform with the particular versions you need. These steps are an alternative to the standard bootstrapping approach, you should do one or the other, not both.
From the project directory run
make clone
Within the necessary subproject directory or directories run the git checkout <your-release-tag-or-branch>
commands you need to get the specific subproject versions you need checked out.
Example:
cd example-storefront
git checkout develop
Then run the following
cd .. # cd into reaction-platform
make
This will proceed with the bootstrapping process using the versions you have explicitly checked out
User-defined Docker networks are used to connect the Reaction services that run as separate Docker Compose projects. With this configuration, each of the projects can be launched independently using Docker Compose.
While the projects can be launched independently they may have network dependencies that are required to function correctly. The platform Makefile will launch services for you if you start it all together. You are free to manually start a single service but you will need to ensure dependencies are running.
Platform networks in the Docker environment should be named as
*.reaction.localhost
. The localhost
TLD is reserved and guaranteed to not
conflict with a real TLD.
Network | Description |
---|---|
api.reaction.localhost | GraphQL and API traffic between services. |
auth.reaction.localhost | Authentication and authorization services. |
These services will be running when the initial make
command is complete:
Service | Description |
---|---|
OAuth2 Server (Hydra) (http://localhost:4444) | ORY Hydra OAuth2 token server. |
Reaction Meteor (http://localhost:3000) | The Reaction Meteor application, which includes the server API and the Meteor UI client. |
Example Storefront (http://localhost:4000) | An example Reaction storefront UI built with Next.JS. |
After running make start
, you should be able to explore the GraphQL API at http://localhost:3000/graphql-beta. See GraphQL Playground.
These commands are used to control the system as a whole.
Run these commands from the reaction-platform
project root directory.
Command | Description |
---|---|
make |
Boostraps the entire Reaction development environment in Docker. |
make stop |
Stops all containers. |
make start |
Starts all containers. |
make rm |
Removes all containers. Volumes are not removed. |
make clean |
Removes all containers, networks, and volumes. Any volume data will be lost. |
make init-<project-name> |
Example: make init-example-storefront . Does clone/setup for a single project. |
You may refer to each sub-project's README for additonal operation details.
Sub-project | Documentation |
---|---|
reaction |
Reaction Documentation |
reaction-hydra |
reaction-hydra , ory/hydra |
example-storefront |
Example Storefront docs |
For tips on developing on Docker, read our Docker docs.
Copyright © GNU General Public License v3.0