Broken access control is the first item in OWASP's Top 10:2025, and OWASP found some form of it in 100% of the applications tested. For a client portal, where every customer must see only their own files, invoices and messages, that is the risk the whole build should be organised around.
This playbook is the order we would run a first portal release in, written as a working document: eight steps, each with an owner, a time budget, an exit check and a rollback note. The stack is Next.js on Vercel with Supabase and Stripe, and every platform rule below comes from the vendor's own documentation, read on 17 November 2026.
The eight steps at a glance
Each step has one owner who signs off the exit check. Times are working days for a first release serving one firm's clients, with sign-in, documents, requests, messages and optional billing. They are our planning estimates, not measured averages, and a portal with a single sign-on requirement or two-way CRM sync will run longer.
| Step | Owner | Time budget | Exit check |
|---|---|---|---|
| 1. Scope the first release | Client sponsor with product lead | 3 to 5 days | One-page scope signed, roles listed, exclusions written down |
| 2. Model tenants, roles and data | Lead developer | 3 to 4 days | Every table has RLS on and a policy matrix exists |
| 3. Sign-in and sessions | Lead developer | 3 to 5 days | Custom SMTP live, every server action checks the session |
| 4. Documents and files | Lead developer | 4 to 6 days | Private bucket, upload rules enforced, file backup in place |
| 5. Core screens | Designer with front-end developer | 8 to 12 days | Client users complete the three main tasks unaided |
| 6. Billing, if in scope | Lead developer | 2 to 4 days | Stripe customer portal linked, webhooks tested |
| 7. Access and data protection testing | Second developer as reviewer | 3 to 5 days | Cross-tenant tests pass, processor contract signed |
| 8. Launch, rollback drill and handover | Lead developer with client sponsor | 3 days plus 2 weeks of support | Rollback rehearsed, runbook handed over |
Source: Octo Agency planning estimates, 2026
The total is roughly seven to nine working weeks. Steps 4 and 5 can overlap once the data model is fixed; steps 2 and 7 cannot be shortened without moving risk into production.
Steps 1 and 2: scope, then the data model
Step 1: Scope the first release
Owner: the client's sponsor, with our product lead. Time: 3 to 5 days.
Write one page that lists who logs in, what each role can see and do, and what is out of the first release. Our post "Client Portal Requirements Checklist: 40 Questions Across Users, Permissions, Documents and Billing" has the full question set; this step is about cutting it down to what ships first.
- Check: every role has a name and a one-line description.
- Check: the three tasks client users do most often are written down, because step 5 tests them.
- Check: exclusions are listed, for example "no e-signature in release 1".
Rollback note: none. If the scope moves after sign-off, the change goes into the changelog at the bottom of this page with a date and a new time budget.
Step 2: Model tenants, roles and data
Owner: lead developer. Time: 3 to 4 days.
Every row that belongs to a client carries an organisation ID, and every table in an exposed schema has Row Level Security switched on. Supabase's documentation recommends exactly that, and notes that new tables in the public schema start with privileges granted to its built-in roles. OWASP's Authorization Cheat Sheet adds the two rules that matter most here: deny by default, and validate permissions on every request.
| Role | Own organisation's records | Other organisations' records | Invoices | Portal settings |
|---|---|---|---|---|
| Client user | Read, create requests | None | Read own | None |
| Client admin | Read, create, invite users | None | Read and pay own | Own organisation only |
| Firm staff | Read and update assigned clients | Assigned clients only | Read | None |
| Firm admin | All | All | All | All |
Source: Octo Agency template, based on the OWASP Authorization Cheat Sheet, 2026
Index every column a policy filters on, and wrap the auth.uid() call in a select so Postgres evaluates it once per statement; both are performance recommendations from Supabase's RLS guide.
Rollback note: schema changes ship as migration files in the repository, never as edits in the dashboard, so step 8 can reason about what each release changed. Supabase Branching builds a preview environment from those migration files for each pull request, and branches start without data by default, so test migrations there against seeded records rather than against production.
Steps 3 and 4: sign-in, sessions and files
Step 3: Sign-in and sessions
Owner: lead developer. Time: 3 to 5 days.
The Next.js authentication guide recommends a Data Access Layer that verifies the session close to the data, and says Proxy checks should be optimistic only. It also says to treat Server Actions and Route Handlers like public API endpoints and check authorisation inside each one.
- Check: custom SMTP is configured. Supabase's production checklist lists two emails per hour for endpoints that send email on the built-in sender, which a launch invitation run will exceed in minutes.
- Check: CAPTCHA is on for sign-up, sign-in and password reset, as the same checklist advises.
- Check: sign-in meets WCAG 2.2 success criterion 3.3.8, which bars a cognitive function test such as remembering a password unless an alternative or assisting mechanism exists. A magic link or a password field that allows paste and password managers both work.
Rollback note: if a sign-in change locks users out, roll the code back first, then check whether email templates or redirect URLs changed in the Supabase dashboard, because a code rollback will not undo those.
Step 4: Documents and files
Owner: lead developer. Time: 4 to 6 days.
Supabase Storage blocks uploads to any bucket without RLS policies, and access to a private bucket comes from policies on the storage objects table. Use private buckets for client documents. The OWASP File Upload Cheat Sheet lists the rest: allow-list extensions, do not trust the Content-Type header, rename files on the server, cap file size, restrict uploads to authorised users and scan files where possible.
- Check: a client user cannot list or fetch another organisation's file by changing an ID in the URL, the object-level check OWASP calls out.
- Check: files have their own backup routine, because Supabase's database backups contain only metadata about Storage objects.
Rollback note: a deleted file cannot be recovered by rolling back code or restoring the database. Soft-delete documents for 30 days before removing the object.
Steps 5 and 6: the screens clients use, and billing
Step 5: Core screens
Owner: designer with front-end developer. Time: 8 to 12 days.
Build the dashboard, documents, requests and messages screens against the three tasks from step 1. Test them with two or three real client users before launch, not only with firm staff, who know where everything is. Keep controls at least 24 by 24 CSS pixels or spaced to match, which is WCAG 2.2's level AA target size rule.
Rollback note: screen changes are code only, so Instant Rollback covers them, provided no migration shipped alongside.
Step 6: Billing, if in scope
Owner: lead developer. Time: 2 to 4 days.
For most firms, Stripe's hosted customer portal is enough: customers update payment methods and billing details, change or cancel subscriptions, and pay, view and download invoices. Know its limits before promising features. Stripe's documentation says the portal cannot be shown inside an iframe, offers at most 10 products when customers switch plans, and lets customers cancel but not update subscriptions with multiple products, usage-based prices or trials. New portal sessions expire after five minutes if unused.
Rollback note: billing state lives in Stripe. A code rollback leaves subscriptions as they are, so replay any webhook events the faulty release failed to process.
Steps 7 and 8: test, launch and rehearse the rollback
Step 7: Access and data protection testing
Owner: a second developer as reviewer. Time: 3 to 5 days.
Create test accounts for every role in two organisations and try each action in the policy matrix across the boundary. OWASP recommends unit and integration tests for authorisation logic; we would keep these cross-tenant tests in the pipeline so a later change cannot quietly break them.
- Check: requests made with the service key never carry user input, since that key bypasses RLS.
- Check: the firm has a processor contract with each vendor holding client data. GDPR Article 28 requires one, and requires the data to be deleted or returned at the end of the service.
- Check: the incident plan names who tells the firm about a breach. Under Article 33, a controller notifies the supervisory authority within 72 hours where feasible, and a processor must tell the controller without undue delay.
Step 8: Launch, rollback drill and handover
Owner: lead developer with the client sponsor. Time: 3 days, then two weeks of close support.
Rehearse one rollback on staging before launch day. Vercel's Instant Rollback points the domains back at an earlier production deployment in seconds, but environment variables stay as they are, and auto-assignment of production domains is switched off until someone promotes a deployment again. Hobby plans can roll back only to the previous deployment; Pro and Enterprise can choose any deployment that was previously live.
| What broke | First move | Watch for |
|---|---|---|
| A screen or bug in code | Vercel Instant Rollback | New pushes will not go live until a deployment is promoted |
| A migration that changed data | Point-in-Time Recovery to just before it | The project is unavailable during the restore |
| A deleted or overwritten file | Restore from the separate file backup | Database backups hold only file metadata |
| A changed environment variable | Revert the value, then redeploy | Rollback does not touch environment variables |
| A billing webhook failure | Fix forward, then replay events from Stripe | Rolling back code does not change Stripe state |
Source: Vercel Instant Rollback documentation, Supabase Database Backups documentation, Stripe customer portal documentation, read 2026-11-17
Ship migrations in two parts: add new columns or tables in one release, remove old ones in a later release, so the previous code still runs if you roll back between them.
| Plan | Daily backups kept | Point-in-Time Recovery |
|---|---|---|
| Free | Not listed; export with the CLI yourself | Not available |
| Pro | 7 days | Add-on, about $100 a month for 7 days |
| Team | 14 days | Add-on, about $200 a month for 14 days |
| Enterprise | Up to 30 days | Add-on, about $400 a month for 28 days |
Source: Supabase Database Backups documentation, read 2026-11-17
Supabase's production checklist recommends Point-in-Time Recovery once a database is expected to pass 4 GB. For a portal holding client records, we would turn it on at launch regardless of size.
How to use this playbook
Copy the overview table into the project tracker, one row per step, with the owner's name in place of the role. Do not start a step until the previous exit check is ticked, except steps 4 and 5, which can overlap. Keep this page versioned: when a vendor changes a limit or a step's time budget proves wrong, add a dated line below.
| Version | Date | Change |
|---|---|---|
| 1.0 | 2026-11-23 | First published. All vendor limits checked against documentation on 2026-11-17. |
We build applications like this in Next.js, and we would adapt the time budgets to each client's scope before quoting. Our web apps service page explains how we scope a portal build.


