尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Instant AI analysis for contract's summary, risks & verdict in seconds.
翻译准备中
正在加载完整 README。
查看完整 README ↗Legalyze AI is an AI-powered legal document analyzer. Upload a contract, NDA, or agreement, and a multi-agent AI pipeline summarizes it, flags risky clauses, and returns a safe/unsafe verdict — streamed to the browser in real time.
This is a two-service app: a Next.js frontend/app-server and a separately-deployed FastAPI analysis backend.
backend/README.md├── src/ # Next.js app (see CLAUDE.md for the full directory map)
│ ├── app/ # routes, incl. app/api/* — the only code allowed to talk to the DB or backend directly
│ ├── components/ # UI, split by page/domain
│ └── lib/ # auth (better-auth), db (Drizzle), services, utils
├── drizzle/ # DB schema migrations
├── backend/ # FastAPI analysis service — deployed independently, see backend/README.md
└── public/ # static assets
backend/README.md) or pointed at a deployed instancepnpm install
Create a .env in the project root:
# Database
DATABASE_URL="postgresql://..."
# better-auth
BETTER_AUTH_URL="http://localhost:3000"
BETTER_AUTH_SECRET="..."
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
GITHUB_CLIENT_ID="..."
GITHUB_CLIENT_SECRET="..."
# FastAPI backend
WEB_URL="http://127.0.0.1:8000" # or your deployed FastAPI Cloud URL
# Shared secret sent to the backend. Server-side only, never NEXT_PUBLIC_.
# Must equal BACKEND_API_SECRET on the backend. Generate: openssl rand -hex 32
BACKEND_API_SECRET="..."
# Bug report emails (src/app/api/report/route.ts)
SMTP_HOST="..."
SMTP_PORT="587"
SMTP_USER="..."
SMTP_PASS="..."
SMTP_FROM="..."
TO_EMAIL="..."
# Optional — Google Analytics
NEXT_PUBLIC_GA_ID=""
pnpm test # frontend (Vitest)
cd backend && uv run pytest # backend (pytest, runs offline)
npx drizzle-kit generate # generate a migration from schema changes
npx drizzle-kit migrate # apply migrations
pnpm dev
Runs on http://localhost:3000. Make sure the backend (backend/) is running too — the frontend calls it directly for all analysis requests.
legalyze-ai.vercel.appbackend/README.md for deployment detailsContributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.