Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClearClause

AI-powered legal document explainer. Paste any contract and get a plain-English summary, a full simplified rewrite, and the things worth considering before you sign — powered by Claude.

Built for freelancers, independent contractors, and small business owners who sign contracts often but don't have a lawyer on call for every one.


Features

  • Plain-English summary — a 2–3 sentence explanation of what the document actually says
  • Full simplified rewrite — the entire contract rewritten in everyday language, no legal jargon
  • Things worth considering — 2–4 specific points flagged by severity (High / Medium / Low), each with a concrete suggestion on what to negotiate
  • Document type detection — automatically identifies what kind of agreement it is
  • 1,000-word input cap with a live word counter
  • Clean, responsive UI with no dependency on external JS frameworks

Tech Stack

  • Frontend: Vanilla HTML, CSS, and JavaScript — no build step required
  • AI: Claude via the Anthropic API
  • Backend: A minimal Express server (local) or Vercel Serverless Function (production) — used only to keep the API key secure server-side

Project Structure

clearclause/
├── index.html          # Main tool page
├── about.html           # About page
├── contact.html          # Contact page
├── css/
│   ├── global.css        # Shared design tokens, nav, footer
│   ├── home.css           # Tool page styles
│   ├── about.css           # About page styles
│   └── contact.css          # Contact page styles
├── js/
│   ├── prompts.js          # Isolated AI system prompt
│   ├── analyze.js           # Core tool logic + API calls
│   ├── contact.js            # Contact form handling
│   └── main.js                 # Shared nav behavior
├── api/
│   └── analyze.js          # Vercel serverless function (production API relay)
├── server.js              # Local dev server (Express)
├── package.json
└── .env.example

Getting Started (Local Development)

1. Clone the repo and install dependencies

npm install

2. Add your Anthropic API key

Copy .env.example to .env and add your real key:

ANTHROPIC_API_KEY=sk-ant-your-real-key-here

Get a key from the Anthropic Console. Note that API usage is billed separately from any Claude.ai subscription — usage-based pricing, not a flat fee.

3. Run the local server

node server.js

4. Open the app

Visit http://localhost:3000 in your browser. (Opening index.html directly will not work — the app needs the server running to relay requests securely to the Claude API.)

Deploying to Vercel

  1. Push this repo to GitHub
  2. Import the project into Vercel
  3. In your Vercel project settings, add an Environment Variable:
    • Name: ANTHROPIC_API_KEY
    • Value: your real API key
  4. Deploy — Vercel automatically detects /api/analyze.js as a serverless function

Your API key stays server-side at all times; it is never exposed to the browser.

Disclaimer

ClearClause is an AI tool built for informational purposes only. It does not constitute legal advice and does not create a lawyer-client relationship. Always consult a qualified, licensed legal practitioner before signing any contract or making legal decisions.

Author

Alan Macharia I build AI-powered systems and tools for businesses.

🔗 linkedin.com/in/alan-macharia-ai

ClearClause was built as a demonstration of AI-powered tools that solve real, everyday problems — not AI for the sake of it. Interested in a custom AI-powered website or system for your business? Let's connect.

About

AI-powered contract explainer; plain-English summaries, simplified rewrites, and negotiation tips

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages