Skip to content

Architecture Overview

CUTIP Desktop is a full-stack desktop application that wraps the CUTIP Python library.

Electron shell
  └── spawns PyInstaller backend binary (random port)
      ├── FastAPI (serves React static + REST API + WebSocket)
      │     ↓
      │   SQLite (users, workspaces, api_keys)
      └── imports cutip library directly (no subprocess)

Backend

  • FastAPI with async SQLAlchemy and SQLite (aiosqlite)
  • Imports cutip models and services directly (no subprocess calls)
  • OAuth2 authentication (GitHub) with JWT tokens
  • REST API for workspace management, artifact browsing, container management, and validation
  • Container runtime plugin for Docker/Podman management

Frontend

  • React 18 + TypeScript + Vite
  • MUI v6 component library with dark/light theme
  • Zustand for state management
  • Axios with automatic JWT refresh
  • React Router v6 for client-side routing
  • @xyflow/react for DAG workflow visualization
  • @monaco-editor/react for YAML/JSON inspection

Electron

  • Spawns the PyInstaller-bundled backend on a random port
  • Splash screen with progress bar while backend starts
  • Preload bridge exposes selectDirectory(), getVersion(), isDev() via IPC

Database

SQLite stores user accounts, registered workspaces, and encrypted API keys. The cutip artifacts themselves live on the filesystem — the database only stores a path reference.