Skip to content

Code

Sylve is built with Go (backend) and SvelteKit in SPA mode (frontend).

For the best development experience, we recommend a FreeBSD -CURRENT machine.

Install required tooling with pkg:

Terminal window
pkg update
pkg install -y git go node24 npm-node24

Verify your installation:

Terminal window
go version
node -v
npm -v

If your local machine is not FreeBSD, use a remote FreeBSD host for development.

VS Code Remote - SSH works great for this workflow:

Terminal window
git clone https://github.com/AlchemillaHQ/Sylve
cd Sylve

Install air:

Terminal window
go install github.com/air-verse/air@latest

Use tmux, zellij, or screen and split into two panes:

  1. In the repository root:
Terminal window
air .
  1. In the web/ directory:
Terminal window
npm run dev

Before opening a pull request, run these checks.

From the repository root, format Go code:

Terminal window
go fmt ./...

From the web/ directory, run frontend checks:

Terminal window
npm run check
npm run lint
npm run format

Available frontend scripts:

{
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint ."
}

In config.json, set:

{
"proxyToVite": true
}

With proxyToVite enabled, the Go backend proxies frontend requests to Vite, so you do not need to work with two separate ports directly.