OrderHub, Multi-Tenant Order Platform

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

OrderHub, Multi-Tenant Order Platform interface preview

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.

Architecture

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

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

Case studies

Screenshots

  • OrderHub, Multi-Tenant Order Platform: Orders list
    Orders list
  • OrderHub, Multi-Tenant Order Platform: New order, pending confirmation
    New order, pending confirmation
  • OrderHub, Multi-Tenant Order Platform: Stock management
    Stock management
  • OrderHub, Multi-Tenant Order Platform: Team and roles
    Team and roles
  • OrderHub, Multi-Tenant Order Platform: Notifications (manager role)
    Notifications (manager role)
  • OrderHub, Multi-Tenant Order Platform: Kafka topics in Kafka UI
    Kafka topics in Kafka UI
  • OrderHub, Multi-Tenant Order Platform: RabbitMQ email queues
    RabbitMQ email queues
  • OrderHub, Multi-Tenant Order Platform: GraphQL API in Apollo Sandbox
    GraphQL API in Apollo Sandbox

Technologies

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

More projects

Back to all projects