Development guideline

Architecture

Scion uses Vue 3 Composition API with TypeScript. The main UI component LandingPage.vue is a thin orchestrator that delegates logic to 11 composables:

Composable Purpose
useAuth LDAP authentication, connection state, login/logout
useRsync Rsync process state, stop transfer, status/error management
useDatabase SQLite transaction tracking (start, resume, complete, cancel)
useFileWatcher Chokidar-based file monitoring, triggers re-sync on changes
useAppState Electron-store persistence for layout, rsync options, server IP
useLayout GoldenLayout panel management, xterm terminal setup
useRemoteFolders Remote folder browsing via SSH, modal management
useServer Server availability watching
useNetworkDrive Windows network drive detection
useTransfer File transfer orchestration (local + remote rsync)
useTheme Dark/light/system theme toggle with electron-store persistence

All composables are consumed by LandingPage.vue only; child components receive state via props.

Configuration

Server list and LDAP settings are centralized in src/config.ts. To add a new server, add an entry to the servers array:

{
  name: 'servername',
  defaultIp: 'server.example.com',
  projectPrefix: '/projects/'
}

Testing

Tests use Vitest with the following patterns:

# Run all tests
npm run test:vitest:ci

# Run tests with UI
npm run test:vitest:ui

# Run tests in watch mode
npm run test:vitest

Versioning

commit-and-tag-version package is used for generating Change Logs and Version number tags.

# Release with a specific version
npm run release -- --release-as 1.2.13

Commit message convention

Uses ”<type>: <description>” format:

git commit -a -m"<type>[optional scope]: <description>"

References:

Rsync process management

All rsync path resolution is handled by getRsyncExe() in lib/rsync/process.js:

The rsync child process is spawned with detached: true on all platforms so the process group can be killed cleanly on stop/logout.

smbmap has been removed – remote folder listing is now handled entirely via SSH.