An enterprise-grade Retrieval-Augmented Generation (RAG) platform with a modern Cosmic Glassmorphism UI.
- π 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.
git clone https://github.com/your-username/RagBot-2.0.git
cd RagBot-2.0- Navigate to
/server. - Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- Windows:
venv\Scripts\activate - Mac/Linux:
source venv/bin/activate
- Windows:
- Install dependencies:
pip install -r requirements.txt
- Configure the
.envfile in the/serverdirectory: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
- Run the server:
uvicorn main:app --reload
- Navigate to
/frontend. - Install dependencies:
npm install
- Configure
frontend/.env.localwith 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
- Run the development server:
npm run dev
- Push your code to GitHub.
- Import the project in Vercel.
- Configure the Root Directory to
frontend. - Ensure the Framework Preset is set to Next.js.
- Add all the environment variables from your
.env.localfile to the Vercel dashboard. - Deploy!
- In your hosting platform, create a new Web Service from your repository.
- Set the Root Directory to
server. - Build Command:
pip install -r requirements.txt - Start Command:
uvicorn main:app --host 0.0.0.0 --port $PORT(Or rely on aProcfileif applicable:web: uvicorn main:app --host 0.0.0.0 --port $PORT) - Add your backend
.envvariables to the dashboard. - Deploy!
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
}
}
}RagBot-2.0/
βββ frontend/ # Next.js 15 Client
βββ server/ # FastAPI Backend & RAG Modules
βββ assets/ # Branding & Screenshots
βββ README.md
This project is licensed under the MIT License. See the LICENSE file for details.





