162 lines
5.4 KiB
Markdown
162 lines
5.4 KiB
Markdown
# Stockhome
|
|
|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|
[](#)
|
|

|
|

|
|

|
|

|
|

|
|
|
|
The problem solver for every household in the world: **STOCKHOME**! Have you ever spent too long searching for things in your freezer or pantry? If so, this open-source project is just the right thing for your home server!
|
|
|
|
<p align="center">
|
|
<img src="./.github/assets/Arc_Inventory.low.jpg" width="802" alt="Inventory Screenshot" />
|
|
</p>
|
|
|
|
## Features
|
|
|
|
- Organize your food at home
|
|
- Keep track of the Expiry and Bottling date of your food
|
|
- Generate QR codes for your food and products to easily scan them with your smartphone to see all the details
|
|
- Organize your food and products into different storages (Storage locations)
|
|
- Rename your app and change the currency
|
|
- Keep track of the stored amount of your food
|
|
- Keep track of the costs for your food
|
|
|
|
## Installation
|
|
|
|
### 1. Install Docker
|
|
|
|
If you haven't installed Docker yet, install it by running as root:
|
|
|
|
```shell
|
|
curl -sSL https://get.docker.com | sh
|
|
exit
|
|
```
|
|
|
|
### 2. Clone repository
|
|
|
|
**_Recommended because it is easy to update_**
|
|
|
|
Clone this repository by running:
|
|
|
|
```shell
|
|
git clone --branch v0.1 --single-branch https://github.com/theis-js/stockhome.git
|
|
```
|
|
|
|
You can replace `v0.1` with the latest release tag to get the latest version of the stack. You can also use `dev` to get the latest development version, but keep in mind that it may contain bugs and errors.
|
|
|
|
View the available version tags here: [Releases](https://github.com/theis-js/stockhome/tags)
|
|
|
|
> **NOTE:** To do this, you must have git installed. [How to install git?](https://git-scm.com/install/)
|
|
|
|
### 3. Create `.env` file
|
|
|
|
In the root directory of this repository create an `.env` file and enter the following records:
|
|
|
|
```txt
|
|
MYSQL_ROOT_PASSWORD=
|
|
AUTH_SIGNATURE=
|
|
BACKEND_HOST=localhost
|
|
```
|
|
|
|
Make sure that you have set an secure root password and a secure signature.
|
|
|
|
> **NOTE:** These three values cannot contain special characters.
|
|
|
|
The `BACKEND_HOST` can be set to the IP address of your server or to `localhost` if you are running the app on your local machine.
|
|
|
|
> **Change Docker Config:** If you want to run the stack for example in a docker network or want to change something at the docker config, visit the [Docker docs](./.github/docs/docker/README.md) for this project.
|
|
|
|
### 4. Start Stockhome
|
|
|
|
First, navigate into the root directory of this repository and run:
|
|
|
|
```shell
|
|
docker compose up -d --build
|
|
```
|
|
|
|
The database and all necessary services are started and initialised automatically.
|
|
|
|
### 5. First login
|
|
|
|
The default admin credentials are always:
|
|
|
|
```
|
|
Username: admin
|
|
Password: admin
|
|
```
|
|
|
|
_Keep in mind that you should change the password later in the settings page._
|
|
|
|
> **NOTE:** If errors occur get yourself some help in the [error code page](./.github/docs/error/README.md).
|
|
|
|
## Feedback and bug reports - Troubleshooting
|
|
|
|
I'd be grateful if you could report any bugs as issues here in the repository! [Report a bug](https://github.com/theis-js/stockhome/issues)
|
|
|
|
## Update
|
|
|
|
To update stockhome to the latest version, navigate into the root directory of this repository and run:
|
|
|
|
```shell
|
|
git pull
|
|
latesttag=$(git describe --tags)
|
|
git checkout ${latesttag}
|
|
docker compose up -d --build
|
|
```
|
|
|
|
To update to a specific version, replace `latesttag` with the version tag you want to update to. You can view the available version tags here: [Releases](https://github.com/theis-js/stockhome/tags)
|
|
|
|
**Example to downgrade/update to version `v0.1`:**
|
|
|
|
```shell
|
|
git pull
|
|
git checkout v0.1
|
|
docker compose up -d --build
|
|
```
|
|
|
|
## Development
|
|
|
|
### Prerequisites
|
|
|
|
- Docker
|
|
- Visual Studio Code (or any other IDE)
|
|
- Cloned the repository
|
|
|
|
### Start backend and database
|
|
|
|
First, navigate into the root directory of this repository and run:
|
|
|
|
```shell
|
|
docker compose -f docker-compose.dev.yml up -d --build
|
|
```
|
|
|
|
### Start frontend
|
|
|
|
Navigate into the `frontend` directory and run:
|
|
|
|
```shell
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
The frontend is now running on `http://localhost:5173` and the backend is running on `http://localhost:8004`.
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
|
|
## Contributing
|
|
|
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
|
Whole project made by [Theis Gaedigk](https://portfolio-theis.de)!
|