Documentation Index
Fetch the complete documentation index at: https://domoinc-openapi-sync-documents.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Intro
This tutorial walks through building a shared Todo app with React, TypeScript, Redux Toolkit, and AppDB. The app is scaffolded with the DA CLI, loads the current Domo user’s identity and avatar, and stamps ownership onto every todo so users can see who added what. You’ll learn the patterns you’ll reach for in every real Domo app:
- Scaffold a Vite + React + TypeScript project with
da new - Declare an AppDB collection in
manifest.jsonand publish an initial design - Build a typed service layer over
AppDBClient,IdentityClient, andUserClient - Manage async state with Redux Toolkit’s
buildCreateSlice+asyncThunkCreator - Compose small, presentational components that read from and dispatch against the store
Prerequisite: Complete the Setup and Installation guide and run
domo login before starting.Step 1: Install the DA CLI and scaffold the app
The DA CLI clones the @domoinc/vite-react-template — a Vite + React + TypeScript project preconfigured with the Domo proxy, ESLint, Prettier, Vitest, Storybook, and
da generate scaffolding.
Install the CLI globally:
da new prompts for a package manager (pick pnpm), clones the template, writes your app name, initializes git, and installs dependencies.
The scaffold gives you:
public/manifest.json— app metadata, size, collectionspublic/thumbnail.png— thumbnail shown in the Asset Librarysrc/main.tsx— React entry pointsrc/manifestOverrides.json— per-environment manifest overrides (dev/qa/prod)- A Vite dev server wired through
@domoinc/ryuu-proxyto your Domo instance - Scripts:
start,build,upload,generate,test,storybook
Step 2: Declare the Todos collection
Replace
public/manifest.json with:
Note: AppDB columns are always
STRING. Booleans are stored as "true" / "false" and parsed at the UI layer. ownerId and ownerName give us the basis for per-user ownership displays and filters.Step 3: Publish the initial design and wire the proxy
Before local dev can read or write documents, Domo needs to provision the collection and hand you a
proxyId.
pnpm build and domo publish from the build/ folder. The output prints a link to the new App Design.
Then, in the Domo UI:
- Open the App Design link.
- Click New Card → Select Collection → Create New → Create Collection to provision an empty
Todoscollection. - Save the card.
id and the card’s proxyId from the design page, and add both to public/manifest.json:
Step 4: Types and service layer
Create
src/services/types.ts:
src/services/app.ts:
IdentityClient+UserClientgive you the current user’s ID, email, display name, role, and avatar — everything you need to stamp ownership on documents and render a friendly header.extractDocsflattens the AppDB envelope ({ id, content, createdOn, ... }) into plain todo objects, so the rest of the app never has to think about document metadata.
Step 5: Redux store with buildCreateSlice
We’ll use Redux Toolkit’s
buildCreateSlice with the asyncThunkCreator so that async thunks can be declared inline on each slice — no separate actions.ts file.
Create src/reducers/createAppSlice.ts:
src/reducers/index.ts:
src/reducers/app/slice.ts:
src/reducers/todos/slice.ts:
loadingvssaving—loadingcovers the initial list fetch;savingis toggled by creates, updates, and toggles so the form can disable its submit button without blanking the list.toggleTodotakes the whole todo (not just an ID) so the reducer can build the fullTodoDatapayload without refetching.- Selectors declared on the slice — callers never reach into
state.todos.itemsdirectly; they importselectTodosand get type safety for free.
Step 6: Components
Each component lives in its own folder under
src/components/ with a matching .module.scss. We’ll show the TypeScript; grab the SCSS from the GitHub source.
UserHeader renders the current user’s avatar, name, role, and email, with a gradient-initials fallback if the avatar URL 404s.
ownerId / ownerName from the store onto every new todo at submit time.
useEffect, surfaces any error from either slice in a banner, and renders the header, form, and list.
Step 7: Wire up main.tsx
Replace
src/main.tsx with:
DOMO_APP_NAME and DOMO_APP_VERSION are injected by the Vite template from manifest.json — useful for logging and telemetry.
Your final src/ tree:
Step 8: Test locally
proxyId is set, AppDBClient, IdentityClient, and UserClient all talk to your real Domo instance — create, toggle, and delete todos and they persist across reloads. Log in as a different user and you’ll see your name/avatar in the header and By <name> on every new todo.
Step 9: Publish
pnpm build (which lints, tests, and builds), then domo publish from the build/ folder. The new build becomes the active design. Anyone instantiating the app from the Asset Library picks it up.
Next steps
- Run
da generate componentorda generate reducerto scaffold new slices that follow the samecreateAppSlicepattern. - Add a
UserPreferencescollection with alimitToOwnerfilter to persist per-user theme or default filter — see AppDB filters. - Layer dev/qa/prod
id+proxyIdvalues withda manifestandsrc/manifestOverrides.jsoninstead of hand-editing. - Continue with AI Book Recommender or Mapbox World Map.