CedarGuard
A multi-tenant compliance, risk and governance platform for social housing, with AI that drafts cited suggestions a human approves before anything is saved.
git clone git@github.com:the-client/cedarguard.git
Cloning into 'cedarguard'...
fatal: could not read from remote repository.
It belongs to the client, and so does the compliance data inside it.
hint: the code is private, the product isn't. It's running live at cedarguard.co.uk ↗
- Role
- Lead Full-Stack Engineer
- Tools
- React · TypeScript · Firebase
- Type
- AI Compliance SaaS
- Year
- 2026

01 · Overview
A control tower for housing compliance
CedarGuard is a multi-tenant SaaS platform for tracking statutory compliance, risk registers and board reporting across social housing portfolios.
I owned the full stack: architecture, data model, authorization, desktop packaging and every AI feature, including the RAG assistant. A second engineer contributed a few features: a Gantt view, CSV exports and compliance-mapping fixes.
02 · Problem statement
Manual compliance under new legislation
Social housing providers face a wave of post-Grenfell law: the Building Safety Act 2022, the Fire Safety Act 2021, the Social Housing Regulation Act 2023 and Awaab's Law, all with tighter budgets and rising compliance costs. Checking properties against their obligations, keeping risk registers and preparing board reports were manual, spreadsheet-driven jobs that couldn't scale or catch problems before they became breaches.
The goal was to move from tracking to prediction: surface compliance gaps and risk signals automatically, and give boards a live view instead of a monthly roll-up.
- Social housing
- Regulatory compliance
- Risk management
03 · Architecture
One backend, three deployment targets
One codebase serves three targets: a React 19 SPA on Vite, a signed macOS Electron app that reuses the same renderer, and a secondary Azure App Service deployment. All three call one Express action-dispatch endpoint running as a single Vercel serverless function, backed by Firebase Auth and Firestore, with role checks in both the API and the Firestore security rules.
The desktop app signs in through a hand-built Google OAuth PKCE flow with a loopback server and OS-encrypted token storage, behind the same auth interface as the web SDK, so the rest of the app never knows which client it runs on. AI calls go to Google Gemini, with an OpenRouter cascade as the fallback for quota limits and outages.
04 · Build
AI that suggests, people who approve
The hardest part was the agent layer: seven on-demand agents, from risk and compliance to governance and delivery, that read tenant-scoped records and draft cited suggestions. A project manager or above must accept, edit or reject each one before anything touches a live record.
Retrieval is decided by code, not the model, so tenant isolation is structural rather than prompt-enforced, and any cited fact that can't be traced to a real record is dropped. The apply step is the only path that writes: it re-checks authorization and claims the suggestion in a transaction, so a double apply or a race with a rejection can't corrupt state. Closing an incident, verifying compliance or approving spend has no AI adapter at all. The RAG assistant I built follows the same rule: it is read-only, and retrieves only what the signed-in user is allowed to see.
- 7 AI agents
- Human sign-off
- Tenant isolation

05 · Reporting
Board reports that lock when approved
Board reports follow a statutory template of required sections, auto-save while drafting, lock once approved and export to PDF for sign-off.
Point-in-time reporting lets a board see the portfolio as it stood in any past month, not only today.

06 · Project results
Blank repo to production in 3.5 months
CedarGuard went live at cedarguard.co.uk about 3.5 months after its first commit, covering compliance tracking, risk management, AI-assisted analysis, board reporting and a native desktop app. The AI compliance engine cut manual review effort by about 60%, and the RAG assistant cut navigation and lookup time by about 40%.
- Less manual review effort
- ~60%
- Faster navigation and lookup
- ~40%
- Blank repo to production
- 3.5 mo


What shipped
- Took a multi-tenant compliance and risk platform from a blank repo to production in about 3.5 months.
- Designed a 7-agent AI layer where every suggestion is source-cited and needs human sign-off before it touches a live record.
- Shipped one backend serving a web app, a signed macOS desktop app and a secondary Azure deployment from a single codebase.
- Built a RAG-based AI assistant that finds forms and tabs from a plain-English question, cutting navigation and lookup time by about 40%.
- Built a chunked AI fact-checking engine that checks every claim in AI output, one to one, against live web sources.
- Built desktop sign-in on a hand-rolled Google OAuth PKCE flow with OS-level encrypted token storage.
- Implemented point-in-time reporting so a board can see the portfolio as it stood in any past month.
