How rummy43/ai-microservices-platform works
This is an event-driven microservices platform whose main workflow creates a user, publishes a transactional outbox event to Kafka, and consumes it to produce an AI-personalized welcome notification with idempotency and dead-letter recovery. The graph emphasizes that workflow, the gateway’s security boundary, and the AI integration. README documentation supports the broader observability capabilities, but the supplied tree and source excerpts do not establish their runtime wiring, so they are not mapped here.
Main entry points: NotificationService.java Notification processing · SecurityConfig.java Gateway routes and secures requests · UserServiceImpl.java User operations · KafkaConsumerService.java Event consumer and retries
Components 21
API Gateway
- Gateway routes and secures requests
api-gateway/src/main/java/com/ramesh/api_gateway/config/SecurityConfig.java - Identity propagation
api-gateway/src/main/java/com/ramesh/api_gateway/filter/IdentityPropagationFilter.java
User Service
- User API
user-service/src/main/java/com/ramesh/user_service/controller/UserController.java - User operations
user-service/src/main/java/com/ramesh/user_service/service/impl/UserServiceImpl.java - User database
user-service/src/main/java/com/ramesh/user_service/repository/UserRepository.java - Outbox event capture
user-service/src/main/java/com/ramesh/user_service/service/OutboxEventService.java - Outbox table
user-service/src/main/java/com/ramesh/user_service/repository/OutboxEventRepository.java - Outbox publisher
user-service/src/main/java/com/ramesh/user_service/service/OutboxPublisherService.java - Kafka event publisher
user-service/src/main/java/com/ramesh/user_service/kafka/EventPublisher.java
Notification Service
- Event consumer and retries
notification-service/src/main/java/com/ramesh/notification_service/kafka/KafkaConsumerService.java - Notification processing
notification-service/src/main/java/com/ramesh/notification_service/service/NotificationService.java - Processed-event records
notification-service/src/main/java/com/ramesh/notification_service/repository/ProcessedEventRepository.java - Notification audit log
notification-service/src/main/java/com/ramesh/notification_service/repository/NotificationLogRepository.java - AI enrichment client
notification-service/src/main/java/com/ramesh/notification_service/ai/AiEnrichmentClient.java - Dead-letter records
notification-service/src/main/java/com/ramesh/notification_service/repository/DeadLetterEventRepository.java - Dead-letter reprocessor
notification-service/src/main/java/com/ramesh/notification_service/service/DltReprocessorService.java
AI Enrichment
- Enrichment API
ai-service/src/main/java/com/ramesh/ai_service/controller/AiController.java - Enrichment service
ai-service/src/main/java/com/ramesh/ai_service/service/AiEnrichmentService.java
Other components
- API client
- Kafka topics
- Ollama local LLM
Connections 22
- API client → Gateway routes and secures requests: sends request
- Gateway routes and secures requests → Identity propagation: propagates identity
- Gateway routes and secures requests → User API: routes user API
- Gateway routes and secures requests → Notification processing: routes notification API
- User API → User operations: invokes
- User operations → User database: persists user
- User operations → Outbox event capture: records event
- Outbox event capture → Outbox table: writes event
- Outbox publisher → Outbox table: reads pending events
- Outbox publisher → Kafka event publisher: publishes event
- Kafka event publisher → Kafka topics: sends event
- Kafka topics → Event consumer and retries: delivers event
- Event consumer and retries → Notification processing: processes event
- Event consumer and retries → Dead-letter records: records exhausted failures
- Notification processing → Processed-event records: checks and records
- Notification processing → Notification audit log: writes audit log
- Notification processing → AI enrichment client: requests enrichment
- AI enrichment client → Enrichment API: calls enrichment API
- Enrichment API → Enrichment service: invokes
- Enrichment service → Ollama local LLM: generates content
- Dead-letter reprocessor → Dead-letter records: loads and updates
- Dead-letter reprocessor → Notification processing: replays event