Routing & navigation
Piral uses React Router v6. There's a single router, owned by the app shell — pilets don't configure it, they contribute to it. Each registerPage call adds a route at runtime, so the application's full route table is assembled from every pilet that happens to be loaded. Inside a pilet's own components you use the ordinary React Router hooks and components (useParams, Link, useNavigate, …); they work unchanged because the pilet renders within the shell's router context.
Registering routes
Route parameters
Navigation links
Programmatic:
Menu items
Routes make a page reachable by URL; menu items make it reachable by clicking. A pilet registers entries into named menu zones, and the shell's layout decides where each zone renders — so a pilet adds navigation without knowing anything about the shell's chrome:
Shell renders them at: <Menu type="general" /> and <Menu type="admin" />
Route guards
A guard is just conditional rendering inside the page component — redirect when the user isn't allowed in. Remember this only hides UI; enforce real access on the server and, ideally, with feed-level targeting so unauthorized users never receive the pilet at all.