Skip to content
Logo

Local dashboard setup

Use the dashboard with the local maker network to create an account, deposit collateral, grant a bot key and open a quoting entry. Use your bot or the SDK example to publish quotes.

Before you start

  • Complete the prerequisites and 1. Start ClickHouse in Local maker testing. Keep MARGIN_FIXTURE_CLICKHOUSE_URL set in the terminal that starts the network.
  • Start a fresh network and wait for its ready message. Choose this route before running SDK setup or deposit.
  • Install Bun and Node.js 22 with npm.
  • Obtain GitHub access to the dashboard and its private package dependencies.

This walkthrough uses synthetic local keys and tokens. The default fixture links its organization to maker 401. Use the manifest's rust-owner and rust-quoter wallets with either SDK language. For a maker on another network, follow Maker onboarding with your own wallet and bot key.

1. Start the dashboard

Clone the dashboard in a separate directory:

git clone https://github.com/superis-labs/ui-flint-dash.git
cd ui-flint-dash
git fetch origin 8173d59175bf4e6efc864a5e64ebd0b5e0e25488
git checkout --detach 8173d59175bf4e6efc864a5e64ebd0b5e0e25488
git submodule update --init --recursive
npm login --scope=@superis-labs --auth-type=legacy --registry=https://npm.pkg.github.com
bun install --frozen-lockfile
bun run build:shared

Create .env.local in this checkout. Replace the placeholders with values from .cache/maker-onboarding/manifest.json in the server checkout:

VITE_SITE_MODE=dash
VITE_NETWORK_LABEL=LOCAL
VITE_REST_URL='<public_endpoint>'
VITE_REST_URLS=
VITE_PERPS_NETWORK=local
VITE_PERPS_RPC_URL='<rpc_url>'
VITE_PERPS_WS_URL='<websocket_url>'
VITE_PERPS_PROGRAM_ID='<program_id>'
VITE_ENABLE_ANALYTICS=false
VITE_SENTRY_DSN=
VITE_WALLETCONNECT_PROJECT_ID=

Run bun run dev. Open the local dashboard and keep this terminal running.

2. Sign in with the fixture email

With MARGIN_FIXTURE_CLICKHOUSE_URL set, the network launcher creates the login organization. Check .cache/maker-onboarding/organization.json in the server checkout. The default fixture has email set to maker@example.test and trader_id set to 401. If the file is missing, complete the ClickHouse and network startup steps before continuing.

  1. Open Account → Sign in and enter that email.
  2. Select Continue.
  3. Read the new login-code line in the network terminal. It includes the fixture email and code= followed by the current six-digit code.
  4. Enter that code and select Verify & sign in.
  5. After sign-in completes, select Perps → On Chain.

Check that the dashboard shows maker 401. Use the code from your current request.

3. Connect the local owner wallet

Register the disposable rust-owner wallet from the manifest with the local development signer below. This loads the fixture key into the browser page.

Register a fixture wallet through the browser console

Open the browser's developer tools on the local dashboard and select Console. Paste this snippet. When the file picker opens, select the JSON file at wallets["rust-owner"].keypair_path from the manifest:

const picker = document.createElement("input");
picker.type = "file";
picker.accept = ".json";
picker.onchange = async () => {
  const file = picker.files?.[0];
  if (!file) return;
  const { registerLocalTestWallet } = await import("/src/lib/flint/perps/localTestWallet.ts");
  const address = await registerLocalTestWallet(JSON.parse(await file.text()));
  console.info(`Local fixture wallet: ${address}`);
};
picker.click();

The console prints the wallet address. This helper is available only in local development. Repeat registration after reloading the page.

Select Connect Local fixture. Check that the connected address matches wallets["rust-owner"].public_key in the manifest.

4. Create, fund and delegate

Follow Create and fund the account:

  1. Select Review account creation to create the assigned account.
  2. In Funds, deposit a small amount of the fixture's USDC.
  3. In Delegates, paste wallets["rust-quoter"].public_key, choose Maker bot (Trade + Quote) and set an expiry.

For each action, select its Review button and check the transaction details. After Simulation passed appears, select Sign & send and wait for Transaction confirmed. Close the review to continue.

Check the account's collateral and active delegate.

5. Configure the SDK example

In another terminal, follow SDK example setup for Rust or TypeScript. Complete package access, then download and build the example. Use the existing fixture keys and these values from the same manifest:

SettingManifest value
RPC_URLrpc_url
PUBLIC_ENDPOINTpublic_endpoint
MAKER_ENDPOINTmaker_endpoint
TRADER_ID401
OWNER_KEYPAIRwallets["rust-owner"].keypair_path
QUOTER_KEYPAIRwallets["rust-quoter"].keypair_path
PERP_IDSelected perps[] entry's linear_perp_id
COLLATERAL_MINTcollateral_mint

Use the SDK configuration steps to export these values in the example's terminal. Keep OWNER_KEYPAIR set for later SDK settlement and shutdown commands. Account creation, deposit and the bot grant are complete; do not repeat SDK setup or deposit.

6. Open an entry and test quotes

  1. Run Grant quoting permission with the fixture admin key, then return to the dashboard.
  2. Select Refresh, then Markets. Find the market for your PERP_ID and select Open entry. Review, sign and send the transaction. Wait for Transaction confirmed.
  3. Follow Publish a quote, then Check a fill.

Keep the example configured for maker 401 and the same bot key throughout the test.

When finished, follow Shutdown and the local network cleanup steps. Stop the dashboard terminal with Ctrl+C.

Optional maintainer checks

The dashboard's browser regression guide describes the automated lifecycle test and its OTP capture inputs.