BookWorm is decomposed into distinct microservices following Domain-Driven Design principles, with each service owning its data and business logic.
Component | Responsibility | Technology |
---|
API Gateway | Request routing, authentication, rate limiting | YARP |
Catalog API | Book catalog management, search functionality | .NET Core, PostgreSQL, Qdrant |
Ordering API | Order processing, payment coordination | .NET Core, PostgreSQL |
Basket API | Shopping cart management | .NET Core, Redis |
Rating API | Reviews and ratings management | .NET Core, PostgreSQL |
Chat API | Real-time communication | .NET Core, SignalR, PostgreSQL |
Notification API | Email and push notifications | .NET Core, SendGrid, Azure Table |
Finance API | Order processing | .NET Core, PostgreSQL |
Event Bus | Asynchronous messaging | RabbitMQ |
Component | Purpose | Implementation |
---|
Book Management | CRUD operations for books | Entity Framework Core |
Author Management | Author profiles and relationships | Entity Framework Core |
Category Management | Book categorization and hierarchy | Entity Framework Core |
Publisher Management | Publisher details and relationships | Entity Framework Core |
Search Service | Full-text search and filtering | Semantic Kernel |
Component | Purpose | Implementation |
---|
Order Aggregate | Order lifecycle management | DDD aggregate pattern |
Order Saga | Complex order workflow | Saga orchestration pattern |
Order Events | Domain event publishing | Event-driven coordination |
Component | Purpose | Implementation |
---|
Real-time Messaging | Live chat functionality | SignalR for WebSockets |
AI Chatbot | Automated customer support | Gemma 3 integration |
Message Persistence | Chat history storage | PostgreSQL database |
Notification System | Alert delivery | Email and push notifications |
Presence Management | User online status | In-memory state with Redis |
Component | Purpose | Used By |
---|
Authentication | JWT token validation | All API services |
Logging | Structured logging | All services |
Monitoring | Health checks and metrics | All services |
Caching | Response caching | High-frequency read operations |
Event Publishing | Domain event handling | All domain services |
Configuration | Environment-specific settings | All services |