Skip to content

Repository files navigation

ContractorIQ

AI-powered contract analysis workspace for freelancers and agencies.

What is ContractorIQ?

ContractorIQ ingests a PDF/DOCX contract, extracts scope, flags risky clauses, estimates delivery hours, and drafts counter-proposal language in one workflow. It supports authenticated production use and a public interactive demo path. The app uses Supabase for auth/data/storage and can run analysis through either Anthropic or OpenAI via env-controlled provider switching.

Tech Stack

Frontend

TechnologyVersionPurpose
Next.js16.2.3App router UI + API routes
React19.2.4Component rendering
Tailwind CSS4.xStyling system
Framer Motion12.38.0UI animations
GSAP3.15.0Scroll and hero animations
Zustand5.0.12Analysis upload/result state

Backend & Infrastructure

TechnologyVersionPurpose
Supabase AuthmanagedMagic link + OAuth sessions
Supabase PostgresmanagedAnalyses, chat, preferences
Supabase StoragemanagedContract file storage
Anthropic SDK0.88.0Claude analysis provider
OpenAI SDK6.34.0GPT-4o-mini analysis provider

Testing & Tooling

TechnologyVersionPurpose
TypeScript5.xType safety
ESLint9.xLinting
pnpm10.xPackage manager

Key Features

  • Upload + analyze flow on /analyze with status and robust error diagnostics.
  • Public demo mode on /analyze?demo=1 without auth.
  • Analyzer provider switch via env: Anthropic or OpenAI.
  • Dashboard/history + analysis detail route.
  • Preferences screen that affects pricing/negotiation behavior.
  • Avatar menu showing signed-in user name/email and sign-out.

Environment Variables

VariableDescription
NEXT_PUBLIC_SUPABASE_URLSupabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anon key
SUPABASE_SERVICE_ROLE_KEYServer-side privileged key for fallback storage upload
NEXT_PUBLIC_APP_URLApp origin used for auth redirects
NEXT_PUBLIC_DEMO_MODEDemo-mode feature toggle
NEXT_PUBLIC_SHOW_GOOGLE_OAUTHShow/hide Google OAuth button in auth UI
ANTHROPIC_API_KEYClaude provider key
OPENAI_API_KEYOpenAI provider key
ANALYZER_PROVIDERanthropic or openai
OPENAI_ANALYSIS_MODELOpenAI model id (default gpt-4o-mini)

Getting Started

pnpm install
pnpm dev

Notes

  • Apply DB and storage setup from supabase/migrations/001_initial.sql before first upload.
  • If AI billing is unavailable, analysis returns a demo fallback result and surfaces an in-UI notice.

About

AI-powered contract analysis workspace for freelancers and agencies.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages