Skip to content

Rohithsilent/RagBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 RagBot AI : Cosmic RAG Platform

An enterprise-grade Retrieval-Augmented Generation (RAG) platform with a modern Cosmic Glassmorphism UI.

Next.js 15 FastAPI TypeScript Tailwind CSS Firebase Auth Pinecone Google Gemini

✨ Visual Experience

Landing Page

Landing Page Light Landing Page Dark

Authenticated Chat

Chat Light Chat Dark

Auth & Profile

Auth Gate Profile Settings

πŸš€ Feature Highlights

  • πŸŒ™ Seamless Theme Engine: Fluid transition between "Cosmic Obsidian" (Dark) and "Ethereal Dawn" (Light) modes.
  • πŸ” Secure Authentication: Firebase-powered Google and Email login with a glassmorphic Auth Gate.
  • πŸ›‘οΈ Multi-Tenant Privacy: Advanced document isolation using Pinecone Namespacingβ€”User A can never access User B's documents.
  • 🧠 Context-Aware Memory: Persistent chat sessions stored in Firestore with full conversation history sent to the LLM.
  • ⚑ Lightning-Fast Responses: Intelligent problem-solving using Gemini 2.5 Flash from Google with a smooth typewriter UI effect.

πŸ› οΈ Installation & Local Setup

Step 1: Clone & Setup

git clone https://github.com/your-username/RagBot-2.0.git
cd RagBot-2.0

Step 2: Backend (FastAPI)

  1. Navigate to /server.
  2. Create a virtual environment:
    python -m venv venv
  3. Activate the virtual environment:
    • Windows: venv\Scripts\activate
    • Mac/Linux: source venv/bin/activate
  4. Install dependencies:
    pip install -r requirements.txt
  5. Configure the .env file in the /server directory:
    OPENAI_API_KEY=your_openai_api_key
    GOOGLE_API_KEY=your_google_api_key
    PINECONE_API_KEY=your_pinecone_api_key
    PINECONE_INDEX_NAME=your_pinecone_index_name
  6. Run the server:
    uvicorn main:app --reload

Step 3: Frontend (Next.js)

  1. Navigate to /frontend.
  2. Install dependencies:
    npm install
  3. Configure frontend/.env.local with Firebase credentials and the backend API URL:
    NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
    NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
    NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
    NEXT_PUBLIC_API_URL=http://localhost:8000
  4. Run the development server:
    npm run dev

🚒 Production Deployment Guide

Frontend Deployment (Vercel)

  1. Push your code to GitHub.
  2. Import the project in Vercel.
  3. Configure the Root Directory to frontend.
  4. Ensure the Framework Preset is set to Next.js.
  5. Add all the environment variables from your .env.local file to the Vercel dashboard.
  6. Deploy!

Backend Deployment (Render / Railway)

  1. In your hosting platform, create a new Web Service from your repository.
  2. Set the Root Directory to server.
  3. Build Command: pip install -r requirements.txt
  4. Start Command: uvicorn main:app --host 0.0.0.0 --port $PORT (Or rely on a Procfile if applicable: web: uvicorn main:app --host 0.0.0.0 --port $PORT)
  5. Add your backend .env variables to the dashboard.
  6. Deploy!

Security

Make sure to protect your user's chat history with proper Firebase Firestore Security Rules. Navigate to the Firestore Database settings in the Firebase Console and deploy the following:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /sessions/{sessionId} {
      allow read, write: if request.auth != null && (request.auth.uid == resource.data.userId || request.auth.uid == request.resource.data.userId);
    }
    match /{document=**} {
      allow read, write: if false; // Deny all other access by default
    }
  }
}

πŸ“ Repository Structure

RagBot-2.0/
β”œβ”€β”€ frontend/   # Next.js 15 Client
β”œβ”€β”€ server/     # FastAPI Backend & RAG Modules
β”œβ”€β”€ assets/     # Branding & Screenshots
└── README.md

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.


✨ Forged in the Cosmos by Rohith

Keep exploring, keep building. πŸš€

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors