A powerful document ingestion and Retrieval Augmented Generation (RAG) platform for intelligent document interactions
- π Workflow Management: Create and manage custom workflows with prompt templates and model configurations
- π Document Processing: Intelligent document ingestion with chunking and embedding
- π¬ Contextual Chat: Chat with your documents using advanced RAG technology
- ποΈ Vector Storage: Powered by Chroma vector database for efficient similarity search
- π₯ Session Management: Organize conversations with persistent session storage
- π API-First: RESTful API architecture for seamless integrations
graph LR
A[Frontend UI<br/>Next.js + React] <--> B[FastAPI Backend<br/>Python]
B <--> C[Chroma Vector DB<br/>Embeddings]
B <--> D[Supabase<br/>Auth + Database]
B <--> E[Gemini API<br/>LLM + Embeddings]
| Component | Technology |
|---|---|
| Frontend | Next.js, React, Tailwind CSS |
| Backend | FastAPI, Python 3.9+ |
| Database | Supabase (PostgreSQL) |
| Vector Store | Chroma DB |
| Authentication | Supabase Auth |
| LLM/Embeddings | Google Gemini API |
Before getting started, ensure you have:
- Python 3.9+ installed
- Node.js 18+ and npm/yarn
- Supabase account with API keys
- Google Gemini API key
- Docker (optional, for containerized deployment)
-
Clone the repository
git clone https://github.com/Yash-pede/aiplanet.git cd aiplanet -
Backend Setup
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Environment Configuration
cp .env.example .env
Update your
.envfile:SUPABASE_URL=your_supabase_url SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_KEY=your_supabase_service_key GOOGLE_API_KEY=your_gemini_api_key CHROMA_PATH=./chroma_db TEMP_DIR=./temp DEBUG=true
-
Start the Backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
-
Frontend Setup
cd ../client npm install npm run dev
- Navigate to the workflows section
- Define your prompt template
- Select your preferred LLM and embedding models
- Configure document sources
- Save and activate your workflow
- Upload documents through the UI or API
- Documents are automatically:
- Downloaded and parsed
- Split into meaningful chunks
- Embedded using Gemini
- Stored in Chroma vector database
- Create a new chat session
- Select your workflow
- Ask questions about your documents
- Get contextual responses powered by RAG
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Health check |
/api/workflows |
GET, POST | Manage workflows |
/api/workflows/{id} |
GET, PUT, DELETE | Individual workflow operations |
/api/workflows/{id}/execute |
POST | Execute workflow |
/api/documents |
POST | Upload document metadata |
/api/sessions |
POST | Create chat session |
/api/messages |
POST | Send message |
| Endpoint | Method | Description |
|---|---|---|
/api/metadata/available-embedding-models |
GET | List available embedding models |
/api/metadata/available-llm-models |
GET | List available LLM models |
For detailed API documentation, visit /docs when running the backend server.
aiplanet/
βββ backend/ # FastAPI backend
β βββ app/
β β βββ api/ # API routes
β β βββ services/ # Business logic
β β βββ dao/ # Data access objects
β β βββ clients/ # External service clients
β β βββ schemas/ # Pydantic models
β β βββ core/ # Configuration and utilities
β βββ requirements.txt
β βββ .env.example
βββ client/ # Next.js frontend
β βββ app/ # App router pages
β βββ components/ # React components
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility libraries
β βββ utils/ # Helper functions
βββ docker-compose.yml # Docker configuration
βββ README.md
Key configuration options in app/core/config.py:
APP_NAME: Application nameAPI_PREFIX: API route prefixCORS_ORIGINS: Allowed CORS originsDEBUG: Debug mode toggle
graph TD
A[Document Upload] --> B[Metadata Storage]
B --> C[File Download]
C --> D[Document Parsing]
D --> E[Text Chunking]
E --> F[Generate Embeddings]
F --> G[Store in Chroma]
G --> H[Mark as Processed]
graph TD
A[User Message] --> B[Similarity Search]
B --> C[Retrieve Context]
C --> D[Construct Prompt]
D --> E[LLM Generation]
E --> F[Save Response]
F --> G[Return to User]
- Authentication: Supabase-based user authentication with JWT tokens
- Authorization: Role-based access control per user
- CORS: Configurable cross-origin resource sharing
- Input Validation: Comprehensive request validation using Pydantic
- Error Handling: Secure error responses without sensitive data exposure
- Support for additional file formats (Word, HTML, Images)
- Dynamic model switching during conversations
- Enhanced UI for workflow visualization
- Improved error handling and user feedback
- Advanced admin dashboard
- Parallel document processing
- Caching layer for improved performance
- Webhook support for integrations
- Multi-tenant architecture
- Custom model fine-tuning
- Advanced analytics and insights
- Enterprise SSO integration
Built with β€οΈ by the Yash Pede