Skip to content
Please consider turning off your ad blocker to help encourage ethical advertising

Developer Setup

Setting up

This assumes you're using vscode and will want to use the debugging tools for the backend. If you're not using vscode then skip the launch.json section.

Project Layout

Clone the repo:

Code

git clone https://github.com/SelfhostedPro/Yacht.git

Create the config directory for the sqlite db:

Code

cd Yacht
mkdir backend/config

Requirements

Install the backend requirements

Code

cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Install the frontend requirements

Code

cd ../frontend
npm install

Setup a launch.json (optional)

in the root directory create a .vscode folder and paste the following launch.json:

Code

cd ..
mkdir .vscode
nano launch.json

Installation Script

{
    "configurations": [
        {
            "name": "Python: Module",
            "type": "python",
            "request": "launch",
            "module": "uvicorn",
            "args": [
                "backend.api.main:app",
                "--reload"
            ]
        }
    ]
}

Run everything

Start the backend using the run button in the debugging tab in vscode or manually run it. Then for the frontend run the following from inside the frontend folder:

Code

npm run serve

Script:

Here is an untested script that basically combines everything except for the launch.json stuff:

Code

#!/bin/bash
git clone https://github.com/SelfhostedPro/Yacht.git
cd Yacht
mkdir config
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cd ../frontend
npm install

Then just use the "Run Everything section above


Last update: 2021-02-25