Skip to content

Client portal demo: each client sees only their own work

A working demo of a client portal built with MERN. Create an account or use a sample one, then watch the server refuse each attempt to reach another client's data.

  • Demo apps
Access check page in the client portal demo, showing seven attempts to reach data the account must not see, all blocked

This is a demo built for this portfolio, not a client’s project. Every company, person and figure in it is made up.

The problem

A client portal can look finished and still fail on the part that matters. If it only checks that someone is logged in, and not that a file belongs to them, changing one number in a link can open another client’s file. Nothing looks broken, and every normal test passes, because normal users don’t edit the address bar.

What was built

A client portal where clients follow their projects, sign off work, message the team, share files and download their documents and invoices. Agency staff see every client, and the portal can carry the agency’s own name and colour.

People sign up and confirm their email address. A new account starts with no access to anyone’s work until an admin gives it a role: Admin, Staff, Client or Customer. An admin can also suspend an account, which locks it out on its next click.

Passwords can be reset by an emailed link, and anyone can turn on two-step sign-in with an authenticator app. Uploaded files are checked by their content, not their name, and only people on that project can download them.

Every database query is limited to the signed-in user’s records. Another client’s record gets the same answer as one that doesn’t exist. Refused attempts are written to an activity log that staff can read. Any role not on the allowed list sees nothing at all.

The Access check page shows this in the open. Sign in as a client and your browser sends real requests trying to reach another client’s data, and you see each answer from the server. Try the demo or read the code on GitHub.

Why it matters

We use AI tools, including Claude Code, to build faster, and we treat what they write as a draft. The automated tests mostly cover what must not happen. To prove those tests work, 74 protections were broken on purpose, one at a time, and the tests now catch every one.

A real portal would also need real email, file storage with virus scanning, and card payments. This demo leaves them out because it has no real users or money. Its emails arrive in an inbox inside the demo instead.

Need something like this for a client? We can build it under your agency’s brand, and your client deals only with you. See how that works.

Start a project

Have a project in mind?

Tell me what you are building. You will have a reply within twelve hours with scope, a price and a timeline.