Temporal UI
Prerequisites
Temporal must be running in development.
Temporal UI requires Temporal v1.16.0 or later.
Make sure Corepack is installed and run corepack enable pnpm.
Using Temporal CLI
You can install Temporal CLI using Homebrew:
brew install temporal
You can start a Temporal server in development using the following command:
temporal server start-dev
Development
Local Development
Setup
Once you have the prerequisites going, run the following:
pnpm install
Running pnpm install will attempt to download and install the most recent version of Temporal CLI into ./bin/cli/temporal. The development server will attempt to use use this version of this Temporal when starting up.
- If that port is already in use, the UI will fallback to trying to talk to whatever process is running on that port.
- If you do not have a version of Temporal CLI at
./bin/cli/temporal, the development server will look for a version of Temporal CLI in your path.
- For Windows users, you will need to start Temporal using one of the methods listed above until we have sufficiently tested this functionality on Windows. (We would absolutely welcome a pull request.)
git submodule update
This clones the Temporal API Protos into the git submodule, which is required for local development of the UI when running against a local version of the UI server.
To run a local development version of the Svelte application via Vite, run pnpm dev. The application will run on http://localhost:3000 against a local ui-server running along with Temporal server from the temporal-cli.
pnpm dev
Alternatively, you can run pnpm dev:temporal-cli to run against the version of ui-server and Temporal server included temporal-cli.
pnpm dev:temporal-cli
Building the UI
The Temporal UI can be built for local preview. You must set the VITE_TEMPORAL_UI_BUILD_TARGET environment variable in order to build the assets. This will be set for you if you use either of the following pnpm scripts. The resulting assets will be placed in ./build by default or the directory defined by the BUILD_PATH environment variable.
You can preview the built app with pnpm run preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.
pnpm build:local
The Temporal UI can build assets for ui-server. The resulting assets will be placed in ./server/ui/assets.
pnpm build:server
Using Docker
After pulling down the lastest version of Temporal's docker-compose, you can access the UI by visiting http://localhost:8080.
If you want to point the development environment at the docker-compose version of Temporal, you can use the following command:
pnpm dev:docker
pnpm run build:docker
pnpm run preview:docker
Running UI and Temporal Server locally
- In
temporal repo, run Temporal server locally
make start
- In
ui repo, add .env.local-temporal file with the following env variables
VITE_TEMPORAL_PORT="7134"
VITE_API="http://localhost:8081"
VITE_MODE="development"
VITE_TEMPORAL_UI_BUILD_TARGET="local"
- Run UI with pnpm dev:local-temporal
pnpm dev:local-temporal
- Create namespace with CLI (Temporal server does not do this automatically unlike CLI)
temporal operator namespace create default
OSS API Development
Understanding OSS API Endpoints
When developing new features that require API endpoints for the OSS version of Temporal, the available APIs can be found in the Temporal API repository. These gRPC APIs are converted to HTTP through the ui-server's gRPC proxy.
Key Resources:
Common API Patterns:
- WorkflowService:
temporal/api/workflowservice/v1/service.proto - Core workflow operations
- OperatorService:
temporal/api/operatorservice/v1/service.proto - Administrative operations (search attributes, clusters, etc.)
- Endpoint Mapping: gRPC service methods map to HTTP POST endpoints at
/api/v1/{service}/{method}
Example:
- gRPC:
temporal.api.operatorservice.v1.OperatorService.ListSearchAttributes
- HTTP:
POST /api/v1/operator/list-search-attributes