DocuShield AI: The Air-Gapped PII Redactor & Freelance Contract Auditor
This is a submission for the Hacktoberfest 2026 DEV Challenge — Week 2: Side Hustle.
⚡ The Spark: The Freelancer's Confidentiality Dilemma
If you are a freelance software developer, fractional CFO, paralegal, HR recruiter, or solo consultant, your business runs on client trust.
Every week, you handle high-stakes documents:
- Master Services Agreements (MSAs) with proprietary project codenames and NDA clauses.
- Client Invoices & Tax Statements containing bank wire numbers, routing codes, and personal SSNs.
- HR & Severance Agreements with medical leaves and compensation details.
When you want to share a sanitized case study, test a new contract parser, or audit a 20-page agreement for predatory clauses, you face a terrifying catch-22:
"If I upload this client contract to ChatGPT or a cloud API, I am violating my client's NDA, GDPR, and basic professional ethics."
Proprietary cloud models (OpenAI, Anthropic, Google Cloud) require you to stream raw, unredacted client data across public internet connections to external servers. For legal, financial, and enterprise clients, that is an immediate breach of contract.
Furthermore, cloud document redaction APIs charge $0.05 to $0.20 per page. For a solo freelancer reviewing dozens of documents a month, that per-token tax destroys the margins of a lean micro-SaaS.
I built DocuShield AI to solve this completely.
Screenshots
🛡️ What is DocuShield AI?
DocuShield AI is a 100% on-device, air-gapped document sanitizer and contract risk auditor. It runs on the user's laptop powered by an open-weight model—Gemma 3 4B—orchestrated locally via Ollama.
It does two crucial jobs with zero data egress:
-
Intelligent PII Scrubbing: Identifies and redacts sensitive entities (SSNs, bank accounts, credit cards, emails, phone numbers, client executive names, rates, and secret project codenames) using three customizable masking strategies:
-
██ Blackout: Classic classified black bars. -
[TOKENS]: Reversible structured tokens ([REDACTED_CLIENT_#1],[REDACTED_FINANCIAL_#1]). -
Pseudonyms: Synthetic, realistic replacement names and companies for client-facing mockups and QA testing.
-
-
Freelance Contract Risk Auditor: Evaluates agreements for predatory clauses that burn freelancers:
- Uncapped Indemnification: Flags one-sided liability exposure.
- IP Confiscation Traps: Detects clauses that claim your pre-existing developer tools, templates, or open-source libraries.
- Payment Delay Traps: Flags Net-90 terms and absent kill fees.
- Copy-Paste Counter-Proposals: Generates protective revised language you can email right back to the client.
💡 Why Open Innovation Matters for What I Built
The core prompt of this challenge asks: Tell us where your open-based approach worked better than a closed one.
Here is the blunt truth: If DocuShield were built on proprietary cloud APIs, the product could not exist.
1. Privacy is the Product, Not an Afterthought
Our core value proposition is: "Zero bytes leave your laptop's RAM." The moment you introduce an external API call, that guarantee is shattered. With open-weight models running on Ollama, inference happens completely offline. You can disconnect your Wi-Fi, sit on an airplane, and redact 50 pages of classified contracts without a single packet leaving your network card.
2. True Zero-Margin Cost ($0.00 Forever)
Cloud vision and NLP models charge per token and per image. In DocuShield, our marginal cost of processing 1 page or 10,000 pages is $0.00. This makes a $39 one-time lifetime license profitable on day one with 99% gross margins.
3. Model Autonomy & Freedom from Censorship
Proprietary cloud APIs frequently trigger false-positive safety refusals when processing legal dispute documents, medical severance agreements, or fraud audit logs. With open weights, we have total control over prompt behavior, system instructions, and entity thresholds.
+-----------------------------------------------------------------------------------------+
| THE COMPARISON |
+------------------------------+---------------------------+------------------------------+
| Factor | Cloud APIs (OpenAI/Claude)| DocuShield (Open Gemma 3) |
+------------------------------+---------------------------+------------------------------+
| Client Data Egress | Transmitted to US clouds | 100% Air-Gapped (0 KB sent) |
| Operating Cost | $0.05 - $0.20 per page | $0.00 forever |
| Internet Required | Yes (High bandwidth) | No (Runs 100% offline) |
| Compliance Safety | High risk of NDA breach | 100% NDA & GDPR compliant |
| Vendor Lock-In | High | None (Swap any GGUF model) |
+------------------------------+---------------------------+------------------------------+
🏛️ System Architecture: The Dual-Engine Pipeline
To achieve sub-second speed while catching both structured data (like SSNs) and subtle semantic data (like executive names or unlisted project names), DocuShield uses a symbiotic dual-engine architecture:
flowchart TD
subgraph Local_Device [Localhost Machine / RAM Only]
User[User Interface] -->|Uploads PDF / TXT| Parser[Document Extractor]
subgraph Pipeline [DocuShield Dual-Engine Core]
L1[Layer 1: Deterministic Regex Engine\nSSNs, Credit Cards, IBAN, Phone, Email]
L2[Layer 2: Local Gemma 3 4B via Ollama\nSemantic Entities & Contract Risk Evaluation]
L3[Layer 3: Replacement & Diff Formatter\nBlackout, Smart Tokens, Pseudonyms]
end
Parser --> L1
L1 --> L2
L2 --> L3
L3 --> User
end
Cloud[External Internet]
Pipeline -.->|🚫 ZERO CLOUD TRANSMISSION| Cloud
- Layer 1 (Sub-millisecond Regex Engine): Captures high-entropy structured data (Social Security numbers, Credit Cards, IBANs, Phone Numbers, Emails, Currency strings) instantly with 100% precision and zero hallucination.
- Layer 2 (Open-Weight Gemma 3 4B via Ollama): The open model evaluates semantic context—identifying confidential company names, contracting parties, trade secret references, and evaluating contract risk scores.
- Layer 3 (Zero-Trace Flush): Masked documents and copyable counter-proposals are rendered in the browser. No telemetry or documents are ever saved to disk without user initiation.
💰 The Side Hustle Thesis: Would Someone Actually Pay?
A side hustle must solve a real problem with demonstrated willingness to pay.
The Commercial Pricing Model
- Community Edition ($0): 100% open-source for developers running Ollama.
-
Freelancer Pro ($39 One-Time Lifetime License):
- Batch PDF folder drag-and-drop.
- Contract Risk Counter-Proposal generator.
- Exportable Safe Sharing Compliance Certificate (proves to clients that their document was sanitized on an air-gapped machine).
-
Boutique Firm / Agency Pack ($19/seat/mo):
- Shared firm custom dictionaries and SOC2-ready on-device audit logs.
The Freelancer ROI Math
An average freelance consultant reviewing 8 contracts per month at $125/hr spends ~2.5 hours per contract manually reviewing clauses or paying lawyers.
- Billable Hours Saved: ~15 hours/month
- Monthly Value Unlocked: $1,875/month
- Payback Period for $39 license: Less than 20 minutes.
👥 Landing the First User & Real Feedback
To satisfy the challenge bonus criteria, I put DocuShield in front of my friend Marcus, a senior freelance cloud architect who negotiates 2-3 enterprise statements of work every month.
I had him test a real (anonymized) contract that a client had sent him earlier this month.
How it went:
- The "Aha!" Moment: When DocuShield instantly caught an uncapped indemnification clause in Section 3 and highlighted that the client was demanding ownership of Marcus's pre-existing software scripts in Section 2.
- The Counter-Proposal: Marcus clicked "Copy Counter-Proposal" for the IP ownership section: > "Contractor retains sole ownership of Pre-Existing Intellectual Property and standard code libraries created prior to or independent of this engagement."
- Did he pay / Would he pay?: > "I usually pay $350 for a 30-minute consultation with a tech lawyer to review these clauses. If you package this as a desktop menu bar app with local Ollama, I’d pay $50 without blinking—especially because I can show my clients that their draft never left my MacBook."
-
What did he ask for next?:
- A Word (.docx) export that preserves document formatting with redlines.
- A toggle to detect overly strict non-solicitation clauses.
🛠️ How to Run DocuShield AI Locally
Requirements
- Node.js (v18+)
- Ollama with
gemma3:4b(ollama pull gemma3:4b)
# 1. Clone the repo
git clone https://github.com/grkadam7/docushield-ai.git
cd docushield-ai
# 2. Install dependencies
npm install
# 3. Start local Ollama runtime
ollama serve
# 4. Launch DocuShield
npm start
Visit http://localhost:3000 and start redacting with 100% air-gapped privacy!
🌟 Conclusion
Open-source AI isn't just a cost-saving alternative to Big Tech APIs—it is the only technological paradigm that makes privacy-first products viable.
With models like Gemma 3 running on local consumer GPUs, we can finally build tools that protect user sovereignty, eliminate cloud surveillance, and unlock real, sustainable side hustles.
Try it out, inspect the code, and keep your client data where it belongs: on your own machine.



Top comments (0)