Case study · Legal SaaS

A case management platform for cross-border legal service

LSP Legal runs the day-to-day of a firm that serves legal documents in other countries, under the Hague Service Convention, the Inter-American Convention and letters rogatory. We designed and built the platform that tracks every job, from the first invoice to the returned Hague certificate.

Industry
Legal services
Use case
International service of process
Our role
Product design, architecture, backend, frontend, QA
Users
Admins and team members
8Service types with their own forms
6Stage job pipeline with checked moves
24Data entities, all with soft delete
99API endpoints across 17 controllers
The brief

What the firm needed

  • One place to run every cross-border service job, instead of spreadsheets, inboxes and a dated legacy tool.
  • Support for eight service types, each with its own legal fields: Hague, Inter-American, letters rogatory, process server, email, mail, Foreignsover and other.
  • No work before payment, and no job closed without proof of service and a client update.
  • Follow-ups with central authorities and clients that stay on schedule, months after a job starts.
  • Billing connected to Stripe and QuickBooks, and documents kept in Dropbox and Google Drive.
What we delivered

One platform, end to end

  • Firms, clients, jobs, process servers, translations, invoices and tasks in one web app
  • A drag-and-drop job pipeline with every move checked on the server
  • Configuration-driven forms for all eight service types
  • Follow-up reminders and document generation running automatically in background queues
  • Role-based access, a full audit trail and soft deletes on every record
What we built

Everything a service job needs

From the first enquiry to the closing email, each step of a cross-border service job has a home in the platform.

01

Firms, clients & cases

Law firms and their clients, with jobs linked to court cases (court, plaintiff and defendant) and system-generated case numbers in the firm's own format.

02

Job pipeline board

A drag-and-drop board: Lead, Pending Payment, Service in Progress, Certificate Received, Completed and Cancelled. Each move is checked, from paid invoice to attached affidavit.

03

Service-type forms

Eight service types with their own sections: Hague document and lawsuit details, Inter-American central authority addresses, mail service state law, with help text and collapsible sections.

04

Service execution

Assign several process servers with one marked primary, log up to three service attempts with dates and notes, and track additional parties on each job.

05

Translations & countries

Translation tracking with translator, pages, quote and sent, received and paid dates, plus country rules: language, translation needs and average service time.

06

Billing & finance

Invoices from draft to paid, card or check payments, and job expenses for couriers, process server fees, central authorities, printing and shipping, synced with Stripe and QuickBooks.

Automation

Follow-ups that run themselves

  • Central authority follow-ups scheduled at 3.5, 4.5 and 5.5 months for Hague jobs
  • Monthly client updates from month 1 to month 5, and a 6-month default judgment email
  • Email categories and templates for central authorities, clients, invoices and job closing
  • Reminder emails and document generation processed in Redis and BullMQ queues
  • Document links to Dropbox and Google Drive on every job
Quality

Tested on every change

  • CI on every pull request: lint, migrations, unit tests, end-to-end tests and build
  • Playwright browser tests for the critical paths, running against real Postgres and Redis
  • End-to-end tests for every service type: create, fill, save and reload
  • Health checks that report a degraded state when the database or cache is down
  • A readability pass: Title Case labels, larger type and one set of date labels across the app
How we delivered

Delivered in clear phases

Phased delivery with a staging demo and client sign-off at each milestone.

01

Align

Staging access for the client, and agreed rules for statuses, dates and roles.

02

Foundations

Firms, clients, jobs, service attempts, translations and access control, signed off in a staging demo.

03

Workflow

Invoice-first job creation, the pipeline board with checked moves, case numbering and service-type forms.

04

Automation

Documents, email follow-ups, a live countries module and pipeline dashboards.

Architecture

How it's built

A NestJS API and a Next.js web app on PostgreSQL and Redis, with shared contracts between them.

API & web app

A modular NestJS API with 99 endpoints and OpenAPI docs, and a Next.js App Router frontend using TanStack Query, Zod and dnd-kit.

Data model

PostgreSQL with TypeORM: 24 entities with UUID keys, created, updated and deleted timestamps on every table, and reviewed SQL migrations instead of auto-sync.

Config-driven forms

Each service type carries its own JSON form definition, shared by the API and the UI, with answers stored as JSONB on the job.

Auth & access

JWT access tokens with an httpOnly refresh cookie, bcrypt hashing, rate limiting, admin and team member roles from a shared permissions package, and an audit log of every change.

Background work

Redis and BullMQ queues for reminder emails and document generation, plus scheduled jobs and a health endpoint for Postgres and Redis.

Tech stack

Tools we used

NestJSNext.jsReactTypeScriptPostgreSQLTypeORMRedisBullMQTanStack QueryTailwind CSSdnd-kitZodStripeQuickBooksSwaggerPlaywrightJestDockerPM2
Next step

Need software for a complex workflow?

Case tracking, pipelines with rules, billing and integrations: tell us how your team works today and we will reply within one working day.