OrderHub, Multi-Tenant Order Platform
Event-Driven Microservices · Multi-Tenant · Full-Stack
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