DocuMind AI — Chat With Any PDF | RAG-Based Python Final Year Project With Source Code
Back to ProjectRoughly twenty minutes start to finish. You'll need two terminal windows open at the same time — one for the backend, one for the frontend. Don't close either while the app is running.
First, Python. Version 3.10 or newer. If you don't have it, get it from python.org and grab the latest 3.x release — not 2.7, that's ancient and won't work. On Windows, tick the "Add Python to PATH" checkbox during install. People skip this and then wonder why the terminal doesn't recognise the word "python."
Second, Node.js 18 or newer from nodejs.org. Take the LTS version, not "Current."
Check both landed:
python --version
node --version
If either one errors out, restart your terminal first. Sometimes PATH changes don't apply until you do.
Do this before touching the code — it's the part people forget and then get confused by a startup error.
Chroma Cloud: go to trychroma.com, sign up on the free tier, create a database. From the dashboard you need three values — the API key, the tenant ID, and the database name. Copy all three into a notepad file for now.
Groq: head to console.groq.com, sign in, open the API Keys section and create a new key. It's shown once. Copy it immediately.
Unzip the project. Open a terminal in the folder. Then:
cd documind/backend
python -m venv venv
Now activate the virtual environment. This command is different depending on your OS:
# Windows
venv\Scripts\activate
# macOS or Linux
source venv/bin/activate
You'll know it worked because (venv) appears at the start of your terminal prompt. If it doesn't appear, the next steps will install packages globally and cause problems later, so get this right.
pip install -r requirements.txt
This takes a few minutes. PyMuPDF and the chromadb client are the big ones.
# Windows
copy .env.example .env
# macOS or Linux
cp .env.example .env
Open the new .env file in VS Code or Notepad and fill in these six required values:
SECRET_KEY — any random string. Mash your keyboard, it's fine.JWT_SECRET_KEY — another random string, different from the first one.CHROMA_API_KEY — from your Chroma dashboard.CHROMA_TENANT — also from Chroma.CHROMA_DATABASE — the database name you created.GROQ_API_KEY — from console.groq.com.The rest have sensible defaults and you can leave them alone. GROQ_MODEL defaults to llama-3.3-70b-versatile, MAX_UPLOAD_MB to 20, and the database lands in a local SQLite file.
Also — no quotes around the values, no spaces around the equals sign. SECRET_KEY=abc123, not SECRET_KEY = "abc123".
python seed_demo.py
python run.py
The seed script is optional but useful — it creates a login (demo@documind.ai / demo1234) so you can skip registration during a demo. Handy when your examiner is watching and you don't want to fumble a signup form.
When run.py works, you'll see Flask start on http://127.0.0.1:5000. Leave this terminal running.
New terminal window. Don't reuse the backend one.
cd documind/frontend
npm install
# Windows
copy .env.example .env
# macOS or Linux
cp .env.example .env
npm run dev
Vite prints a local URL, usually http://localhost:5173. Open it in your browser.
Register a new account or use the demo login. Upload a normal text PDF — a lecture slide deck or a research paper works well. The status will say "processing" for a few seconds while the background thread chunks and embeds it, then flip to "ready" on its own. You don't need to refresh; the frontend polls every 2 seconds.
Now ask it something specific from the document. If you get an answer with a small p. 7 style pill next to it, everything is wired correctly — extraction, chunking, embedding, retrieval and the LLM call all worked. Click the Summary tool in the sidebar as a second check.
The app refuses to start and lists missing variables. That's the config validation doing its job. Read the list — it names exactly which keys are blank in your .env. Usually someone copied the Chroma API key but forgot the tenant ID.
"Model not found" or a decommissioned model error from Groq. This one is common and it isn't your fault. Groq retires model names periodically. Open console.groq.com/docs/models, pick a currently listed model, replace the GROQ_MODEL value in .env, restart the backend.
Upload rejected with an extraction error. Your PDF is a scan. No text layer means nothing for PyMuPDF to pull out. Try a different file — anything exported from Word, LaTeX or Google Docs will work.
Frontend loads but every request fails. Check the backend terminal is still running. Then check VITE_API_URL in the frontend .env points at http://127.0.0.1:5000/api. Note the /api at the end — leaving it off breaks every call.
A document is stuck on "processing" forever. You probably restarted the backend mid-ingestion, which kills the thread handling it. Delete that document and upload it again.
Our team is here to assist you with installation and setup.