A simple web application for RAG (Retrieval-Augmented Generation) search using MongoDB, Google VertexAI API, and FastAPI backend.
- Clean and elegant user interface
- Secure login system
- Google-like search experience
- Real-time search results with modal view
- Search history tracking
- Responsive design
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- Python (v3.9 or higher)
- MongoDB (v6.0 or higher)
- Google Cloud CLI (for VertexAI API access)
-
Clone the repository:
git clone <your-repo-url> cd <project-directory>
-
Install frontend dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will be available at
http://localhost:8080
-
Navigate to the backend directory:
cd backend
-
Install Poetry:
curl -sSL https://install.python-poetry.org | python3 -
-
Install Python dependencies using Poetry:
poetry install
-
Set up environment variables by creating a
.env
file:MONGODB_URI=mongodb://localhost:27017/rag_search GOOGLE_APPLICATION_CREDENTIALS=path/to/your/credentials.json
-
Start the FastAPI server using LangChain serve:
langchain serve --port 8101
The backend API will be available at
http://localhost:8101
- Create a Google Cloud project and enable VertexAI API
- Create a service account and download the credentials JSON file
- Set the path to your credentials in the backend
.env
file
- Install MongoDB Community Edition
- Start the MongoDB service
- Create a new database named 'rag_search'
Once the backend is running, visit http://localhost:8101/docs
for the complete API documentation.
- Frontend code is in the
src
directory - Backend code is in the
backend
directory - Components use shadcn/ui library
- Styling is done with Tailwind CSS
Frontend:
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
Backend:
langchain serve --port 8101 # Start development server
pytest # Run tests
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support, please open an issue in the repository or contact the development team.