Run the app locally (for developers)¶
The app is a Vue 3 frontend with a small Node server side (the context proxy, sign-in, the AI relay and the change log). Locally the Vite dev server runs the same server side as a plugin.
cd src/VirtufinApp
npm install # @virtufin/* come from the Gitea npm registry (.npmrc, token from VIRTUFIN_REGISTRY_TOKEN)
npm run dev # http://localhost:3000
The contexts come from ~/.config/virtufin/api/contexts.toml, the same file the TUI and
the notebooks read (VIRTUFIN_CONTEXTS_FILE names another). Pick the starting context with
VIRTUFIN_CONTEXT:
A minimal contexts.toml:
[[contexts]]
name = "demo"
description = "medusa demo"
api_host = "api.virtufin.com"
api_port = 443
tls = true
api_key = "..." # or VIRTUFIN_API_KEY in the dev server's environment
protected = false
Without the sign-in settings (VIRTUFIN_APP_OIDC_ISSUER and the others, see
Architecture) the dev server signs no one in and everyone is
an admin: the header shows no sign-in (dev). With them set, the dev server signs in as
the deployed one does.
scripts/run_app.sh starts the backend (api, WorkManager) through the sibling
deploy-local repo and the frontend together. Build, typecheck and tests are in the repo
README (docs/README.md).