Clients, cases, deadlines, hearings, tasks, finances, and documents — with an AI legal assistant built into the system.

JurisFlow is a management system for law firms. It’s not a UI prototype: it has a frontend, backend, MySQL database, authentication, and an AI assistant connected to an LLM.
Clients, active cases, deadlines for the period, hearings, revenue, expenses, and balance — calculated from actual entries, not typed in by hand.
CNJ number, court, court division, county, area, stage, client position, opposing party, case value, and activity history.
Draft petition, case law analysis, deadline calculation, case update summary, extrajudicial notice, and fee agreement.
| Module | What it does |
|---|---|
| Overview Dashboard | Metrics for clients, active cases, deadlines, hearings, revenue, expenses, and balance |
| Clients | Individual/business registration, CPF/CNPJ, contacts, address, profession, marital status, notes, and status |
| Cases | CNJ number, court, court division, county, legal area, stage, opposing party, case value, and status |
| Case Progress | Case activity, with important items flagged |
| Client Services | Triage of new clients via WhatsApp, in person, by video, phone, or email |
| Deadlines & Schedule | Critical deadlines, hearings, meetings, expert examinations, and due diligence |
| Tasks | Internal management: priority, owner, deadline, and status |
| Finance | Revenue, expenses, fees, court costs, due dates, payments, and cash flow |
| Documents | Petitions, answers, appeals, powers of attorney, fee agreements, settlements, notices |
| AI Assistant | Generation and analysis of legal content via LLM, focused on Brazilian law |
The path a case takes through the system — each stage is a module, and they all share the same client and case.
Each case moves through a fixed sequence, and the dashboard shows how many are at each stage.
Regardless of the stage, each case has an outcome status used in filters and metrics.
Nine tables: users, clients, consultations, lawsuits, lawsuit_movements, calendar_events, tasks, financial_transactions, legal_documents.
A document links to a client + case + attorney. A financial transaction links to the case that generated it. Nothing is left unlinked.
Responsive interface with light/dark theme, built with React 19, Radix UI, and Tailwind.
JurisFlow is a full-stack application: it runs a Node server and requires MySQL. It’s not a static site.
The project uses pnpm (there’s a pnpm-lock.yaml version-controlled) and ESM modules.
# check the versions node -v pnpm -v
An empty database is all you need — Drizzle migrations create the nine tables.
# create the database mysql -u root -p -e "CREATE DATABASE jurisflow"
Only for the Legal Assistant. The other eight modules work without it.
# open .env BUILT_IN_FORGE_API_URL= BUILT_IN_FORGE_API_KEY=
Five steps. At the end, JurisFlow is running in your browser, populated with demo data.
All the code — frontend, backend, migrations, and tests — lives in a single repo.
git clone https://github.com/inematds/jurisflow.git cd jurisflow
Use pnpm: it owns the lockfile, and a patch is applied to wouter which npm ignores.
pnpm install # install front end + back end all at once
Copy the example and fill it in. DATABASE_URL e JWT_SECRET are required; LLM keys are needed only if you’re going to use the assistant.
cp .env.example .env # .env — the minimum to get it running DATABASE_URL=mysql://usuario:senha@localhost:3306/jurisflow JWT_SECRET=um-segredo-aleatorio-e-longo PORT=3000
Drizzle generates migrations from the schema and applies them to the database. It’s the same command in both steps.
pnpm db:push # drizzle-kit generate && drizzle-kit migrate
One process serves both the API and the frontend. Open the address, log in, and click “Generate Sample Data” in the menu to populate clients, cases, hearings, tasks, finances, and documents.
pnpm dev # http://localhost:3000
pnpm build — builds the front end and back endpnpm start — runs the production build
pnpm check — TypeScript type checkpnpm test — Vitest suite
pnpm format — Prettier across the board, using the repo’s rules.
Empty database + “Generate Sample Data” = a fictional law firm ready to present in minutes.
The assistant is instructed to work with the CPC, CPP, CLT, Federal Constitution, Civil Code, CDC, and case law from the STF, STJ, and TST. You choose the operation and describe the case in plain Portuguese.
Describe the case; it returns the document structure with legal grounds and requested relief.
Surveys how the courts have ruled on the issue and how it applies to the case.
Counted from the notice of service, according to the applicable procedural rule.
Turns the court order or case update into plain language for the client.
Drafts the notice based on the facts and relief requested that you provide.
Builds the agreement with its scope, billing method, and standard clauses.
Draft petition — employment lawsuit
Cliente trabalhou como analista de logística, fazia duas horas extras diárias e foi demitido sem receber aviso prévio.
Case Law Analysis — consumer
Jurisprudência do STJ sobre dano moral em caso bancário — Tema 1061.
The assistant still no is connected to a legal database for verification. It is instructed to cite statutes and case law, but an LLM alone can produce incorrect references. Treat the output as a draft: every cited law and precedent must be checked against the source before being filed with the court.
JurisFlow is currently a functional MVP for legal ERP/CRM with an AI assistant. Next comes integration with the outside world — and, on the horizon, delegating repetitive work to agents.