production-oriented HR assistant that uses Retrieval-Augmented Generation (RAG) to answer policy questions from uploaded documents (PDFs).
- β JWT Authentication with role-based access control
- β RAG System with ChromaDB vector store
- β Document Processing (PDF upload and parsing)
- β Hugging Face Integration (embeddings + LLM)
- β LangChain β RAG orchestration and retrieval pipeline
- β Modern UI with Tailwind CSS
- β Real-time Chat Interface
- β Document Management
Why this project
- Provide employees and HR teams with an intelligent assistant that answers policy questions using company documents (PDFs), and supports secure role-based access.
Features
- Secure authentication and role-based access (admin, hr_manager, employee)
- Document ingestion (PDF) with intelligent chunking and metadata
- Vector search with ChromaDB + sentence-transformers embeddings
- RAG-powered Q&A with context-aware retrieval and intent classification
- Web UI for chat and document management (Next.js + TypeScript)
Quick start (local)
Prerequisites
- Python 3.9+
- Node.js 18+ and npm
- Git
Backend
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env to add HUGGINGFACE_API_TOKEN and SECRET_KEY
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Frontend
cd frontend
npm install
npm run dev- Admin:
hr_admin/admin123 - Manager:
hr_manager/manager123 - Employee:
employee/employee123
- Swagger: http://localhost:8000/api/docs
- ReDoc: http://localhost:8000/api/redoc
- Backend: FastAPI, LangChain, ChromaDB, Hugging Face
- Frontend: Next.js 16, TypeScript, Tailwind CSS
- ML: sentence-transformers, google/flan-t5-large