ES

Projects01 / 06SaaS · LegalTech

Legalix

Practice-management software for law firms with a built-in AI legal secretary. Our biggest project.

Type
SaaS · LegalTech
Status
In development
Year
2026
My role
Co-founder · product and AI-led development
Link
Private product · demo on request
8weeks of development
36klines of TypeScript
29SQL migrations
44screens
599automated tests
11technical docs

The challenge

Small and mid-sized law firms work across spreadsheets, desktop folders, paper diaries and email. Lawyers end up spending hours on admin: registering clients, logging deadlines, chasing payments.

We wanted one tool to centralise everything —cases, clients, deadlines, calendar, tasks, documents and billing— that could also understand plain-language instructions. The principle behind the product: “a lawyer should practise law, not do paperwork”.

A whole firm on one screen

Every screenshot uses the demo firm “LexNova Abogados”, with 100% fictional data.

Cases with filters, owners and status.
Case file: parties, deadlines, tasks, documents, billing and activity.
Procedural deadlines with automatic reminders.
Tasks as a list or Kanban, linked to the case.
Billing: retainers, fees and disbursements.
Firm reports by lawyer, practice area and period.
Clients with their full history.
Activity and immutable audit log: who did what, and when.

Legalix AI: the legal secretary

The lawyer types or dictates: “Juan Palomo came in, he was fired on Friday…”. Legalix understands the instruction, turns it into an action plan over the firm’s real data (client, case, opposing party, hearing, tasks), asks for confirmation when needed and executes it with the user’s own permissions, through the same services the UI uses.

Every action carries a risk level: simple ones run immediately; creating a case or a deadline requires “Save”; anything financial is flagged as critical. If AI is not configured or the provider is down, Legalix keeps working exactly the same: AI is a layer, not a dependency.

How Legalix AI works

  1. Instruction

    Text, voice or an attached document.

  2. Context

    Current page, conversation memory and only the data the user can see (RLS).

  3. Router

    gpt-oss-120b queriesClaude Haiku actionsClaude Sonnet research

  4. Tools

    Read and write tools, typed with Zod and filtered by role permissions.

  5. Plan & risk

    1 · direct2 · confirm3 · critical

  6. Confirmation

    “I found…”: the lawyer ticks what to save. If it comes from external content, it always asks.

  7. Execution

    The same services the UI uses, with RLS and triggers in the database.

  8. Audit

    Every change is logged with the AI run that made it.

Simplified flow of an instruction in Legalix AI. If AI is unavailable, the app works the same without it.

AI engineering decisions

  • Model router with fallback. Queries go first to an open-weight model (gpt-oss-120b); actions, attachments and letters to Claude Haiku; legal research with official sources and trial preparation to Claude Sonnet. If one fails, the next takes over.
  • Per-model circuit breaker: three failures in a row and that model is skipped for 60 seconds.
  • Decide with data, not gut feeling. In testing, the open model dropped data from attachments and saved payments as notes; actions moved to Haiku, which costs the same and follows instructions.
  • Prompt-injection defence. Documents and notifications are treated as untrusted content (taint tracking): a plan derived from them never runs without confirmation.
  • Zod-typed tools filtered by the user’s role: the AI cannot do anything the user cannot do.
  • Per-plan quotas enforced server-side: monthly requests, daily cap and advanced queries, with alerts at 80% and 100%.
Legalix AI settings: provider status, conversation retention and last-30-days usage.
Plan and usage: four plans (€19, €39, €69 and €119/month) with different AI quotas.

MCP connector for ChatGPT and Claude

Many lawyers already pay for ChatGPT or Claude. With the connector they can ask their own assistant about their cases, deadlines, calendar or billing, read-only and with their own permissions, at no AI cost to Legalix.

We implemented the MCP protocol (Streamable HTTP) with zero dependencies, using OAuth 2.1 authorisation (PKCE and dynamic client registration) on top of Supabase Auth. Token access is restricted in the database itself, not just in the application.

Per-firm connector activation: an admin enables it and each person authorises it with their own account.

Security and data

  • Multi-tenant with Row Level Security on every table: a firm never sees another firm’s data (covered by isolation tests).
  • Granular roles and permissions, confidential cases and confidential document storage.
  • Immutable audit log; AI actions are tagged with the run that made them.
  • Data hosted in the EU (Frankfurt) and GDPR documentation.
  • Login rate limiting per email and IP, and validated internal redirects.
  • Migration centre that imports folders, ZIP, Excel or CSV without ever modifying the original data.
Sign-in: rate limiting per email and IP, clear error messages and session-expiry notice.

On mobile

Fully responsive: lawyers can check their day or a case file from the courthouse.

“Today” on mobile
Case file on mobile

How we built it

The two IAizate partners built Legalix by directing AI agents (Claude Code) as if they were a team: specifying each module, splitting it into tasks, reviewing every change, demanding tests and documenting decisions. My job is not to type every line, but to decide what gets built, how it is validated and when something is done right.

That is why there are almost 600 tests (unit and integration tests against a real database: tenant isolation, permissions, triggers, storage and prompt injection) and 11 technical documents: architecture, database, AI, MCP, GDPR, design, pricing and migration.

What I learned

  • Security belongs in the database, not just in the UI.
  • An AI product must also work without AI.
  • Measure each model’s cost and quality on real cases before deciding.
  • With AI agents, quality depends on how well you specify and review.

Tools

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS 4
  • Supabase
  • PostgreSQL 17
  • Row Level Security
  • pg_cron
  • Zod
  • Vitest
  • Claude API
  • gpt-oss
  • MCP
  • OAuth 2.1
  • Vercel (fra1)
  • Claude Code