Skip to content

Project Setup ​

Set up a local development environment for SkySend.

Prerequisites ​

  • Node.js 24 LTS, the version in .node-version that CI and the Docker image use. A version manager like fnm switches to it on its own.
  • pnpm 10
  • Git
  • Linux, macOS or Windows on x64 or arm64, the platforms the SQLite driver of the server ships prebuilt binaries for

Clone and Install ​

bash
git clone https://github.com/Skyfay/SkySend.git
cd SkySend
git checkout dev

On macOS, the setup script installs fnm with the Node of .node-version, pnpm in the version package.json pins and the dependencies. It also offers to add the line to ~/.zshrc that lets new terminals switch to that Node inside the project.

bash
bash scripts/setup-dev-macos.sh

Elsewhere, install Node 24 and pnpm 10, then run pnpm install and create the dev environment from its template:

bash
cp .env.dev.example .env.dev

The dev server reads .env.dev, which git ignores, so local values and secrets like an OIDC client stay out of the repository. .env.dev.example holds the defaults for development and is the file to update when a variable is added. pnpm setup:worktree copies .env.dev of the primary checkout into a new git worktree, or creates it from the template.

New work happens on a branch off dev, and its pull request goes back into dev, never into main. See Branches and Pull Requests.

Development ​

Start all packages in development mode:

bash
pnpm dev

This runs all workspaces in parallel:

  • Server (apps/server) - Hono dev server with hot reload
  • Web (apps/web) - Vite dev server with HMR
  • Docs (docs) - VitePress dev server

Dev server on another machine

The Vite dev server listens on every interface. When it runs on a remote box, set BASE_URL in .env.dev to the address you open in the browser, like http://devbox:5173, and Vite allows that host. With PORT the API server moves off 3000, and the proxy of Vite follows it.

CLI Client Development ​

The CLI client is not started by pnpm dev since it is a command-line tool, not a server. To develop and test it:

bash
# Run a command directly with tsx (no build needed)
pnpm --filter @skysend/client run -- upload ./test-file.txt

# Build TypeScript
pnpm --filter @skysend/client build

# Compile to binary (current platform)
pnpm --filter @skysend/client build:compile

# Compile for a specific target
pnpm --filter @skysend/client build:macos-arm64

Build ​

Build all packages:

bash
pnpm build

Run Tests ​

bash
pnpm test

Tests are written with Vitest. Each package has its own test directory:

  • packages/crypto/tests/ - Crypto library tests
  • packages/transfer/tests/ - Zip, upload and download pipeline tests
  • apps/server/tests/ - Server tests
  • apps/client/ - CLI client (use pnpm --filter @skysend/client run for manual testing)

The end-to-end tests in e2e/ run the app in Chromium, Firefox and WebKit with Playwright. Install the browsers once with pnpm test:e2e:install, then run pnpm test:e2e. See the Testing Guide.

Linting & Formatting ​

bash
# Lint
pnpm lint

# Lint with auto-fix
pnpm lint:fix

# Format
pnpm format

# Check formatting
pnpm format:check

# Type check
pnpm typecheck

Monorepo Structure ​

SkySend uses pnpm Workspaces:

yaml
# pnpm-workspace.yaml
packages:
  - "apps/*"
  - "packages/*"
  - "docs"

All packages share a root tsconfig.json and ESLint configuration. Each package has its own package.json and tsconfig.json for package-specific settings.

Key Scripts ​

CommandDescription
pnpm devStart all packages in dev mode
pnpm buildBuild all packages
pnpm testRun all tests
pnpm test:e2eBuild, then run the end-to-end tests in Chromium, Firefox and WebKit
pnpm test:e2e:uiBuild, then pick and watch end-to-end tests in the Playwright UI at http://localhost:9323
pnpm test:e2e:installInstall the browsers for the end-to-end tests
pnpm lintRun ESLint
pnpm lint:fixRun ESLint with auto-fix
pnpm formatFormat with Prettier
pnpm format:checkCheck formatting
pnpm typecheckTypeScript type checking
pnpm --filter @skysend/client run -- <args>Run CLI client in dev mode

Code Conventions ​

  • Language: TypeScript (strict mode, avoid any)
  • Package Manager: pnpm (never npm or yarn)
  • Validation: Zod for all data validation
  • Modules: ES modules ("type": "module")
  • i18n: All user-facing strings use i18next
  • Style: Prefer const over let, keep functions short