FlexiRAG - Flexible Retrieval Augmented Generation
FlexiRAG is a powerful document RAG (Retrieval Augmented Generation) platform that allows you to upload, deploy, and query documents through an intuitive interface and API.
- Document Management: Upload and manage various document types
- RAG Deployments: Deploy documents as queryable API endpoints
- Chat Interface: Interact with your documents through a conversational UI
- API Access: Programmatically access your deployed documents
- Gemini Integration: Leverage Google's Gemini AI for document understanding
This project is built with modern web technologies:
-
Frontend:
- React with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling
- shadcn/ui for UI components
- React Router for navigation
-
Backend:
- FastAPI (Python)
- Supabase for authentication and storage
- Google Gemini AI for document processing
- Node.js & npm (or bun)
- Python 3.8+ (for backend development)
- Gemini API key (for document deployments)
- Clone the repository:
git clone <YOUR_REPOSITORY_URL>
cd flexi-rag-nest- Install dependencies:
npm install- Start the development server:
npm run devThe application will be available at http://localhost:8080
- Install Python dependencies:
pip install -r requirements.txt- Set up environment variables in
.env:
GEMINI_API_KEY=your_key
SUPABASE_URL=your_url
SUPABASE_KEY=your_key
- Run the API:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadThe API documentation is available at:
- Swagger UI:
/docs - ReDoc:
/redoc
- Create an account or sign in
- Upload documents to your library
- Deploy documents as API endpoints
- Query documents through the chat interface or API
- Manage deployments and API keys in the settings
Once you've deployed a document, you can query it using the provided endpoint:
POST https://flexirag-cqdrbdcvc0gfhxbg.canadacentral-01.azurewebsites.net//api/v1/deployed/{document_id}
Content-Type: application/json
{
"query": "Your question about the document",
"api_key": "your_gemini_api_key" // Optional, if configured in settings
}flexi-rag-nest/
├── src/
│ ├── components/ # UI components
│ ├── pages/ # Application pages
│ ├── services/ # API services
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions
│ └── App.tsx # Main application component
├── public/ # Static assets
└── ... # Configuration files
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Built with ❤️ using modern web technologies
