glortener#

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.
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 encryptionDATABASE_URL: path to the sqlite database. it should include thesqlite:prefix if you intend to use dbmateBASE_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
/createroute should be protected to prevent unauthorized users from creating or deleting links - the
/:slugroutes 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:
- open an issue to discuss your ideas.
- fork the repository and submit a pull request.
acknowledgements#
- font provided by Cozette.
- colorscheme provided by Dark Biscuit de Mar