What I Built
PrivateDesk is a local document Q&A app for small professional offices: accountants, clinics, and small law firms.
These offices sit on piles of PDFs (contracts, invoices, intake forms, policies) that they often cannot upload to a cloud AI tool because of client confidentiality. So they either skip AI completely or paste sensitive files into a service they don't control.
PrivateDesk fixes that. You drop in your PDFs, ask a question in plain language ("What are the termination terms in the Sharma contract?"), and get an answer with the exact file name and page number it came from. A language model, embeddings, and the database all run on the office's own computer. It works with the Wi-Fi turned off.
Who would pay: a three-person accounting or law office that wants AI help but can't risk client data leaving the building. The business model is simple: one-time setup plus support. I install it on their machine, load their documents, and handle updates. No per-seat subscription, no per-token bill, no vendor holding their data.
Demo
All documents in the demo are fake, with invented names and data.
[https://github.com/ShubhamHagawane/PrivateDesk]
How I Built It
Everything at runtime is open source and local:
Model: a small open-weight Gemma model running through Ollama (default gemma3:4b, configurable). It answers questions using only the excerpts retrieved from the user's documents.
Embeddings: nomic-embed-text, also served locally through Ollama, to turn document chunks and questions into vectors.
Ingestion: PDFs are parsed page by page with pdfjs-dist, then split into overlapping chunks within each page, so every chunk keeps an exact page number.
Storage and retrieval: chunks and embeddings are stored in MongoDB. For a small office's document set, cosine similarity over the stored vectors is fast enough, so I kept the architecture simple.
Answering: the top matching chunks go into a strict prompt: answer only from the excerpts, cite [file, page N] for every claim, and reply "I couldn't find that in the uploaded documents" when the answer isn't there. Tokens stream to the UI as they're generated.
App: Node/Express backend and a React (Vite) front end with an upload sidebar, a chat panel, and clickable source chips that show the retrieved excerpt.
The design choice that matters most: citations are not decoration. A wrong answer from a legal or clinical document is worse than no answer, so the app always shows where an answer came from and refuses to guess.
Limits right now (honest version): text-based PDFs only (no OCR for scans yet), and a small local model can miss nuance on long or complex clauses, which is why the source excerpt is always one click away.
Why Does Open Innovation Matter?
This product only works because the model is open.
Privacy is the product. The whole pitch is that files never leave the machine. With a closed API, that sentence would be false, and the customers I'm targeting couldn't legally or ethically use the tool.
Cost makes the business work. A hosted API charges per token, forever, and a document-heavy office would run up a bill every month. A local model has no per-query cost, so I can sell a one-time setup with support. <!-- Add your own numbers if you measure them, e.g. "Indexing 1,000 pages cost $0 and took X minutes on a laptop." -->
No lock-in. The model is a setting (CHAT_MODEL), not a dependency on one vendor's pricing or policy changes. If a better open model appears, the office upgrades without rebuilding anything.
It works offline. In the demo, I turn Wi-Fi off and it still answers, which is something no closed API can do.
Prize Categories
Best Use of Gemma: the whole answering step runs on a locally served Gemma model through Ollama.
Best Use of Entire: I shared the agent sessions behind this project (link above).
Best Use of GitHub Copilot: [DESCRIBE HOW YOU USED IT, OR DELETE]
Best Use of a .tech Domain: [ADD YOUR .tech LINK, OR DELETE]
Best Use of MongoDB Atlas: [KEEP ONLY IF YOU ACTUALLY USED ATLAS OR ATLAS LOCAL, E.G. WITH VECTOR SEARCH. DELETE IF YOU USED PLAIN LOCAL MONGODB]
Best Use of Sentry Agent Tracing: [KEEP ONLY IF YOU ADD TRACES AND SCREENSHOTS, OR DELETE]



Top comments (0)