MuseLegal/AI-Legal-Platform

Fork being rebuilt as a firm-branded client portal with role-based matter access

Two PRs merged: (1) `matter_participants`-based portal access controls - new join table, RLS policies on matters/documents/portal_messages/tasks/intake_submissions/downloadable_files, `canAccessMatterByRole` and `ensureMatterScopedResourceAccess` added to `access.ts`. (2) Public law firm landing page - root route replaced with a three-surface firm site (marketing, `/portal`, `/assistant`).

View on GitHub →

MuseLegal is repositioning the upstream legal-AI assistant as a productized law-firm portal. The recorded activity covers two architectural moves: an explicit authorization model for matter-scoped resources, and a public marketing landing page that splits the app into three distinct surfaces - public site, client portal, and attorney back office.

The access control work is the more substantial piece. A new matter_participants join table, Supabase RLS policies on six tables, and mirrored TypeScript helpers in access.ts together enforce role-based matter isolation at both the database and application tiers. The public landing page commit completes the structural framing by replacing the upstream root redirect with a firm-branded entry point that routes clients to /portal and attorneys to /assistant.

This fork is diverging from the upstream product identity. It presupposes a matters schema, a custom JWT role claim, and a client-portal data model that don't exist upstream.

What's in it

Direction

personasmulti-tenantbranding

Activity

Themed changes and pull requests touching this fork, newest first. Themed changes that haven't been turned into a public post yet still appear — they're real work even without a published writeup.

Threads of work (detailed view)

6 threads have been distilled into posts.

Root page replaced with a public law firm marketing site

MuseLegal's fork drops the `/assistant` redirect that was the upstream root and replaces it with a full marketing page for a fictional "Johnson Law" firm - separating the public entry point from two distinct authenticated routes: `/portal` for clients and `/assistant` for attorneys.

Matter-participant access model replaces implicit ownership for portal resources

MuseLegal rewrites portal authorization around an explicit many-to-many `matter_participants` join, enforced at both the database (Supabase RLS) and application tiers. This is infrastructure groundwork for a client-portal product layer sitting on top of the upstream assistant.

Add matter_participants table and RLS policies for portal access control

MuseLegal replaces implicit matter ownership with an explicit participants model: a new join table, two SQL helper functions, and Supabase RLS policies covering six portal tables. TypeScript helpers in `access.ts` mirror the database check at the application tier.

Pull requests (detailed view)

1 PR touch this fork — inbound (filed against it) or outbound (filed from it). State icons match the editorial dashboard.

✅ Merged (1)