Constellation Studio docsOpen the studio

Tutorial: design a whole app on Pega in the studio

On this page
An app designed in the studio, running on a real Pega 26.1 case type, in one minute.

This tutorial builds the Recipe Capture app: a menu, a home page with your work, a case page with the life cycle, details, history, Pulse and documents, and every case screen. All of it is designed in the studio. Pega runs the cases: stages, routing, validation and data. The exported app is the front end, and it talks to Pega through the DX API v2.

Every screenshot comes from a real run against Pega Infinity 26.1 (the DIY Recipe Tracker application, case RC-44). The rule for this app: nothing is styled by hand in code. When the studio is missing a component or setting, it gets added to the studio. The menu (App navigation), the case-property fields and the upload area were added this way.

The finished case page: menu, case header, life-cycle chevrons, details read from Pega

What you will do

  1. Prepare: a case flow, Connect to Pega and a public OAuth client.
  2. Design the App shell: the menu, the theme and the page transitions.
  3. Design Home: your work.
  4. Design the Case page: header, stages, details, tasks, history, Pulse and documents.
  5. Export the app and run it against Pega.
  6. Change things in the studio and export again.

For what each component does and how to set it up, see the component reference.


1. Before you start

2. Open App pages

Open Case flows in the left rail, pick your flow and open the App pages tab.

Case flows → App pages: Home, Case page and App shell, each a studio design

The app has three pages of its own around the case screens:

Page What it is Starts with
Home (My work) What people see after signing in A greeting and My work (search + to-do)
Case page One case Case header with stages, Details, Open tasks, history beside Pulse, Documents
App shell (menu) The menu beside or above every page, a top bar, a right rail beside an open case, plus the app's theme, style and page transitions An App navigation component, containers named Top bar and Right rail

Design creates the page as a new design from studio sections and opens it. Open edits the page you picked. You can also pick any existing design. Built-in page falls back to the app's plain page.

3. The App shell: menu, theme and page transitions

Click Design next to App shell (menu).

The App shell design: the App navigation component and its menu items

Select the menu (App navigation) and edit it in Properties:

The App shell also has two areas you can fill or delete (they are found by their names in Layers):

Then give the app its look in Themes. Everything here applies to the whole app:

Themes → Style on the App shell: gradient wash, gradient buttons and expressive motion for the whole app

The app takes its look from the App shell, and so does the canvas: Home, the Case page and every step screen are drawn with the shell's theme while you design them (their own Themes panel says so and opens the shell).

4. Home

Click Design next to Home (My work). The starter has a greeting and a My work card. Its To do lists the signed-in person's assignments, most urgent first, and clicking a row opens that assignment.

You can add anything else from Components or Sections, for example:

Bound data components read Pega live in the app with the signed-in person's own access.

5. The Case page

Click Design next to Case page. When the studio is connected to Pega, the starter already names your case type's properties: a title or name property first, then the next five.

The Case page design: Details lists Recipe title, Cuisine type… each with its Pega property

What each part shows in the app:

Component In the app
Case summary The open case's name, ID, status and urgency, the fields you name, then the stage, when it was created, who created it and when it was updated; a Follow this case button below it (Pega notifies followers)
Case stages The case type's stages as chevrons, with the current stage highlighted
Details Exactly the fields you list, read from the case
To do (Open tasks) What is waiting on this case and who has it. Rows you can work open the assignment
Timeline bound to D_pyWorkHistory with CaseInstanceKey = @P .pzInsKey The case history
Pulse The case conversation: post, reply, like, and @mention people (typing @ suggests people from Pega). Turn off Like & reply actions in its options to hide them
Attachments The case's files; click one to download it
File upload (with no Pega property) Adds files to the case
Tags (with no Pega property) The case's tags: add (spaces become hyphens, since Pega refuses spaces) and remove with ×
Related cases Cases linked to this one, each opening its case, and a box to relate another by ID

