Portfolio / Dashboards & internal tools
CourtMate
A live case-management SaaS for Sri Lankan law chambers — cases, teams, court-aware scheduling, and an offline-first mobile app built for courtrooms.
Built and run by Joel Wickremasinghe
live product
19
releases shipped in 6.5 months of continuous development — v1.0.0-beta to v1.10.0, 241 commits
measured · release notes + git log
Problem
What needed to exist
Sri Lankan courts assign dates without hearing times, so a lawyer can reliably attend only one court per day. A chamber juggling dozens of matters across Supreme, High, District, and Magistrate courts is one double-booking away from a professional problem — and most of that juggling lives in paper diaries.
Court practice also has a connectivity problem: the one place a lawyer most needs their case file is the courtroom, where the network is least reliable.
What we built
The system
A multi-tenant platform where each law chamber runs cases through their full lifecycle — filing to judgment — alongside non-litigation assignments with per-type workflow stages, tasks, role-based access (Owner / Chamber Admin / Lawyer), and multi-chamber calendars. External instructing lawyers from other firms can be invited into specific matters by magic link, scoped to those matters only.
Refix, the court-date rescheduling tool, scans up to 90 days ahead and grades every working day CLEAR / SAME_COURT / CONFLICT / HIGH_CONFLICT by where each assigned lawyer is already needed — court-aware, role-aware (lead counsel double-booked across different courts is the red flag), and holiday-aware. The 2026 calendar carries 27 gazetted Sri Lankan public holidays and 15 court-vacation entries in code. It advises; it never blocks a human's choice.
The mobile companion is offline-first: WatermelonDB on SQLite with incremental push/pull sync, plus a manual Court Mode toggle that forces fully-offline operation inside courtrooms. The product is in open beta at ctmate.com — online payments are feature-flagged off and beta access is free, which is why the calculator below is the implemented billing model rather than a checkout.
Live surface
The thing itself, running
captured 1 August 2026live website
ctmate.com
The live product site — open beta, real users
Links checked 1 August 2026. Screenshots are static captures — the live site is the source of truth.
Interactive proof
Operate the billing model yourself
Interactive proof — live component
CourtMate subscription calculator
The same tier prices and slab formula the product bills with, mirrored from subscription.ts and billingSlabService.ts.
Base covers 5 lawyers · extra lawyers bill in slabs of 5
Monthly bill
- Chamber base · 5 lawyer seats
- $35.00
- Extra seats · 0 slabs of 5
- $0.00
- Admins · 1 × $8.00
- $8.00
≈ $8.60 per lawyer · base annual $357.00/yr; seat add-ons price annually at checkout
CourtMate is in open beta — online payments are currently switched off and beta access is free. This is the implemented billing model, not a mock-up.
Architecture
CourtMate architecture — web, mobile, and the Refix engine
Stack
Built with
- Next.js 16 · React 19
- TypeScript
- Firebase Firestore + Auth
- Tailwind CSS v4
- TanStack Query
- Stripe (test mode — payments off in beta)
- React Native · Expo
- WatermelonDB + SQLite
- Playwright + Vitest
- K6 load testing
- Vercel
Outcome
Numbers, with provenance
241
commits across 6.5 months of continuous development (Jan 16 – Jul 27 2026)
measured · git history
52
API route files behind the product
measured · source tree count
345
TypeScript files across web (297) and mobile (48)
measured · source tree count
181
sweep data points across 7 user contexts and 25 routes in the July full-product test, plus 16 documented flows
measured · product test report
0.00%
error rate under 50–200 virtual users in the April load test — on local-dev topology, where P95 latency (2.52 s) missed the 300 ms target; both numbers reported
measured · K6 load-testing report
2
named live beta users — early and real; we don't inflate this number, we grow it
measured · beta user roster
Every figure above is read from the system of record it describes. Gaps are marked, not filled in.
Also in this system
Supporting detail
Refix is deterministic, not 'AI'
The conflict engine is rule-based scoring over courts, roles, and calendars — reproducible and explainable. We could call it AI; accuracy matters more to us than the label.
Court Mode
One toggle forces the mobile app fully offline for courtroom use — reads and writes hit the local database, and sync resumes when the lawyer chooses. Local-database encryption is scaffolded but not yet enabled, so we don't claim it.
Tested like a product, not a demo
20 unit-test files, 20 Playwright specs, a 181-point full-product sweep across seven user contexts, and a load test with its failure honestly recorded. The quality bar is part of the architecture.
Need an internal tool your team actually trusts?
CourtMate is a live product with real users, an offline-first mobile app, and a billing engine you can operate above. We build dashboards and internal tools to the same standard — including the parts nobody demos, like sync and testing.