DEV Community

Apurv
Apurv

Posted on

ScopeShield: A Local-First Freelance Contract Auditor

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission πŸ’Έ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

ScopeShield is a local-first Streamlit web app that helps freelancers detect "scope creep" in client requests without uploading sensitive NDAs to closed AI platforms. It uses PyMuPDF to parse local contract PDFs and an open-weights Gemma model to cross-reference client requests against the agreed deliverables. If a client asks for a feature not in the contract, ScopeShield flags it, calculates the extra cost using deterministic Python math, and logs a confirmed change order in a local SQLite database

Demo

Code

All of the codes are here.
https://github.com/krvnium/ScopeShield

How I Built It

I built ScopeShield as a modular, local-first Python Streamlit web application. For document processing, I used PyMuPDF to extract text from contract PDFs directly on the user's laptop, ensuring the files are never uploaded to a third-party server. For the core auditing logic, I integrated Gemma 4 (Google's open-weights model) via the google-genai SDK. I designed a strict JSON schema prompt that forces the open-weight model to classify the request (In Scope vs. Scope Creep), cite the exact page number, and estimate the additional hours. All financial calculations and confirmed change-orders are handled by deterministic Python logic and saved to a local SQLite database.

Why Does Open Innovation Matter?

Freelance Statements of Work (SOWs) contain highly confidential client data, proprietary pricing strategies, and strict NDAs. Uploading these legal contracts to closed-source, proprietary AI platforms is often a breach of client trust. By relying on local extraction and open-weight models like Gemma 4, freelancers can leverage powerful AI auditing without compromising their clients' privacy. Open innovation makes secure, enterprise-grade contract auditing accessible to solo developers who cannot afford expensive monthly SaaS subscriptions

Top comments (0)