Run from source
Run the API, web app and MCP server locally against a seeded demo workspace, and build the desktop app.
Requirements
You need Git, Node 22.12 or later and pnpm 10 (run corepack enable). There is no database to install: run locally, the API uses PGlite, a real Postgres compiled to WebAssembly, and keeps it in .data/. Clone the public repository to begin.
Start
git clone https://github.com/knotworking-oss/knotworking.git && cd knotworking
pnpm install --frozen-lockfile
cp .env.example .env
pnpm db:setup # create the schema and seed the demo workspace
pnpm dev # API on :4000, web on :3000, MCP server on :4100
Run from source, the API listens on 127.0.0.1:4000. The browser reaches it through the web app's /api proxy, never directly. API_HOST is only for a proxy on another machine.
The demo workspace
Open http://localhost:3000 and sign in as ada@knotworking.dev with the password knotworking-demo. The other demo users share that password. The demo is a small company, Acme Inc, with Marketing, Operations and Sales teams, a product launch, a team offsite and this week's meetings. Due dates are set relative to the day you seed.
Build the desktop app
The Tauri desktop app is a native window around the web interface of a running Knotworking server. You build it from source, because this is a source-only release with nothing to download. It needs a server to connect to: use the one from Start above, or one from the Quickstart.
On top of the requirements above, install stable Rust from rustup and the Tauri 2 prerequisites for your OS:
- Linux: the WebKitGTK 4.1 development libraries (
libwebkit2gtk-4.1-devon Debian and Ubuntu,webkit2gtk-4.1on Arch) and your distribution's native build tools. The Tauri guide lists the full package set. - macOS: the Xcode Command Line Tools (
xcode-select --install). - Windows: Microsoft C++ Build Tools with the Desktop development with C++ workload, the WebView2 Runtime, and the Rust MSVC toolchain.
From the repository root, on the OS where you will use the app, build the packages. If you followed Start, the dependencies are already installed.
pnpm install --frozen-lockfile
pnpm --filter @knotworking/desktop desktop:build
The first build compiles the Rust dependencies and takes a while. The packages land in apps/desktop/src-tauri/target/release/bundle/, and they are unsigned:
- Linux: install the
.debwith your package manager on Debian or Ubuntu, or make the AppImage executable and run it. - macOS: open the
.dmgand copy Knotworking to Applications. - Windows: run the
.msiinstaller.
To compile the executable without packaging it, add --no-bundle. It lands in apps/desktop/src-tauri/target/release/.
pnpm --filter @knotworking/desktop desktop:build --no-bundle
To work on the app itself, run pnpm desktop from the repository root instead. It builds and opens a development window. Set KNOTWORKING_SERVER_URL when you launch it to open a particular server for that run only.
To connect the app to a server:
- Start a server with
pnpm devfrom Start, follow the Quickstart, or use your team's existing server. - Launch Knotworking and enter the address you would type into a browser:
http://localhost:3000forpnpm dev, or your team's address, such ashttps://knotworking.example.com. - Sign in. With the demo workspace, that is
ada@knotworking.devand the password above. The address is remembered; choose Change server… in the account menu to switch.
Repository layout
apps/
web/ Next.js web app
server/ Hono HTTP API, the single backend for every client
mcp/ MCP server, an API client for agents
desktop/ Tauri window around the web app
packages/
core/ Domain model shared by every client: schemas, IDs, sync protocol, modules
db/ Drizzle schema, SQL migrations, seed data
api-client/ Typed API client inferred from the server's routes
ui/ Components and theme
docs/ Architecture, data model, self-hosting and module guides
Scripts
| Command | What it does |
|---|---|
pnpm dev | Run the API, web app and MCP server in watch mode |
pnpm build | Production build of every package and app |
pnpm typecheck | Type-check everything |
pnpm test | Unit and API integration tests, on an in-memory Postgres |
pnpm db:generate | Generate a SQL migration after changing a schema file |
pnpm db:migrate | Apply migrations |
pnpm db:seed | Load the demo workspace (pnpm db:setup runs migrate and seed together) |
pnpm db:reset | Drop the local database and set it up again |
pnpm desktop | Run the desktop app in development mode |
compose.dev.yaml starts a throwaway Postgres with a well-known password and a published port, in place of PGlite. It is for local development only: never use it on a shared or internet-facing machine.
Contributing
Run pnpm typecheck and pnpm test before you submit a change, and check formatting on the files you changed with pnpm exec prettier --check. In the pull request, describe the change and how you checked it. Include screenshots for visible UI changes and a migration for schema changes.
Open bugs and questions in the issue tracker. Report security problems privately through the repository's Security tab, with synthetic data and redacted credentials.