Inspiration

🚀 The Story Behind Juris AI: Democratizing Legal Intelligence "Justice is not a luxury for the few; it is a fundamental right for all."

💡 What Inspired Us Navigating the legal system is often an overwhelming, intimidating, and expensive experience for everyday citizens. Whether it's understanding basic tenant rights, deciphering complex statutory codes, or formalizing a legal notice, the barrier to entry has historically been guarded by dense legal jargon (legalese) and high hourly retainers.

We asked ourselves a simple question: What if everyone had a virtual legal advisor in their pocket—one that speaks their language, understands local jurisprudence, and breaks down complex laws in seconds?

This vision gave birth to Juris AI—a client-side, privacy-focused, multilingual AI legal assistant engineered to simplify statutory analysis, automate legal document drafting, and provide actionable procedural roadmaps for citizens worldwide.

What it does

Juris AI is a browser-based legal assistant studio designed to provide structured legal analysis, document generation, and procedural roadmaps. Key capabilities include:Multi-Jurisdiction Intelligence: Adapts answers according to legal systems across 8 jurisdictions (India, United States, United Kingdom, France, Germany, Canada, Australia, and International Law).Multilingual & Hinglish Support: Generates structured legal analysis in English, Hinglish (Hindi written in Roman script), Hindi, Spanish, French, German, Japanese, and Mandarin.Structured Card Analysis: Parses legal responses into clear visual sections:$\text{Issue Analysis}$$\text{Applicable Statutes & Precedents}$$\text{In-Depth Legal Breakdown}$$\text{Strategic Options & Remedies}$$\text{Procedural Hazards & Risks}$Automated Legal Document Draftsman: Generates formal notices, employment contracts, affidavits, and petitions with an interactive modal editor and one-click plain text exporter.Interactive Voice Controls: Features dual-way speech interaction with microphone voice dictation (Speech-to-Text) and answer read-aloud capabilities (Text-to-Speech) using the native Web Speech API.Local Consultation History: Automatically saves and loads chat sessions using browser localStorage.

How we built it

We designed Juris AI to be extremely fast, accessible, and lightweight, running completely in the browser without requiring heavy backend servers or complex build tools.

  1. The Technology Stack Frontend Architecture: Pure HTML5, CSS3 (Glass morphism design system), and Vanilla JavaScript. AI Orchestration: Powered by Puter AI JavaScript SDK (puter.ai.chat()), eliminating the need for private backend API keys. Voice Synthesis & Recognition: Integrated native Web Speech API for dual-way voice interaction (Speech-to-Text dictation and Text-to-Speech audio explanations). Styling & Assets: Custom SVG vector backdrops of Lady Justice, dynamic ambient light orbs, Font Awesome icons, and premium Google Fonts (Cinzel, Plus Jakarta Sans, JetBrains Mono).

Challenges we ran into

Challenge 1: Unstructured AI Output ("Hallucinated Formatting") Problem: Large Language Models often output erratic Markdown, making it difficult to render clean, consistent HTML glassmorphism cards. Solution: We implemented strict bracketed section tags ([SECTION: ...]) inside the AI system instructions and built a custom regex-based DOM parser (renderStructuredLegalOutput) to reliably convert raw stream text into beautiful UI cards.

Challenge 2: Seamless Hinglish Audio Synthesis Problem: Standard browser Text-to-Speech engines lack native "Hinglish" language tags, often leading to broken phonetic output. Solution: We mapped Hinglish audio routing dynamically to hi-IN while instructing Puter AI to output clean Romanized Hindi text, creating a smooth and natural speech experience.

Challenge 3: Pure Frontend Execution Without Dependencies Problem: Avoiding heavy frameworks (like React, Next.js, or Node.js) while maintaining state, modal dialogs, theme switches, and responsive sidebars. Solution: We constructed a modular, object-oriented JavaScript architecture (StoreManager, LegalAIService, and DOM Controllers) in pure Vanilla JS.

Accomplishments that we're proud of

Complete Client-Side Execution: Engineered a full legal studio that opens and runs in any web browser without needing npm install, build steps, or server deployments. Dynamic Legal Multi-Jurisdiction Engine: Built prompt matrices that seamlessly switch legal contexts between civil law, common law, and international frameworks on the fly. Accessible Legal Voice Interface: Integrated dual voice controls enabling users to speak queries and hear legal breakdowns spoken back in their preferred language. Aesthetic Glassmorphism UI: Created a dark-mode legal studio interface with Lady Justice ambient graphics and interactive follow-up action chips.

What we learned

Prompt Engineering is Architectural Design: Designing strict structural prompts is just as important as writing clean JavaScript code when building user-facing AI applications. Accessibility Matters: Adding voice read-aloud capabilities and multilingual support dramatically broadens the usability of legal information for non-native speakers and visually impaired users. Power of Modern Browser APIs: Leveraging native Web Speech and Puter AI allows developers to build rich, serverless web applications that run directly from an index.html file.

What's next for Juris AI

Document OCR Analysis: Uploading PDF legal notices or contracts for instant AI summary and clause analysis. Export to PDF: Printing styled legal drafts directly to PDF with official formatting and signature fields. Offline Fallback Index: Caching common statutory codes locally using IndexedDB for basic offline legal research.

Built With

Share this project:

Updates

Submission history