Document intelligence platform with multi-doc upload, AI-powered Q&A, semantic search, and chat history using RAG.
- Multi-document upload & management
- AI-powered Q&A across documents
- Semantic search via Pinecone vectors
- Persistent chat history
- Secure JWT authentication
- Real-time document processing
Frontend: Next.js 14+, React, Redux, Tailwind CSS | Backend: Express.js, TypeScript, MongoDB | AI: LangChain, Pinecone, GOOGLE | Python: FastAPI
├── backend/ # Express API, auth, chats, messages
├── frontend/ # Next.js app, UI, Redux state
├── genai/ # FastAPI, document processing, Q&A
└── README.md
Backend:
cd backend && npm install
# .env: MONGODB_URI, JWT_SECRET, PINECONE_API_KEY, OOGLE_API_KEY, PORT=5000
npm run dev # Runs on http://localhost:5000Frontend:
cd frontend && npm install
# .env.local: NEXT_PUBLIC_API_URL=http://localhost:5000
npm run dev # Runs on http://localhost:3000GenAI:
cd genai && pip install -r requirements.txt
# .env: PINECONE_API_KEY, GOOGLE_API_KEY, MONGODB_URI
python -m uvicorn app.main:app --reload # Runs on http://localhost:8000| Endpoint | Method | Purpose |
|---|---|---|
/api/users/register |
POST | Register user |
/api/users/login |
POST | Login user |
/api/chats |
GET | Get all chats |
/api/chats |
POST | Create chat |
/api/messages |
POST | Send message/question |
/api/documents/upload |
POST | Upload document |
/api/ask-question |
POST | Ask AI question |
- Create Account → Register at
/register - Login → Go to
/login - Create Chat → Click "New Chat"
- Upload Docs → Drag & drop or select files
- Ask Questions → Type in chat input, get AI answers
- MongoDB error → Check MONGODB_URI and MongoDB is running
- API connection fails → Verify NEXT_PUBLIC_API_URL and backend running
- Google error → Check GOOGLE_API_KEY is valid
- Slow responses → Check Pinecone quota and network
- Passwords hashed with bcryptjs
- JWT token authentication
- Input validation & CORS protection
- User data encrypted at rest
All 3 services need these keys:
- PINECONE_API_KEY (from Pinecone dashboard)
- GOOGLE_API_KEY (from GOOGLE GEMINI)
- MONGODB_URI (local or MongoDB Atlas)
See individual service READMEs for full env setup.
- Fork repo → Create branch → Make changes → Push → Pull request
- Follow TypeScript best practices
- Test changes before submitting
MIT License
- Issues: GitHub Issues
- Author: @ADCobra — bondlicensedtokillqueen@gmail.com