About the Project

Inspiration

The inspiration for VisaDraft Studio came from seeing how stressful USCIS paperwork can be for international students and professionals. Filling out forms like I-765 and I-539 often requires repeatedly copying the same information from passports, I-94s, and I-20s—with even small mistakes leading to delays or rejections. At the same time, many people are uncomfortable uploading highly sensitive personal documents to online tools. We wanted to build a solution that works offline-first, keeps data local and private, and still provides intelligent guidance throughout the drafting process.


What We Learned

Building VisaDraft Studio was a deep learning experience across multiple domains:

  • Desktop application design with PySide6 and Qt, including complex tabbed workflows and dark-theme UX.
  • PDF internals and AcroForm handling, especially how USCIS PDFs structure fields and why appearances often break.
  • OCR and document parsing, combining Tesseract, MRZ parsing, regex, and contextual validation for higher accuracy.
  • Retrieval-Augmented Generation (RAG) using ChromaDB and Gemini, with strict grounding to official USCIS documents.
  • PII safety and sanitization, ensuring sensitive data is never sent to an LLM.
  • State management and persistence using profile-based JSON storage instead of a centralized database.

Most importantly, We learned how to balance automation with responsibility—knowing when software should help and when it should intentionally stop and ask the user for confirmation.


How We Built It

VisaDraft Studio is a Python-based desktop application designed around a modular, privacy-first architecture.

  • The UI is built with PySide6 (Qt) and organized into clear workflows: profile selection, document upload, data review, pre-flight validation, and export.
  • Document extraction uses:
    • pytesseract and MRZ parsing for passports
    • pdfplumber for I-94 and I-20 PDFs
    • Validation rules and confidence levels to flag uncertainty
  • Extracted and user-edited data is stored locally in per-profile JSON files, ensuring isolation between users.
  • A RAG chatbot powered by Gemini + ChromaDB answers questions strictly from official USCIS instruction PDFs, provides citations, and explicitly says “I don’t know” when information isn’t available.
  • The chatbot also drives interactive field completion, asking for required manual fields one at a time and auto-populating them when answered.
  • PDF generation uses precise field mappings for I-765 and I-539, carefully handling AcroForm quirks and leaving legally sensitive fields intentionally blank.
  • A pre-flight review screen validates data, highlights issues, and generates a downloadable draft or review pack.

Challenges Faced

This project came with several non-trivial challenges:

  • USCIS PDF complexity: Field names are inconsistent, nested, and sometimes invisible unless appearances are handled correctly.
  • OCR variability: Passport scans vary widely in quality, requiring multiple fallback strategies and validation checks.
  • RAG safety: Preventing hallucinations and ensuring the chatbot never gives legal advice required strict retrieval rules and guardrails.
  • PII protection: Designing a robust sanitization pipeline so no sensitive data ever leaves the local machine.
  • UX balance: Automating as much as possible without hiding uncertainty or giving users a false sense of correctness.

Each challenge pushed the design toward clarity, transparency, and user trust rather than maximum automation.


Reflection

VisaDraft Studio is an MVP, but it already demonstrates how thoughtful automation, local-first design, and responsible AI can make complex government workflows more approachable. The project reinforced my belief that AI tools should not replace user judgment—especially in legal contexts—but instead reduce friction, surface risks, and guide users with clarity.

This project is the foundation for expanding support to additional USCIS forms, improving extraction accuracy, and refining guided review workflows in future iterations.

Built With

  • chromadb
  • cross-platform-desktop-(windows
  • gemini-embeddings
  • google-gemini-api
  • json
  • macos
  • pdfplumber
  • pillow
  • pypdf/pypdf2
  • pyside6-(qt)
  • pytesseract-&-tesseract-ocr
  • python
  • python-dateutil
  • python-dotenv
  • rag
  • requests
Share this project:

Updates