E-Commerce
The E-Commerce domain is the core business domain of FlowMart, our modern digital marketplace. This domain orchestrates all critical business operations from product discovery to order fulfillment, handling millions of transactions monthly across our global customer base.
The E-Commerce domain is the core business domain of FlowMart, our modern digital marketplace. This domain orchestrates all critical business operations from product discovery to order fulfillment, handling millions of transactions monthly across our global customer base.
Domain Overview
The E-Commerce domain encapsulates all the core business logic for the FlowMart e-commerce platform. It is built on event-driven microservices architecture with key services like Orders Service Orders Service Service v0.0.3 Service that handles orders Publishes OrderAmended , OrderCancelled +1 Subscribes InventoryAdjusted APIs AsyncAPI , OpenAPI , OpenAPI Owner order-management Map Repo View docs , Inventory Service (deprecated) Deprecated Inventory Service Service v0.0.2 Service that handles the inventory Publishes InventoryAdjusted , OutOfStock Subscribes UserSignedUp, OrderConfirmed +4 Owner order-management Map Repo View docs , and Payment Service Payment Service Service v0.0.1 Service that handles payments Publishes PaymentProcessed Subscribes PaymentInitiated Owner dboyne Map Repo View docs .
FlowMart’s E-Commerce domain is built on event-driven microservices architecture, enabling:
- Real-time inventory management via Inventory Service (deprecated) Deprecated Inventory Service Service v0.0.2 Service that handles the inventory Publishes InventoryAdjusted , OutOfStock Subscribes UserSignedUp, OrderConfirmed +4 Owner order-management Map Repo View docs across multiple warehouses
- Seamless payment processing with Payment Service Payment Service Service v0.0.1 Service that handles payments Publishes PaymentProcessed Subscribes PaymentInitiated Owner dboyne Map Repo View docs and Payment Gateway Service Payment Gateway Service Service v0.0.1 Manages integration with external payment processors (Stripe, PayPal, etc.) Publishes PaymentFailed Subscribes ProcessPayment , FraudCheckCompleted Owner dboyne Map Repo View docs
- Smart order routing and fulfillment through Orders Service Orders Service Service v0.0.3 Service that handles orders Publishes OrderAmended , OrderCancelled +1 Subscribes InventoryAdjusted APIs AsyncAPI , OpenAPI , OpenAPI Owner order-management Map Repo View docs
- Personalized customer notifications via Notifications Notifications Service v0.0.2 Service that handles notifications across multiple channels (email, SMS, push) Publishes NotificationSent Subscribes InventoryAdjusted , PaymentProcessed +2 Owner order-management Map Repo View docs
- Subscription-based shopping experiences managed by Subscription Service Subscription Service Service v0.0.1 Service that handles subscriptions Publishes UserSubscriptionStarted , UserSubscriptionCancelled Subscribes PaymentProcessed Owner subscriptions-management Map Repo View docs
- Advanced fraud detection via Fraud Detection Service Fraud Detection Service Service v0.0.1 Analyzes payment transactions for fraudulent activity and risk assessment Publishes FraudCheckCompleted , FraudDetected +1 Subscribes PaymentInitiated Owner dboyne Map Repo View docs
Core Domains for E-Commerce
The Orders and Subscription domains are core domains for the E-Commerce domain.
They are used to manage the orders and subscriptions for the E-Commerce domain.The E-Commerce domain is built on the following sub domains:
- Orders - Core domain for order management
- Payment - A generic domain for payment processing using Stripe as a payment provider
- Subscription - Generic subscription domain handling users subscriptions
FlowMart E-Commerce Database Schema
This diagram represents the core relational data model behind FlowMart. It captures the main business entities and their relationships, including the Customer Customer Entity v1.0.0 Represents an individual or organization that places orders. View docs , Order Order Entity v1.0.0 Represents a customer's request to purchase products or services. View docs , Payment Payment Entity v1.0.0 Represents payment transactions for orders in the e-commerce system. View docs , and Transaction Transaction Entity v1.0.0 Represents a low-level interaction with a payment gateway or processor (e.g., authorize, capture, refund, void). View docs entities.
The schema is designed to support a distributed microservices architecture with event-sourced patterns, enabling services like Orders Service Orders Service Service v0.0.3 Service that handles orders Publishes OrderAmended , OrderCancelled +1 Subscribes InventoryAdjusted APIs AsyncAPI , OpenAPI , OpenAPI Owner order-management Map Repo View docs , Inventory Service (deprecated) Deprecated Inventory Service Service v0.0.2 Service that handles the inventory Publishes InventoryAdjusted , OutOfStock Subscribes UserSignedUp, OrderConfirmed +4 Owner order-management Map Repo View docs , and Payment Service Payment Service Service v0.0.1 Service that handles payments Publishes PaymentProcessed Subscribes PaymentInitiated Owner dboyne Map Repo View docs to operate independently while maintaining data consistency through asynchronous events.
Rendering PlantUML diagram...
Order Processing Flow
Loading graph...
Key Business Flows
For a visual overview of our target state, see the Target Architecture Target Architecture Diagram v1.0.0 Target state microservices architecture we are migrating towards View diagram diagram.
Subscription Management
Our Subscription Service Subscription Service Service v0.0.1 Service that handles subscriptions Publishes UserSubscriptionStarted , UserSubscriptionCancelled Subscribes PaymentProcessed Owner subscriptions-management Map Repo View docs powers FlowMart’s popular “Subscribe & Save” feature. The User Cancels Subscription User Cancels Subscription Flow v1.0.0 Flow for when a user has cancelled a subscription Owner subscriptions-management View flow View docs handles subscription cancellations:
Payment Processing
Secure, multi-provider payment processing with fraud detection via Fraud Detection Service Fraud Detection Service Service v0.0.1 Analyzes payment transactions for fraudulent activity and risk assessment Publishes FraudCheckCompleted , FraudDetected +1 Subscribes PaymentInitiated Owner dboyne Map Repo View docs . The Payment Flow for customers Payment Flow for customers Flow v1.0.0 Business flow for processing payments in an e-commerce platform Owner dboyne View flow View docs orchestrates the complete payment journey:
Performance SLAs
- Order Processing: < 2 seconds
- Payment Processing: < 3 seconds
- Inventory Updates: Real-time
- Notification Delivery: < 30 seconds
Monitoring & Alerts
- Real-time order volume monitoring
- Payment gateway health checks
- Inventory level alerts
- Customer experience metrics
- System performance dashboards