circle-exclamation
KatanOS will not receive any updates at the moment, which is why I decided to make it open source.

shapesBuild

This page documents how to run, test, and package KatanOS from source.

Prerequisites

  • Node.js LTS

  • npm

  • Windows environment for NSIS/AppX packaging

Install

npm ci

Development Modes

Renderer (Vite only):

npm run dev

Electron + Vite:

npm run electron:dev

electron:dev runs:

  • Vite dev server on http://localhost:3000

  • Electron once server is reachable

Test

Vitest config:

  • environment: jsdom

  • include pattern: **/*.test.{ts,tsx}

Production Build

Web bundle:

Desktop package (Electron Builder):

AppX helper flow:

Build Configuration Sources

  • package.json (scripts and build sections)

  • vite.config.ts

  • vitest.config.ts

  • scripts/build-appx.cjs

  • build-config.local.json (local appx identity merge)

Vite Notes

Current Vite config details:

  • base path: ./

  • dev port: 3000

  • chunk splitting by major vendor groups (react, charts, icons, ai)

Electron Builder Targets

Configured Windows targets:

  • nsis

  • appx

Output path:

  • dist/

AppX Local Identity Flow

electron:build:appx:

  1. reads build-config.local.json

  2. merges local build.appx identity into package.json

  3. runs npm run build && electron-builder --win appx

  4. restores original package.json

Useful Validation Sequence

Current Script Inventory

From package.json:

  • dev

  • build

  • preview

  • test

  • test:watch

  • electron:dev

  • electron:build

  • electron:build:appx

There is no lint script in current package scripts.

Last updated

Was this helpful?