The first open-source RAG (Retrieval-Augmented Generation) application built with Gemini, Pinecone, and Next.js, featuring robust authentication and complete control over your data. π
Iβve always wanted to build a RAG system on the web, but most resources required using the OpenAI API, which demands a credit card. I wanted to work with free models like Gemini and couldnβt find a comprehensive solution with Next.js. So, I decided to take the initiative and create my own open-source RAG solution.
SmartDoc is designed for anyone looking for a free, secure, and powerful RAG system with full control over document storage. The app features OAuth-based authentication and Rive animations for smooth user feedback, especially on unauthorized pages.
-
π Document Upload & Query:
Upload your PDF documents, securely store them in Pinecone, and query their content using Gemini embeddings. -
π§ RAG-Powered Question Answering:
Ask questions related to your uploaded documents, and receive precise answers thanks to Gemini's advanced embeddings and Pinecone's vector storage. -
π Full Data Control:
You have total control over your documents, including the ability to delete, manage, or reference them whenever needed. -
π Secure Authentication:
- Integrated OAuth with Google and GitHub via Auth.js for a smooth and secure login experience.
- Access a dedicated profile page with session information and a sign-out option.
-
π Dark/Light Mode Toggle:
Personalize your experience by toggling between Dark Mode and Light Mode to suit your environment. π -
π¨ Dynamic UI with Animations:
Built with TailwindCSS for responsiveness and Framer Motion for smooth transitions. Unauthorized pages are highlighted with engaging Rive animations for user feedback.
- Upload a PDF Document: Upload your file and store it in a dedicated Pinecone namespace.
- Data Storage: All your data is stored privately in a Pinecone index, with the ability to delete or reference it at any time.
- Ask Questions: Use RAG to query your documents and retrieve accurate responses.
- Manage Documents: Complete control over your uploaded documents with the ability to manage, reference, or delete.
- Responsive & Secure: Seamless experience with a responsive UI and OAuth-based authentication.
- YouTube Integration: Easily download YouTube transcripts and thumbnails.
- Customizable Theme: Switch between Dark Mode and Light Mode for a personalized UI experience.
- Clone the repository:
git clone https://github.com/yourusername/SmartDoc.git
- Change the directory
cd SmartDoc
- Add the environment variables in the .env.local
cp .env.example .env.local
- Install the packages
npm install
- Run the project
npm run dev
- β‘ Next.js - Powerful React framework for building web applications.
- π οΈ TypeScript - Strongly typed programming language that builds on JavaScript.
- π¨ TailwindCSS - Utility-first CSS framework for rapid UI development.
- π Rive - Interactive animations for dynamic user interfaces.
- π Auth.js - Authentication library for seamless login flows.
- π± GitHub - Version control and collaboration platform.
- π Google - Authentication and other services for apps.
- π§ Pinecone Vector Database - Vector database for machine learning models.
- π€ Gemini Model & Embeddings - Advanced AI for embeddings and language understanding.
- Framer Motion - Used for Adding Animations