Skip to content

Local Development & Testing

This page will guide you on how to test Selv in a local environment.

In order to start the app, you need to have cloned it and set it up. If you haven’t already, follow:

In development, you will need to start the local python backend and the tauri app separately.

  1. Get into the backend folder
    From the route selv/ folder:

    cd .\backend
  2. Enter the venv

    .\.venv\Scripts\Activate.ps1
  3. Run the main.py file

    python .\main.py

The python backend should have started, listening 127.0.0.1:8000

  1. Make sure to be at the root of the selv/ folder and not to be in a virtual env (“(venv)” at the start of the command line).

  2. Start the app

    npm run tauri dev

After dev building, the app should start as a desktop application.

Frontend not having any information displayed

Section titled “Frontend not having any information displayed”

This could be caused by the tauri app loading before the python backend : On start, the frontend expects the backend to be started (It is launched by Tauri before the app opens and FastApi starts a lot quicker than the app). Therefor, if the frontend can’t reach the backend, it will throw errors and not try to reconnect.
Fix: Simply reload the Tauri app (CTRL+R) to make the frontend fetch the datas again.

“Low-level” modifications not taking effect

Section titled ““Low-level” modifications not taking effect”

By “Low-level”, I refer to the operations or the elements that are mainly managed by the OS (The taskbar icon, for example).
This could be caused by the OS or the Rust cargo caching some informations and not updating them.
Fix:

  1. Clean the cargo cache:
    cargo clean