---
schema: 4
type: case
id: 14
title: "A client‑lifecycle system from first lead to handover"
description: "An internal system for running an agency’s client journey: lead, proposal, milestones, invoices and handover, with two approval gates."
created: 2026-10-20
updated: 2026-10-20
attributes:
  channels: [website]
  status: published
  motif: workflow
  kind: own
  client: "h1902y"
  year: 2026
  state: "Paused"
  stack: ["Next.js", "Cloudflare Workers", "Cloudflare D1", "TypeScript", "Vitest"]
  timeline: "Backend built in about 10 days"
---

## Problem

Agency work lives in scattered tools. Proposals, milestones, invoices and handover each have rules about what can happen next, and those rules get broken by hand.

## What we built

- An admin app for the pipeline, proposals, projects, clients and access, catalogue and invoices, with a lead-intake API
- A client app where a client decides on proposals, reviews deliverables and sees updates and billing
- A rules engine that holds the state machine for each stage
- A platform layer with Cloudflare Access sign-in, a database store and safe retries

## Outcome

- 84 automated tests passing across the rules engine and the platform layer
- Backend and rules are done; the screens still need to be built, which is why this is paused
