← built

Compass

A multi-tenant CRM for real-estate sales teams, from tenant provisioning to lead assignment.

kind
personal project
year
2026
status
in development

§01 context

Real-estate teams still run on spreadsheets and phone memory. Compass is my attempt at the system that replaces that: capture a lead, score it, assign it, follow up.

It's multi-tenant from day one. Each vendor gets an isolated workspace, there's a separate platform app for provisioning tenants, KYC and billing, and plans are enforced with per-tenant feature flags.

Compass admin dashboard

§02 shape

How it’s put together

web (intake)   admin (vendor app)   super-admin (platform)
       └──────────────┬──────────────────┘
                      ▼
               nginx (TLS, routing)
                      ▼
          NestJS API ── tenant guards on every request
           │        │            │
           ▼        ▼            ▼
      Postgres   BullMQ      Ory Kratos / Hydra
      (Prisma)   workers     (identity, OAuth2)

§03 hard parts

The hard parts

  1. 01

    Isolation you can't forget to add

    Tenant scoping lives in guards, not in individual queries, so a new endpoint is isolated by default. Plan limits are checked in the same place.

  2. 02

    Identity I didn't hand-roll

    Ory Kratos handles identities, magic-link activation and mobile OTP. Hydra handles OAuth2. More moving parts in compose, a lot less security code of my own.

  3. 03

    Scoring and assignment

    Lead scores come from PostHog events, and assignment runs through a small rules engine with team policies. Scheduled and slow work goes through BullMQ queues.

stack

  • NestJS
  • Next.js
  • PostgreSQL
  • Prisma
  • BullMQ
  • Ory Kratos
  • Ory Hydra
  • PostHog
  • Docker

next →

formiq

Form backend infrastructure with a typed SDK, an API, a dashboard and async workers.