.webp&w=2048&q=75)
Lexora — AI-Powered Contract Lifecycle Management (CLM)
Lexora is a full-stack contract lifecycle product: templates (NDA, vendor, consulting, employment, MSA), clause library, variable placeholders, rich editing, sharing, PDF/DOCX/Markdown/HTML export, and signature flows. Auth covers email/password, Google OAuth, verification and reset via Resend, JWT access tokens with rotating refresh, and RBAC. AI features use Google Gemini (with Ollama fallback) for chat grounded in the contract, risk-focused review, rewrite/explain/summarize, clause generation and suggestions, and streaming full-contract generation. Retrieval deliberately avoids vectors: a hierarchical tree is built from BlockNote structure (`contractTree.ts`); the model selects sections, pulls exact line-bounded sources, and server-side validation ensures citations quote real text—reducing hallucinated references compared to embedding-only RAG.
Timeline
Ongoing
Role
Full-Stack Developer
Team
Solo
Status
Technology Stack
Next.js 14
React 18TypeScript
Tailwind CSS
BlockNoteNode.js 20
Express 4MongoDB
MongoosePassportGoogle GeminiOllamaResendJoiSwagger / OpenAPIpnpm workspacesKey Features
Key Learnings
- Structuring CLM domains: templates, clauses, variables, signatures, and audit-friendly exports
- Reasoning-based retrieval over document outline vs embedding similarity trade-offs
- Monorepo discipline with shared types and env validation (Joi at startup)
- Operating Gemini with retry/backoff and local-model fallback for dev resilience
Key Challenges
- Grounding LLM answers in long legal documents without a vector database
- Robust citation validation and fallbacks when the model drifts
- RS256 key management and secure token rotation across client and server
- Keeping editor state, tree index, and AI prompts consistent on every save