Naming a field's property. In Case summary and Details, each line of Fields is:

Label | Sample value | .Property

For example:

Recipe title | Lemon tart | .RecipeTitle
Cuisine type | Italian | .CuisineType

Why the app asks Pega twice. Pega's case read (GET cases/{ID}) only returns the properties of the case's default view. So the app also reads the properties your page names from the case type's list data view (D_<CaseType>List), for the open case only. That is how Cuisine type shows below although it is not on the default view.

Arrange the sections however you like. Columns stack on narrow screens by themselves. Check the page at 768 and 390 px in the toolbar.

6. Export and run

  1. In Case flows, click Export app and then Download .zip.

  2. Unzip it, open a terminal in the folder and run:

    npm install
    npm run ui:add          # the shadcn/ui parts the screens use
    cp .env.example .env.local
    
  3. In .env.local, set:

    • VITE_PEGA_SERVER: the Pega URL with the application path, e.g. https://pega.example.com/prweb/app/diy-recipe-tracker;
    • VITE_PEGA_CLIENT_ID: the public OAuth client.
  4. Run npm run dev -- --port 5174 (the port must match the client's redirect URI) and Sign in with Pega.

Home lists your real work, inside the designed menu, theme and background:

Home in the exported app: the designed menu and the signed-in person's assignments

My cases → a case opens the designed case page with Pega's data:

Further down, the history comes from Pega, Pulse posts are saved in Pega, and files added in Documents are attached to the case:

Documents: a file uploaded from the page is attached to the case; history and Pulse above come from Pega

Pulse works like Pega's own: reply under a message, like it, and type @ to mention someone (Pega suggests people, and the mention reaches them as a Pega notification). Your own messages also show Edit (the message is then marked edited) and Delete, which asks "Delete for everyone?" first. Follow this case sits under the case summary.

Pulse in the exported app: a liked message, a reply that mentions Recipe Tester, Follow this case

At the bottom, the case's tags and related cases. Pega relates only case types that are set up for it: in App Studio, open the case type → Settings → Related case types and add the case types it may relate to (Recipe Capture lists Recipe Capture and Recipe Sharing). Without that, relating shows Pega's own message, "Case type is not related". Each related case opens its case page; × removes the relation and leaves the case itself alone.

Tags and related cases on the case page: tags added from the app, and Pega's own related cases

Edit under Details changes the case's fields right on the page. The app opens the case's own Edit details action (pyUpdateCaseDetails, the same one as Pega's "Edit details"), so the fields you can change are the ones in the case type's Edit view in App Studio (Other views → Edit); the others stay read-only. Pega's picklists become dropdowns, numbers and dates their own controls. Save sends only what changed, guarded by the case's eTag, and Pega runs its validation; its message shows under the fields if it refuses. Turn the button off with the Details component's Edit button option.

Details in edit mode on RC-44: Pega's Edit view fields as controls, Save and Cancel

A step as a conversation. Put a step's fields inside a Conversation component in its design, and the app asks them one at a time: typed answers, choice buttons, Yes/No, dates and an attachment question whose files go straight to the case. A summary with Change links ends it; the step's own Submit sends the answers to Pega like a form. The Recipe app's RecipeCaptureDate keeps its own value even when Pega's Edit details saves another one, so that one field is set by a rule in the app, not by the screen.

Enter Recipe Details as a conversation: answers, the attached notes and the summary before Submit

Go on a task opens that step with the screen designed for it in the case flow. The screens are the ones you designed or recorded, and steps without a design use a form generated from Pega's own view.

7. Change it and export again

Change any page or screen in the studio and click Export app again. Don't edit the generated files: they are the output of the designs, and the next export replaces them. The exported README.md lists which files come from which page.

What is live and what is not yet

Live from Pega:

A Pega region or Pega's own widgets cannot be placed in the exported app: it is not a Pega portal. For pages inside Pega's own portal, publish the components instead (see Publishing components).