Reaction Commerce
Real-time, modern e-commerce platform.
Overview
Reaction Commerce is an open-source, API-first e-commerce platform built on Node.js that pioneered the modern headless commerce approach. Originally developed as a real-time commerce platform using Meteor.js, Reaction provides a GraphQL-first architecture with modular microservices designed for scalability and customization. The platform emphasizes real-time inventory updates, flexible product catalogs, and extensible plugin architecture for payments, shipping, and tax calculations. This Docker stack combines Reaction Commerce with MongoDB 6 to create a complete e-commerce backend with persistent document storage and real-time capabilities. MongoDB serves as the primary database for storing product catalogs, order data, customer information, and inventory levels, while its change streams enable Reaction's real-time features like live inventory updates and order tracking. The combination provides a modern alternative to traditional e-commerce platforms like Magento or Shopify, offering complete API control and customization freedom. This stack is ideal for developers building custom storefronts, businesses requiring complex product configurations, and organizations needing real-time inventory management across multiple sales channels. The GraphQL API enables headless implementations with React, Vue, or mobile applications while maintaining real-time synchronization through subscriptions.
Key Features
- GraphQL API with real-time subscriptions for live inventory and order updates
- Plugin-based architecture for payments, shipping, taxes, and custom business logic
- Multi-tenant marketplace support with vendor management and commission tracking
- Advanced product catalog with variants, options, and complex pricing rules
- Real-time inventory management with automatic stock level synchronization
- MongoDB change streams integration for instant data propagation across services
- Operator dashboard for store management and administrative functions
- Headless commerce API supporting multiple frontend frameworks and mobile apps
Common Use Cases
- 1Building custom e-commerce storefronts with React, Vue, or Angular frontends
- 2Creating multi-vendor marketplaces with independent seller management
- 3Developing mobile-first commerce applications with real-time inventory sync
- 4Implementing B2B e-commerce platforms with complex pricing and approval workflows
- 5Setting up omnichannel retail systems connecting online and physical stores
- 6Creating subscription commerce platforms with recurring billing and inventory automation
- 7Building API-driven commerce solutions for IoT devices and voice assistants
Prerequisites
- Docker and Docker Compose installed with at least 4GB RAM available for containers
- Port 3000 available for Reaction Commerce web interface and GraphQL API
- Basic understanding of GraphQL queries and mutations for API interaction
- Node.js and JavaScript knowledge for customizing plugins and business logic
- MongoDB query familiarity for direct database operations and troubleshooting
- At least 10GB free disk space for MongoDB data storage and container images
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 reaction: 3 image: reactioncommerce/reaction:latest4 container_name: reaction5 restart: unless-stopped6 environment: 7 MONGO_URL: mongodb://mongodb:27017/${DB_NAME}8 ROOT_URL: http://localhost:30009 ports: 10 - "3000:3000"11 depends_on: 12 - mongodb13 networks: 14 - reaction1516 mongodb: 17 image: mongo:618 container_name: reaction-mongodb19 volumes: 20 - mongodb_data:/data/db21 networks: 22 - reaction2324volumes: 25 mongodb_data: 2627networks: 28 reaction: 29 driver: bridge.env Template
.env
1DB_NAME=reactionUsage Notes
- 1Docs: https://docs.reactioncommerce.com/
- 2Access at http://localhost:3000 - real-time updates via GraphQL subscriptions
- 3GraphQL-first architecture with Meteor.js backend
- 4Admin: http://localhost:3000/operator (create admin on first run)
- 5Plugin-based: payments, shipping, taxes are all plugins
- 6Modern microservices architecture with Node.js
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
reaction
reaction:
image: reactioncommerce/reaction:latest
container_name: reaction
restart: unless-stopped
environment:
MONGO_URL: mongodb://mongodb:27017/${DB_NAME}
ROOT_URL: http://localhost:3000
ports:
- "3000:3000"
depends_on:
- mongodb
networks:
- reaction
mongodb
mongodb:
image: mongo:6
container_name: reaction-mongodb
volumes:
- mongodb_data:/data/db
networks:
- reaction
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 reaction:5 image: reactioncommerce/reaction:latest6 container_name: reaction7 restart: unless-stopped8 environment:9 MONGO_URL: mongodb://mongodb:27017/${DB_NAME}10 ROOT_URL: http://localhost:300011 ports:12 - "3000:3000"13 depends_on:14 - mongodb15 networks:16 - reaction1718 mongodb:19 image: mongo:620 container_name: reaction-mongodb21 volumes:22 - mongodb_data:/data/db23 networks:24 - reaction2526volumes:27 mongodb_data:2829networks:30 reaction:31 driver: bridge32EOF3334# 2. Create the .env file35cat > .env << 'EOF'36DB_NAME=reaction37EOF3839# 3. Start the services40docker compose up -d4142# 4. View logs43docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/reaction-commerce/run | bashTroubleshooting
- Connection to MongoDB failed: Verify mongodb container is running and check network connectivity with docker network ls
- Reaction fails to start with MONGO_URL error: Ensure DB_NAME environment variable is set and MongoDB is accepting connections on port 27017
- GraphQL playground returns 404 error: Wait for Reaction to fully initialize (can take 2-3 minutes on first startup) and verify ROOT_URL matches your access URL
- Admin panel shows blank page: Clear browser cache and ensure operator route is accessible at /operator, create first admin user if none exists
- Real-time subscriptions not working: Check WebSocket connections are not blocked by proxy or firewall, and MongoDB change streams are enabled
- Plugin installation fails: Verify Node.js dependencies and ensure Reaction container has write permissions to plugin directories
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download