Skip to main content

Quick Start

In about 15 minutes you run FINOS Workspace on your own computer, write a small data backend, and put its widget on a dashboard. FINOS Workspace is self-hosted, so there is no shared instance to sign in to: you start your own first.

What you need​

  • Docker with Docker Compose.
  • Python 3, to run the script that writes the configuration.
  • A clone of the FINOS Workspace repository, for the Compose file and the configuration script.
  • For the backend: Python 3.10 or later, or Node.js 22.18 or later. Use whichever language you prefer; every example on this site comes in both.

1. Get the images​

FINOS Workspace runs from four images. Pull the released ones from Docker Hub, or build them from the clone:

The released images are public, so you need no GitHub account and nothing is built. They are built for linux/amd64, so on a computer with Apple silicon Docker runs them through emulation, which is slower. You need Docker Compose 2.24 or later, which docker compose version shows.

Write a file called .env in the root of the clone:

cat > .env <<'EOF'
COMPOSE_FILE=docker-compose.yml:docker-compose.hub.yml
WORKSPACE_VERSION=latest
EOF

COMPOSE_FILE makes every docker compose command in this guide read docker-compose.hub.yml on top of docker-compose.yml. It replaces the build of each image with the image from Docker Hub. WORKSPACE_VERSION is the tag of the images: latest is the newest release, pre-releases included. To run another release, put its tag here, including the leading v.

2. Start FINOS Workspace​

A script writes the secrets and addresses that FINOS Workspace needs. Run it from the clone, with the email address of the first administrator:

cd backend-api/backend
python3 -m scripts.create_local_env --admin-email <your-email>
cd ../..

To let the Agent answer questions, open agent/.env and set DEFAULT_MODEL and the API key of that model's provider. You can skip this for now.

Start the stack from the root of the clone:

docker compose up

Compose pulls the four images, about 250 MB, and starts the stack. The first start takes a few minutes.

The stack is ready when docker compose ps, in a second terminal, shows the API as healthy. Then set the administrator's password. The command asks for it twice:

docker compose run --rm init python -m scripts.init_users --new-password <your-email>

Open http://localhost:3000 and sign in with your email address and that password. The Apps page is empty, because no backend is connected yet.

3. Write a backend with one HTML widget​

A backend is a small web server that the FINOS Workspace API calls for your browser. It answers three requests:

  • /widgets.json describes the widgets that the backend offers.
  • /apps.json lists ready-made dashboards. This backend has none.
  • /portfolio_summary returns the content of the one widget, an HTML page.

FINOS Workspace adds theme=dark or theme=light to the widget's request, so the page can match the app's colors. The API calls the backend, so the backend needs no CORS settings; it only answers its three routes.

Create an empty directory and put this program in it:

Create a virtual environment, and install the two packages that the program uses in it:

python3 -m venv .venv
source .venv/bin/activate
pip install fastapi uvicorn

On Windows, activate the environment with .venv\Scripts\activate instead.

Save the program as main.py:

main.py
from fastapi import FastAPI, Request, Response
from fastapi.responses import HTMLResponse

app = FastAPI()

WIDGETS = {
"portfolio_summary": {
"name": "Portfolio summary",
"description": "Key figures of a sample portfolio",
"category": "Quick start",
"type": "html",
"endpoint": "portfolio_summary",
"gridData": {"w": 20, "h": 12},
}
}

METRICS = [
("Total value", "$124,563", "+5.4%"),
("Daily P&L", "$8,421", "+12.3%"),
("Active positions", "42", "+3"),
("Sharpe ratio", "0.87", "-0.05"),
]

PALETTES = {
"dark": {"background": "#0b2432", "card": "#12313f", "text": "#e7f2f8", "muted": "#9db4c0"},
"light": {"background": "#ffffff", "card": "#f2f6f8", "text": "#1a3248", "muted": "#5a7282"},
}

ROUTES = {"/widgets.json", "/apps.json", "/portfolio_summary"}


@app.middleware("http")
async def check_routes(request: Request, call_next) -> Response:
if request.method == "OPTIONS":
return Response(status_code=204 if request.url.path in ROUTES else 404)
return await call_next(request)


@app.get("/widgets.json")
def widgets() -> dict:
return WIDGETS


@app.get("/apps.json")
def apps() -> list:
return []


@app.get("/portfolio_summary", response_class=HTMLResponse)
def portfolio_summary(theme: str = "dark") -> str:
colors = PALETTES.get(theme, PALETTES["dark"])
cards = "".join(
f'<div class="card"><div class="label">{label}</div>'
f'<div class="value">{value}</div>'
f'<div class="{"down" if change.startswith("-") else "up"}">{change}</div></div>'
for label, value, change in METRICS
)
return f"""<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
body {{ margin: 0; padding: 16px; background: {colors["background"]}; color: {colors["text"]}; font: 14px/1.4 system-ui, sans-serif; }}
.grid {{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }}
.card {{ background: {colors["card"]}; border-radius: 8px; padding: 12px; }}
.label {{ color: {colors["muted"]}; font-size: 12px; }}
.value {{ font-size: 22px; font-weight: 600; }}
.up {{ color: #2e9e6a; }}
.down {{ color: #d0504f; }}
</style>
</head>
<body><div class="grid">{cards}</div></body>
</html>"""

Start it:

uvicorn main:app --port 5050

Both programs return the same responses. Check the backend in your browser: http://localhost:5050/portfolio_summary shows four cards with sample portfolio figures. Leave the backend running.

The routes are checked with OPTIONS

When you connect a backend with Validate widgets turned on, FINOS Workspace sends a plain OPTIONS request to every route and expects 204 for a route that exists and 404 for one that does not. The programs above answer that way, with the middleware check_routes in Python and the OPTIONS branch in TypeScript. Requests that a widget sends describes the check.

4. Connect the backend and add the widget​

  1. In FINOS Workspace, select Connections in the sidebar, then Connect Backend.
  2. In Name, type Quick start. In Endpoint URL, type http://localhost:5050.
  3. Select Test. The dialog finds 1 widget, 0 apps and 0 prompts. Select Add.
  4. Select Create Dashboard under My Dashboards in the sidebar, then Add widgets.
  5. Choose Portfolio summary under the category Quick start, and select Add widgets.

The dashboard shows your widget. Switch the app between dark and light mode, and the widget follows, because FINOS Workspace asks the backend again with the new theme.

If the test fails, check that the backend is still running and that the API can reach it. For an address on localhost, the stack's API container reaches your machine through host.docker.internal, and on Linux the backend has to listen on 0.0.0.0.

Next: configure the MCP Companion to build your apps​

With FINOS Workspace running and a backend connected, let your AI coding tool work with it. The MCP Companion connects AI tools, like your IDE, to your open FINOS Workspace tab, so the tool can add widgets, build dashboards and turn them into apps for you.

Configure the MCP Companion →

Afterwards, run the reference backend to see every widget type, parameter and setting in action. Features explains dashboards, widgets, apps and the Agent, and the other tutorials cover deployment and building backends in depth.