Skip to content

Development

Andreas Backström edited this page Jul 3, 2025 · 7 revisions

This document is intended to get you started developing and contributing to booklogr as quick as possible.

Prerequisites

You will need to have the following installed on your computer:

Getting started

A few steps need to be taken before starting development on the front- and backend.

Backend

The backend consists of two parts, the API which is a Python Flask serve and an accompanying database running PostgreSQL.

Setup environment variables

Copy .env.example file and name it .envin the root folder. You do not need to change anything unless you want to or run into problems. See ENV variables for more information.

API

First, make sure you have poetry installed. If you do not have poetry installed run, python -m pip install poetry.

From the api folder, install all dependencies by running,

poetry install

Start API server

From the api folder run the following to start the development API server:

poetry run flask run

If you aren't going to develop anything on the API side then you can instead run docker compose up booklogr-api. This will spin up an API server on port 5002.

Database & authentication

From the root folder run the following to retrieve the latest docker images and setup the PostgreSQL database and authentication server:

docker compose up booklogr-db

Once the services are up and running, run the following to add all necessary tables to the booklogr database:

poetry run flask db upgrade

Frontend

The frontend is a React website that communicates to the API to retrieve and send information.

From the web folder run the following to install:

npm install

Setup environment variables

Copy .env.example file and name it .envin the web folder. You do not need to change anything unless you want to or run into problems. See ENV variables for more information.

Start the frontend server

From the web folder run the following to start the development frontend server:

npm run dev

You should now be all good to go in order to start developing. If you have any questions or problems, feel free to get in contact by opening a issue.

Clone this wiki locally