Skip to content

R Commerce

High-Performance Headless E-Commerce Platform


Why R Commerce?

Blazing Fast

Sub-10ms API responses with Rust's zero-cost abstractions. Handle 10,000+ concurrent users per instance.

Memory Safe

Rust's ownership model eliminates entire classes of bugs. No garbage collection pauses, no memory leaks.

Headless Architecture

API-first design powers any frontend. React, Vue, mobile apps, IoT devices - use what you love.

PostgreSQL Powered

Built on PostgreSQL for reliability, performance, and full ACID compliance.

6 Payment Gateways

Stripe, PayPal, WeChat Pay, AliPay, Airwallex, Braintree included. Easy to add more.

Global Shipping

Multi-carrier support with real-time rates, label generation, and tracking integration.


Architecture Overview

graph TB
    subgraph Frontend
        WEB[Web App]
        MOBILE[Mobile App]
        POS[POS System]
    end

    subgraph API
        REST[REST API]
        WS[WebSocket]
        GQL[GraphQL]
    end

    subgraph Services
        OS[Order Service]
        PS[Product Service]
        PAYS[Payment Service]
        SS[Shipping Service]
    end

    subgraph Data
        DB[(PostgreSQL)]
        REDIS[(Redis Cache)]
    end

    WEB --> REST
    MOBILE --> REST
    POS --> REST

    REST --> OS
    REST --> PS
    REST --> PAYS
    REST --> SS

    OS --> DB
    PS --> DB
    PAYS --> DB
    SS --> DB

    REST --> REDIS
    WS --> REDIS

Core Features

Feature Description Status
Product Management Simple, Variable, Subscription, Digital, Bundle products Complete
Order Management Full lifecycle with editing capabilities Complete
Payment Processing 6 gateways with fraud detection Complete
Shipping Multi-carrier with real-time rates Complete
Subscriptions Recurring billing with dunning management Complete
Notifications Email, SMS, Push, Webhooks Complete
Redis Caching Session, Rate Limit, Job Queue Complete
WebSocket Real-time updates and pub/sub Complete

Quick Start

Installation

# Clone the repository
git clone https://github.com/creativebastard/rcommerce.git
cd rcommerce

# Build the project
cargo build --release

# Run with default configuration
./target/release/rcommerce-server

Docker Deployment

# Start with Docker Compose
docker-compose up -d

# Services available:
# - API: http://localhost:8080
# - Database: PostgreSQL on port 5432
# - Redis: port 6379

Documentation

Getting Started

Quick start guide, installation instructions, and initial configuration.

API Reference

Complete REST API documentation with examples and error codes.

Payment Gateways

Configure Stripe, Airwallex, WeChat Pay, AliPay, and more.

Deployment

Production deployment guides for Docker, Kubernetes, and bare metal.

Operations

Scaling, monitoring, backups, reverse proxies, and security.

Development

Developer guide, CLI reference, and configuration options.

Migration

Migrate from Shopify, WooCommerce, Magento, or Medusa.

Architecture

Deep dive into system design, data models, and integration patterns.


Example API Usage

Create a Product

curl -X POST http://localhost:8080/api/v1/products \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "title": "Premium Widget",
    "product_type": "simple",
    "price": 29.99,
    "inventory_quantity": 100
  }'

Create an Order

curl -X POST http://localhost:8080/api/v1/orders \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "customer_id": "uuid-here",
    "items": [{
      "product_id": "product-uuid",
      "quantity": 2
    }],
    "shipping_address": { ... }
  }'

Supported Platforms

Platform Deployment Method
Linux systemd, Docker, Kubernetes
macOS launchd, Docker
FreeBSD rc.d, iocage jails
Docker Docker Compose, Swarm
Kubernetes Helm charts, Operators

Performance Benchmarks

Metric Value
Binary Size ~20 MB
Memory Usage 10-50 MB
API Response Time < 10ms avg
Concurrent Users 10,000+ per instance
Cold Start < 1 second

Roadmap

  • Phase 0: Project Foundation
  • Phase 1: Core Infrastructure
  • Phase 2: Order & Product System
  • Phase 3: Payment & Shipping
  • Phase 4: Real-time Features
  • Phase 5: Advanced Features (In Progress)

Get Started


Built with care in Rust • Dual Licensed (AGPL-3.0 / Commercial) • GitHub