Guides

Client Portal Build: The Playbook, Step by Step With Owners, Times and Rollback Notes (2026)

Eight steps to build a client portal in Next.js and Supabase, each with an owner, a time budget, an exit check and a rollback note, plus a changelog.

Summarize with AI
Octo Agency cover: Client Portal Build, with a purple hexagon pattern

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.

Client portal build steps, owners, time budgets and exit checks
StepOwnerTime budgetExit check
1. Scope the first releaseClient sponsor with product lead3 to 5 daysOne-page scope signed, roles listed, exclusions written down
2. Model tenants, roles and dataLead developer3 to 4 daysEvery table has RLS on and a policy matrix exists
3. Sign-in and sessionsLead developer3 to 5 daysCustom SMTP live, every server action checks the session
4. Documents and filesLead developer4 to 6 daysPrivate bucket, upload rules enforced, file backup in place
5. Core screensDesigner with front-end developer8 to 12 daysClient users complete the three main tasks unaided
6. Billing, if in scopeLead developer2 to 4 daysStripe customer portal linked, webhooks tested
7. Access and data protection testingSecond developer as reviewer3 to 5 daysCross-tenant tests pass, processor contract signed
8. Launch, rollback drill and handoverLead developer with client sponsor3 days plus 2 weeks of supportRollback 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.

Example policy matrix for a first release
RoleOwn organisation's recordsOther organisations' recordsInvoicesPortal settings
Client userRead, create requestsNoneRead ownNone
Client adminRead, create, invite usersNoneRead and pay ownOwn organisation only
Firm staffRead and update assigned clientsAssigned clients onlyReadNone
Firm adminAllAllAllAll

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.

Rollback decisions by what went wrong
What brokeFirst moveWatch for
A screen or bug in codeVercel Instant RollbackNew pushes will not go live until a deployment is promoted
A migration that changed dataPoint-in-Time Recovery to just before itThe project is unavailable during the restore
A deleted or overwritten fileRestore from the separate file backupDatabase backups hold only file metadata
A changed environment variableRevert the value, then redeployRollback does not touch environment variables
A billing webhook failureFix forward, then replay events from StripeRolling 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.

Supabase database backup options by plan
PlanDaily backups keptPoint-in-Time Recovery
FreeNot listed; export with the CLI yourselfNot available
Pro7 daysAdd-on, about $100 a month for 7 days
Team14 daysAdd-on, about $200 a month for 14 days
EnterpriseUp to 30 daysAdd-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.

Playbook changelog
VersionDateChange
1.02026-11-23First 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.

Frequently asked questions

How long does it take to build a client portal?

By our planning estimate, a first release for one firm, with sign-in, documents, requests, messages and optional billing, takes about seven to nine working weeks across eight steps. Single sign-on with each client's identity provider, two-way CRM sync or per-document permissions add time. The steps that should not be compressed are the data model and the access testing, because OWASP's 2025 data found broken access control in every application it tested.

What is the biggest security risk in a client portal?

One client seeing another client's data. OWASP ranks broken access control first in its Top 10:2025 and maps 40 weaknesses to it. The fix is structural: an organisation ID on every row, Row Level Security on every table, deny by default, and authorisation checked on every request, including file downloads. Then test it with accounts from two organisations trying each action across the boundary, and keep those tests running in the pipeline.

Can you roll back a client portal release?

Code, yes. Vercel's Instant Rollback points the domains back to an earlier production deployment in seconds, on Pro and Enterprise to any previously live deployment. Data is separate. A rollback does not undo migrations, environment variables or Stripe state, so ship migrations in two parts and keep Point-in-Time Recovery on. Supabase documents a worst-case recovery point of two minutes for it, with downtime during the restore.

Do Supabase backups include uploaded files?

No. Supabase's backup documentation says database backups contain only metadata about Storage objects, so restoring an older backup will not bring back a file deleted after it. Pro projects keep seven days of daily database backups, Team 14 and Enterprise up to 30. For a portal that stores contracts, statements or reports, set up a separate file backup and soft-delete documents for a period before removing them for good.

Should a client portal use Stripe's hosted customer portal?

For most firms, yes. It handles payment methods, billing details, invoice downloads, and subscription changes and cancellations without custom screens. Check the limits first: Stripe's documentation says it cannot run inside an iframe, offers at most 10 products when switching plans, and allows cancelling but not updating subscriptions with multiple products, usage-based prices or trials. If your billing needs any of those, budget for custom screens.

Sources

  1. A01:2025 Broken Access Control OWASP Top 10:2025
  2. Authorization Cheat Sheet OWASP Cheat Sheet Series
  3. File Upload Cheat Sheet OWASP Cheat Sheet Series
  4. Row Level Security Supabase Docs
  5. Storage Access Control Supabase Docs
  6. Production Checklist Supabase Docs
  7. Database Backups Supabase Docs
  8. Branching Supabase Docs
  9. How to implement authentication in Next.js Next.js documentation, Vercel, 2026
  10. Performing an Instant Rollback on a Deployment Vercel Docs, 2026
  11. Provide a customer portal to your customers Stripe Documentation
  12. Web Content Accessibility Guidelines (WCAG) 2.2 W3C, 2024
  13. Art. 28 GDPR: Processor gdpr-info.eu, Regulation (EU) 2016/679, 2016
  14. Art. 33 GDPR: Notification of a personal data breach to the supervisory authority gdpr-info.eu, Regulation (EU) 2016/679, 2016

Tags

  • Client portals
  • Web apps
  • Next.js
  • Process
Veljko Nikolic

Veljko Nikolic

Founder, Octo Agency

Veljko runs the build side of Octo Agency. He has shipped marketing sites for B2B teams in legal tech, health and manufacturing, and writes about what survives contact with a real review cycle.

Mihajlo Stojanovic

Reviewed by

Mihajlo Stojanovic

Co-founder, Octo Agency

Mihajlo runs the technical side of Octo Agency: Webflow builds, custom backends and the systems that keep a site editable after launch. He has shipped more than twenty Webflow sites a year as a white-label partner and writes about what survives contact with a real marketing team.