DEV Community

Cover image for FamilyVault: An Offline-First AI Document Safe Built for My Parents
Saurabh Kumar
Saurabh Kumar

Posted on

FamilyVault: An Offline-First AI Document Safe Built for My Parents

Hacktoberfest: Maintainer Spotlight


 This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built FamilyVault for my parents.

Like almost every household, my family has a chaotic physical drawer and a messy desktop folder filled with years of paperwork: health insurance cards, tax returns, hospital discharge summaries, birth certificates, and academic marksheets.

A few months ago, when my dad was dealing with an urgent insurance claim and a visa renewal around the same time, we hit two major headaches:

  1. Finding the exact policy rider clause took hours of frantic digging through scanned PDFs.
  2. A subtle typo in a date of birth between an old identity document and a newer certificate almost derailed an official application.

When I showed him cloud-based OCR tools and commercial AI assistants that could search through documents, his immediate reaction was: "I am not uploading our family's passports, tax files, and medical histories to some company's remote servers."

He was completely right. Organizing family documents shouldn't require surrendering your family's privacy.

Together with my teammate Rajnishant Kumar, I built FamilyVault—an offline-first, zero-cloud desktop digital safe for family documents. It runs multimodal AI and discrepancy detection directly on an ordinary laptop, ensuring not a single byte ever leaves the computer.

What it does for them:

  • Smart Drag-and-Drop Ingestion: When my parents drop in a scanned bill, ID, or PDF, local OCR and vision models automatically determine the document type, family member, issuing authority, and dates.
  • Cross-Document Contradiction Engine: It extracts atomic facts (legal names, dates of birth, policy numbers) across all files in the vault. If an Aadhaar card and a marksheet have conflicting date-of-birth spellings, FamilyVault flags it side-by-side with citations before an official government or visa application gets rejected.
  • Natural-Language Search with Exact Citations: My dad can ask questions like "What is the deductible on our ICICI health policy?" and get an answer backed by direct, clickable snippets from the original document.
  • Bank-Grade Local Security: Everything is locked on-disk with AES-256-GCM envelope encryption, Argon2id key derivation, and SQLCipher.

When I handed the build over to my dad and showed him the search and contradiction engine flagging a birthdate discrepancy entirely with the Wi-Fi turned off, his first words were: "Finally, something that actually respects where our data lives."


Demo


Code

The complete source code is public and open-source under the MIT license:

FamilyVault

FamilyVault is a Windows desktop application for keeping family documents in a password-protected, portable vault. It stores original documents as encrypted objects, preserves document history, and provides local extraction, search, expiry tracking, and document-grounded assistance.

The vault is designed to remain usable independently of the installed application. FamilyVault is intended to work offline; optional model provisioning requires an internet connection to download the local AI runtime and model.

What it does

  • Creates, opens, locks, and restores password-protected .vault folders.
  • Imports PDF and image documents and stores originals encrypted.
  • Keeps document versions and an audit history; importing a newer version does not overwrite the prior one.
  • Extracts document text locally, proposes metadata for review, and tracks expiry dates.
  • Searches document metadata and text, with a separate semantic search mode.
  • Answers questions from retrieved document content using local inference when the local model is available, with citations where available.
  • Builds and…

How I Built It

FamilyVault is built with Electron, JavaScript, SQLite / SQLCipher, and open-weight AI runtimes:

1. Local Open-Source AI Architecture

  • Gemma 4 (Open-Weights Inference): We used Google's open-weight Gemma 4 (Gemma-4-E2B quantized GGUF) running locally on-device. The model is supervised via a local llama-server process bound exclusively to 127.0.0.1.
  • Grounded Document Q&A: We engineered a deterministic retrieval pipeline. Retrieved document chunks pass through our local embedding search, and Gemma 4 generates responses strictly constrained to cite document line numbers, eliminating hallucinations.
  • Local OCR: Text extraction is handled by Tesseract.js in background worker threads, allowing offline scanning without needing cloud OCR APIs or large Python runtime dependencies.

2. Contradiction & Verification Pipeline

Rather than blindly trusting an LLM with critical legal numbers, we treat AI extractions as untrusted suggestions. Extracted entities pass through deterministic regex and schema validators before entering SQLite. A discrepancy detection module then runs cross-record diffs across family profiles to highlight conflicting facts.

3. Sandboxing & Zero-Network Guarantee

The Electron frontend runs under a strict Content Security Policy (CSP) with remote network requests disabled. All database operations and cryptographic operations (Argon2id + AES-256-GCM) execute in isolated preload processes.


Why Does Open Innovation Matter?

For a project like FamilyVault, open-source AI wasn't just a technical preference—it was the only viable path.

  1. True Privacy Requires Open Weights: Closed APIs (like commercial cloud LLMs) require streaming sensitive personal identifiers, bank statements, and health records over the wire to third-party data centers. Open weights allowed us to download the intelligence once and run it indefinitely inside a local sandbox.
  2. Offline Resilience: Emergency hospital visits or international travel often involve spotty or nonexistent internet. Because open models run on-device, FamilyVault works 100% offline.
  3. No Subscription or Token Tolls: Managing family paperwork is a lifelong chore. Families shouldn't have to worry about monthly API subscription bills or rate limits just to look up an old vaccination record or tax form.
  4. Transparency & Auditability: In security-critical personal software, open source means anyone can audit the code to verify that documents are never phoned home.

My Agent Session

We leveraged Antigravity and DevRelay during our hacking session to architect the cryptographic envelope, refine the local llama-server process lifecycle, and verify unit test suites.


Prize Categories

Featured Prize Category: Best Use of Gemma ($200)

FamilyVault uses Google Gemma 4 as the core intelligence engine for on-device document understanding and grounded natural-language querying. By bundling a quantized Gemma 4 model via local llama-server, we achieved sub-second inference on ordinary consumer laptops with zero data leaving the machine, proving that modern generative AI can be brought directly to private family data without cloud compromise.


Team Members

Top comments (0)