CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

Platform architecture overhaul — signoff inbox, discipline routing, trial system, onboarding fork #3857

MergedXSccantynz wants to mergefeature/platform-architecture-overhaulmainopened Jun 3, 20260/9 tasks
ccantynzcommented Jun 3, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/MarcoReid.com/pull/86


What this fixes

The platform had coherent auth but no real architecture beneath it. Every user saw the same dashboard. Professionals had no inbox. Trial accounts were marketing fiction. Onboarding was a skippable form that did nothing. This PR fixes all of it.


Changes

Professional signoff inbox (SignoffInbox.tsx + /signoffs page)

  • Professionals now see a live "Sign-off requests" section at the top of their dashboard
  • Shows pending requests from public users with document type, jurisdiction, requester notes, and submission time
  • Full management page at /signoffs with Pending / Under Review / Completed filter tabs
  • Approve / Request amendments / Decline actions wired to PATCH /api/signoffs/[id]
  • If user has no Professional record: inbox renders nothing (silent)
  • Empty state: "Your inbox is clear"

Discipline-specific dashboard (DisciplineModules.tsx)

  • Dashboard now detects discipline from practiceArea field (keyword matching)
  • Legal users see: Matters, Trust Accounts, Court Calendaring, Document AI, Client Portal, Billing & Time, E-Signatures, Conflict Check — plum accent
  • Accounting users see: Bank Feeds, Tax Compliance, Payroll, Catch-Up Centre, Client Management, Invoices, Document Editor, Marco Accounting — forest accent
  • General: both sets side by side
  • Personalised greeting subtitle: "Your legal practice" / "Your accounting intelligence hub"
  • Discipline badge on dashboard (or "Complete your profile →" if not set)
  • Quick actions adapt per discipline (Log time for lawyers, Bank reconciliation for accountants)
  • Old generic module grid replaced

Real trial system (lib/seed-demo.ts + TrialBanner)

  • isTrialAccount, trialStartedAt, trialEndsAt added to User schema
  • Register API accepts isTrial: true — sets 14-day window and calls seedDemoData()
  • seedDemoData() creates: Patel Family Trust demo client, active matter, 1.5h time entry, $15k trust account, draft invoice — all in a single transaction, fire-and-forget (never blocks registration)
  • TrialBanner shows days remaining with "Upgrade now →" CTA, dismissable per session
  • Expired trials: banner turns red, platform routes to /trial-expired

Schema additions (User model)

trialStartedAt   DateTime?
trialEndsAt      DateTime?
isTrialAccount   Boolean   @default(false)

Onboarding API extended

POST /api/me/onboarding now accepts: userType, discipline, professionalBody, registrationNumber, admissionJurisdiction, bio, headline, consumerNeeds — maps to existing Professional model fields


Still incoming (same PR)

  • Onboarding fork UI (professional vs consumer path — agent still running, will push to this branch)

Test plan

  • New user registers → onboarding renders fork screen (professional vs consumer)
  • Professional path collects bar number, professional body, jurisdiction
  • Consumer path routes to /generate after completion
  • Professional dashboard shows SignoffInbox section
  • Lawyer sees legal modules, accountant sees accounting modules
  • Trial registration seeds demo data (Patel Family Trust visible on dashboard)
  • Trial banner shows correct days remaining
  • Expired trial redirects to /trial-expired
  • Vercel build passes

https://claude.ai/code/session_013xYaNLb66Q87o1azuQoSLA


Generated by Claude Code

ccantynzcommented Jun 3, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marco-reid-com Ready Ready Preview, Comment Jun 3, 2026 10:27am

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts