Skip to main content
Hamza Khan

Legal product & infrastructure engineering

Build, connect and fixlegal-tech software

I build and improve the software that legal teams rely on in their day-to-day work. For legal-tech founders and technical teams building a product or improving an existing platform. Scope the architecture, application work, integrations or fixes, then review working increments with the engineer writing the code.

Delivered in client work
  • Architecture
  • Full-stack builds
  • Integrations
Starting a new AI product?

30-minute intro call on Calendly

System view · Demo legal-tech appIllustrative

Permissions, tenant isolation and audit log in every layer

  1. Interface · Next.js and React

  2. Services and APIs · Node.js and FastAPI

  3. Data · PostgreSQL and Redis

  4. Background jobs · Temporal and BullMQ

  5. Integrations · Case management, Graph, SharePoint

Fix retestedVerified before handover
Illustrative example made for this page · fictional application · not a product screenshot.

01 / Overview

Which product problems can I take on?

I take on product work in legal tech, from a first build to a platform that already misbehaves.

  • You are a legal-tech founder or team that needs a technical lead who owns architecture and delivery.
  • Your case-management system holds the records, but email, documents and workflow tools do not connect to it.
  • The app works in a demo and behaves unpredictably with real users, data or load.
  • A security finding needs fixing in the code, then confirming that the fix holds.

First step

Free product & security review

Bring one product workflow or AI feature. I review its architecture, permissions and failure points and send a brief record of what I reviewed and suggested next steps. Free for one agreed workflow; larger or complex reviews are scoped as paid assessments.

It is not a comprehensive penetration test, and active testing needs written authorization.

Book a review(opens in new tab)

02 / Capabilities

Five ways to build and improve your product

Open a capability for how it works, what it needs and its limits.

Build

Design the system, build the product and connect it to the tools your users already rely on.

  • 23Solution architectureTurn an operating problem into a reviewable design: roles, interfaces, data flows, permissions and tenant boundaries.

    I turn an operating problem into a system you can build, with its roles, interfaces, data flows and component boundaries defined. You get a design your team can review and challenge, with permissions and tenant boundaries decided before code is written.

    How it works

    1. 1

      Understand: Map the workflow, the users and roles, the existing systems and what a working result means.

    2. 2

      Design: Draft the interfaces, services, data model and integration points, with permissions and tenant boundaries explicit.

    3. 3

      Review: Walk through the design with your team and test the riskiest assumptions early.

    4. 4

      Document: Write down the architecture, decisions and open questions so others can build from it.

    What it needs
    Time with the people who know the workflow, plus any existing code, schemas or system documentation.
    Approval and limits
    I recommend an approach and state its trade-offs, and you make the final decisions on scope and priorities.
    • Tenant isolation
    • RBAC
    • PostgreSQL
  • 24Full-stack product deliveryBuild the working product: Next.js and React interfaces, Node.js or FastAPI services, data and AI features.

    I build the working product, with interfaces in Next.js and React, services and APIs in Node.js or FastAPI, and the data layer behind them. AI-connected features ship in the same codebase, with permissions and background processing built in.

    How it works

    1. 1

      Plan: Break the agreed scope into releasable pieces, each with clear acceptance criteria.

    2. 2

      Build: Implement interface, API and data changes together, in small increments that can be reviewed.

    3. 3

      Verify: Test each piece against the agreed cases before the next one starts.

    4. 4

      Release: Deploy through your CI/CD pipeline and document how the system runs.

    What it needs
    An agreed scope, access to your repository and environments, and a named person who can answer product questions.
    Approval and limits
    I build to the scope we agree, and changes to that scope are discussed and agreed before they are built.
    • Next.js
    • React
    • Node.js
    • FastAPI
  • 25Case-management and legacy system integrationConnect case-management and older systems to email, documents, calendars, e-signature and phone, where interfaces allow.

    I connect case-management systems and older platforms to email, documents, calendars, e-signature and phone systems, where their interfaces and permissions allow. Under NDA, I built an agentic case-management system with these integrations for a multi-office US law firm.

    How it works

    1. 1

      Assess: Review the system’s available APIs, access permissions, data quality and workflow constraints.

    2. 2

      Agree: Decide which records and actions to connect, and which stay read-only.

    3. 3

      Connect: Build the integration with retries, background processing and error handling for unreliable endpoints.

    4. 4

      Verify: Test against agreed cases and record which user or process changed each record.

    What it needs
    Credentials or sandbox access to the system, its API documentation if it exists, and a contact who owns the data.
    Approval and limits
    Where a system offers no usable interface, I tell you early and agree another route with you.
    • Case management
    • REST APIs
    • Microsoft Graph
    • SharePoint

Stabilize and secure

Find and fix what misbehaves, then fix security findings and retest them.

  • 26Application stabilizationFind why an application behaves unreliably, fix the cause and verify it against the original problem.

    I find why an application behaves unreliably and fix the cause with targeted changes. That covers inconsistent results, inefficient API calls and workflow defects. Each correction is checked against the original problem before handover.

    How it works

    1. 1

      Reproduce: Collect the failing cases, logs and user reports, then reproduce the problem on a copy of the system.

    2. 2

      Diagnose: Trace the cause through the code, data, queries and third-party calls.

    3. 3

      Fix: Make the smallest change that removes the cause, and add tests around it.

    4. 4

      Verify: Re-run the failing cases and the surrounding workflows, then record what changed.

    What it needs
    Read access to the code and logs, a safe environment to test in, and examples of the behavior that goes wrong.
    Approval and limits
    Some causes sit in third-party systems or old data I cannot change, so I document them and agree a workaround with you.
    • REST APIs
    • PostgreSQL
    • Background jobs
  • 27Security remediation engineeringFix agreed security findings in the code, then retest the affected behavior and nearby features.

    I remediate agreed security findings in application code, with retesting of affected behavior and nearby features where included. Findings can come from my assessment or another tester's report. Authorization, tenant isolation and input handling are common areas.

    How it works

    1. 1

      Triage: Review each finding, its evidence and its impact, then agree the order of fixes.

    2. 2

      Fix: Change the code where the weakness starts, such as a missing authorization check or unvalidated input.

    3. 3

      Retest: Repeat the original steps, then test related features and permissions for regressions.

    4. 4

      Record: Document what changed, what was retested and anything still open.

    What it needs
    The finding report or reproduction steps, access to the code, and a staging environment where fixes can be tested.
    Approval and limits
    I fix and retest what is in scope, and I do not certify that an application is secure overall.
    • RBAC
    • Tenant isolation
    • Retesting

03 / How it works

How is a legal-tech product put together?

I build a product in layers, with permissions and an audit trail running through every one.

Layers of a legal-tech product

Explore steps

Step 1 of 5

Interface

Next.js and React screens for staff, clients and administrators, showing each role only what it may see.

Permissions, tenant isolation and audit logging run through every layer.

04 / Controls

How I verify work before handover

Agree acceptance checks, access and the handover before building. You receive the implementation, verification record and known limits. Continued maintenance and new work require an agreed scope.

  • Permissions designed in

    Roles, tenant boundaries and access rules are decided in the first design and tested with each feature.

  • Verification before handover

    Changes are checked against agreed cases and the evidence is recorded. The scope identifies which security fixes will be retested.

  • Traceable changes

    Sensitive actions are logged, so you can see who or what changed a record, and when.

  • Documented limits

    Handover notes cover how the system works, what it does not do and what to watch.

Limits and background reading

What this does not do

  • Rewrite a working system from scratch by default. Work starts with the smallest change that solves the problem.
  • Change code or systems without an agreed scope and the access you grant.
  • Promise a result that cannot be verified. Anything I could not test is reported.
  • Certify that a product is secure or compliant.
  • Make legal decisions. Lawyers decide, and the systems prepare and record.

Background reading

05 / Evidence

What product work have I delivered?

Most client work is under NDA, so these examples are one named client, one public case study and one public project.

  • Named client · Tech lead

    Clausio

    As tech lead, I worked directly with the co-founder on Clausio, an AI contract review tool for law firms. The work included tenant isolation security, new product features, third-party integrations including Stripe and a Microsoft Word add-in connected to firm knowledge.

  • Public case study · Legal AI

    Human-governed AI intake

    I handled architecture and implementation of an intake system for a US personal-injury firm. It connects voice, email and documents to attorney review, with an action-level audit trail.

    Read the case study
  • Public project · Website

    Scott Baron law firm website

    A Next.js and Node.js website for a law firm, with legal-service content, responsive navigation and content management.

    View project

