Skip to content

Environment Setup

This guide is for contributors working inside the SciFlow monorepo.

Prerequisites

  • Node.js 22 (use nvm install 22 && nvm use 22 or equivalent).
  • npm – the workspace relies on npm workspaces; PNPM/Yarn are not supported.
  • Python 3.11 + pip – only needed if you want to build the MkDocs site locally (python3 -m venv .venv && pip install -r docs/requirements.txt).

One-time install

npm install
Installs dependencies across all packages because Nx + npm workspaces hoist what they can.

Repo Structure (Highlights)

  • packages/editor/core – ProseMirror runtime, features, command system.
  • packages/editor/start – Web component wrapper, demo assets, Lit-based helpers.
  • packages/schema – Shared schema definitions.
  • docs – MkDocs configuration + markdown sources.

Core Nx Commands

Command Purpose
npx nx run-many -t lint test build typecheck Local equivalent of the CI gate.
npx nx test @sciflow/editor-start Run Vitest unit tests for the web component.
npx nx bundle @sciflow/editor-start Produce the distributable ES module bundle + demo assets.
npx nx serve docs Start the MkDocs dev server (requires Python deps).

Demo Loop

npx nx bundle @sciflow/editor-start
npx http-server .
# open http://localhost:8080/packages/editor/start/demo/index.html

Rebuild the bundle whenever you touch source files that feed the demo.

Need Help?

  • Run npx nx show project <name> to inspect targets and dependencies.
  • Ask in the team channel if Nx cache artifacts look stale—clearing .nx usually fixes drift.
  • Check the Docs & Tooling page for MkDocs-specific tips.