Take a look around.
ReactJS / Application structure

A public website and a staff app have different jobs

By Lan T.5 min read

A public page helps someone understand the product and decide what to do next. A staff app helps an authorized person work with particular records. They can share components, but each needs a clear answer to who can read its data, change it and review the result.

Diagram: name the audience, then map the pages, then protect staff data, then review both journeys.
Plan public discovery and protected staff work around the people using each experience.Open the full diagram ↗

Start with the reader and their task

A service page and a member record can both be built with React. That does not give them the same requirements. The service page needs useful content before the visitor starts interacting. The member record needs the right person’s data, the right permissions and clear feedback when an action changes something.

I would map those tasks before deciding which pieces belong in one application. A public catalogue might reuse a product model with a staff tool, while returning a much smaller set of fields. Sharing a database is not a reason to give both screens the same API response.

ExampleReader and taskBoundary to agree
BeeMVP service, case or noteA visitor assessing the workPublic, prerendered content with its own canonical URL
RoleHarbor product introductionA visitor learning how the system worksPublic introduction at roleharbor.beemvp.com/
RoleHarbor member demoA visitor choosing a packageStripe test catalogue at /memberships; deliberately noindex
RoleHarbor /manage workspaceA visitor trying a shared test role, or authorized private staffSign-in and server permissions; deliberately noindex. Shared demo accounts have fixed security settings.
A protected staff API actionThe authorized caller making a changeSession, MFA where enabled, staff role and action checks on the server

Give public pages useful HTML

BeeMVP’s service, case and note pages are prerendered with their main copy, headings, links and structured data in the HTML. Interactive parts, such as the brief helper and screen selectors, have their own client components. Reading the offer does not depend on an animation module finishing its work.

In the Next.js App Router, layouts and pages are Server Components by default. Client Components provide browser interaction and can also contribute to the initial rendered HTML. “Uses client components” and “has no useful server-rendered content” are different descriptions; inspect the actual response before deciding what a crawler or visitor receives.

RoleHarbor’s Worker serves canonical metadata and structured data for its product introduction. Its member catalogue and staff routes remain separate from that public landing page. This is a different rendering setup from BeeMVP’s prerendered Next.js pages.

Keep staff data behind its own checks

RoleHarbor separates its product introduction, member catalogue and staff workspace. Its sign-in page now lists shared Owner, Administrator and Viewer accounts for the test workspace. A session and server permission checks still apply after sign-in. The public accounts keep staff and security settings fixed; an operational installation needs private staff accounts for those controls.

A hidden button can make a screen less confusing, but it cannot decide whether a direct request is allowed. The server needs to verify the session and the permission for the requested record or action. In Next.js, the same principle applies to a Route Handler or Server Action that performs protected work.

The shared password belongs on the demo sign-in page, not in a public page’s structured data. A public login does not turn the member and staff records into pages to index.

Share the parts that help both experiences

Buttons, formatting helpers and agreed request types can be useful shared pieces. Navigation and data-loading behaviour usually need more thought. A staff member may need filters, pagination and a selected record; a first-time visitor needs a short route to the information they came for.

RoleHarbor uses ReactJS with a Hono API running on Cloudflare Workers and PostgreSQL through Hyperdrive. BeeMVP uses Next.js to prerender public content. These are connected products with different rendering and access needs; RoleHarbor’s ReactJS application is not a Next.js staff app.

Write a page-to-user map before the route list grows

For each page, write down the reader, the task, the data it needs, who may change that data and how it should appear in search. Then add the behaviour for a missing record, an expired session or a forbidden action.

The blank map is a planning aid. It does not provide access control by itself. It helps a product owner and developer find disagreements while the page list is still small.

Review both journeys

For the public journey, read the page as a visitor: can you understand the offer, follow the evidence and reach the right contact context? Check its actual HTML, title, canonical, links and mobile layout.

For the staff journey, try the task with representative test records and each agreed role. Check direct API requests as well as controls on the screen. Confirm that an expired session or failed request does not leave the person guessing whether a change succeeded. Those are acceptance tasks to run on the target app, not outcomes supplied by this worksheet.

  • Public: useful content, correct metadata and a clear next step.
  • Staff: correct records, permitted actions and understandable failure states.
  • Shared: a documented handoff and a way to reproduce the checks.
Explore the working system

Try RoleHarbor for yourself.

RoleHarbor serves one business and one Discord server. Try the member journey or sign in as Owner, Administrator or Viewer. The demo uses Stripe test mode; no real charges are collected. Discord uses the configured demo server.

How to sign in and restore the connections
  1. Open the staff demo. The sign-in page lists the three available accounts.
  2. Choose Owner, Administrator or Viewer to fill in the email and password. Start with Viewer if you want to look around.
  3. Select Sign in. Use the workspace navigation to explore members, plans, billing and operations.
Owner
demo.owner@beemvp.comBusiness and provider settings, package-to-role mapping, room access and membership operations.
Administrator
demo.admin@beemvp.comDay-to-day membership operations, packages, billing and eligible failed-work retries.
Viewer
demo.viewer@beemvp.comRead-only access to the workspace. Changes are refused by the server.

Shared password: RoleHarbor@Demo

These public accounts keep fixed sign-in details. They cannot change staff accounts, passwords or MFA. Private staff accounts retain the full team and security controls.

Restore the default connections

Sign in as Owner, open Connections and choose Reset demo. Enter the shared password, then select Restore default connections.

This restores the saved Stripe test keys and Discord connection settings. It keeps members, payments, plans and activity. It does not undo Discord room changes, reverse payments or reset the whole workspace.

This is a shared workspace, so other visitors may change its records. Use test information when trying an editable role.

Further reading & related work

Product examples and references for the decisions in this note.

Have a similar piece of work?

Tell me who needs each page.

Tell me what you’re working on ↗

Keep reading