In-App Compliance Help & Regulatory Updates
In-App Compliance Help & Regulatory Updates
Added in v0.1.57
DepositClear's compliance dashboard now includes two features to help UK letting agents understand their legal obligations and stay current with legislative changes: contextual help articles embedded inside issue cards, and a Regulatory Updates feed with automated weekly notifications.
Contextual Compliance Help Articles
When you expand a compliance issue card, a guidance panel appears below the remediation advice. This panel loads an article specific to the rule that raised the issue.
What's in an article
- Summary — a concise plain-English description of the rule
- Full guidance body — expandable detail including deadlines, thresholds, and obligations
- GOV.UK links — direct links to the authoritative legislation or guidance on GOV.UK
Covered rules (v0.1.57)
| Rule | Legislation |
|---|---|
| Deposit protection 30-day deadline | Housing Act 2004, s.213 |
| Recording the deposit protection scheme | Housing Act 2004 |
| Deposit cap compliance | Tenant Fees Act 2019 |
| How to Rent guide serving | Deregulation Act 2015 |
| Periodic tenancy transition | Renters' Rights Act 2024 |
| Section 21 abolition | Renters' Rights Act 2024 |
How it works
Articles are stored in the compliance_help_articles table and seeded lazily on first access — there is nothing to configure. The ComplianceHelpInline component is rendered inside every expanded issue card and fetches the relevant article via the complianceHelp.helpForRule tRPC procedure.
Regulatory Updates Feed
The compliance dashboard now has two tabs: Issues (the existing view) and Regulatory Updates.
The Regulatory Updates tab
- Displays a feed of legislative announcements relevant to UK letting agents
- Each update card is expandable for full detail
- An unread badge on the tab header shows how many updates you haven't seen yet
- A Mark all read button clears all unread state in one action
- Read/unread state is tracked per user — each team member has their own view
Pre-seeded updates (v0.1.57)
| Update | Status |
|---|---|
| Renters' Rights Act 2024 — Royal Assent | ✅ In force |
| Section 21 abolition | ⏳ Pending commencement order |
| Deposit cap threshold confirmation | ✅ Confirmed |
| How to Rent guide — January 2024 update | ✅ Published |
| MEES EPC Rating E enforcement | ✅ In force |
Weekly Notification Cron
A background job (regulatory-updates-notifier) runs every Monday at 08:00 UTC via Inngest.
What it does:
- Queries all regulatory updates where
notifiedAt IS NULL - For each unnotified update, dispatches an in-app notification to every member of every organisation
- Stamps the update row with the current timestamp in
notifiedAtso it is never re-sent
This ensures agents are automatically alerted to new legislative changes without needing to check the dashboard manually.
tRPC Procedures
All compliance help and regulatory update data is accessed through the complianceHelp router.
complianceHelp.helpForRule
Fetches the help article associated with a given compliance rule.
// Input
{ ruleId: string }
// Returns
{
id: string;
ruleId: string;
title: string;
summary: string;
body: string;
govUkLinks: { label: string; url: string }[];
}
complianceHelp.listUpdates
Returns all regulatory updates with per-user read state.
// Input
{ orgId: string }
// Returns
{
id: string;
title: string;
summary: string;
category: string;
publishedAt: string;
isRead: boolean;
}[]
complianceHelp.unreadUpdateCount
Returns the number of updates the current user has not yet read.
// Input
{ orgId: string }
// Returns: number
complianceHelp.markUpdateRead
Marks a single regulatory update as read for the current user.
// Input
{ updateId: string; orgId: string }
complianceHelp.markAllUpdatesRead
Marks all regulatory updates as read for the current user.
// Input
{ orgId: string }
Database Schema
compliance_help_articles
Stores the guidance article library. Populated lazily on first access.
| Column | Type | Notes |
|---|---|---|
id | uuid | Primary key |
ruleId | text | Maps to a compliance rule identifier |
title | text | Article heading |
summary | text | Short plain-English summary |
body | text | Full guidance content |
govUkLinks | jsonb | Array of { label, url } objects |
regulatory_updates
Stores regulatory change announcements.
| Column | Type | Notes |
|---|---|---|
id | uuid | Primary key |
title | text | Update headline |
summary | text | Plain-English summary |
category | regulatory_update_category | Enum |
publishedAt | timestamp | Date of legislative event |
notifiedAt | timestamp | Set when the cron has dispatched notifications; NULL = not yet sent |
regulatory_update_reads
Per-user read tracking.
| Column | Type | Notes |
|---|---|---|
id | uuid | Primary key |
updateId | uuid | FK → regulatory_updates |
userId | text | User identifier |
readAt | timestamp | When the user read the update |
Component Reference
| Component | Location | Purpose |
|---|---|---|
ComplianceHelpInline | src/app/dashboard/compliance/compliance-help-inline.tsx | Renders the help article inside an expanded issue card |
RegulatoryUpdatesPanel | src/app/dashboard/compliance/regulatory-updates-panel.tsx | Full updates feed with expandable cards and mark-read controls |
ComplianceDashboard | src/app/dashboard/compliance/compliance-dashboard.tsx | Root dashboard component; manages tab state and unread badge |