This setup runs OpenKey and Secret Manager locally. By default, encrypted KV
and SQL requests still use the TinyCloud development node at
https://node.tinycloud.xyz.Prerequisites
- Bun 1.2 or later
- A Chromium-compatible Playwright browser
- Local
openkeyandsecret-managercheckouts in sibling directories
Create the local environment files
From thesecret-manager checkout:
http://127.0.0.1:5173.
Both generated .env files are ignored by Git. Do not replace their test-only
values with production credentials.
Prepare both repositories
Still fromsecret-manager:
@openkey/db from their built output. db:push
initializes the local PGlite schema and generates the Prisma client.
Run the end-to-end smoke test
The test uses a public Anvil development key through OpenKey’s normal external
wallet path. A passing run proves that the local widget discovered the wallet,
the wallet signed the TinyCloud SIWE request, and Secret Manager could write,
reload, decrypt, and delete its placeholder secret.
To watch the browser interaction:
Interactive development loop
For hot reload, prepare the repositories once as above, then run each process in a separate terminal. Fromopenkey:
openkey in a second terminal:
secret-manager:
http://127.0.0.1:4187/app. If the first OpenKey widget request falls
back to a popup while Vite performs its cold compile, wait for the OpenKey web
server to finish and retry the connection.
Troubleshooting
The OpenKey API cannot resolve @openkey/db
The OpenKey API cannot resolve @openkey/db
Run
bun --cwd ../openkey run build from Secret Manager, or bun run build
from OpenKey, before starting the API.Playwright says a web server exited early
Playwright says a web server exited early
Confirm ports
3001, 5173, and 4187 are free and that both .env files
were created from the checked-in templates.The widget does not offer the test wallet
The widget does not offer the test wallet
Run the checked-in
test:smoke flow. Its Playwright bootstrap installs the
wallet before application scripts execute and asserts that OpenKey received
hasEoa=true.Secret Manager stays on Preparing TinyCloud session
Secret Manager stays on Preparing TinyCloud session
Verify that
VITE_TINYCLOUD_HOST is reachable. The default smoke flow needs
network access to https://node.tinycloud.xyz.