Skip to main content

Introduction: How Cockpit and Cardinal work together

Two complementary pieces of iCure work together to power your application. Cockpit is the admin console where you set up and manage your backend. Cardinal is the platform your application talks to at runtime through the Cardinal SDK. You use Cockpit to provision and configure things; your application then uses the Cardinal SDK every day to read and write data.

Open Cockpit

Cockpit runs entirely in your browser โ€” nothing to install. Open Cockpit โ†’ cockpit.icure.dev to register or sign in, then follow along in Register & Log In.

Bootstrap your app from a templateโ€‹

You don't have to start from a blank project. Cardinal ships ready-to-clone starters in several languages, so you can go from "account created" to "app talking to the backend" in minutes. There are two kinds:

See the Quickstart for step-by-step setup in each language. Whichever you pick, you'll plug in the values from your project's "Ready to go" step โ€” see Initialize the Cardinal SDK.

Start in Cockpit: registration creates your Environmentโ€‹

Before anything else: when you register in Cockpit, you create an Environment. The Environment is bound to your email address, and you become its only administrator with "Environment Access" โ€” full control over everything inside it. (You can later invite more administrators; additional ones can be scoped to a single project with "Project Access" instead.)

Everything you build lives inside that Environment, in a simple hierarchy:

Environment            โ† created on registration, bound to your email (you = sole Environment-Access admin)
โ””โ”€โ”€ Project โ† one application/solution and its database
โ””โ”€โ”€ Tenant โ† an isolated slice of a project (multi-tenant projects only)

The two sidesโ€‹

Cockpit โ€” the admin consoleโ€‹

Cockpit is a web app for provisioning and configuring your iCure backend. It doesn't store your medical data itself โ€” every action you take in Cockpit is performed through the Cardinal SDK against the iCure Cardinal backend. In Cockpit you:

  • create Projects (and, for multi-tenant projects, Tenants);
  • create the users your application will have (see the user types below) and the Administrators who manage the project;
  • wire up External Services (email and SMS gateways, captcha);
  • configure the Authentication Process (the email/SMS one-time code) โ€” it's what lets your application's end users register themselves and log in (it references the project's group and parent organization). Creating users in Cockpit doesn't require a process; your app's self-registration and login flows do;
  • manage Roles & Permissions, External JWT, Custom Properties, and read Metrics and storage usage.

Cardinal SDK โ€” the client libraryโ€‹

The Cardinal SDK (@icure/cardinal-sdk) is the library your application embeds (React, React Native, Python, โ€ฆ) to talk to the iCure backend. It gives you authenticated, end-to-end-encrypted access to the medical data model, organised as API namespaces โ€” among them:

All data lives inside Groups โ€” iCure's container primitive โ€” and the SDK is group-aware: most operations have a variant scoped to a specific group. That group model is exactly what Cockpit's Environment โ†’ Project โ†’ Tenant hierarchy maps onto.

User typesโ€‹

A project's users come in several types, each created from its own place in Cockpit:

  • HCP โ€” a healthcare professional (a person).
  • Organization โ€” an organizational party (e.g. a clinic or company). It's just another user type with its own creation UI โ€” not a mandatory parent of the other users.
  • Patient
  • Device
  • Custom Entities โ€” coming in the next version of Cockpit.

Each user is a data owner: the Cardinal SDK's crypto layer (Crypto, CryptoStrategies, RecoveryKey, Shamir key sharing) manages their end-to-end encryption keys, so data is encrypted on the client and only readable by the parties it's shared with.

How they cooperateโ€‹

        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ COCKPIT โ”‚ (you, to set things up)
โ”‚ Environment โ†’ Project โ†’ โ”‚
โ”‚ Tenant ยท Users ยท Auth โ”‚
โ”‚ process ยท External services โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ provisions & configures (via the Cardinal SDK)
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ iCure Cardinal backend โ”‚ (Groups hold your data, end-to-end encrypted)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ฒโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ authenticated, encrypted reads/writes
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ YOUR APPLICATION โ”‚ (every day, via the Cardinal SDK)
โ”‚ @icure/cardinal-sdk โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The typical loop:

  1. Set up the backend in Cockpit โ€” register (creating your Environment), create a Project, add your users, and configure an Authentication Process. You can create users directly in Cockpit without a process; the Authentication Process is what lets your application's end users register themselves and log in.
  2. Collect the SDK configuration values โ€” the final "Ready to go" step of project creation hands you the identifiers your application needs (project/group id, external-services spec id, authentication process id, โ€ฆ).
  3. Initialize the Cardinal SDK in your app with those values, and authenticate.
  4. Read and write data through the SDK โ€” scoped to your project (and tenant), end-to-end encrypted.
info

Cockpit and your application both talk to the same backend through the same SDK. Cockpit is the "control plane" (set-up and administration); your app is the "data plane" (everyday use).

The data model (Cockpit โ†” Cardinal)โ€‹

Cockpit gives friendly names to the underlying iCure concepts:

In CockpitIn the Cardinal SDKWhat it is
Environmenta top-level Groupcreated when you register; bound to your email; you are its sole Environment-Access admin
Projecta Groupone application/solution and its database
Tenanta Group within a projectan isolated slice of a multi-tenant project
Administratora User with admin rightsmanages the project in Cockpit (Environment- or Project-scoped access)
HCP / OrganizationHealthcarePartya healthcare professional, or an organizational party
PatientPatientan end user / subject of care
DeviceDevicea connected device
Authentication Processan auth process (email/SMS OTP)how the end users log in / register to your application

Where to go nextโ€‹

Core concepts โ€” the building blocks referenced above: Environment ยท Project ยท Tenant ยท Organization ยท HCP ยท Patient ยท Device ยท Administrators & Access Levels ยท Authentication Processes.

Cardinal SDK docs โ€” for the developer side: SDK documentation ยท How to initialize the SDK ยท The Cardinal data model ยท End-to-end encryption.

Templates & boilerplates โ€” clone a starter and go: Quickstart ยท TypeScript ยท Kotlin ยท Python ยท Dart ยท React ยท React Native ยท Flutter.