This project is a microservices architecture built around Apache Kafka for event-driven communication. It consists of multiple independent services that interact via Kafka topics to provide a scalable and decoupled system.
- client: A frontend application built with Next.js and React. It serves as the user interface for interacting with the system.
- analytic-service: A Kafka service responsible for processing and analyzing event data.
- email-service: A Kafka service that handles email-related events and notifications.
- kafka-service: Manages Kafka cluster setup and administration.
- order-service: Processes order-related events through Kafka.
- payment-service: Handles payment processing with an Express API and Kafka integration.
- Node.js (version 16 or higher recommended)
- Apache Kafka cluster running and accessible
- npm or yarn package manager
Each service has its own dependencies. To install them, navigate to each service directory and run:
npm install
or
yarn install
- Ensure your Kafka cluster is running.
- Start each service individually by navigating to its directory and running:
npm run dev
or
node index.js
depending on the service setup.
- For the client frontend, run:
npm run dev
inside the services/client
directory to start the Next.js development server.
The services communicate asynchronously via Kafka topics. The client frontend interacts with the backend services to provide a seamless user experience. Each service handles its domain-specific logic and communicates events through Kafka.
services/
├── analytic-service/ # Kafka analytics service
├── client/ # Frontend Next.js application
├── email-service/ # Kafka email handling service
├── kafka/ # Kafka cluster management service
├── order-service/ # Kafka order processing service
└── payment-service/ # Kafka payment processing service with Express API
Contributions are welcome. Please open issues or submit pull requests for improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.