Project Setup
Set up a local development environment for SkySend.
Prerequisites
- Node.js 24 LTS, the version in
.node-versionthat 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
git clone https://github.com/Skyfay/SkySend.git
cd SkySend
git checkout devOn 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 scripts/setup-dev-macos.shElsewhere, install Node 24 and pnpm 10, then run pnpm install and create the dev environment from its template:
cp .env.dev.example .env.devThe 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:
pnpm devThis 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:
# 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-arm64Build
Build all packages:
pnpm buildRun Tests
pnpm testTests are written with Vitest. Each package has its own test directory:
packages/crypto/tests/- Crypto library testspackages/transfer/tests/- Zip, upload and download pipeline testsapps/server/tests/- Server testsapps/client/- CLI client (usepnpm --filter @skysend/client runfor 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
# Lint
pnpm lint
# Lint with auto-fix
pnpm lint:fix
# Format
pnpm format
# Check formatting
pnpm format:check
# Type check
pnpm typecheckMonorepo Structure
SkySend uses pnpm Workspaces:
# 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
| Command | Description |
|---|---|
pnpm dev | Start all packages in dev mode |
pnpm build | Build all packages |
pnpm test | Run all tests |
pnpm test:e2e | Build, then run the end-to-end tests in Chromium, Firefox and WebKit |
pnpm test:e2e:ui | Build, then pick and watch end-to-end tests in the Playwright UI at http://localhost:9323 |
pnpm test:e2e:install | Install the browsers for the end-to-end tests |
pnpm lint | Run ESLint |
pnpm lint:fix | Run ESLint with auto-fix |
pnpm format | Format with Prettier |
pnpm format:check | Check formatting |
pnpm typecheck | TypeScript 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
constoverlet, keep functions short