This project implements a microservices architecture using NestJS and Kafka for message queuing, featuring three main services: Auth for user authentication and authorization, Order for managing user orders, and Payment for handling Stripe payments.
- NestJS
- MongoDB
- Kafka
- Stripe
-
Login: Allows users to log in with their credentials.
-
Register: Allows new users to register an account.
-
Authentication: Provides JWT-based authentication for securing other services.
-
POST /auth/register: Register a new user.
-
POST /auth/login: Log in an existing user.
-
GET /auth/me: Get the authenticated user's information.
-
Create Order: Creates an order based on the products selected by the user.
-
List Orders: Retrieves a list of orders for the authenticated user.
-
POST /orders: Create a new order.
-
GET /orders: Get a list of orders for the authenticated user.
-
Stripe Integration: Handles payments using Stripe.
-
Create Payment: Initiates a payment session with Stripe.
-
Stripe Webhook: Listens for Stripe webhook events to handle payment confirmations and create orders.
-
POST /payment: Create a new Stripe payment session.
-
POST /payment/stripe/webhook: Handle Stripe webhook events.