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 --versionfails, runcorepack 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-appIt 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--platformpicks the apps:web,mobileormobile-web.--tenantsets the tenant code the apps send.--yestakes 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:
| Path | What it holds |
|---|---|
apps/web | A Vite and React app that signs in a practitioner and lists up to ten patients |
apps/mobile | An Expo app that signs in a patient |
.env | OVOK_BASE_URL and OVOK_TENANT_CODE, which every app reads |
.mcp.json | The Ovok MCP server, for AI coding agents |
AGENTS.md, CLAUDE.md | The 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 devOpen 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:
- Check that
OVOK_TENANT_CODEin.envis your project's tenant code. - Check that the account is a practitioner of that project.
- Restart
pnpm devafter 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 iosRun pnpm android to build for Android instead. Sign in with a patient account of your project.
Test your integration
- Sign in to the web app with a practitioner account.
- Sign in to the mobile app with a patient account.
- Try each scenario below.
| Scenario | How to trigger | Expected result |
|---|---|---|
| A practitioner signs in | Sign in to the web app with a practitioner of your project | The Patients list shows up to ten patients |
| A wrong password | Sign in to the web app with a wrong password | The form shows the error Ovok returns |
| A second factor | Sign in with an account that has a second factor turned on | The app says the account needs a second factor |
| A patient signs in | Sign in to the mobile app with a patient account | The app shows Signed in. |
Optional: Add an app or a packageClient-side
pnpm turbo gen app
pnpm turbo gen packageturbo 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 agentsIt 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