Store (v1.0.0)

The core business domain encompassing all e-commerce operations for BookWorm

Overview

The Store domain represents the heart of BookWorm’s business operations, orchestrating all aspects of the online bookstore experience from product discovery to order fulfillment.

🎯 Domain Vision

To create a seamless, scalable, and maintainable e-commerce platform that delights book lovers while demonstrating modern software architecture best practices.

🏗️ Strategic Design

Domain Boundaries

The Store domain is strategically divided into two subdomains based on our microservices architecture:

  1. Catalog Subdomain - Core subdomain

    • Product information management
    • Search and discovery
    • Ratings and reviews
    • AI-powered recommendations
  2. Orders Subdomain - Core subdomain

    • Shopping cart management
    • Order processing workflow
    • Payment orchestration
    • Customer notifications

Ubiquitous Language

TermDefinition
BookA physical or digital publication available for purchase
BasketA temporary collection of items selected by a customer
OrderA confirmed purchase request with payment information
CatalogThe complete inventory of available books
RatingCustomer feedback including stars and written reviews
SagaA distributed transaction pattern for order processing

💼 Event Storming

We conducted an event storming session for the Store domain to understand its complexities and subdomain interactions. This session helped us map key events, commands, and aggregates, aligning our technical implementation with business needs for robust functionality.

Our implementation follows an event-driven architecture with CQRS pattern to ensure scalability and loose coupling between services.

📊 High-level architecture

To effectively visualize and understand the architecture of the BookWorm system, we will employ the C4 model. This model allows us to represent the system at various levels of abstraction, providing a comprehensive view of its structure and interactions.

Our architecture follows several key architectural decisions:

System Context Diagram

Loading graph...

Container Diagram

Loading graph...

The data storage strategy is detailed in our PostgreSQL database decision, with event-driven communication patterns outlined in our Event-Driven CQRS approach.

AI-powered features are implemented following our AI Integration Strategy, while real-time communication uses SignalR.

🔄 Interactive Architecture Diagram

The following diagram provides an interactive view of the architecture of the BookWorm system. You can explore the components, their relationships, and the flow of data between them.

Current Production Architecture

Below is the interactive event-driven architecture diagram for the BookWorm Store system.

📈 Domain Metrics

Service Level Objectives (SLOs)

MetricTargetDescription
Availability99.9%Uptime for critical services
Response Time< 200msP95 latency for API calls
Order Success Rate> 98%Successful order completions
Event Processing< 1sTime to process domain events

Key Performance Indicators (KPIs)

  • Orders per Hour: Average throughput capacity
  • Catalog Search Speed: Time to return search results
  • Cart Abandonment Rate: Percentage of uncompleted orders
  • Service Health Score: Composite reliability metric

📈 Domain Metrics

Service Level Objectives (SLOs)

MetricTargetDescription
Availability99.9%Uptime for critical services
Response Time< 200msP95 latency for API calls
Order Success Rate> 98%Successful order completions
Event Processing< 1sTime to process domain events

Key Performance Indicators (KPIs)

  • Orders per Hour: Average throughput capacity
  • Catalog Search Speed: Time to return search results
  • Cart Abandonment Rate: Percentage of uncompleted orders
  • Service Health Score: Composite reliability metric

🛡️ Security & Compliance

Security Measures

  • Authentication: JWT-based user authentication via Keycloak Identity Management
  • Authorization: Role-based access control (RBAC)
  • Encryption: TLS 1.3 for all communications
  • Data Protection: PCI DSS compliance for payments

Audit & Compliance

  • Complete audit trail via event sourcing
  • GDPR compliance for user data
  • Regular security assessments
  • Automated compliance checking

🔍 Observability

Our observability strategy is built on modern cloud-native principles, following our .NET Aspire cloud-native development approach and container-first deployment strategy.

Three Pillars

  1. Metrics: Prometheus + Grafana dashboards
  2. Logging: Structured logging with Serilog
  3. Tracing: Distributed tracing with OpenTelemetry

Monitoring Dashboards

  • Service health and availability
  • Business metrics and KPIs
  • Performance bottleneck detection
  • Error rate tracking