CLI

Create an app with create-ovok

Start a Turborepo with an Ovok web app and mobile app, wired to your project, in one command.

Complexity: 1 of 5 · Clients: Web (@ovok/core), React Native (@ovok/native) · Time: 5 minutes

create-ovok creates a workspace, installs it and makes its first git commit. Its apps already know your Ovok API and tenant. AI coding agents in it get the Ovok rules and the Ovok MCP server.

Set upConsole

You need:

  • Node.js 22.12 or later, and pnpm. If pnpm --version fails, run corepack enable pnpm.
  • Your project's tenant code. Find your tenant code, or start with the example tenant public-example.
  • For the mobile app, Xcode to build for iOS or Android Studio to build for Android.

Create the workspaceClient-side

Run create-ovok with your project's name:

npm create ovok@latest my-app

It asks which apps to start with. The recommended setup is a web app and a mobile app for iOS and Android, against https://api.sandbox.ovok.com and the tenant public-example. Choose to set each part yourself to enter your own tenant code.

To skip the questions, answer them with flags:

npm create ovok@latest my-app -- --platform mobile-web --tenant {{TENANT_CODE}} --yes
  • --platform picks the apps: web, mobile or mobile-web.
  • --tenant sets the tenant code the apps send.
  • --yes takes the recommended setup for every question no flag answered.

The create-ovok reference lists every flag. With pnpm, run pnpm create ovok my-app.

Verify your integration

create-ovok ends with the next steps to run. The workspace holds:

PathWhat it holds
apps/webA Vite and React app that signs in a practitioner and lists up to ten patients
apps/mobileAn Expo app that signs in a patient
.envOVOK_BASE_URL and OVOK_TENANT_CODE, which every app reads
.mcp.jsonThe Ovok MCP server, for AI coding agents
AGENTS.md, CLAUDE.mdThe Ovok rules, for AI coding agents

If the install failed, the workspace stays in place. Run pnpm install in it once the cause is fixed.

Run the web appClient-side

Start every app in the workspace:

cd my-app
pnpm dev

Open the URL Vite prints, such as http://localhost:5173. Sign in with a practitioner account of your project.

Verify your integration

You should see a list headed Patients with up to ten names. If you don't:

  1. Check that OVOK_TENANT_CODE in .env is your project's tenant code.
  2. Check that the account is a practitioner of that project.
  3. Restart pnpm dev after you change .env.

Run the mobile appClient-side

The mobile app is an Expo development build. Build it once for a simulator or a device:

cd apps/mobile
pnpm ios

Run pnpm android to build for Android instead. Sign in with a patient account of your project.

Test your integration

  1. Sign in to the web app with a practitioner account.
  2. Sign in to the mobile app with a patient account.
  3. Try each scenario below.
ScenarioHow to triggerExpected result
A practitioner signs inSign in to the web app with a practitioner of your projectThe Patients list shows up to ten patients
A wrong passwordSign in to the web app with a wrong passwordThe form shows the error Ovok returns
A second factorSign in with an account that has a second factor turned onThe app says the account needs a second factor
A patient signs inSign in to the mobile app with a patient accountThe app shows Signed in.

Optional: Add an app or a packageClient-side

pnpm turbo gen app
pnpm turbo gen package

turbo gen app asks for the app's name and platform and adds it to apps/. turbo gen package adds a shared package to packages/.

Optional: Refresh the Ovok rulesClient-side

After you update create-ovok, rewrite the Ovok block of every AGENTS.md:

pnpm turbo gen agents

It replaces only the text between BEGIN:ovok-agent-rules and END:ovok-agent-rules. The rest of each file is yours.

See also

Last updated on

On this page