A production-ready full stack platform with AI agents, RAG pipeline, real-time streaming, and enterprise-grade infrastructure β built from scratch.
I built NexusAI because I wanted a single platform that combines everything I've been learning β full stack development with TypeScript and Python, agentic AI with LangGraph, real-time WebSocket communication, RAG pipelines, and production DevOps with Docker and Kubernetes.
Most AI projects I found online were either just a Python script calling an API, or a simple chatbot with no real backend. I wanted to build something that feels like a real production system β with proper authentication, background workers, observability, and a clean architecture.
This is that project.
NexusAI is a full stack AI agent platform where users can:
- Chat with AI agents that can use tools (web search, database queries, file reading)
- Upload documents and query them using RAG (Retrieval-Augmented Generation)
- Stream responses in real time via WebSocket β no waiting for the full response
- Manage conversations with full history persistence
- Monitor everything β agent runs, API latency, token usage, errors
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js 15) β
β React 19 Β· TypeScript Β· Tailwind Β· Zustand β
βββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β REST + WebSocket
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend (FastAPI) β
β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β AI Agents (LangGraph) β β
β β Planner β Tool Use β Critic β Response β β
β β Tools: search Β· code Β· database Β· files β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β RAG Pipeline β β
β β Ingest β Chunk β Embed β Store β Search β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Auth Β· Rate Limiting Β· Webhooks Β· Admin Panel β
β Celery Workers Β· Prometheus Β· Sentry β
ββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββββββββββ
β β β
βΌ βΌ βΌ
PostgreSQL Redis Vector DB
MongoDB (Qdrant/Chroma)
| Technology | Purpose |
|---|---|
| Next.js 15 + React 19 | UI framework with App Router |
| TypeScript | Type safety across the entire frontend |
| Tailwind CSS v4 | Styling |
| Zustand | State management |
| WebSocket client | Real-time streaming |
| Technology | Purpose |
|---|---|
| Python 3.11 + FastAPI | High-performance async API |
| LangGraph + LangChain | Multi-agent orchestration |
| Pydantic v2 | Data validation |
| SQLAlchemy (async) | ORM for PostgreSQL |
| Celery + Redis | Background task queue |
| JWT + OAuth2 | Authentication |
| Technology | Purpose |
|---|---|
| PostgreSQL | Primary relational database |
| MongoDB | Document storage |
| Redis | Caching, sessions, task queue |
| Qdrant / ChromaDB | Vector database for RAG |
| Docker + Kubernetes | Containerization and orchestration |
| GitHub Actions | CI/CD pipeline |
| Prometheus + Sentry | Monitoring and error tracking |
Built with LangGraph β agents follow a Planner β Tool Use β Critic β Synthesizer pipeline. Each agent can call tools autonomously, maintain memory across sessions, and stream tokens back to the frontend in real time.
Upload PDFs, DOCX, or plain text files. The system parses, chunks, embeds, and stores them in a vector database. Agents automatically search the knowledge base when answering questions.
WebSocket-based streaming means users see tokens as they're generated β not a loading spinner for 10 seconds. Includes tool call visualization so users can see what the agent is doing.
JWT access tokens + refresh tokens, API key support, and Google OAuth2. HTTP-only cookies on the frontend. Role-based access control.
Full tracing via Logfire (for PydanticAI) and LangSmith (for LangChain). Prometheus metrics endpoint. Sentry for error tracking. Every agent run, tool call, and LLM request is traced.
SQLAdmin panel with authentication β manage users, view database records, monitor background tasks via Celery Flower.
- Python 3.11+
- Node.js 18+ (or Bun)
- Docker + Docker Compose
- An OpenAI or Anthropic API key
git clone https://github.com/arpitkasaudhan/ai-fullstack-platform.git
cd ai-fullstack-platformcp .env.example .env
# Edit .env and add your API keysdocker-compose up -dBackend:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reloadFrontend:
cd frontend
bun install
bun dev| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| API | http://localhost:8000 |
| API Docs | http://localhost:8000/docs |
| Admin Panel | http://localhost:8000/admin |
ai-fullstack-platform/
βββ backend/
β βββ app/
β β βββ main.py # FastAPI app entry point
β β βββ api/
β β β βββ routes/v1/ # API endpoints (auth, chat, rag, users)
β β βββ core/ # Config, security, middleware
β β βββ db/ # Database models (SQLAlchemy + MongoDB)
β β βββ schemas/ # Pydantic request/response schemas
β β βββ repositories/ # Data access layer
β β βββ services/ # Business logic
β β βββ agents/ # LangGraph AI agents
β β βββ rag/ # RAG pipeline (ingest, embed, search)
β β βββ worker/ # Celery background tasks
β βββ tests/ # pytest test suite
β βββ alembic/ # DB migrations
βββ frontend/
β βββ src/
β β βββ app/ # Next.js App Router pages
β β βββ components/ # React components
β β βββ hooks/ # useChat, useWebSocket, useAuth
β β βββ stores/ # Zustand state stores
β βββ e2e/ # Playwright end-to-end tests
βββ docker-compose.yml
βββ Makefile
βββ README.md
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/login |
Login and get JWT tokens |
| POST | /api/v1/auth/refresh |
Refresh access token |
| GET | /api/v1/chat/conversations |
List user conversations |
| POST | /api/v1/chat/message |
Send message to AI agent |
| WS | /api/v1/chat/ws |
WebSocket for streaming |
| POST | /api/v1/rag/upload |
Upload document to knowledge base |
| GET | /api/v1/rag/search |
Search knowledge base |
| GET | /api/v1/users/me |
Get current user profile |
Full interactive docs available at /docs (Swagger) and /redoc.
# Backend tests
cd backend
pytest tests/ -v
# Frontend tests
cd frontend
bun test
# E2E tests
bun playwright testservices:
backend # FastAPI app
frontend # Next.js app
postgres # Primary database
mongodb # Document store
redis # Cache + task queue
celery # Background workers
qdrant # Vector database
flower # Celery monitoring UI
prometheus # Metrics collectionStart everything: docker-compose up -d
- LangGraph agent patterns β how to properly structure multi-step agents with tool use, memory, and human-in-the-loop checkpoints
- WebSocket streaming with FastAPI and how to handle backpressure and reconnection on the frontend
- RAG pipeline design β the difference between naive chunking and recursive character splitting, and why reranking matters
- Async Python β SQLAlchemy async sessions, async Celery tasks, and how to avoid common pitfalls
- Production TypeScript patterns β Zustand for state, React Query for server state, and proper error boundaries
Contributions, issues and feature requests are welcome. Feel free to open an issue or submit a PR.
MIT License β see LICENSE for details.
Built with β€οΈ by Arpit Kasaudhan