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 Flows access control.
- 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.
Builder certification for customer environments: If you plan to develop and deploy Flows custom apps, you must complete Builder certification. This ensures you understand security requirements, development best practices, and compliance standards for production deployments.
Install Node.js
We recommend 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. |
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.
On the first run, you’ll be prompted to install a locally trusted SSL certificate. Enter your sudo password (macOS/Linux) or confirm the browser certificate installation (Windows). This is a one-time setup.
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.
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.
- Auth API —
connectToHostApp,HostAppAPI, and helpers.