Development Setup

Scope: To be read by everyone who wants to change code, i.e., needs a development setup.

Operating Systems

  • Ubuntu/Debian-based Linux system or
  • Ubuntu/Debian in WSL on Windows

Ways to develop PermaplanT

Right now we have two different ways to develop PermaplanT:

Docker services + local development

Run the database and other services like adminer in Docker containers but run backend and frontend locally. Read more

Dev container

Run everything within the VSCode devcontainer. Read more

IDE

Visual Studio Code Extensions

Frontend

Backend

Rust formatting can be achieved by adding the following to settings.json in VSCode after installing rust-analyzer:

  "[rust]": {
    "editor.defaultFormatter": "rust-lang.rust-analyzer",
    "editor.formatOnSave": true
  }

Browsers

  • Chrome/Chromium 128.0.6613.137 or later
  • Firefox 115.15.0esr (Extended Support Release) or late

Note: You cannot switch between different branches (like mr.permaplant.net, dev.permaplant.net) while using the same browser without resetting the cache as CORS preflights etc. get cached and cause weird errors.

Dependencies

If you want to install all necessary dependencies for development run the following command in project's root directory:

make install

TODO: make install currently does not install scraper deps, which is, however, not needed if you use dumps. See #2110.

Data

The easiest way is to import one of our dumps, see doc/database/import_dumps.md.

To fill the database with scraper data, please additionally clone the scraper repository to scraper/data using your preferred protocol (SSH or HTTPS), e.g.:

# SSH
git clone ssh://git@gitlab.tuwien.ac.at:822/permaplant/scraper-data.git scraper/data

# Insert scraped data into the database
make insert-scraper

# Reset database will reinsert
make reset-database

Quick start

After installing dependencies, run make run-backend and make run-frontend in two different terminal windows and keep them open.

Run make help in the root directory to see all available make commands.

For more advanced backend or frontend setup, see