Find a file
2024-07-14 18:31:08 +02:00
.reuse Switch to sqlx 2024-07-11 17:25:01 +02:00
.sqlx Add description to item and item class 2024-07-14 15:17:04 +02:00
assets/fonts Include custom build of Iosevka 2024-07-13 13:43:51 +02:00
LICENSES Include custom build of Iosevka 2024-07-13 13:43:51 +02:00
migrations Add description to item and item class 2024-07-14 15:17:04 +02:00
src Use rust-embed for serving static files 2024-07-14 18:31:08 +02:00
static Expose label generation to frontend 2024-07-14 01:28:56 +02:00
.envrc Switch to sqlx 2024-07-11 17:25:01 +02:00
.gitattributes Include custom build of Iosevka 2024-07-13 13:43:51 +02:00
.gitignore Init 2024-07-11 01:16:00 +02:00
build.rs Init 2024-07-11 01:16:00 +02:00
Cargo.lock Use rust-embed for serving static files 2024-07-14 18:31:08 +02:00
Cargo.lock.license Init 2024-07-11 01:16:00 +02:00
Cargo.toml Use rust-embed for serving static files 2024-07-14 18:31:08 +02:00
deny.toml Expose label generation to frontend 2024-07-14 01:28:56 +02:00
flake.lock Init 2024-07-11 01:16:00 +02:00
flake.lock.license Init 2024-07-11 01:16:00 +02:00
flake.nix Switch to sqlx 2024-07-11 17:25:01 +02:00
README.md Add basic README 2024-07-14 17:36:08 +02:00

li7y

li7y (pronounced lily) is a lightweight inventory management system.

Development

To start a development server, run

SUPERUSER_PASSWORD=foo SECRET_KEY=[replace me with the output of head -c 64 /dev/urandom | base64 -w0] DATABASE_URL=postgres://postgres:postgres@localhost/li7y cargo watch -x run

This sets the superuser password to foo, specifies a fixed secret key (to keep sessions persistent across restarts) and configures a database at postgres://postgres:postgres@localhost/li7y. A development database can be set up for example with podman:

podman run --rm -it -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=li7y -p 5432:5432 postgres:15-alpine

Then you can open your browser on http://localhost:8080.

When changing SQL queries or the database schema, the SQLx cache needs to be updated with

DATABASE_URL=postgres://postgres:postgres@localhost/li7y cargo sqlx prepare

Migrations should be run automatically, but during development the sqlx command-line tool can be used to run and revert the migrations:

# manually apply unapplied operations
DATABASE_URL=postgres://postgres:postgres@localhost/li7y sqlx migrate run
# manually revert most recent migration
DATABASE_URL=postgres://postgres:postgres@localhost/li7y sqlx migrate revert

Licence

Most files are licensed under the terms of AGPL-3.0-or-later, but some files (especially vendored external files) are licensed differently. Every file has its licence specified according to the REUSE specification. You can use the reuse tool to get detailed copyright and licensing information on all files.

The built software includes third-party libraries. A detailed list of them can be generated with cargo tree or cargo deny list -l crate.