Blog
Languageenid

OrbiChat - AI Chatbot Platform for Freelance Agencies

Try It Yourself

Visit Dashboard
GitHub Repository

Test Account

  • Email: test@gmail.com / Password: testing123

*Code details are confidential and not publicly shared due to credentials and security restrictions.

About The Platform

OrbiChat is a web-based AI chatbot platform specifically designed to help freelance agencies automate client interactions using Retrieval-Augmented Generation (RAG) and Large Language Models (LLM). This platform enables agencies to provide their clients with dedicated AI assistants capable of answering queries, understanding complex conversational context, and utilizing custom knowledge bases to provide 24/7 automated support. Beyond automation, OrbiChat also serves as a lead generation tool, capturing potential customer emails directly through the chat flow to help agencies grow their client pipeline.

Engineering Excellence: Multi-Service Architecture

NestJS Backend

Acts as the Orchestrator. Handles business logic, authentication, API gateway, session management, database access, Role-Based Access Control (RBAC), and service coordination.

FastAPI AI Service

Focused specifically on Data Ingestion and RAG (Retrieval-Augmented Generation) Query Processing. Handles document processing, vector storage interaction, prompt optimization, and efficient communication with LLMs, leveraging Python's robust AI ecosystem.

Architecture Flow

User -> Next.js Frontend
NestJS Backend (Orchestrator)
FastAPI AI Service (Python)
LLM Provider / Knowledge Base

Features

Context-aware Chat

AI maintains the context of previous conversations to provide highly relevant responses.

Knowledge Base (RAG)

AI is capable of answering questions based on specific company data using Retrieval-Augmented Generation.

Embeddable Widget

Agencies can deploy their chatbot anywhere: just copy-paste a widget snippet into any website and it's live.

Session Management

Each user has an independent conversation session that is neatly stored.

AI Guardrails

Limits the AI's conversation domain to ensure it stays within business ethics and scope.

Lead Generation

Captures visitor emails directly through the chat flow, turning conversations into actionable leads for agencies.

Analytics Dashboard

Track total leads, incoming chats, token usage, and conversation metrics in real-time from a centralized dashboard.

Scalable AI Service

AI service is decoupled to handle intensive ingestion and query processing independently.

Engineering Value

This project demonstrates mature distributed service thinking and multi-service architecture. The integration between a robust Node.js (NestJS) backend serving as the Orchestrator and a Python-based FastAPI dedicated to RAG Ingestion and Query Processing showcases expertise in designing scalable systems with a clear separation of concerns.

Challenges

One of the biggest engineering challenges was balancing token efficiency with response accuracy. Naively sending full context to the LLM on every query leads to excessive token consumption and high costs, while being too aggressive with trimming causes hallucinations and loss of context. The solution was implementing Adaptive RAG, an architecture where a lightweight classifier AI first analyzes each incoming query to determine whether it requires knowledge base retrieval, conversational context, or can be answered directly. Only then is the query routed to the appropriate pipeline, ensuring the LLM receives precisely the context it needs: nothing more, nothing less. This approach significantly reduced token waste while maintaining high response quality and contextual accuracy.

Technology Stack

Frontend
  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
Backend & AI
  • NestJS (Orchestrator)
  • FastAPI (RAG & Ingestion)
  • OpenAI GPT
  • Adaptive RAG Pipeline
Infrastructure
  • Supabase (PostgreSQL)
  • Redis (Caching)
  • Docker & Nginx
  • VPS Deployment

Key Stack

Next.js, TypeScript, NestJS, FastAPI, Python, OpenAI GPT, Adaptive RAG, Supabase, Redis, Docker, Nginx, Tailwind CSS.