https://github.com/cgxeiji/inventory
Inventory manager with a web interface made with Go.
https://github.com/cgxeiji/inventory
go golang inventory-management web
Last synced: 24 days ago
JSON representation
Inventory manager with a web interface made with Go.
- Host: GitHub
- URL: https://github.com/cgxeiji/inventory
- Owner: cgxeiji
- License: mit
- Created: 2020-09-01T04:18:16.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-09-03T03:03:51.000Z (almost 6 years ago)
- Last Synced: 2025-04-20T14:54:28.087Z (about 1 year ago)
- Topics: go, golang, inventory-management, web
- Language: Go
- Homepage:
- Size: 22.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Inventory
[](https://github.com/cgxeiji/inventory/releases)
[](https://pkg.go.dev/github.com/cgxeiji/inventory)
[](https://github.com/cgxeiji/inventory/blob/master/LICENSE)

Inventory is an inventory manager written in Go and served as a web page. It
was developed to keep track of items in a small scale, like research
laboratories or homes.
## How does it work?
By default, inventory will run a web server at `localhost:8080` and create a
directory at `$HOME/.inventory` to store the information of each item.
You can change the port and directory by passing:
```
$ inventory -p 5005 -d /path/to/inventory/dir
```
`localhost:8080` shows a table with the list of items in the inventory. You can
press `+ Add item` to add a new item to the inventory using the web interface
or manually create an entry at `$HOME/.inventory`.
#### Items
Each item is added to its own directory with a unique id name and consist of a
`info.yaml` metadata file, `picture.jpg` with a picture of the item, and
`location.jpg` with a photo of the return location.
Once the item is added, it will appear inside the table at the root url.
Clicking on the thumbnail of the item will open a new page with a QR code
linking that specific item. You can print this QR code and physically attach it
to the item.
#### Check in/out with QR codes
Scanning the QR code will open an `update item` interface where the user is
prompted to write their name. Clicking on `Use item!` will change the state of
the item to `in use = true` and show the name of the person using the item.
After finishing using the item, scan the QR code again to return the item. This
time, the user is prompted to upload a photo of the place the item was returned
at. Pressing on `Return item!` will change the state of the item to `in use =
false` and the location of the item can be reviewed by clicking on the
`returned` link from the main inventory url.
### Security
If only restricted users should have access to the inventory, then create a
`.htdigest` file or `.htpasswd` file and add users to the realm `inventory`.
Then, run inventory as:
```
$ inventory -c /path/to/.htdigest
```
This will block the access to the inventory main page, but the QR scan can
still be accessed by anyone.
## Installation
You can download the [release
binaries](https://github.com/cgxeiji/inventory/releases) or compile it from
source by running:
```
$ go get -v github.com/cgxeiji/inventory/inventory
```