Amicus AI: The "Law Firm" of the Future
Inspiration
The legal world is gated by high costs, complex "legalese," and a generic one-size-fits-all approach that fails to account for local context. We wanted to dismantle these barriers. Inspired by the "Wolfpixel" design aesthetic—conveying high trust and authority—we built Amicus AI. Our goal was to create not just another chatbot, but a "Law Firm of the Future": an interface that feels elite and sophisticated, yet provides instant, jurisdiction-aware legal strategy to anyone, anywhere, without the $500/hour price tag.
What it does
Amicus AI is a comprehensive legal intelligence platform powered by Google Gemini 3. It features:
- Jurisdiction-Aware Counsel: Unlike generic AI, Amicus knows where you are. It captures your Country and State (e.g., Delhi, India or California, USA) during onboarding and injects this context into every interaction, ensuring advice cites relevant local laws (like the BNS or IPC).
- The "Ghost" Vault (Zero-Retention Privacy): A secure document analysis system. Users can upload contracts, court orders, or handwritten notes. The system analyzes them in-memory and immediately discards the file. We promise: "We read it once, then burn the copy".
- Contract Forge: A specialized agent that drafts legally binding documents in Markdown format based on simple user prompts, strictly adhering to local statutes.
- Red Flag Scanner: A critical audit tool that scans uploaded contracts for dangerous clauses (like unfair indemnity or ambiguity), assigns a severity rating, and explains the risk in plain 5th-grade English.
How we built it
We utilized a cutting-edge stack to merge high performance with aesthetic precision:
- Core Engine: Next.js 16 (App Router) for the framework and MongoDB for user profile management.
- AI Logic: We integrated the Google Gemini 3 API (using
gemini-3-flash-previewfor speed). We used advanced system prompting to create distinct personas ("Amicus Elite Strategist" vs. "Amicus Red Flag Scanner"). - Styling: We used Tailwind CSS v4 and Framer Motion to implement the "Wolfpixel" aesthetic—featuring deep navy backgrounds, serif typography (Playfair Display), and "bento grid" layouts.
- Privacy Engineering: We built custom API routes that handle file streams (
ArrayBuffertoBase64) entirely in memory, ensuring user files never touch a persistent disk storage bucket.
Challenges we ran into
- Balancing Aesthetic & Performance: Implementing the heavy "high-trust" animations and fonts without slowing down the app required careful tuning of Next.js font optimization and Framer Motion variants.
- Prompt Engineering for Law: Getting the AI to be "authoritative" without being "risky" was tough. We had to iterate on system instructions to ensure it avoids moralizing and sticks strictly to legal strategy.
- API Rate Limits: Moving from prototype to functional demo meant hitting rate limits on the "Pro" models. We solved this by optimizing our token usage and strategically switching to "Flash" models for high-volume tasks.
Accomplishments that we're proud of
- True Local Awareness: Successfully injecting the user's MongoDB-stored jurisdiction into the active AI context window. It feels magical when the AI quotes a specific section of the Bharatiya Nyaya Sanhita (BNS) just because it knows you are in Delhi.
- The "Ghost" Architecture: We built a file handling system that is privacy-first by design. It was technically challenging to bypass standard storage uploads, but essential for a legal app.
- The UI/UX: We didn't just build a chatbot; we built a brand. The application looks and feels like a top-tier consultancy firm.
What we learned
- Context is King: The difference between a generic "ChatGPT wrapper" and a useful product is often just two lines of code: the context injection. Knowing who and where the user is changes everything.
- Multimodal Power: Gemini's ability to "see" documents (OCR) and understand their semantic legal meaning simultaneously is a game-changer for digitizing paper-heavy legal workflows.
What's next for AMICUS AI
- Deep Research Bureau: Implementing an agent that can browse live case law databases for real-time precedent checking.
- Streaming Responses: Upgrading our API routes to support streaming text for a more conversational "live" feel.
- Visual Contract Editor: Moving beyond Markdown generation to a full "Split View" rich-text editor where users can accept or reject AI suggestions in real-time.
Log in or sign up for Devpost to join the conversation.