Inspiration: As the Indian economy is getting formalized and the real-estate boom is on the rise, the traditional process of drafting rental agreements in India is inefficient, fragmented, and legally risky—often involving outdated templates, manual edits, and unverified clauses. Inspired by this problem and the rise of AI-assisted productivity tools, we set out to create KeyRaya, a smart, secure, and collaborative rental agreement platform that simplifies contract creation while maintaining legal rigor.
What it does: KeyRaya is an AI-assisted rental agreement portal that enables users to:
- Draft legally sound rental agreements online
- Customize clauses with placeholders and party details
- Collaborate via comments and clause-level editing
- Use AI to suggest clause improvements (only when requested)
- Export final agreements as professional PDFs
- Share agreements with read or comment permissions
- Track progress and maintain version control
How we built it: We built KeyRaya as a full-stack web application using:
- Frontend: React.js + Tailwind CSS for a clean, user-friendly design > inspired and developed using Bolt.new
- Backend: Node.js + Express.js API with secure JWT authentication and OTP login
- Database: PostgreSQL with a modular schema supporting agreements, sections, clauses, comments, and collaboration
- AI Integration: Google Gemini API (invoked only on user request) for clause rewriting
- PDF Export: Server-side HTML-to-PDF rendering using Puppeteer
- DevOps: PM2, PostgreSQL SSL, NGINX, and UFW for secure deployment
Challenges we ran into: Designing a flexible clause system with support for both AI and user edits without breaking legal intent
- Ensuring real-time collaboration without conflict—especially for comment handling
- Handling JWT authentication and OTP-based login securely
- PDF rendering consistency across clause styles and layouts
- Synchronizing snake_case and camelCase across frontend and backend systems
Accomplishments that we're proud of:
- Created a legally-robust and AI-aware agreement generator from scratch
- Built full CRUD and collaboration systems, including comments, mentions, and share controls
- Implemented a modular section/clause editor that scales with agreement complexity 4 Achieved secure OTP-based login and PDF export in production
What we learned: The legal-tech domain demands both flexibility and precision, especially in how clause versions and AI edits are handled + Building real-time collaborative features like comments and mentions involves deep coordination between frontend state and backend schema. Lastly, handling AI responsibly means giving users control, not automating everything blindly to ensure near-zero hallucination especially when dealing with legal terms and clauses.
What's next for KeyRaya
- Add our patented e-signature feature (Ref: UeSS > Unique eSign Stamp)
- Enable multi-language clause support for regional users > Critical for India
- Launch mobile-first experience with PWA capabilities
- Improve clause suggestion UX with live previews
- Offer template marketplaces for other legal documents like lease renewals, termination letters, etc.
Built With
- bolt
- express.js
- gemini
- jwt
- nginx
- node.js
- nodemailer
- pm2
- psql
- react
- sql
- typescript
- ubuntu
- ufw
- vite


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