You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xenua 551a4a42bc
add license
10 months ago
entity initial commit 11 months ago
migration initial commit 11 months ago
src implement secure cooking 11 months ago
.gitignore initial commit 11 months ago
Cargo.lock initial commit 11 months ago
Cargo.toml initial commit 11 months ago add license 10 months ago update readme already lmao 11 months ago


this is unfinished software

a tiny link shortener (& maybe pastebin in the future)

running it

^V needs a postgresql database. for ssl, run it behind a reverse proxy like nginx.

all config is done through env vars/.env file:

var default description
LISTEN_ADDR the listen address with port.
DATABASE_URL the address to the postgres database. this is passed directly to sea_orm::Database::connect
BASE_DOMAIN ^V assumes https if this is set, and will use secure cookies for that domain
V_ID_CHARSET abcdefghijkmnpqrstuwxyz123467890 the charset for generated ids that show up in links (manual overrides don't care about this)
V_ID_GEN_LENGTH 6 length of the generated ids (again, manually set ids don't care.)
V_DEV_TEST_DATA whether or not to generate a dev user with some test data; probably only useful for devs

(this list may be incomplete. the full list can be found at the start of the main() function in src/

dev info

if you want to tinker with ^V, here's some pointers

  • it uses sea_orm for data storage abstraction.
    • defining new things works as follows:
      1. the schema is defined through migrations (migration/), then
      2. it is applied to an actual database:
        $ sea migrate fresh
      3. entity mappings are generated from that database:
        $ sea generate entity --with-serde both --serde-skip-deserializing-primary-key -o entity/src
    • the sea command is provided from $ cargo install sea-orm-cli and needs to run with DATABASE_URL set (or its -u option)