How siamsell/icar-microservice works
iCar Algeria is a Django microservices marketplace with Auth, Catalog, and Notification services. Clients use Auth for account and JWT operations, then access catalog listings with stateless token validation; catalog changes and user events are exchanged asynchronously through RabbitMQ. Notification APIs manage follows and notification state, while a worker consumes events and persists notification/fan-out data. The README documents Traefik/Consul routing and isolated databases, but their implementation files are outside this tree; edges involving them are documented rather than source-verified.
Main entry points: catalog/views.py Catalog API · users/views.py Auth API · notifications/views.py Notification API · rabbitmq_consumer.py User Event Consumer
Components 23
Auth Service
- Auth API
microservices/services/auth/icar_auth/users/views.py - User Records
microservices/services/auth/icar_auth/users/models.py - User Serializers
microservices/services/auth/icar_auth/users/serializers.py - User Event Publisher
microservices/services/auth/icar_auth/users/rabbitmq.py
Catalog Service
- Catalog API
microservices/services/car/catalog_service/catalog/views.py - Stateless JWT Auth
microservices/services/car/catalog_service/catalog_service/authentication.py - Listings and Categories
microservices/services/car/catalog_service/catalog/models.py - Catalog Serializers
microservices/services/car/catalog_service/catalog/serializer.py - Content Event Publisher
microservices/services/car/catalog_service/catalog/rabbitmq.py - User Event Consumer
microservices/services/car/catalog_service/catalog/rabbitmq_consumer.py - Consumer Command
microservices/services/car/catalog_service/catalog/management/commands/consume_user_events.py - Catalog Database
microservices/services/car/catalog_service/catalog/models.py
Notification Service
- Notification API
microservices/services/notification/notification_service/notifications/views.py - Stateless JWT Auth
microservices/services/notification/notification_service/notification_service/authentication.py - Notification Serializers
microservices/services/notification/notification_service/notifications/serializers.py - Follow and Notice Data
microservices/services/notification/notification_service/notifications/models.py - Event Worker
microservices/services/notification/notification_service/notifications/rabbit.py - Worker Command
microservices/services/notification/notification_service/notifications/management/commands/start_worker.py - Notification Database
microservices/services/notification/notification_service/notifications/models.py
Platform Infrastructure
- Traefik Gateway
- Consul Discovery
- RabbitMQ
Other components
- API Client
Connections 23
- API Client → Traefik Gateway: sends requests
- Traefik Gateway → Consul Discovery: routes healthy instances
- Traefik Gateway → Auth API: routes requests
- Traefik Gateway → Catalog API: routes requests
- Traefik Gateway → Notification API: routes requests
- Auth API → User Serializers: validates data
microservices/services/auth/icar_auth/users/views.py - Auth API → User Records: reads and writes
microservices/services/auth/icar_auth/users/views.py - Auth API → User Event Publisher: publishes user events
microservices/services/auth/icar_auth/users/views.py - User Event Publisher → RabbitMQ: publishes events
- RabbitMQ → User Event Consumer: delivers user events
- Consumer Command → User Event Consumer: starts consumer
microservices/services/car/catalog_service/catalog/management/commands/consume_user_events.py - User Event Consumer → Listings and Categories: syncs user records
microservices/services/car/catalog_service/catalog/rabbitmq_consumer.py - Catalog API → Stateless JWT Auth: authenticates requests
microservices/services/car/catalog_service/catalog/views.py - Catalog API → Catalog Serializers: serializes responses
microservices/services/car/catalog_service/catalog/views.py - Catalog API → Listings and Categories: queries listings
microservices/services/car/catalog_service/catalog/views.py - Catalog API → Content Event Publisher: publishes content events
microservices/services/car/catalog_service/catalog/views.py - Content Event Publisher → RabbitMQ: publishes events
- RabbitMQ → Event Worker: delivers events
- Worker Command → Event Worker: starts consumer
microservices/services/notification/notification_service/notifications/management/commands/start_worker.py - Event Worker → Follow and Notice Data: creates notices
microservices/services/notification/notification_service/notifications/rabbit.py - Notification API → Stateless JWT Auth: authenticates requests
microservices/services/notification/notification_service/notifications/views.py - Notification API → Notification Serializers: serializes responses
microservices/services/notification/notification_service/notifications/views.py - Notification API → Follow and Notice Data: manages follows and notices
microservices/services/notification/notification_service/notifications/views.py