inspiration
compliance teams are stuck between dense contracts and fast‑moving regulations. we wanted a crm‑style control room that makes violations visible, actionable, and auditable without a legal ops team spending days on manual review.
what it does
lexguard ingests contracts (pdf or pasted text), extracts structured fields and clauses, compares them against regulations, and surfaces violations with severity and suggested fixes. users can filter by severity and track resolution status.
how we built it
next.js 14 + tailwind on the frontend. elasticsearch stores contracts, regulations, and violations. the app uses openrouter for structured extraction and compliance reasoning with function calling. everything runs via api routes and client‑side keys (openrouter + elastic).
challenges we ran into
- parsing llm outputs reliably when models return extra text.
- balancing a clean crm‑style ui with fast demo setup.
- ensuring elastic indices exist and handling missing‑index errors gracefully.
accomplishments that we're proud of
- end‑to‑end flow: upload → extract → scan → violations.
- clean crm‑style layout that explains each step to users.
- flexible model selection + api key checks inside the settings page.
what we learned
- function calling is essential for reliable structured extraction.
- “setup/seed” ergonomics matter as much as the scan itself.
- error handling is critical in demos — graceful degradation saves time.
what’s next for lexguard
- add streaming scan progress and richer audit export.
- auto‑suggest regulation bundles by jurisdiction and contract type.
- integrate assignment + workflows (owners, sla, reminders).
- add semantic search on clauses with real‑time highlights.
Built With
- elastic-search
- kaniban
- nextjs

Log in or sign up for Devpost to join the conversation.