Moe Loubani
Back to projects
Buildventory
MCPFastifyPostgreSQLBullMQNext.js

Buildventory

One Audited Command Registry Behind Web, REST, and MCP

Jul 2026

New-home builder ops platform where web, REST and MCP all run through one audited command registry.

An operations platform for new-home builders covering inventory, deals, holds, and commissions, where every action runs through a single command registry exposed identically to the web app, REST API, and an OAuth-protected MCP server.

Visit Buildventory

Overview

Buildventory is an operations platform for new-home builders: inventory (projects, units, floorplans), deals with deposit schedules, holds and reservations with expiry, commissions, and an options and upgrades configurator with a rules engine. A unit can never be double-sold. Onboarding is AI-driven: a builder drops a real price sheet or unit tracker (CSV, Excel, or PDF) and a worker pipeline seeds the account from it.

My Role

I designed, built, shipped, and run Buildventory end to end: the command architecture, the parsing pipeline, the MCP server, authentication, and deployment.

Architecture

  • A Turborepo monorepo: Next.js web app, Fastify API, a dedicated MCP server, and a BullMQ worker for the parsing pipeline, on Postgres 17 and Redis.
  • A single command registry holds all business logic. Each command defines a Zod input schema, a policy, and a handler.
  • The registry is exposed through the REST API and an OAuth-protected MCP server.
  • The onboarding worker parses uploads field by field with a confidence score on each, then asks the builder a short set of gap questions before seeding.

Key Engineering Decisions

  • One command registry instead of parallel human and AI code paths. Validation, policy, and audit happen in one place, so an agent can do exactly what a user can do and nothing more, and there is only one behaviour to keep correct.
  • Per-field confidence scores in the parser. Price sheets are wildly inconsistent, so low-confidence fields become questions for a human instead of silently bad data in a live account.
  • AI seeding goes through the same guardrails as a person. An agent writing real data into a live account gets no shortcut around the audit trail.
  • Availability state kept consistent as holds expire. The stacking-elevation board has to stay accurate as units move between available, held, and sold, and a unit can never be double-sold.

Reliability & Security

  • Every command execution is recorded as an ActivityEvent with full provenance. AI-issued commands are tagged actorType ‘ai’.
  • Read-only and full-access controls scope what an agent may touch.
  • Better Auth for authentication, with 2FA/TOTP.