Unlock the full potential of your policy documents! PolicyPal lets you effortlessly upload your PDFs and ask complex, natural language questions. Powered by a local Large Language Model (LLM) and built with modern microservice architecture, PolicyPal delivers human-like, reasoned answers—instantly telling you if a claim is approved or rejected, and why.
- Instant Answers: No more searching through dense PDFs.
- Smart & Secure: Local AI keeps your documents private.
- Seamless Experience: Upload, ask, and get actionable responses.
- Modern Tech Stack: React, Node.js, FastAPI, LangChain, and Ollama for top performance.
| Component | Description |
|---|---|
| 🎨 Frontend | Elegant React UI for authentication, uploads, and Q&A. |
| 🚪 Backend | Node.js + Express server: Orchestrates API calls, authentication, and database management. |
| 🧠 ML Service | Python (FastAPI, LangChain): Handles the AI magic using local LLMs via Ollama. |
Data Flow: React Client ➡️ Node.js Server ➡️ Python ML Service
Make sure your toolkit is ready:
Clone and Prepare:
git clone
cd PolicyPalcd doc_qa_backend
python -m venv venv
# Windows:
venv\Scripts\activate
# macOS/Linux:
# source venv/bin/activate
pip install -r requirements.txt
# Grab the AI model (one-time only)
ollama pull gemma:2bcd ../Server
npm installConfigure Environment:
- Copy
.env.example➡️.env - Fill in:
MONGODB_URI=mongodb+srv://:@cluster.mongodb.net/JWT_SECRET=your_super_secret_key_for_jwtPORT=5000NODE_ENV=development
cd ../Client
npm installFire up each service in its own terminal for smooth operation!
Terminal 1: ML Service
cd doc_qa_backend
# Activate your environment!
uvicorn app.main:app --reload
# → Now running at: http://localhost:8000Terminal 2: Node.js Backend
cd Server
npm start
# → API at: http://localhost:5000Terminal 3: React Frontend
cd Client
npm start
# → MAGIC at: http://localhost:1234- Visit http://localhost:1234
- Sign up or Log in
- Upload a policy PDF and get ready to chat with your document!
- Use the “Ask Questions About a Document” form—type your question, hit Get Answer.
- Get instant, intelligent, clause-level responses.
- For best speed & privacy, use on a powerful local machine.
- Combine with custom LLMs on Ollama for tailored industry domains.
From insurance claim reviews to legal audits, PolicyPal makes understanding your policies effortless, accurate, and even a bit fun.
Cut through the jargon. Get to your answer. Be policy-smart—with PolicyPal!
Unleash the power of AI on your documents—because you deserve answers as classy and sharp as you are.