How adri-2/micro-service-store works
This is a distributed storefront platform: clients obtain JWTs from account-service, then use authenticated catalog and order APIs. Order creation stores a draft, asynchronously enriches it with account and product data, and supports stock confirmation or release; accounting emits an event consumed by billing. The README documents per-service PostgreSQL stores and Redis caching. Some paths—especially product persistence and billing internals—are supported only by the README or source index, so those links are limited to documented relationships.
Main entry points: app/views.py Order API · app/views.py Account API · app/views.py Catalog API · order_service.py Order processing
Components 25
Identity service
- Account API
services/account_service/app/views.py - Account serializers
services/account_service/app/serializers.py - User model
services/account_service/app/models.py - Account PostgreSQL
Product catalog
- Catalog API
services/product_service/app/views.py - Product serializers
services/product_service/app/serializers.py - Catalog models
services/product_service/app/models.py - Catalog PostgreSQL
Order management
- Order API
services/order_service/app/views.py - Order serializers
services/order_service/app/serializers.py - Order records
services/order_service/app/models.py - Order processing
services/order_service/app/services/order_service.py - Catalog client
services/order_service/app/services/product_service.py - Account client
services/order_service/app/services/user_service.py - Async order task
services/order_service/app/tasks.py - Event publisher
services/order_service/app/messaging/publisher.py - Orders PostgreSQL
Billing events
- RabbitMQ
- Billing consumer
services/billing_service/app/rabbitmq.py - Invoice logic
services/billing_service/app/billing.py - Billing API
services/billing_service/app/main.py - Invoice model
services/billing_service/app/models.py - Billing PostgreSQL
Other components
- Client
- Redis cache
Connections 30
- Client → Account API: requests login
- Account API → Account serializers: serializes auth
services/account_service/app/views.py - Account serializers → User model: uses user model
services/account_service/app/serializers.py - Account API → User model: reads user
services/account_service/app/views.py - Account API → Account PostgreSQL: persists accounts
- Client → Catalog API: requests catalog
- Catalog API → Product serializers: serializes products
services/product_service/app/views.py - Catalog API → Catalog models: accesses catalog
services/product_service/app/views.py - Catalog API → Catalog PostgreSQL: stores catalog
- Client → Order API: submits orders
- Order API → Order serializers: selects serializer
services/order_service/app/views.py - Order API → Order records: queries orders
services/order_service/app/views.py - Order API → Async order task: queues processing
services/order_service/app/views.py - Order API → Event publisher: publishes accounting
services/order_service/app/views.py - Order records → Orders PostgreSQL: stores orders
- Async order task → Order processing: runs processing
services/order_service/app/tasks.py - Order processing → Order records: updates order
services/order_service/app/services/order_service.py - Order processing → Account client: fetches users
services/order_service/app/services/order_service.py - Order processing → Catalog client: fetches products
services/order_service/app/services/order_service.py - Account client → Account API: requests account data
services/order_service/app/services/user_service.py - Catalog client → Catalog API: requests catalog data
services/order_service/app/services/product_service.py - Order API → Redis cache: caches responses
services/order_service/app/views.py - Catalog client → Redis cache: caches product data
services/order_service/app/services/product_service.py - Event publisher → RabbitMQ: publishes event
- RabbitMQ → Billing consumer: delivers orders
- Billing consumer → Invoice logic: processes billing
services/billing_service/app/rabbitmq.py - Invoice logic → Invoice model: creates invoices
services/billing_service/app/billing.py - Billing API → Billing consumer: starts consumer
services/billing_service/app/main.py - Billing API → Invoice model: lists invoices
services/billing_service/app/main.py - Invoice logic → Billing PostgreSQL: uses billing store
services/billing_service/app/billing.py