Find a file
2024-07-24 16:44:29 +02:00
.forgejo/workflows CI: Only gate OCI image push on branch 2024-07-24 12:19:58 +02:00
.reuse Switch to sqlx 2024-07-19 00:05:26 +02:00
.sqlx Add item state 2024-07-24 16:29:22 +02:00
assets/fonts Include custom build of Iosevka 2024-07-19 00:06:07 +02:00
LICENSES Include custom build of Iosevka 2024-07-19 00:06:07 +02:00
migrations Add item state 2024-07-24 16:29:22 +02:00
src Use clap for configuration 2024-07-24 16:44:29 +02:00
static Add item state 2024-07-24 16:29:22 +02:00
.envrc Switch to sqlx 2024-07-19 00:05:26 +02:00
.gitattributes Include custom build of Iosevka 2024-07-19 00:06:07 +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 clap for configuration 2024-07-24 16:44:29 +02:00
Cargo.lock.license Init 2024-07-11 01:16:00 +02:00
Cargo.toml Use clap for configuration 2024-07-24 16:44:29 +02:00
deny.toml Expose label generation to frontend 2024-07-19 00:06:18 +02:00
flake.lock flake: Update pre-commit-hooks.nix to new name 2024-07-24 12:19:59 +02:00
flake.lock.license Init 2024-07-11 01:16:00 +02:00
flake.nix Add item state 2024-07-24 16:29:22 +02:00
README.md Add basic README 2024-07-19 00:06:24 +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.