Skip to content

About

An AI tool that finds issues and unfair terms in legal documents and explains what people can do.

Resources

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

LexisGuide

LexisGuide

Understand any legal document in seconds. Every edit, verified on the blockchain. A team of AI agents that know the law. Built for LexHack 2026.

An AI legal co-pilot that reads leases, benefits denials and government notices, flags what's risky in plain English, and gives every edit a verified history on the blockchain. Built for LexHack 2026 — decision support, not legal advice.

License: MIT Continuous integration CodeQL Deploy API Deploy landing page Live site

React TypeScript Vite Python FastAPI AWS Lambda DynamoDB Amazon Cognito Amazon Bedrock Solidity Base Terraform

Live app · Admin portal · Report a bug

Overview Screenshots Architecture Getting started Deploying Testing

LexisGuide answering a question about a benefits letter, then explaining the risky clause and handing over a dated action plan
The landing page's own live demo — ask a question, see the exact clause it's grounded in, get a dated plan. Not a mockup.


What LexisGuide does

Every year, people get letters they can't afford a lawyer to explain: a benefits denial, an eviction notice, a lease renewal. Miss one deadline buried in the fine print, and the case can be lost by default.

LexisGuide reads the document for you. Add a PDF, Word file, or pasted text and it scores the document for clarity and fairness, flags every clause worth worrying about, explains it in plain English with the exact evidence, and suggests what to do next — then keeps a verified, block-by-block history of every edit, so nothing can be quietly rewritten later.

📄 AI document review A 0–100 clarity & fairness score, evidence-backed findings, and AI-drafted rewrites scoped to one clause at a time.
⛓️ Blockchain-verified history Every change is fingerprinted (SHA-256) and written to the Base blockchain. Open any past version and check it against its own block.
🤖 A multi-agent AI assistant A router plus specialist agents — support, US law, document review, and an operator that can apply an approved fix — running on AWS Bedrock.
💬 Slack-style workspaces Channels, @mentions, reactions, and shared documents, so a tenant, a caseworker, and a legal-aid volunteer can work the same case together.
🔐 Admin portal Account management, an audit log, and integration health, gated behind a Cognito admins group.
🛡️ Secure by design Every record is checked against the signed-in Cognito identity server-side; the browser never holds AWS credentials.

This is decision support, not legal advice — LexisGuide points people to what to check and who to ask, it does not replace a lawyer for a high-stakes decision.

LexisGuide's palette: ink, paper, sand, green, meadow, amber
Every color in this README is the app's own — paper, ink and meadow green, pulled straight from its CSS.


See it in action

Home — every document's score, its open findings, and what to work on first.

LexisGuide Home dashboard with document scores and open findings

Review — the findings queue, the document, and the evidence, side by side.

LexisGuide Review page with a finding's evidence and explanation open

Verified history — every version checked against the block that recorded it.

LexisGuide document history verified against its blockchain block, with a line-by-line diff

Messages — Slack-style channels, mentions, reactions, and shared documents.

LexisGuide Messages: a Slack-style channel with reactions and a shared document

AI Assistant — plain-English answers on US law, grounded and cited.

LexisGuide AI Assistant answering a question about a security deposit

Admin portal — accounts, workspaces, integrations, and the audit log.

LexisGuide admin portal overview with account totals and integration health

Landing page — the full pitch, watercolor meadow and all.

The full LexisGuide landing page hero

Sign-in — email and password, or one tap with Google.

LexisGuide sign-in screen with email and Google sign-in

How it's built

The browser never holds an AWS credential. Every request carries the signer's Cognito ID token, and the API checks it — and the caller's own records — before touching DynamoDB, Bedrock, or the ledger's signing key.

%%{init: {"theme": "base", "themeVariables": {
  "primaryColor": "#E9F3EA",
  "primaryTextColor": "#1B1C14",
  "primaryBorderColor": "#00674F",
  "lineColor": "#2F8A5E",
  "secondaryColor": "#FAF7EE",
  "tertiaryColor": "#FFFDF5",
  "fontFamily": "Inter, sans-serif"
}}}%%
flowchart LR
    Browser["React app\n(GitHub Pages)"]

    subgraph AWS["AWS · us-west-2"]
        Gateway["API Gateway\nHTTP API"]
        Lambda["FastAPI\non Lambda"]
        Dynamo[("DynamoDB\nsingle table")]
        Cognito(["Cognito\nuser pool"])
        Secrets[("Secrets\nManager")]
        Bedrock["Bedrock AgentCore\nmulti-agent assistant"]
    end

    Chain[("Base Sepolia\nDocumentLedger contract")]

    Browser -- "Cognito ID token" --> Gateway
    Gateway --> Lambda
    Lambda -- "verify token" --> Cognito
    Lambda -- "read / write\nown records" --> Dynamo
    Lambda -- "recorder key" --> Secrets
    Lambda -- "invoke" --> Bedrock
    Lambda -- "signed tx" --> Chain
