a simple gleam link shortener using a lustre server component and sqlight + cake. has user-friendly, readable slugs
README.md

glortener #

home page screenshot

a simple gleam link shortener using a lustre server component and sqlight + cake. user-friendly slugs can be generated automatically, or you can input them manually.

Package Version Hex Docs

development #

devenv shell                  # enter devenv shell to install all the required packages
dbmate up                     # create sqlite db and run migrations
gleam run -m tailwind/install # install tailwind cli
gleam run -m tailwind/run     # build CSS
gleam run                     # run the project

deployment #

the project needs the following environment variables defined:

  • SECRET_KEY_BASE: needed by web server for signing and encryption
  • DATABASE_URL: path to the sqlite database. it should include the sqlite: prefix if you intend to use dbmate
  • BASE_URL: the base URL, where you plan to serve the application from

since this application is intended to be minimal, i suggest handling authentication at the network level:

  • the /create route should be protected to prevent unauthorized users from creating or deleting links
  • the /:slug routes should be publicly accessible, so they can be shared with anyone

contributing #

contributions are welcome! if you have suggestions, bug reports, or want to add new features, please feel free to:

  1. open an issue to discuss your ideas.
  2. fork the repository and submit a pull request.

acknowledgements #