Skip to content

Pages

A page is a React component stored in the platform and rendered in the app. Two roles per entity:

RoleReplaces
View pageThe default record detail view
Create pageThe default create form

Pages are compiled at runtime, so a deploy takes effect without rebuilding the app.

Pages are ordinary React with versioned imports:

import React, { useEffect, useState } from "react@19.2.5";
import { Stack, Typography } from "@mui/material@7.3.10";
import { createController } from "platform:stdlib";
import type IssueController from "../controllers/IssueController.ts";
const controller = createController<IssueController>();
export default function IssueView({ recordId }: CustomViewProps) {
const [issue, setIssue] = useState(null);
useEffect(() => {
controller.getIssueDetail({ recordId }).then(setIssue);
}, [recordId]);
return <Stack><Typography>{issue?.title}</Typography></Stack>;
}

Versioned specifiers pin what the page was written against, so a platform upgrade cannot silently change a page’s behavior.

Data comes from controllers — a page fetches through a typed client rather than querying directly.

Pages live under guest_files/views/, with metadata in pages/_meta.json. A full deploy includes them:

Terminal window
polymesa deploy ./config

To iterate on pages alone:

Terminal window
polymesa pages deploy ./config --dry-run
polymesa pages retrieve ./config

Assign a page as an entity’s view or create page in the app’s model settings, or by deploying the entity definition that references it. Standalone pages are also reachable by their durable id, for dashboards belonging to no single entity.