Case study

Flowestate.co.nz

React + NestJS + Supabase

ReactNestJSSupabaseTypeScript

Key outcomes

Secure RBAC/ABAC
Workflow automation
PDF/CSV reporting

The Problem

Estate administration is one of the most document-intensive processes in legal practice. Executors must track assets, liabilities, beneficiaries, and tasks across a timeline that can span years. Law firms juggle dozens of active estates simultaneously, each with its own status, deadlines, and compliance requirements.

Most firms manage this in spreadsheets and email. Tasks fall through the cracks. Deadlines are missed. Documents live in email attachments.

Flowestate replaces that with a purpose-built dashboard system.

Who Uses It

The platform serves three distinct user types with different permission levels and workflow needs:

  • Law Firms — see all estates across all lawyers in the firm, manage team access
  • Lawyers — manage their assigned estates, track tasks and documents, communicate with executors
  • Executors — view their estate, upload documents, track progress, complete assigned tasks

Each role sees a different dashboard with different data access. A lawyer cannot see another lawyer's estates without explicit sharing. An executor cannot see internal lawyer notes.

Auth and Access Control

The permission model is RBAC + ABAC — roles determine base access level, attributes determine record-level access.

A JWT carries the user's role and firm membership. Row-level security in Supabase enforces attribute-based rules: a lawyer's query for estates returns only estates they are assigned to, regardless of what the frontend sends.

This belt-and-suspenders approach means a frontend bug that accidentally queries all estates does not expose data—the database enforces the access policy independently.

Legal System Integrations

Estate administration in New Zealand connects to two dominant legal practice management systems: Actionstep and LEAP. Flowestate integrates with both to pull matter data and sync task status without requiring lawyers to enter the same information twice.

Identity verification uses APLYiD — a NZ-specific identity verification service used for beneficiary and executor identity checks as part of anti-money-laundering compliance.

Document Automation

The platform handles three document workflows:

  1. PDF generation — estate summaries, asset schedules, distribution statements are generated server-side from templates with estate data merged in
  2. CSV export — asset and liability lists for accountants and court filings
  3. Task automation — completing a task can trigger document generation, notify a party, or update a status—reducing the manual steps in common workflows

Email delivery uses templated transactional email with variable substitution. Each estate type (intestate, testate, trust) has its own template set.

Key Engineering Decisions

Supabase RLS as the access control layer. Rather than implementing access checks in the API layer only, Supabase Row Level Security enforces the ABAC rules at the database level. This is more reliable than API-only checks and makes it easier to add new endpoints without introducing access control bugs.

NestJS for structured API growth. Estate administration logic is complex and grew throughout the engagement. NestJS's module system made it straightforward to add new features (new document types, new integrations) without introducing coupling.

Separation of executor and lawyer views. The UX decision to build distinct dashboards rather than a single view with role-based visibility resulted in cleaner code and a more intuitive product. Each dashboard is optimised for its user's actual workflow.

Scope

  • Role-based dashboards for Law Firms, Lawyers & Executors
  • Secure auth with JWT + RBAC + ABAC
  • Integrations: APLYiD (identity) + Actionstep/LEAP (legal)
  • PDF & CSV generation, task/document automation
  • Email delivery pipeline with templates
Like what you see?

Waqas Raza

AI-Native Full-Stack Engineer. Top Rated on Upwork · $180K+ earned · 93% job success. I build production AI agents, LLM systems, Web3 platforms, and full-stack applications.

Hire me on Upwork