Prototype

Walkthrough starter

The starter opens a sample workspace in a new tab. Open a project, check a task, then use browser Back and Forward. Reload on the project screen to see the local fixtures reset while the same project stays open.

Copy a new prototype

From the repository root, choose a short, unused lowercase slug such as my-flow. Check both the route folders and the prototypes array in apps/studio/src/lib/prototype-navigation.ts. If the flow already exists, edit its folder. For a new flow, run this block with your chosen slug. The copy runs only when the new directory is created successfully.

prototype_dir='apps/studio/src/app/(products)/prototypes'
prototype_slug='my-flow'
mkdir "$prototype_dir/$prototype_slug" && cp -R "$prototype_dir/starter/." "$prototype_dir/$prototype_slug/"

The new folder sits beside starter/. The sibling (catalog)/ route group owns the Studio directory and its sidebar. Product routes sit outside that group so their screens fill the tab.

Make it your flow

  • Set the product’s browser title in page.tsx. Replace the sample workspace in _components/Walkthrough.tsx with the product shell.
  • Put screen UI in _screens.tsx, mock data in _data.ts, and prototype-only controls in _components/. Import images from a local _assets/ folder when needed.
  • The starter uses stable fragment IDs for screens. For example, /prototypes/my-flow#support opens the copied support project. Its links are relative to the current route, so copying or renaming the folder preserves navigation. Keep interactive edits in the shared walkthrough component when they need to survive moving between screens.
  • Import shared components from @sarvam/life and compose them with Tailwind utilities. Keep new UI local until a separate componentization pass.

Register and run

Add a single entry to the prototypes array in apps/studio/src/lib/prototype-navigation.ts. The slug matches the folder name. The title and description are what reviewers see in Studio.

{
    slug: "my-flow",
    title: "Team onboarding",
    description: "Invite a teammate and review their workspace access.",
},

Start Studio with pnpm --filter studio dev from the repository root, or use the running dev server. Open /prototypes at its printed origin and launch the entry. The registry also feeds the sidebar and search. A direct URL can work before registration, so verify discovery by title as well as the route itself.