Files
grocy/README.md

199 lines
12 KiB
Markdown
Raw Permalink Normal View History

2024-04-13 13:20:35 +02:00
-----
2020-12-22 09:58:36 +01:00
<div align="center">
2024-04-13 13:20:35 +02:00
<img alt="Logo" height="50" src="https://raw.githubusercontent.com/grocy/grocy/master/public/img/logo.svg?sanitize=true" />
<h2>ERP beyond your fridge</h2>
<h3>Grocy is a web-based self-hosted groceries & household management solution for your home</h3>
2024-11-01 10:44:16 +01:00
<em><h4>This is a hobby project by <a href="https://berrnd.de">Bernd Bestel</a></h4></em>
2020-12-22 09:58:36 +01:00
</div>
-----
2017-04-15 23:16:20 +02:00
2018-04-17 20:00:00 +02:00
## Give it a try
2022-02-10 18:04:33 +01:00
- Public demo of the latest stable version (`release` branch) &rarr; [https://demo.grocy.info](https://demo.grocy.info)
2023-05-18 17:55:46 +02:00
- Public demo of the current development version (`master` branch) &rarr; [https://demo-prerelease.grocy.info](https://demo-prerelease.grocy.info)
2023-05-18 10:39:38 +02:00
## Features
2024-04-13 17:43:57 +02:00
See the website. &rarr; <https://grocy.info>
2018-04-17 20:00:00 +02:00
2022-02-10 18:04:33 +01:00
## Questions / Help / Bug Reports / Feature Requests
2020-04-12 14:49:53 +02:00
2022-02-10 18:04:33 +01:00
- General help and usage questions &rarr; [r/grocy subreddit](https://www.reddit.com/r/grocy)
- Bug Reports and Feature Requests &rarr; [Issue Tracker](https://github.com/grocy/grocy/issues/new/choose)
2020-12-19 14:49:00 +01:00
2023-09-01 17:00:50 +02:00
_Please don't send me private messages or call me regarding anything Grocy. I check the issue tracker and the subreddit pretty much daily, but don't provide any support beyond that._
## Community contributions
2022-02-10 18:04:33 +01:00
See the website for a list of community contributed Add-ons / Tools. &rarr; [https://grocy.info/addons](https://grocy.info/addons)
2017-04-15 23:16:20 +02:00
## How to install
2022-02-10 18:04:33 +01:00
2023-07-29 21:17:59 +02:00
> Checkout [Grocy Desktop](https://github.com/grocy/grocy-desktop), if you want to run Grocy without having to manage a webserver just like a normal (Windows) desktop application.
2018-07-22 13:59:53 +02:00
>
2020-12-19 14:49:00 +01:00
> Directly download the [latest release](https://releases.grocy.info/latest-desktop) - the installation is nothing more than just clicking 2 times "next".
2017-04-15 23:16:20 +02:00
2023-05-19 18:08:26 +02:00
Grocy is technically a pretty simple PHP application, so the basic notes to get it running are:
2020-12-19 14:49:00 +01:00
- Unpack the [latest release](https://releases.grocy.info/latest)
- Copy `config-dist.php` to `data/config.php` + edit to your needs
- Ensure that the `data` directory is writable
- The webserver root should point to the `public` directory
- Include `try_files $uri /index.php$is_args$query_string;` in your location block if you use nginx
- Or disable URL rewriting (see the option `DISABLE_URL_REWRITING` in `data/config.php`)
- &rarr; Default login is user `admin` with password `admin`, please change the password immediately (user menu at the top right corner)
2018-06-15 20:50:40 +02:00
Alternatively clone this repository (the `release` branch always references the latest released version) and install Composer and Yarn dependencies manually.
2023-09-01 17:00:50 +02:00
See the website for more installation guides and troubleshooting help. &rarr; [https://grocy.info/links](https://grocy.info/links)
### Platform support
- PHP 8.2 or 8.3 (with SQLite 3.34.0+)
- Required PHP extensions: `fileinfo`, `pdo_sqlite`, `gd`, `ctype`, `intl`, `zlib`, `mbstring`
2023-08-04 15:44:14 +02:00
- _Recommendation: Benchmark tests showed that e.g. unit conversion handling is up to 5 times faster when using a more recent (3.39.4+) SQLite version._
2023-08-04 15:41:44 +02:00
- Recent Firefox, Chrome or Edge
2019-09-21 17:26:53 +02:00
## How to run using Docker
2025-01-31 18:18:40 +01:00
&rarr; https://hub.docker.com/r/linuxserver/grocy
2018-04-18 07:59:13 +02:00
## How to update
2022-02-10 18:04:33 +01:00
2021-07-17 20:17:02 +02:00
- Overwrite everything with the [latest release](https://releases.grocy.info/latest) while keeping the `data` directory
- Check `config-dist.php` for new configuration options and add them to your `data/config.php` where appropriate (the default values from `config-dist.php` will be used for not in `data/config.php` defined settings)
2018-07-25 08:22:27 +02:00
2023-05-19 18:08:26 +02:00
If you run Grocy on Linux, there is also `update.sh` (remember to make the script executable (`chmod +x update.sh`) and ensure that you have `unzip` installed) which does exactly this and additionally creates a backup (`.tgz` archive) of the current installation in `data/backups` (backups older than 60 days will be deleted during the update).
2018-04-18 07:59:13 +02:00
## Localization
2022-02-10 18:04:33 +01:00
2023-05-19 18:08:26 +02:00
Grocy is fully localizable - the default language is English (integrated into code), a German localization is always maintained by me.
2021-07-17 20:17:02 +02:00
2025-01-22 21:08:46 +01:00
You can easily help translating Grocy on [Transifex](https://explore.transifex.com/grocy/grocy/) if your language is incomplete or not available yet.
2021-07-17 20:17:02 +02:00
2025-01-22 20:36:35 +01:00
The default language can be set in `data/config.php`, e. g. `Setting('DEFAULT_LOCALE', 'de');` and there is also a user setting (see the user settings page) to set a different language per user.
2020-12-20 13:03:06 +01:00
The [pre-release demo](https://demo-prerelease.grocy.info) is available for any translation which is at least 70 % complete and will pull the translations from Transifex 10 minutes past every hour, so you can have a kind of instant preview of your contributed translations. Thank you!
2025-01-22 20:36:35 +01:00
Also any translation which once reached a completion level of 70 % ([`strings` resource](https://app.transifex.com/grocy/grocy/strings/)) will be included in releases.
2020-12-19 14:49:00 +01:00
2020-12-22 09:58:36 +01:00
_RTL languages are unfortunately not yet supported._
2020-01-27 19:07:13 +01:00
2022-02-10 18:04:33 +01:00
## Motivation
2024-04-13 17:43:57 +02:00
A household needs to be managed. Before Grocy I did this (for almost 10 years) using my first self written software (a C# Windows forms application) and with a bunch of Excel sheets. The software was a pain to use at the end and Excel is Excel. So I searched for and tried different things for a (very) long time, nothing 100 % fitted, so this is my aim for a "complete household management"-thing. ERP your fridge!
2022-02-10 18:04:33 +01:00
2018-04-17 20:00:00 +02:00
## Things worth to know
### REST API
2022-02-10 18:04:33 +01:00
See the integrated Swagger UI instance on [/api](https://demo.grocy.info/api).
2024-04-13 17:43:57 +02:00
The web frontend uses exactly this API for pretty much everything. So everything you can do there is also possible via the API.
2019-09-21 17:26:53 +02:00
### Barcode readers & camera scanning
2022-02-10 18:04:33 +01:00
2020-01-27 19:07:13 +01:00
Some fields (with a barcode icon above) also allow to select a value by scanning a barcode. It works best when your barcode reader prefixes every barcode with a letter which is normally not part of a item name (I use a `$`) and sends a `TAB` after a scan.
2018-04-17 20:00:00 +02:00
Additionally it's also possible to use your device camera to scan a barcode by using the camera button on the right side of the corresponding input field (powered by [ZXing](https://github.com/zxing-js/library), totally offline / client-side camera stream processing, please note due to browser security restrictions, this only works when serving Grocy via a secure connection (`https://`)). [Here](https://www.youtube.com/watch?v=veezFX4X1JU) and [there](https://www.youtube.com/watch?v=Y5YH6IJFnfc) are quick video demos of that.
2019-09-21 17:26:53 +02:00
2020-12-22 09:58:36 +01:00
_My personal recommendation: Use a USB barcode laser scanner. They are cheap and work 1000 % better, faster, under any lighting condition and from any angle._
2020-04-12 14:49:53 +02:00
2025-02-28 16:14:26 +01:00
### Barcode lookup via external services
Products can be directly added to the database via looking them up against external services by a barcode.
This can be done in-place using the product picker workflow "External barcode lookup" (the workflow dialog is displayed when entering something unknown in any product input field) Quick video demo: <https://www.youtube.com/watch?v=-moXPA-VvGc>
A plugin for [Open Food Facts](https://world.openfoodfacts.org/) is included and used by default (see the `data/config.php` option `STOCK_BARCODE_LOOKUP_PLUGIN`).
See that plugin or `plugins/DemoBarcodeLookupPlugin.php` for a commented example implementation if you want to build a plugin.
2018-04-17 20:00:00 +02:00
### Input shorthands for date fields
2022-02-10 18:04:33 +01:00
2020-01-27 19:07:13 +01:00
For (productivity) reasons all date (and time) input (and display) fields use the ISO-8601 format regardless of localization.
2018-04-17 20:00:00 +02:00
The following shorthands are available:
2018-07-22 13:09:23 +02:00
- `MMDD` gets expanded to the given day on the current year, if > today, or to the given day next year, if < today, in proper notation
2025-01-22 20:36:35 +01:00
- Example: `0517` will be converted to `2025-05-17`
2018-04-17 20:10:19 +02:00
- `YYYYMMDD` gets expanded to the proper ISO-8601 notation
2025-01-22 20:36:35 +01:00
- Example: `20250417` will be converted to `2025-04-17`
2018-07-22 13:03:08 +02:00
- `YYYYMMe` or `YYYYMM+` gets expanded to the end of the given month in the given year in proper notation
2025-01-22 20:36:35 +01:00
- Example: `202507e` will be converted to `2025-07-31`
2023-10-01 21:43:28 +02:00
- `[+/-]n[d/m/y]` gets expanded to a date relative to today, while adding (**+**) or subtracting (**-**) the **n**umber of **d**ays/**m**onths/**y**ears, in proper notation
- Example: `+1m` will be converted to the same day next month
2021-07-17 20:17:02 +02:00
- `x` gets expanded to `2999-12-31` (which is an alias for "never overdue")
- Down/up arrow keys will increase/decrease the date by 1 day
2018-04-17 20:00:00 +02:00
- Right/left arrow keys will increase/decrease the date by 1 week
- Shift + down/up arrow keys will increase/decrease the date by 1 month
- Shift + right/left arrow keys will increase/decrease the date by 1 year
2018-04-17 20:00:00 +02:00
### Keyboard shorthands for buttons
2022-02-10 18:04:33 +01:00
2018-04-17 20:00:00 +02:00
Wherever a button contains a bold highlighted letter, this is a shortcut key.
2020-12-19 14:49:00 +01:00
Example: Button "**P** Add as new product" can be "pressed" by using the `P` key on your keyboard.
2018-04-17 20:00:00 +02:00
2025-02-28 16:14:26 +01:00
### Installable web app (PWA)
2025-02-28 16:14:26 +01:00
Grocy's web frontend is responsive and an "installable web app" ([PWA](https://en.wikipedia.org/wiki/Progressive_web_app), without providing any offline usage capabilities), that provides a pretty native mobile app-like experience without the need for additional tools.
2025-02-28 16:14:26 +01:00
- Quick video demo on Android/Firefox: <https://www.youtube.com/watch?v=L38drVZfwHs>
- Quick video demo on Android/Chrome: <https://www.youtube.com/watch?v=rjLdXUFDNuk>
2018-04-17 20:00:00 +02:00
### Database migrations
2022-02-10 18:04:33 +01:00
Database schema migration is done when visiting the root (`/`) route (click on the logo in the left upper edge) as needed and is also triggered automatically if the version has changed (so when an update has been made).
2018-04-17 20:00:00 +02:00
2024-04-13 17:43:57 +02:00
_Please note: Database migrations are supposed to work between releases, not between every commit. If you want to run the current `master` branch (which is the development version), you need to handle that (and more) yourself._
2019-03-06 19:37:55 +01:00
### Disable certain features
2022-02-10 18:04:33 +01:00
2023-05-19 18:08:26 +02:00
If you don't use certain feature sets of Grocy (for example if you don't need "Chores"), there are feature flags per major feature set to hide/disable the related UI elements (see `config-dist.php`).
2019-03-06 19:37:55 +01:00
2018-07-12 19:25:45 +02:00
### Adding your own CSS or JS without to have to modify the application itself
2022-02-10 18:04:33 +01:00
- When the file `data/custom_js.html` exists, the contents of the file will be added just before `</body>` (end of body) on every page
- When the file `data/custom_css.html` exists, the contents of the file will be added just before `</head>` (end of head) on every page
2018-05-12 15:36:23 +02:00
2018-07-16 21:17:32 +02:00
### Demo mode
2022-02-10 18:04:33 +01:00
When the `MODE` setting is set to `dev`, `demo` or `prerelease`, the application will work in a demo mode which means authentication is disabled and some demo data will be generated during the database schema migration (pass the query parameter `nodemodata`, e.g. `https://grocy.example.com/?nodemodata` to skip that).
2018-07-16 21:17:32 +02:00
### Embedded mode
2022-02-10 18:04:33 +01:00
2023-07-29 21:17:59 +02:00
When the file `embedded.txt` exists, it must contain a valid and writable path which will be used as the data directory instead of `data` and authentication will be disabled (used in [Grocy Desktop](https://github.com/grocy/grocy-desktop)).
2018-07-16 21:17:32 +02:00
In embedded mode, settings can be overridden by text files in `data/settingoverrides`, the file name must be `<SettingName>.txt` (e. g. `BASE_URL.txt`) and the content must be the setting value (normally one single line).
2022-02-10 18:04:33 +01:00
## Contributing / Say Thanks
2023-05-22 22:09:20 +02:00
Any help is welcome, feel free to contribute anything which comes to your mind or see <https://grocy.info/#say-thanks> if you just want to say thanks.
2019-04-22 22:43:07 +02:00
2020-04-07 13:48:55 +02:00
## Roadmap
2022-02-10 18:04:33 +01:00
2024-11-01 10:44:16 +01:00
There is none. The progress of a specific bug/enhancement is always tracked in the corresponding issue, at least by commit comment references.
2020-04-07 13:48:55 +02:00
2023-05-21 20:41:06 +02:00
[Milestones](https://github.com/grocy/grocy/milestones) are used to indicate in which version the corresponding request was done (`vNEXT` means it's currently planned to do that for the next release).
2023-05-18 10:39:38 +02:00
2017-04-23 11:11:13 +02:00
## Screenshots
2022-02-10 18:04:33 +01:00
### Stock overview
2020-12-19 17:08:08 +01:00
![Stock overview](https://github.com/grocy/grocy/raw/master/.github/publication_assets/stock.png "Stock overview")
2017-04-23 11:11:13 +02:00
2022-02-10 18:04:33 +01:00
### Shopping List
2020-12-19 17:09:48 +01:00
![Shopping List](https://github.com/grocy/grocy/raw/master/.github/publication_assets/shoppinglist.png "Shopping List")
2017-04-23 11:11:13 +02:00
2022-02-10 18:04:33 +01:00
### Meal Plan
2020-12-19 17:08:08 +01:00
![Meal Plan](https://github.com/grocy/grocy/raw/master/.github/publication_assets/mealplan.png "Meal Plan")
2022-02-10 18:04:33 +01:00
### Chores overview
2020-12-19 17:08:08 +01:00
![Chores overview](https://github.com/grocy/grocy/raw/master/.github/publication_assets/chores.png "Chores overview")
2017-04-23 11:11:13 +02:00
2017-04-15 23:16:20 +02:00
## License
2022-02-10 18:04:33 +01:00
2017-04-15 23:16:20 +02:00
The MIT License (MIT)