{"id":19554612,"url":"https://github.com/m4tx/shrt","last_synced_at":"2026-06-10T13:31:40.385Z","repository":{"id":231617888,"uuid":"782229576","full_name":"m4tx/shrt","owner":"m4tx","description":"Modern link shortener service written in Rust [WIP]","archived":false,"fork":false,"pushed_at":"2026-04-02T06:48:45.000Z","size":541,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-02T20:21:47.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m4tx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"m4tx"}},"created_at":"2024-04-04T22:13:42.000Z","updated_at":"2026-04-02T06:47:37.000Z","dependencies_parsed_at":"2024-05-06T14:31:13.554Z","dependency_job_id":"5f97b7a3-20a0-41dc-8d1a-1b7e28e46451","html_url":"https://github.com/m4tx/shrt","commit_stats":null,"previous_names":["m4tx/shrt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/m4tx/shrt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fshrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fshrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fshrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fshrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m4tx","download_url":"https://codeload.github.com/m4tx/shrt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fshrt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34155422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T04:28:18.219Z","updated_at":"2026-06-10T13:31:40.364Z","avatar_url":"https://github.com/m4tx.png","language":"Rust","funding_links":["https://github.com/sponsors/m4tx"],"categories":[],"sub_categories":[],"readme":"shrt\n====\n\n[![Rust Build Status](https://github.com/m4tx/shrt/workflows/Rust%20CI/badge.svg)](https://github.com/m4tx/shrt/actions/workflows/rust.yml)\n[![Docker Build Status](https://github.com/m4tx/shrt/workflows/Docker/badge.svg)](https://github.com/m4tx/shrt/actions/workflows/docker-publish.yml)\n[![GNU AGPL v3 licensed](https://img.shields.io/github/license/m4tx/shrt)](https://github.com/m4tx/shrt/blob/master/LICENSE)\n\nShrt is a modern link shortener service written in Rust. It is designed to be fast, secure, and easy to use. It is composed of two parts: the backend, which is a RESTful API, and the frontend, which is a single-page application.\n\n## Development\n\nThe project is written purely in [Rust](https://www.rust-lang.org/), both its backend and frontend.\n\n### Backend\n\nTo run the development server, execute:\n\n```shell\ncd shrt-backend\ncargo run\n```\n\nThis will start the server at [localhost:8000](http://localhost:8000).\n\nTo build a release version, execute:\n\n```shell\ncargo build --release\n```\n\nThe target binary will be put at `target/release/shrt-backend`.\n\n### Frontend\n\nFrontend uses the [yew](https://yew.rs/docs/getting-started/build-a-sample-app) framework. The code is compiled into a WebAssembly binary and then statically served.\n\nFirst, install the [Trunk](https://trunkrs.dev/) bundler and add wasm32 target support to your Rust toolchain.\n\n```shell\nrustup target add wasm32-unknown-unknown\ncargo install trunk\n```\n\nThen, you can use:\n\n```shell\ncd shrt-frontend\ntrunk serve\n```\n\nto start local server at [localhost:8080](http://localhost:8080). It assumes that the backend is running at [localhost:8000](http://localhost:8000).\n\nTo build a distributable version of the frontend, execute:\n\n```shell\ntrunk build --release\n```\n\nThis will build a website in `frontend/dist/` directory that can be statically served by a server such as nginx. You can override th backend URL by providing it as the `SHRT_API_URL` environment variable, like so:\n\n```sh\nexport SHRT_API_URL=http://api.shrt.example.com\ntrunk build --release\n```\n\n#### `pre-commit`\nWe encourage contributors to use predefined [`pre-commit`](https://pre-commit.com/) hooks — to install them in your local repo, make sure you have `pre-commit` installed and run:\n\n```shell\npre-commit install\n```\n\n## Deployment\n\nThe easiest way to try locally or deploy _shrt_ is to use auto-generated Docker images. There is a separate image for backend, frontend, and a reverse proxy (that exposes both the backend and frontend under the same server), all of which are published on [the GitHub Container Registry](https://github.com/m4tx?tab=packages\u0026repo_name=shrt). There is an example `docker-compose.yml` file provided in the repository root.\n\nIn the project root directory, execute:\n\n```shell\ndocker compose up -d\n```\n\nAfter that, the website will be available on at [localhost:8000](http://localhost:8000).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4tx%2Fshrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm4tx%2Fshrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4tx%2Fshrt/lists"}