Loading
  • Frontend — a React SPA on GitHub Pages calls the API directly; it holds no secrets.
  • API — FastAPI on Lambda behind API Gateway; every route depends on a verified Cognito identity.
  • Data — one DynamoDB table, partitioned per user and per workspace, so a query can only ever reach its owner's rows.
  • AI — a router plus specialist agents (support, US law, document review, drafting, an inbox summarizer, and an operator that runs approved actions) on AWS Bedrock, with deterministic fallbacks if a call fails.
  • Ledger — a DocumentLedger Solidity contract on Base Sepolia. The API signs with a key held in Secrets Manager; the browser only ever sees a fingerprint.

Tech stack

Layer Technology
Frontend React 19 · TypeScript · Vite 8 · Tailwind
Backend Python 3.12 · FastAPI · Pydantic v2 · Uvicorn on AWS Lambda
Data Amazon DynamoDB (single-table design)
Auth Amazon Cognito — email/password and Google sign-in
AI Amazon Bedrock (Nova models) via a Bedrock AgentCore multi-agent runtime
Blockchain Solidity DocumentLedger contract on Base Sepolia, via web3.py
Infra & CI Terraform · GitHub Actions · GitHub Pages · CodeQL · Dependabot

Repository layout

frontend/                  React web app, deployed to GitHub Pages
backend/                   FastAPI service and tests, packaged for AWS Lambda
agentcore/assistant/       AgentCore runtime for the multi-agent chat assistant
agentcore/runtime/         AgentCore runtime for one-shot document review
packages/assistant_agent/  The agent team: router, specialists, tools, prompts
packages/review_contract/  Shared review request/result models and prompt
infra/                     Terraform for Cognito, DynamoDB, Lambda, API Gateway
blockchain/                DocumentLedger contract: every edit recorded on Base

Getting started

Requires Python 3.12 and Node.js 22.22.2+.

1. Start the API

cd backend
python3.12 -m venv .venv && source .venv/bin/activate
pip install -e ../packages/review_contract -e ../packages/assistant_agent -e '.[dev]'
uvicorn app.main:app --reload --port 8000

API docs: http://localhost:8000/docs.

2. Start the web app

cd frontend
npm install
npm run dev

The Vite dev server proxies /api to localhost:8000. To point it at a deployed API instead, set VITE_API_BASE_URL — see frontend/.env.example.

Without any cloud credentials configured, the app still runs: document review falls back to a local rule-based scan, and features that need the API report themselves as unavailable rather than fabricating a result.


Deploying to AWS

LexisGuide runs on Cognito, DynamoDB, Lambda, API Gateway and Bedrock AgentCore, deployed with Terraform and GitHub Actions. GitHub Pages hosts only the compiled React app; it calls the API over HTTPS and never receives an AWS credential.

Full one-time setup — Cognito, Google sign-in, the AgentCore runtimes, and adding the first admin — is in AWS_AUTH_SETUP.md.

Two integrations are optional and off unless configured:

  • Statute lookups — set lawfirm_api_key_secret_arn in Terraform to a Secrets Manager ARN holding a lawfirm.dev key. Without it, statute lookups are simply unavailable.
  • Document ledger — set the deployed DocumentLedger contract address and an RPC URL to turn on blockchain history. Without it, the History tab says so plainly instead of pretending to record anything.

Admins are managed at /admin, gated by Cognito's admins group — see Admin portal to add the first one.


API surface

All routes except /health require a Cognito ID token; the API only ever reads or writes the caller's own records.

Route group What it does
POST /api/v1/analyze Reviews a document and returns evidence-backed findings.
POST /api/v1/chat Talks to the multi-agent assistant; carries workspace context and proposed actions.
GET/POST /api/v1/workspaces/** Workspaces, channels, messages, reactions, and shared documents.
GET/POST /api/v1/ledger/** Records and reads a document's blockchain-verified history.
GET /api/v1/statutes/lookup A point-in-time statute lookup, with full provider provenance.
GET/POST /api/v1/admin/** Account, workspace, and audit-log management for admins.

Testing

cd backend && pytest                                   # FastAPI routes and storage
cd packages/assistant_agent && pytest                  # the router and every specialist agent
cd frontend && npm test                                # React components and hooks

The suite runs against real infrastructure standing in for AWS, not mocks of our own code: moto provides an in-memory DynamoDB, and an in-memory EVM (eth-tester) runs the actual compiled DocumentLedger bytecode, so the blockchain tests exercise the real contract — including a tampered version being correctly rejected.


Security

The browser never receives an AWS credential; every DynamoDB record is scoped to its owner and checked server-side on every request; uploaded files are parsed for text only, never executed; and only a document's SHA-256 fingerprint — never its text — is ever written on-chain. See SECURITY.md to report a vulnerability.


License

MIT.


Built for LexHack 2026.

Contributors

Back to top ↑

About

An AI tool that finds issues and unfair terms in legal documents and explains what people can do.

Resources

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages