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:
-
Catalog Subdomain - Core subdomain
- Product information management
- Search and discovery
- Ratings and reviews
- AI-powered recommendations
-
Orders Subdomain - Core subdomain
- Shopping cart management
- Order processing workflow
- Payment orchestration
- Customer notifications
Ubiquitous Language
Term | Definition |
---|---|
Book | A physical or digital publication available for purchase |
Basket | A temporary collection of items selected by a customer |
Order | A confirmed purchase request with payment information |
Catalog | The complete inventory of available books |
Rating | Customer feedback including stars and written reviews |
Saga | A 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:
- Microservices Architecture for service boundaries
- .NET Aspire for Cloud-Native Development for orchestration
- Container-First Deployment Strategy for consistency
- API Gateway Pattern for unified access
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)
Metric | Target | Description |
---|---|---|
Availability | 99.9% | Uptime for critical services |
Response Time | < 200ms | P95 latency for API calls |
Order Success Rate | > 98% | Successful order completions |
Event Processing | < 1s | Time 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)
Metric | Target | Description |
---|---|---|
Availability | 99.9% | Uptime for critical services |
Response Time | < 200ms | P95 latency for API calls |
Order Success Rate | > 98% | Successful order completions |
Event Processing | < 1s | Time 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
- Metrics: Prometheus + Grafana dashboards
- Logging: Structured logging with Serilog
- Tracing: Distributed tracing with OpenTelemetry
Monitoring Dashboards
- Service health and availability
- Business metrics and KPIs
- Performance bottleneck detection
- Error rate tracking