Delivered with law firms, in-house legal tech teams and legal-tech founders over the past three years, mostly under NDA. See all work

Engineering tools

  • OpenAIGPT models
  • AnthropicClaude models
  • GeminiGoogle AI models
  • Mistral AIOpen AI models
  • Perplexity AIAI search
  • LangChainAI agent workflows
  • LLamaPrivate AI models
  • PyTorchCustom AI models
  • TensorFlowMachine learning
  • Apache SparkLarge-scale data
  • PostgreSQLSecure databases
  • MySQLDatabases
  • MariaDBDatabases
  • SQLiteLightweight databases
  • MongoDBFlexible databases
  • CassandraHigh-volume data
  • RedisFast caching
  • PrismaSafe database access
  • SupabaseBackend & auth
  • FirebaseApp backend
  • AWSCloud hosting
  • Microsoft AzureCloud hosting
  • GCPGoogle Cloud
  • OCIOracle Cloud
  • VercelWebsite hosting
  • NetlifyWebsite hosting
  • CloudflareSpeed & protection
  • DigitalOceanCloud servers
  • RailwayApp hosting
  • HerokuApp hosting
  • DockerPortable apps
  • KubernetesScaling apps
  • TerraformInfrastructure as code
  • AnsibleServer automation
  • GitVersion history
  • GithubCode collaboration
  • GitHub ActionsAutomated releases
  • GitLab CI/CDAutomated releases
  • BitbucketCode collaboration
  • CircleCIAutomated testing
  • Travis CI/CDAutomated testing
  • JenkinsBuild automation
  • ReactInteractive screens
  • Next.jsFast websites
  • Vue.jsWeb interfaces
  • AngularLarge web apps
  • SvelteLight web apps
  • AstroContent websites
  • RemixWeb apps
  • NuxtJSFast websites
  • ReduxApp state
  • HTML5Web pages
  • CSS3Page styling
  • SassPage styling
  • Tailwind CSSClean, consistent design
  • BootstrapReady-made layouts
  • Material UIReady-made components
  • Ant DesignBusiness dashboards
  • Babylon Js3D in the browser
  • SanityContent your team edits
  • StrapiContent management
  • Node.jsServers & APIs
  • ExpressJSAPIs
  • NestJSStructured back ends
  • GraphQLFlexible APIs
  • tRPCType-safe APIs
  • FastAPIPython APIs
  • FlaskPython web apps
  • DjangoPython web apps
  • LaravelPHP web apps
  • Ruby on RailsWeb apps
  • ASP.NetMicrosoft web apps
  • Spring BootEnterprise back ends
  • PythonAI & automation
  • TypeScriptReliable app code
  • JavaScriptWeb code
  • JavaEnterprise systems
  • PHPWeb code
  • GoFast services
  • RustSafe, fast code
  • C++High-performance code
  • C#Microsoft apps
  • HaskellPrecise code
  • React NativeiPhone & Android apps
  • FlutteriPhone & Android apps
  • ExpoMobile app releases
  • SwiftiPhone apps
  • KotlinAndroid apps
  • AndroidAndroid apps
  • IonicHybrid mobile apps
  • Framework7Hybrid mobile apps
  • XamarinMicrosoft mobile apps
  • Microsoft GraphMicrosoft 365 data
  • SharePointFirm documents

06 / Questions

Questions before we build

Answers on technical leadership, live products, integrations, data and pricing.

Can you act as technical lead for a legal-tech startup?

Yes. I have worked as tech lead directly with a co-founder. I can own architecture and delivery, review code, and work alongside your engineers or build on my own. The scope is agreed up front, and you keep the product decisions.

Can you fix or extend a product that is already live?

Yes. Many projects start with an existing platform. I review the code, data and access first, then agree a defined set of changes and how each one will be verified. A full rewrite is not the default.

Can you integrate with our case-management system or legacy software?

Often, yes. I first check the available APIs, permissions and data quality, then agree what can be connected. Where a system offers no usable interface, I tell you early and agree another route with you.

How do you protect client data while you work?

I work only within the access you grant and prefer a staging environment with test data. Permissions and tenant boundaries are designed in, sensitive actions are logged, and I can work under your NDA.

How does a project start, and how is it priced?

Every project starts with a 30-minute intro call. We agree the scope, access and acceptance criteria, and the work is priced from that scope. Each project is scoped on its own, so there is no standard price list.