Inspiration

Every company signs SLAs, MSAs, and vendor agreements and then they sit in a folder, unread, until something goes wrong. An auto-renewal silently locks you in for another year. A penalty clause triggers a payout nobody saw coming. A renewal notice window closes while the contract owner is on leave. The information was always in the contract; it just wasn't visible.

We wanted to turn static PDFs into something a procurement or legal-ops team can actually act on: a live dashboard that reads every contract, scores its risk, and tells you exactly what needs a decision and by when without anyone having to re-read 30 pages of legalese.

What it does

  • Clause extraction - Upload any PDF and AI pulls out payment terms, SLA thresholds, renewal windows, penalty rates, liability caps, indemnification, and termination conditions into structured data.
  • Deterministic risk scoring - Every contract gets a 0–100 score with a letter grade, computed across 5 weighted risk categories (renewal/expiry, penalty exposure, termination & notice, SLA consequences, liability & indemnity). No black box - every deduction is traceable to a clause.
  • Action Required reminders - Surfaces the decision deadline, not just the expiry date: for auto-renewing contracts it counts back from the notice window, so you act before you're locked in.
  • Natural-language Q&A - Ask "Which contracts are high risk and why?" or "What renews next quarter?" and get a portfolio-aware answer drawn from your real contract data.
  • Side-by-side comparison - Clause-by-clause diffing that highlights where two contracts diverge - built for renewals and vendor evaluations.
  • Portfolio dashboard - Total monthly exposure, renewal timeline, high-risk alerts, and a real Settings page (risk threshold, reminder lead time, currency, date format, light/dark theme) that drives the whole app end-to-end.

    How we built it

    A three-service architecture, all deployed on Vercel:

  • Frontend - Next.js 16 + React + TypeScript, Tailwind CSS, and Framer Motion. A custom "Modern Fintech" design system with Space Grotesk / Inter / JetBrains Mono and full light/dark theming via CSS variables.

  • Backend API - Node.js + Express (TypeScript) running as serverless functions. Handles presigned S3 uploads, persistence, and orchestrates the AI pipeline.

  • AI Pipeline - Python + FastAPI with the OpenAI API (gpt-4o-mini), pdfplumber for PDF text extraction, and boto3 for S3.

  • Data & cloud - AWS Aurora PostgreSQL for storage, S3 for contract PDFs, and IAM/STS for auth. Uploads go direct to S3 via presigned URLs (bypassing serverless body limits), and AI analysis runs in the background via Vercel's waitUntil so the UI stays instant.

The piece we're most proud of technically: keyless, federated database auth - the backend assumes an AWS IAM role through Vercel OIDC → STS → RDS Signer, so there's no static database password anywhere in the codebase.

Challenges we ran into

  • Keyless DB auth across clouds. Wiring Vercel OIDC to AWS IAM was the hardest part- debugging AssumeRoleWithWebIdentity trust-policy sub patterns, and discovering that minting a fresh RDS token per connection (OIDC → STS → signer) took ~10s, which blew past our 5s connection timeout. We traced it layer by layer (TCP, DNS, JWT decode) and tuned the pool.
  • Raw JSON leaking into the UI. The AI returns nested clause objects; early on they rendered as raw JSON. We built a formatter that turns arrays/objects into readable bullet lists and labeled fields.
  • Structured fields stuck in clauses. The pipeline extracted dates/fees/vendor as clauses but never promoted them to the contract's own columns - so reminders and timelines stayed empty. We added a write-back step that lifts them into the row.
  • Serverless cold starts vs. GPT latency. GPT calls routinely take 10–25s; our function timeouts were too aggressive and kept falling back to canned answers. We raised them and removed all dummy/seed fallbacks so the app only ever shows real data. ## Accomplishments that we're proud of
  • A genuinely end-to-end live product 0 real PDF → S3 → AI extraction → risk scoring → dashboard → natural-language Q&A, all on production infrastructure with zero mock data.
  • Keyless, federated AWS auth with no secrets in the repo.
  • A Settings page that actually changes the app 0 risk threshold, reminder window, currency, date format, and theme all propagate live across every page.
  • A polished, distinctive dark/light "Modern Fintech" UI that doesn't look like a templated AI demo.
  • An explainable risk model - not just a number, but the reason behind every deduction. ## What we learned
  • Cross-cloud identity federation (OIDC ↔ IAM) is powerful but unforgiving -small details in trust policies and token lifetimes matter.
  • Serverless changes how you think about latency: background processing and generous-but-bounded timeouts beat blocking the user.
  • Making AI output trustworthy is mostly product work - structured extraction, deterministic scoring, and honest "no data" states matter more than a bigger model.
  • Shipping real data end-to-end exposes integration bugs that mocks hide. ## What's next for Nexus
  • Scheduled email/Slack reminders for renewal deadlines (we kept reminders on-screen for the hackathon).
  • FX-aware currency conversion (today the currency setting swaps the display symbol only).
  • Bulk upload & folders for managing large contract portfolios.
  • Negotiation suggestions - flag risky clauses and recommend safer redlines.
  • Multi-tenant workspaces with real accounts, roles, and audit history.
  • Custom domain + favicon/OG to round out the production feel.

Built With

Share this project:

Updates