Create your first Ovok app
Scaffold a web and mobile workspace connected to the Ovok sandbox, sign in, and list your project's patients.
- Complexity
- 1/5
- Clients
- Web, React Native
- Time
- 10 minutes
create-ovok sets up a Turborepo with a web app, a mobile app or both, already connected to your Ovok project. The
web app signs a practitioner in and lists the project's patients, so you can see data flow end to end before you
write any code.
Set upConsole
You need:
- Node.js 22 or newer and pnpm.
- An Ovok project and its tenant code. Set up your project shows where to find it.
- A practitioner account in that project, to sign in to the web app.
- For the mobile app, Xcode or Android Studio to build the development client.
Create the workspaceTerminal
Run create-ovok with the name of your workspace folder:
pnpm create ovok my-appIt asks for the apps you want and your tenant code, then installs dependencies and makes the first git commit. The recommended setup creates a web app and a mobile app for iOS and Android, pointed at the sandbox.
Flags answer the questions up front, which is useful in scripts:
| Flag | Answers |
|---|---|
--platform web|mobile|mobile-web | The apps to start with |
--type ios|android | One mobile platform instead of both |
--tenant {{TENANT_CODE}} | Your Ovok tenant code |
--base-url https://api.sandbox.ovok.com | The Ovok API URL |
--yes | Every other question, with the recommended setup |
--skip-install | Leaves pnpm install to you |
--disable-git | Leaves the folder without a git repository |
The result:
apps/holds the apps you chose..envsetsOVOK_BASE_URLandOVOK_TENANT_CODEfor every app..mcp.jsonregisters the Ovok MCP server, so coding agents in the workspace can read your project.- Each app has an
AGENTS.mdwith the Ovok rules for coding agents, and aCLAUDE.mdthat imports it.
Start the web appClient-side
cd my-app
pnpm devThe web app creates one client for the whole app from .env:
import { Ovok } from '@ovok/core/next';
export const ovok = new Ovok({
baseUrl: import.meta.env.OVOK_BASE_URL,
tenantCode: import.meta.env.OVOK_TENANT_CODE,
fhirPath: '/fhir/R4/',
});Sign in with your practitioner's email and password. The app calls ovok.auth.login and then searches the project's
Patient resources.
Verify your integration
You should see a list of up to 10 patients from your project, or an empty list in a new project. If you don't:
- Check that
.envhas your tenant code andhttps://api.sandbox.ovok.com. - Check that the account is a practitioner in that project.
- Look up the error the app shows in Errors.
Start the mobile appClient-side
The mobile app runs in an Expo development client, which you build once per platform:
cd apps/mobile
pnpm ios # or: pnpm androidAfter the first build, pnpm dev starts the bundler and the installed client reloads as you edit.
Test your integration
- Start the web app and sign in as a practitioner.
- Create a patient in the project, for example with the Slim API.
- Sign in again and check the new patient appears.
| Scenario | How to trigger it | Expected result |
|---|---|---|
| Signed in | Valid practitioner email and password | The patient list |
| Wrong password | Any other password | An error message; no list |
| Second factor needed | An account with MFA on | A note to finish with ovok.auth.verifyMfa |
Optional: Grow the workspaceTerminal
Add apps and shared code with the generators create-ovok installed:
pnpm turbo gen app # add a web or mobile app
pnpm turbo gen package # add a shared package
pnpm turbo gen agents # refresh the Ovok rules in every AGENTS.mdSee also
Last updated on