This is my current development setup (in spring 2023). Adapt to your own needs.
- Windows with WSL2, running Debian Bullseye
- Docker (running inside the WSL2 Debian)
First, open two WSL2 Debian terminals open - one for server dev (Rust), one for client dev (Svelte). Then:
Server:
- install rustup 2021 stable toolchain
cd servercode .to open VS Codemake run-local- builds server, then listens on port 8089, logs to stdout- (optional)
make test-localto run server unit/integration tests without client
Client:
code .to open VS Code (at top level)- Click "reopen in container" button (to avoid installing Node.js and packages locally)
- Open a terminal in VS Code (runs inside the dev container)
cd clientnpm installto install dependenciesnpm run devto start dev HTTP on port 5173
- Open http://localhost:5173/ in browser. Vite will reflect changes to the code
while developing the Svete app, which is very handy. The client will connect Websocket to
ws://localhost:8089/by default, so you can see what the server is doing in the other WSL terminal.
Organizer / Metaplugins:
For developing metaplugins (custom Python extensions for the Basic Folders organizer), see the complete setup instructions in organizer/basic_folders/METAPLUGINS.md. This covers:
- Creating a Python venv with proper editable installs for type checking
- Installing the clapshot protobuf library and organizer packages
- Configuring mypy and IDE support for full autocomplete
- Running and testing metaplugins locally
When done, at top level, run one of the following:
make testto build both client and server, and to run all tests in a pristine Docker containermake debian-dockerto test and also build .debs (stored indist_deb/)make run-dockerto automatically build .debs, install them in a Docker container, run server as a systemd service + client as a Nginx site inside it. This is the recommended way to test the whole stackmake build-docker-demoto build a demo image (like the one that can be found in Docker Hub)