Skip to content
← Blog

How to build a customer portal with Claude

Build a customer portal with Claude: your customers sign up with their email, see only their own orders, invoices, or tickets, and upload files, while your team manages everything from a separate invite-only admin app. Steps, config, and the rules to give Claude.

floo team

TL;DR

To build a customer portal with Claude, describe what each customer sees, how a signed-in email maps to a customer account, and what they can change. On floo, [managed.default.users] gives the portal sign-up and sign-in for your customers, stored in your Postgres. Claude writes the pages and the rule that every query filters by the signed-in customer.

  • Customers sign in with email and password on your app's domain, or Google with your own OAuth app.
  • One rule matters most: every read and write is scoped to the signed-in customer.
  • Keep the team's admin screens in a separate invite-only app.

A customer portal is the app that ends "can you send me a copy of that invoice" emails. Customers sign in, see their orders, download documents, and open a request. Claude can build one in an afternoon. The part to get right is not the pages. It is that customer A never sees customer B.

1. Describe the portal

Build a customer portal. Customers sign up with their work email. A customer account has many users; match a user to an account by email domain, or when our team links them to one from the admin side. A user who matches no account sees a "waiting for access" page. Signed-in users see their account's orders, invoices as PDFs, and support requests. They can open a new request and attach files. Every query must filter by the user's account. Write a test that signs in as users from two accounts and checks neither can read the other's orders, even by changing an ID in the URL.

The last two sentences are the ones to keep in every prompt about the portal.

2. Give it sign-in, data, and files

[app]
name = "portal"
access_mode = "public"

[managed.default]
type = "postgres"

[managed.default.users]
methods = ["email_password"]
signup = "open"

[managed.files]
type = "storage"
  • [managed.default.users] turns on sign-up and sign-in at /api/auth on the portal's domain. Users live in your Postgres, in a floo_auth schema.
  • [managed.files] gives the portal a private bucket for invoices and attachments. Files go out through signed links that expire.
  • access_mode = "public" is right here: the portal decides which pages need a signed-in user, not floo's gateway.

If only existing customers should get in, set allowed_email_domains to their domains, or keep sign-up open and let the portal show nothing until a user is linked to a customer account. Don't use signup = "closed" for this: it blocks every new account, including your customers'. Google sign-in needs your own OAuth app per environment; see User accounts.

3. Keep the admin side separate

Your team needs to see every account, fix an order, and answer requests. Put that in a second app with invite-only team sign-in (access_mode = "accounts"). It reaches the portal's data through an API route protected by an app API key. Customers can't sign in to the admin app at all, so the admin screens never depend on the portal's checks being perfect.

4. Test it like a customer

In dev, addresses at @test.getfloo.app sign up with the code 000000, so Claude Code can create two test customers and run the isolation test on every change. Prod refuses those addresses, and dev and prod keep separate users. If you set allowed_email_domains, add "test.getfloo.app" to the list so these test sign-ups still work.

Before you send the link

  • Isolation test passes. Two accounts, neither sees the other.
  • IDs in URLs are checked. Changing /orders/41 to /orders/42 returns not found.
  • Files are signed per request. No permanent public links.
  • A custom domain. portal.yourcompany.com reads better than a platform subdomain. See custom domains.

For the sign-in options in detail, see how to add login to an app Claude built. For uploads, see how to add file uploads to an app Claude built.

Frequently asked questions

Can Claude build a customer portal?

Yes. Describe what customers should see and do, and how a signed-in customer is matched to their records. On floo, the portal gets sign-up and sign-in for customers, a Postgres database, and file storage from a few lines of floo.app.toml.

How does each customer see only their own data?

Every query filters by the signed-in customer. The portal reads the user from the session floo's sign-in service returns, looks up which customer account that email belongs to, and only returns rows for that account. Ask Claude to write a test that signs in as two customers and checks neither sees the other's data.

Should the admin side be in the same app?

Usually not. Put the team's admin screens in a second app with invite-only team sign-in, pointed at the same data through an API. Customers never reach the admin app, even with a bug in the portal's checks.

Get your app live.

read https://getfloo.com/agents.md and set me up on floo

Get an API key
Usage-based pricing. See plans →