Inspiration
Small businesses and startups sign dozens of contracts — vendor agreements, SaaS subscriptions, MSAs — and then lose track of them in shared drives. Renewal dates get missed. Auto-renewals lock teams into bad deals. Risky indemnity clauses go unreviewed. We built ContractIQ because legal ops shouldn't require a legal team.
What It Does
ContractIQ is an AI-powered contract intelligence dashboard. You upload a PDF contract, and within seconds you get:
- Extracted metadata — parties, start/end dates, total value, payment terms, renewal terms
- Clause analysis — renewal, termination, liability, SLA, confidentiality, and indemnity clauses, each tagged by importance (LOW → CRITICAL)
- Obligations — actionable to-dos extracted from the contract with due dates and responsible parties
- Risk scoring — every contract gets a 0–100 risk score based on renewal proximity, missing metadata, financial exposure, and clause gaps
- Alerts — automated reminders for approaching renewal windows, payment deadlines, and obligation due dates
How We Built It
- Frontend & Backend: Next.js 15 (App Router) deployed on Vercel — all API routes live alongside the UI in a single project
- Database: AWS Aurora PostgreSQL — stores all contracts, clauses, obligations, alerts, and organizations
- ORM: Prisma — schema-first type-safe access to Aurora
- AI Extraction: Google Gemini (via Gemini API) — given raw contract text, returns structured JSON with parties, dates, clauses, obligations, and risk factors. Falls back to a deterministic rule-based extractor if the API is unavailable
- Auth: NextAuth.js — demo login for judges, plus Google and GitHub OAuth
- File Storage: Vercel Blob for uploads in production
Challenges
- Structured extraction reliability: Getting Gemini to return consistent, valid JSON across wildly different contract styles required careful prompt engineering and a robust fallback extractor
- Aurora connectivity from Vercel: Configuring SSL (
sslmode=require) and connection pooling (connection_limit,connect_timeout) to make Prisma work reliably with Aurora Serverless from Vercel's edge-adjacent functions - Risk scoring without ground truth: Building a risk model that feels meaningful without labelled training data — we ended up with a weighted factor system that scores renewal urgency, clause severity, and missing metadata independently
What We Learned
- Aurora PostgreSQL integrates cleanly with Prisma — the
postgresql://connection string just works once SSL is correctly configured - Gemini's structured output mode dramatically improves extraction reliability over prompt-engineering alone
- A great product demo matters as much as the code — building a seeded demo workspace with realistic contracts let us show the full value immediately
What's Next
- Email/Slack notifications for expiring contracts
- Multi-user workspaces with role-based access
- Bulk CSV import for companies migrating existing contract data
- Clause negotiation suggestions powered by Gemini
Built With
- aws-aurora
- blob
- google-gemini
- next.js
- nextauth.js
- postgresql
- prisma
- tailwind-css
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.