Skip to content
AP

UNIT 02/12 — PROPTECH · B2B SAAS

nHabit Agent Platform

Multi-tenant B2B agency platform with Stripe billing, CRM sync and a public API

ROLE
Architect & sole engineer
CLIENT
nHabit
SECTOR
PropTech · B2B SaaS
PLATFORM
Web
YEAR
2026
STACK
Next.js · TypeScript · Go · PostgreSQL · Stripe · AWS KMS · ECS Fargate · OpenAPI
STATUS
SHIPPED · IN PRODUCTION — customers only

[ FIG.01 ] BRIEF

nHabit needed a way for letting agents to claim their listings, manage leads and pay. In four months I designed and built the whole layer: a Next.js portal of 38 pages and 19 API routes, two new Go services (partner, 74k lines; billing, 3k lines) with 1,900 tests and 418 route registrations, and agency tenancy with five roles, per-branch access and fail-closed agent authentication.

[ FIG.02 ] BILLING

Stripe went to production on 27 August 2026: six live prices, a freemium ladder from free to £149 a month, pay-as-you-go token packs with an idempotent ledger, 17 webhook events verified by HMAC, UK VAT. Entitlements are enforced forward-only so a downgrade never deletes an agent's work.

[ FIG.03 ] CRM & LISTINGS

Agencies connect their CRM (GlueDog, iamproperty, Street) with KMS-sealed per-agency credentials. A two-directional overlap matcher separates the true agency (score 1.000) from the best false match (0.008), which a one-directional score had got wrong on a 2,066-listing portfolio. Direct listing upload enters the same review queue and enrichment train as CRM ingest.

[ FIG.04 ] LEADS & API

Leads arrive in an inbox with outcome capture and spam controls; a staff console allows safe impersonation; an LLM onboarding assistant answers setup questions for under a penny a turn. The public REST and webhook API, with hashed keys, BLM and RTDF feeds and OpenAPI docs, was signed off on 8 October 2026.

02SHIPPED · IN PRODUCTIONCUSTOMERS ONLY

UNIT 02 — WEB BUILD

[ FIG.SYS ] ARCHITECTURE

SYSTEM SCHEMATIC — AUTO-GENERATED FROM SPEC

AGENT PORTAL · NEXT.JSPUBLIC REST + WEBHOOKSPARTNER SERVICE · GOBILLING · STRIPECRM SYNC · KMSPOSTGRESSTRIPE WEBHOOKS

[ FIG.OUT ] OUTCOME

27 AUG 2026

STRIPE BILLING LIVE IN PRODUCTION

1,900+

TESTS ACROSS THE PARTNER AND BILLING SERVICES

3

CRM INTEGRATIONS WITH SEALED CREDENTIALS

418

ROUTE REGISTRATIONS IN THE PARTNER SERVICE

VERDICT:LIVE — BILLING ON · AGENCIES ONBOARDING[ OK ]

NEXT UNIT

Mealner

The nutritionist-in-an-app that plans, logs and re-plans your eating around real life