# Donation Backend

Backend for Challenge task for Advanced Distributed Systems & Blockchain (ADSB) (HS20) at OST

For a more complete documentation and usage guide have a look at the [docs](https://git.bitterlin.net/adsb/donations-docs).

## Development

Start the [`docker-compose`](./.contribution/docker-compose.yml) file in [`.contribution`](./.contribution) if you need to make changes to the backend.

This will start a Postgres database, the frontend and a load balancer. The load balancer will act as a reverse proxy for the frontend and your backend when it is running on port `8080` on your host. 
This way you can interact with your backend like a real user while developing. 

```bash
docker-compose up
```

The load balancer is reachable under [`localhost:80`](http://localhost). 
If you need to make changes to the default values, set them in the [`.env`](.contribution/.env) file.

To connect your backend to the database of the [`docker-compose`](./.contribution/docker-compose.yml) file, start your backend with `local` as the active profile. 
If you made changes to the values in the [`.env`](.contribution/.env) file, make sure the connection values are the same in your backend configuration.

If you only want to start the database use this:

```bash
docker-compose up db -d
```

### Postman

There is a [`Postman`](https://www.postman.com/downloads/) collection export if you like to access the api this way: [`donation.postman_collection.json`](donation.postman_collection.json)
