-
Notifications
You must be signed in to change notification settings - Fork 17
Development
This document is intended to get you started developing and contributing to booklogr as quick as possible.
You will need to have the following installed on your computer:
A few steps need to be taken before starting development on the front- and backend.
The backend consists of two parts, the API which is a Python Flask serve and an accompanying database running PostgreSQL.
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.
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
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.
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
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
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.
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.