Skip to content

Your First App

Building your first Workrock app is easy. We provide a CLI to handle the boilerplate and authentication.

  • Node.js (v18 or higher)
  • A registered Partner account on the Marketplace.

Install our command-line tool globally:

Terminal window
npm install -g @workrock/cli

Link your machine to your developer account:

Terminal window
workrock login

This will open your browser to authenticate.

We recommend starting with a Next.js application:

Terminal window
workrock create
cd my-workrock-app

Connect your local folder to an app ID registered in the Marketplace:

Terminal window
workrock link

Follow the prompts to select your application. This creates a workrock.json file.

To run your app locally and access the Workrock Core API, you need a Sandbox and a Development Token.

This creates an isolated environment seeded with mock data (Projects, Leads, Tasks):

Terminal window
workrock sandbox --create "My Dev Store"
  1. Get your Auth Token: Run this CLI command to see your token:
    Terminal window
    cat ~/.workrock/config.json
  2. Update workrock-config.ts: Update the workrock-config.ts file in your project (src/config/workrock-config.ts) with your API URL and Development Token (obtained from Marketplace Dashboard):
    export const workrockConfig = {
    apiURL: "WORKROCK_API_URL_HERE",
    devToken: "WORKROCK_DEV_TOKEN_HERE",
    }

Start the development server with the Workrock CLI wrapper:

Terminal window
workrock dev

You can now open http://localhost:3000 to verify your app is running and fetching data from the API!

Note: When you are ready to test within the Workrock OS iframe, the CLI automatically tunnels your localhost to the platform.