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 Go And npm On FreeBSD
Section titled “Install Go And npm On FreeBSD”Install required tooling with pkg:
pkg updatepkg install -y git go node24 npm-node24Verify your installation:
go versionnode -vnpm -vIf your local machine is not FreeBSD, use a remote FreeBSD host for development.
VS Code Remote - SSH works great for this workflow:
- Extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh
- Example setup article: https://hayzam.com/blog/02-linuxulator-is-awesome/
Clone The Repository
Section titled “Clone The Repository”git clone https://github.com/AlchemillaHQ/Sylvecd SylveInstall Live-Reload Tooling
Section titled “Install Live-Reload Tooling”Install air:
go install github.com/air-verse/air@latestRun Backend And Frontend Together
Section titled “Run Backend And Frontend Together”Use tmux, zellij, or screen and split into two panes:
- In the repository root:
air .- In the
web/directory:
npm run devFormatting And Checks
Section titled “Formatting And Checks”Before opening a pull request, run these checks.
From the repository root, format Go code:
go fmt ./...From the web/ directory, run frontend checks:
npm run checknpm run lintnpm run formatAvailable 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 ."}Use A Single Development Entry Point
Section titled “Use A Single Development Entry Point”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.