Flows (Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
@cognite/cli) scaffolds React applications for CDF so you can focus on product features instead of wiring authentication and build tooling. The generated stack uses TypeScript, Vite, the Cognite SDK through React hooks, and paths to deploy to CDF.
Prerequisites
Before you begin, ensure you have the following:- Node.js 20.19 or later (npm 11.10.0 or later required).
- Cursor (recommended) or another editor for TypeScript and React.
- Access to a CDF project (organization, project name, and cluster).
- App hosting capabilities assigned by your administrator in CDF groups. See Assign capabilities.
- Access to
cogniteappsdata.comin your network allowlist. If your organization uses a firewall or proxy that restricts domains, ensure this domain is allowlisted. For other URLs CDF may require, see Allowlist URLs. - A trusted local HTTPS certificate as CDF won’t load your app unless the browser trusts the dev server’s certificate. Options exist with or without admin rights.
Certification for customer environments: If you plan to develop and deploy Flows custom apps to customer environments, complete Builder certification and submit each app for application certification before deploying to production.
Set up your environment
Install Node.js
It’s recommended to use nvm (Node Version Manager) to install and manage Node.js versions.Verify installation
- Node.js upgrade
- npm upgrade
Use nvm or Homebrew.
Cursor (recommended)
Cursor is the recommended IDE for developing Flows custom apps. It provides AI-assisted coding with rules included in generated apps.- Download Cursor from cursor.com.
- Install and open the application.
- Sign in or create an account.
GitHub (optional)
For version control, create an account at github.com and configure Git:Cognite Data Fusion (CDF) access
You need:- Your organization name (for example,
your-org-name). - Your project name (for example,
your-project-name). - Your cluster (for example,
your-cluster-name).
Create and run your app
Create your app
Run:Or create the app in a specific directory:Or create in the current directory by using a special
. syntax:Fill out the parameters
You are prompted for information such as app name (pre-filled if you provided a directory), display name, description, org, project, cluster, base URL, and whether to enable spec-driven development.
| Prompt | Description | Example |
|---|---|---|
| App name | Kebab-case identifier. | my-analytics-app |
| Display name | Human-readable name. | My Analytics App |
| Description | Brief description. | Analytics dashboard |
| Org | Your Cognite organization. | your-org-name |
| Project | Your CDF project. | your-project-name |
| Cluster | Cluster subdomain. | your-cluster-name |
| Base URL | CDF cluster base URL, pre-filled from your cluster but can be changed. For private-link setups, replace with your internal URL. | https://your-cluster-name.cognitedata.com |
| Enable spec-driven development | Adds a SPEC.md file and spec-kit slash commands to your app for structured feature planning. See Spec-driven development. | yes or no. |
Optional. Capture the application brief
If you plan to deploy this app to a customer production environment, run
/flows-app-brief before you start building.The skill coaches you through persona, problem, and success criteria, then writes App-Brief.md in the repository root. Application certification requires this file.Skip this step for dev or test projects as application certification is not required there.
Open the project in Cursor
In the terminal, run the following command to open the generated folder.You can also drag the folder into Cursor.
Install and run
Install dependencies and start the development server:Your app opens in CDF when the dev server is ready.
The dev server serves your app over HTTPS using a self-signed certificate. On the first run, the browser will show a warning and CDF will display Failed to connect to Fusion host until you trust the certificate. See Trust the local HTTPS certificate for the one-time
mkcert setup, or the no-admin manual fallback.Optional: Initialize Git
Use Cursor to initialize a Git repository and make your first commit.You can also use the Source Control panel in Cursor.
Build your app
Start building your application. See the following resources and tips for help:
- Run your app locally — See the UI and behavior while you develop.
- Flows features — For a concise overview of everything the template gives you.
- Deploy your Flows app — See interactive and CI/CD options.
Deploy
Generated structure
Here is the generated structure of your app:my-analytics-app
.agents
.claude
src
App.tsx
App.test.tsx
lib
main.tsx
styles.css
app.json
AGENTS.md
CLAUDE.md
eslint.config.mjs
index.html
manifest.json
package.json
SPEC.md
tsconfig.json
vite.config.ts
vitest.config.ts
What the template includes
The tree above shows where files live. When you runnpx @cognite/cli@latest apps create, the generator also wires in the following capabilities (not only folders and config files):
- Project scaffolding — Application layout,
app.json, configuration files, and skills for AI-assisted development. - CDF authentication — Use
connectToHostApp()from@cognite/app-sdkto get an authenticated Cognite SDK inside CDF (see Auth API). - Local development — Vite with hot module replacement and HTTPS; run commands with npm. See Run your app locally.
- Data fetching — TanStack Query (React Query) is included to use with
connectToHostApp()for SDK calls. - Tests and quality — Vitest and React Testing Library, plus linting/formatting via your template’s scripts in
package.json. - Deployment — Interactive deploy from your machine or automation in CI/CD. See Deploy your Flows app.
- Manifest and CSP —
manifest.jsondeclares your app’s metadata andpermissions.networkfor allowed origins under a strict Content Security Policy. See Content Security Policy.
Further reading
- Flows features — Scaffolding, auth, Vite, tests, deploy, and data fetching at a glance.
- Run your app locally — Dev server, HTTPS, CDF iframe, and configuration.
- Deploy your Flows app — Interactive and automated deployment.
- Builder certification — Required to build Flows custom apps in customer environments.
- Application certification — Required per app before production deployment.
- Auth API —
connectToHostApp,HostAppAPI, and helpers. - Content Security Policy — Production CSP baseline and how to extend it via
manifest.json.