Skip to content

Commit

Permalink
Add more information about contributions to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
m.hollink committed Oct 17, 2024
1 parent fa37b17 commit bf5bf7d
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Miniature Inventory
# Miniature Inventory <!-- omit in toc -->

## Description

Expand All @@ -10,6 +10,16 @@ a [Slim4 PHP backend](https://www.slimframework.com/docs/v4/) (due to server res
![Inventory page](./app/public/assets/images/screenshots/dark/collections.png)
*Inventory page inside the application*

## Table of contents

* [Feature Highlights:](#feature-highlights)
* [Using the application](#using-the-application)
* [Contributing](#contributing)
* [Instructions](#instructions)
* [Running the project locally](#running-the-project-locally)
* [The API & Database](#the-api--database)
* [API Client](#api-client-postman)

## Feature Highlights:

- Creating a custom (painting) workflow that fits you best
Expand Down Expand Up @@ -46,3 +56,31 @@ We welcome any and all contributions! Here are some ways you can get started:
4. Commit and push
5. Submit a pull request
6. Wait for pull request to be merged

## Running the project locally

The application is build up into 3 main parts; The webapp, an API and a database. Each of these component can be run
locally which allows you to make some changes and test these before commiting / submitting a pull request.

### The API & Database

The API and database can be started locally using [Docker](https://www.docker.com/). There is a Dockerfile inside
the /api folder which can be used to create an image containing the required environment to run the Slim4 API. Since the
API is connecting to a database and a connection is required between its easier to spin everything up using
docker compose.

```shell
# from the root directory:
docker compose up
```

> Note: Running the api container automatically creates/overwrites your .env file with the local database credentials.
#### API Client (Postman)

After the containers are started you can open up an API client like [Postman](https://www.postman.com/)
or [Thunder Client](https://www.thunderclient.com/). There is a postman collection in the repository you can
use if you decide on using Postman.

> Note: Each request must have an Authorization header consisting a bearer token. For development, it's not necessary to
> have a valid token (as its being mocked in the [$tokenMiddleware](./api/src/middleware/token-verification.php#L34)).

0 comments on commit bf5bf7d

Please sign in to comment.