Skip to main content
The generated portal project combines a Portal Definition workspace with local preview tooling. This guide covers the files used for Portal Definition authoring. Each authored JSON file represents one PortalResource in the graph.

Definition files

The file name is the resource slug. A display name inside the JSON does not replace that slug.

Project tooling

The installed package documentation matches the dependency versions in the project. Use it when local editor type information is unavailable.

Custom pages and route order

The project’s src/main.tsx starts the portal with createPortal from @fluid-app/portal-sdk. Keep screens, navigation and content in the Portal Definition, so admins can keep editing them in the Portal Builder. Add code only for a page the builder can’t make.
When someone opens a route, the portal renders the first match:
  1. A member type page for the viewer’s member type, at that slug.
  2. A custom page at exactly that slug.
  3. A custom page at the slug of the navigation item the route starts with. For example, customPages.reports renders /reports/2026-09 when a navigation item has the slug reports, with params set to 2026-09.
  4. A system screen at that slug.
  5. A screen from the Portal Definition, matched by its navigation item, then by slug.
  6. Page not found.
So a custom page replaces the system screen or builder screen at the same slug. Use customPages.profile to replace the built-in profile screen. A builder screen can’t replace a system screen, so give your screens slugs that system screens don’t use. A member type page doesn’t get past the rep-only rule for messages and my-site. See System screens with extra rules.

Widget files in a portal project

Company Widget Packages can also live in the generated project: These files belong to the company Widget Package workflow, not to the Portal Definition JSON contract.

Preserve generated state

Do not edit generated content to work around a failed command. Fix author-owned JSON or source, then regenerate. Preserve local changes before pull, clone, or recovery operations.