OrderHub, Multi-Tenant Order Platform

Event-Driven Microservices · Multi-Tenant · Full-Stack

OrderHub architecture: a React and Vite web app calls a NestJS monorepo with orders, inventory, and notifications services. The orders service publishes through a transactional outbox to Kafka topics orders.events, stock.events, and the dead-letter topic orders.events.dlq; the inventory service consumes events idempotently. Docker Compose runs two PostgreSQL databases, Redis, and RabbitMQ.React + Vite web appREST · GraphQL · JWTNestJS monorepoordersinventorynotificationsoutboxidempotent consumerKafkaorders.eventsstock.eventsorders.events.dlqDocker ComposePostgreSQL ×2two databasesRedisrate limiter · cacheRabbitMQemail jobs · retries · DLQ

Overview

A multi-tenant order platform built as a NestJS monorepo with three microservices (orders, inventory, notifications) and a React + Vite frontend, where each tenant sees only its own data. Services communicate through Kafka with a transactional outbox, and email jobs run on RabbitMQ.

Features

  • Multi-tenant data model: each tenant sees only its own data
  • Role-based access with admin, manager, and viewer roles
  • JWT authentication with email/password and Google login
  • REST and GraphQL APIs
  • Web app pages for orders, new orders, stock, notifications, and team management

Technical highlights

  • Transactional outbox publishing to Kafka topics orders.events and stock.events, with a dead-letter topic (orders.events.dlq)
  • Idempotent inventory consumer that skips duplicate events
  • Email jobs on RabbitMQ with retries and a dead-letter queue
  • Redis rate limiter and cache
  • Cut a reporting API endpoint's response time by ~75% (from ~1.2s to ~300ms) by restructuring PostgreSQL queries, adding indexes, and caching results in Redis
  • Docker Compose for all infrastructure: two PostgreSQL databases, Redis, Kafka, and RabbitMQ
  • Vitest unit and e2e tests, plus a load-test script

Technologies

  • TypeScript
  • NestJS
  • React
  • Vite
  • Kafka
  • RabbitMQ
  • PostgreSQL
  • Redis
  • GraphQL
  • REST
  • Docker Compose
  • Vitest

More projects

Back to all projects