partners.matters.ai is the Matters.AI partner program portal — where channel partners (Cloud, VAR, Distributor, MSSP) register deals, request market-development funds, pull enablement content, and manage their company profile, and where the internal Matters.AI team reviews everything. It lives at apps/partners in the monorepo (@matters/partners) as a Next.js 16 App Router app with its own Clerk application, its own Neon Postgres database, R2 bucket, Upstash rate-limiter, and Vercel deployment.
This section documents the portal end to end — architecture, data model, the account-type RBAC, the access-request approval saga, the audit log, Salesforce/CSV partner-status resolution, every feature surface, multi-account login, and operations.
/approval; a Super Admin approves them as a partner or prospect into an existing or new Clerk organization, and access goes live without an invite.Every user resolves to exactly one of seven account types. External (non-@matters.ai) emails are limited to the first four; internal tiers require an @matters.ai email. Full detail — capability matrix, source-of-truth, gates — is in Account-Type RBAC.
| Type | Who | Access |
|---|---|---|
pending | default for everyone unclassified | none (held at /approval) |
rejected | denied; reconsiderable | none (held at /approval, may re-apply) |
prospect | external, nurturing | read-only marketing/content |
partner | external, active partner | full partner portal |
internal_team_member | @matters.ai staff | read-only admin |
admin | @matters.ai | most of the platform (write) |
super_admin | @matters.ai | everything, incl. role assignment + access requests |
| Route | Audience | Description |
|---|---|---|
/ | Public | Landing + sign-in CTA |
/sign-in/[[...sign-in]] | Auth | Clerk-hosted, themed |
/sign-up/[[...sign-up]] | Auth | Self-service Clerk sign-up — grants nothing by itself |
/approval | Auth | The one screen a non-admitted user can reach: ask for approval, awaiting, approved (auto-forwards), rejected (Access Requests) |
/accept-invite | Auth | Clerk org-invitation acceptance (legacy invite path) |
/dashboard | Partner | Partner home — KPIs, recent activity |
/opportunities, /opportunities/new, /opportunities/[id] | Partner | Deal registration + lifecycle (Opportunities) |
/mdf | Partner | MDF requests (MDF) |
/content, /agreements, /tier-benefits | Partner | Enablement (Enablement) |
/profile, /team | Partner | Company profile + org members |
/directory | Public/Partner | Approved-partner directory |
/notifications | Partner | In-app notifications |
/admin | Internal | Admin overview |
/admin/partners | Internal (read) | All partner orgs + directory toggle |
/admin/opportunities, /admin/mdf, /admin/content, /admin/agreements, /admin/tiers | Internal | Admin review/management surfaces |
/admin/activity | Internal (read) | Audit log viewer |
/admin/accounts | Super Admin | Account-type assignment |
/admin/access-requests | Super Admin | Approve/reject access requests |
/admin/rewards | Internal | PoC reward review (pending → approved/paid/rejected) |
/admin/funnel | Internal | Stage-conversion funnel analytics |
/admin/broadcast | Internal | Announce to all orgs or one tier (broadcast.sent) |
/admin/sync-issues | Internal | Salesforce sync failure triage |
/admin/feature-access | Super Admin | Feature × account-type audience matrix |
/admin/settings/enforcement | Super Admin | Enforcement settings |
/admin/design-system | Internal | pm-* theme / component reference |
/api/* | Mixed | Upload (R2), CSV export, SF callout, Clerk webhook, cron, health |
Which gate guards each surface is documented in Authentication & Gates.
The portal is backed by Neon Postgres 18 via Drizzle ORM (see Data Model). Partner status comes from one of two sources (Salesforce & CSV Mode):
partnerStatus.partner_accounts table (~the SF export, loaded via pnpm seed:csv).SUPER_ADMIN_EMAILS allowlist bootstrap Super Adminneon-serverless pool, casing: "snake_case")pm-* CSS custom-property tokens; unified AppShell + collapsible sidebaractivity_log + recordActivity