MERN Stack Portfolio Project

Multi-Tenant AI Support SaaS Platform

A production-grade RAG pipeline — ingest company docs, embed them into MongoDB Atlas Vector Search, and serve context-aware AI responses in real-time. Built end-to-end with Next.js, Express architecture, and OpenAI.

0D
Embedding Dimensions
OpenAI text-embedding-3-small
0ms
Avg. Response Latency
Vector search + LLM round-trip
0+
Multi-Tenant Ready
Isolated org data boundaries
Next.js 15TypeScriptMongoDB AtlasVector SearchOpenAI GPT-4oRAG PipelineTailwind CSSREST APIs

System Architecture

Client UI→Next.js API Routes→OpenAI Embeddings→MongoDB Atlas→Vector Search→GPT-4o-mini→AI Response

Each request generates a semantic embedding, runs a cosine similarity search over the org's indexed knowledge base, then feeds the top-matching chunks as context to GPT-4o-mini — all within a single Next.js API route.

Interactive Live Demo
01
Index Knowledge
Feed business docs into vector DB
02
Chat with AI
RAG-powered context retrieval
03
Monitor Sessions
Real-time conversation logs
Step 01

Knowledge Base Ingest

Text gets split into chunks, embedded via OpenAI, and stored as 1536-D vectors in MongoDB Atlas.

1Text → Sentence chunks
2Chunks → OpenAI embeddings
3Vectors stored in MongoDB Atlas
Step 02

AI Chat Widget

Simulates a customer support bot. Questions are matched to indexed docs via vector similarity.

AI
Hi! I'm your AI support agent. Train me with your business docs, then ask me anything.
Step 03

Agent Monitoring

LIVE

All conversations are persisted to MongoDB and auto-synced every 4s.

0
Sessions
0
Messages
●
MongoDB

Syncing with MongoDB...