Behind the build

How a legal workflow became a software platform

  • A problem appeared. Renewals in memory; files across drives.
  • A system was designed. company → file → matter → asset.
  • A tradeoff was made. Specialized LegalTech over generic CRM.
  • A product shipped. Production desks on nepalipms.com.

Timeline

From fragmented desks to one record.

2024
Discovery with IP practitioners — renewals living in memory, files split across drives, calendars, and inboxes.
2024
Architecture for company → file → matter → asset hierarchy mirroring how Nepalese firms already work.
2025
Production launch: matter records, deadline engines, client portal foundations, national register search.
2026
OCR bulletin intake, litigation/hearing tracking, and active use by Global Law Associates and Janak Bhandari & Associates.

Challenge

Three failure patterns in almost every firm.

Renewal dates lived in someone’s memory until the statutory window closed. Case files were split across shared drives, personal calendars, and private inboxes. Department of Industry status was often discovered only when a client called asking why a certificate hadn’t arrived.

The product needed to feel like the physical desk — not a generic CRM — while remaining reliable enough for confidential client portfolios.

Solution

A practice system shaped like the physical desk.

NepalIPMS centers every engagement on a single matter record — company, file, matter, asset — with statutory deadline engines, national register search, and OCR-assisted bulletin intake. Practitioners work in one timeline instead of reconciling spreadsheets, drives, and inboxes.

The product ships at nepalipms.com on Cloudflare edge infrastructure, with role-based access suited to confidential client portfolios.

User Story

From spreadsheet desk to one matter record.

Before

Renewals tracked in shared spreadsheets with color-coded rows and partner-specific tabs. Register conflicts checked by opening the DoIP site in another browser tab. Bulletin entries retyped field by field into matter notes while the PDF sat in a downloads folder.

After

One matter record with statutory deadline engines and litigation on the same timeline. Sub-200ms search across 130,000+ trademark rows during live client calls. Bulletin PDF upload lands structured fields — mark, applicant, class — with human review for low-confidence extractions.

Decision Log

Calls that shaped the register and the desk.

Exact token matching over fuzzy register search

Decision: Prioritize normalized exact and prefix matches on mark names and application numbers instead of broad fuzzy similarity.

Reason: Paralegals run search while clients are on the phone — predictable results matter more than surfacing “similar” marks.

Tradeoff: Partial typos need clearer empty states and heavier normalization at ingest; we gave up “did you mean” convenience for call-time trust.

D1 FTS5 with KV cache for 130k rows

Decision: Index the national register in D1 with FTS5 and a short TTL cache for repeated portfolio queries at the edge.

Reason: 130,000 rows is big enough to kill naive LIKE scans but small enough for a well-indexed SQLite — without operating a dedicated search cluster from Kathmandu.

Tradeoff: More upfront ingest normalization and index tuning; less flexibility than Elasticsearch-style fuzzy analyzers.

Company → file → matter → asset hierarchy

Decision: Model engagements as nested records mirroring physical desk organization instead of a generic CRM pipeline.

Reason: Firms already think in client companies, matter files, and attached assets — the software had to feel like the desk, not a sales tool.

Tradeoff: Slower onboarding for teams expecting kanban pipelines; deeper fit for IP-specific workflows.

Failed Attempts

What we tried and rolled back.

Broad fuzzy matching on mark names. Early prototypes used similarity scoring across the full register. Queries routinely crossed two seconds on production data, and lawyers stopped trusting results during client calls. We moved to aggressive token normalization and exact-prefix matching instead.

Fully automated deadline acceptance at intake. We initially let the deadline engine start statutory clocks as soon as OCR or manual fields landed. Edge cases — partial filings, amended Nice classes, backdated opposition windows — needed human confirmation before clocks became operational truth.

Architecture

Edge-deployed SaaS around a single matter record.

  • AppNext.js / React / TypeScript product surface for portfolio, deadlines, litigation, and client views.
  • ComputeCloudflare Workers at the edge for low-latency APIs and secure session handling.
  • DataD1 for relational matter/client/deadline state; R2 for documents and bulletin artifacts.
  • IntelligenceOCR pipeline for bulletin PDFs — mark, applicant, class, and opposition status extracted onto the file.
  • RegisterIntegrated national trademark data (130,000+ records) with Nice class views and filtering.

Key features

What practitioners use daily.

  • Matter recordsTrademark, patent, design, copyright, and litigation on one timeline per engagement.
  • Deadline engineRenewals, opposition windows, and hearings calculated at intake — not from memory.
  • Register search130,000+ national trademark records with Nice class views and filtering.
  • Bulletin OCRUpload government bulletins; structured fields land on the matter with human review for low-confidence extractions.
  • Litigation trackingHearings and case status tied to the same file as the underlying IP asset.
  • Client portalFoundations for client-facing views without exposing internal desk workflows.

Technologies

Stack

Next.jsReactTypeScriptCloudflare WorkersD1R2OCRRole-based access

Impact

What changed for the desk.

One record

Trademark, patent, design, copyright, and attached litigation live on the same matter timeline.

Deadlines

Statutory windows calculated at intake — renewals, opposition, and hearings no longer depend on memory.

In production

Active IP desks at Global Law Associates and Janak Bhandari & Associates.

Lessons learned

Mirror the desk, not the CRM.

Legal practice software wins when it follows how firms already organize work — company, file, matter — rather than imposing generic sales pipelines. Deadline accuracy mattered more than feature breadth; a missed renewal window costs more than any dashboard.

Edge deployment on Cloudflare kept document-heavy workflows responsive in Nepal, and pairing OCR with human review avoided the trap of silently wrong register data.

← Home Next: ScholarQuest →