like dog tags but for dolls and entities of any kind https://dolltags.pet
Find a file
2025-04-02 12:46:29 +02:00
.sqlx feat: ability to hide tags 2025-04-02 12:46:29 +02:00
.vscode implemented db reseed in CLI 2025-02-05 11:02:37 +01:00
assets feat: ability to hide tags 2025-04-02 12:46:29 +02:00
migrations feat: ability to hide tags 2025-04-02 12:46:29 +02:00
src feat: ability to hide tags 2025-04-02 12:46:29 +02:00
templates feat: ability to hide tags 2025-04-02 12:46:29 +02:00
.editorconfig woof 2025-01-09 02:21:17 +01:00
.gitignore dev: config cleanup 2025-02-08 19:05:51 +01:00
.rustfmt.toml woof 2025-01-09 02:21:17 +01:00
build.rs added migrations 2025-01-23 22:32:47 +01:00
Cargo.lock feat: TOTP 2FA, closes #5 2025-03-19 13:19:26 +01:00
Cargo.toml feat: TOTP 2FA, closes #5 2025-03-19 13:19:26 +01:00
CHANGELOG.md added qrcode on the tags 2025-02-08 18:18:35 +01:00
LICENSE fix: license details 2025-02-01 14:54:47 +01:00
README.md updated main git link 2025-02-24 22:52:18 +01:00
Rocket.toml.dev dev: config cleanup 2025-02-08 19:05:51 +01:00
shell.nix damn migrating to pgsql was fast here 2025-01-24 16:24:49 +01:00
TODO.md feat: ability to hide tags 2025-04-02 12:46:29 +02:00

dolltags

official docs&blog repo

like dog tags but for dolls and entities of all kinds.

a db for registering dolls and their handlers, dog tags style.

profiles are ID'd using a 6-digit ID for manual input (maybe something else if i can manage to make use of RFID tags) and searched with that ID, nothing else.

a profile is

  • name
  • pronouns
  • kind of entity
  • handler name and contact
  • doll type
  • breed
  • behaviour
  • microchipped
  • and whatever else i think of

Setting it up for prod

The packaging is currently not up to date on NUR due to issues with NUR. it will be packaged on my own repository soon.

The project is packaged for NixOS; if you don't use NixOS, you will need to compile it yourself with the rust toolchain.

This project requires rust (stable, at least v1.84.0 which is the version i use) and cargo, as well as a postgresql database.

$ git clone https://git.deuxfleurs.fr/StardustShard/dolltags
$ cd dolltags
$ cargo build --release

You will also need to bundle the assets/ and templates/ directory.

In both cases, the daemon/CLI requires a configuration file, by default named Rocket.toml and loaded from the CWD but which can be pointed to a custom file using the ROCKET_CONFIG environment variable. Likewise, the assets and template directories will be by default loaded from the CWD but can be pointed to a custom directory using the environment variable ASSETS_PATH. However, the template directory is expected to be in the CWD with no way to change it as-is for now (it will try to search in $PWD/templates).

The configuration file requires three keys, shown below.

[default]
secret_key = "use `openssl rand -base64 32` to generate it"
public_url = "set the canonical url to your instance here"

[default.databases.dolltags]
url = "postgres://dolltags:password@localhost/dolltags"
  • secret_key is required to securely handle the user sessions; changing the secret key will immediately disconnect any previously-working session
  • public_url is required to generate the QrCode image URLs that are used to allow users to download and use those QrCodes wherever they want to offer direct access (e.g. pet tags, ID cards, etc). Example: public_url="https://dolltags.pet/"
  • url for the database follows the PostgreSQL connection URL format and should support all its arguments and variants

Once you have it deployed, to get an admin account there is currently no easy way to promote a user so the current procedure is the following.

  1. create your (to be admin) account
  2. in your server's postgresql terminal, set the is_admin flag to true on your user, e.g. by doing UPDATE users SET is_admin = true WHERE username = 'your-username';