This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
I built clauseCheck—a privacy-first contract and terms auditor designed for freelancers, small business owners, and everyday consumers who constantly have to sign binding agreements, terms of service, or freelance contracts without knowing what hidden traps lie in the fine print.
What it does: Users paste a dense legal contract or terms document, and clauseCheck instantly analyzes it to deliver a clear Risk Score (0-100), a plain-English executive summary, and explicit bullet points highlighting dangerous "red flags" (such as automatic renewal traps, unfair liability shifts, or forced arbitration).
The Side Hustle & Monetization Angle: Freelancers and small agencies waste hundreds of dollars on legal fees or lose money signing bad client contracts. clauseCheck can be monetized as a premium micro-SaaS or a specialized desktop tool for independent contractors who need an instant, reliable second opinion on client scope and liability clauses.
Demo
- Local Run Instruction: Because clauseCheck is designed to protect user privacy by running 100% locally, the app is built to run on your local machine rather than a public cloud server.
- GitHub Repository: Github Repo
-
Quick Local Setup:
- Clone the repo and run
npm install. - Ensure you have Ollama running with Gemma (
ollama run gemma). - Run
npm run devto launch the local auditor dashboard instantly!
- Clone the repo and run
💡Go through Readme.md for complete setup
Here is a short demo video:
Code
- GitHub Repository: clauseCheck
How I Built It
clauseCheck is built around Google's Gemma open-weight model running locally via Ollama for text analysis and structured JSON parsing.
- Frontend & Backend: Developed using Next.js (React & TypeScript) for a fast, unified full-stack architecture.
Step-by-Step Request Lifecycle
User Input Phase:
The user opens the Next.js local development server in their browser and pastes a dense terms of service agreement, privacy policy, or freelance contract into the text area.
API Request Dispatch:
Clicking "Audit Document" fires a POST request to the local Next.js API route (/api/audit) containing the raw text string.
Prompt & AI Processing (Local Inference):
- The backend route formats the text with a strict system prompt instructing Gemma to act as a legal advocate and return a rigid JSON object.
- The request is sent locally to Ollama running gemma (http://localhost:11434), ensuring 100% data privacy because no files ever touch a third-party cloud server.
Response & UI Rendering:
Ollama returns the structured JSON response back to the Next.js frontend, which instantly renders the color-coded risk score badge, summary breakdown, and warning flags on the screen.
Why Does Open Innovation Matter?
Open innovation and open-weight models are absolute deal breakers for legal and contract-based tools:
- Absolute Privacy: Legal documents, employment contracts, and proprietary freelance agreements contain sensitive financial and personal data. Sending them to a closed, third-party commercial API violates client confidentiality and privacy expectations. Running Gemma locally means client data never leaves the user's laptop.
- Zero API Cost for a Micro-SaaS: For a side hustle tool to be profitable, operating costs must be near zero. Relying on closed commercial API tokens for heavy document parsing would quickly eat into profit margins. Local inference on open-weight models costs $0 per query, making the business model actually viable.
Prize Categories
Gemma / Open-Weight Models
Top comments (0)