{"id":20512190,"url":"https://github.com/kinson/lnk","last_synced_at":"2025-07-17T07:04:01.602Z","repository":{"id":84509210,"uuid":"384575220","full_name":"kinson/LnK","owner":"kinson","description":"A URL Shortener","archived":false,"fork":false,"pushed_at":"2022-08-21T05:09:08.000Z","size":374,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T22:45:51.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kinson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-07-10T00:00:22.000Z","updated_at":"2023-03-07T09:55:07.000Z","dependencies_parsed_at":"2023-03-02T20:45:34.641Z","dependency_job_id":null,"html_url":"https://github.com/kinson/LnK","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kinson/LnK","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinson%2FLnK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinson%2FLnK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinson%2FLnK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinson%2FLnK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kinson","download_url":"https://codeload.github.com/kinson/LnK/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinson%2FLnK/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265575456,"owners_count":23790773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-15T20:40:17.009Z","updated_at":"2025-07-17T07:04:01.581Z","avatar_url":"https://github.com/kinson.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lnk\n![Github Actions](https://github.com/kinson/LnK/actions/workflows/ci.yml/badge.svg)\n\u003eYet another URL shortener.\n\n## Getting Started\n\nBefore getting started, the following software needs to be installed:\n* [Docker](https://docs.docker.com/get-docker/)\n* [Node.js](https://nodejs.org/en/download/) (this application was developed using v16)\n* [Yarn](https://classic.yarnpkg.com/en/docs/install)\n* [Elixir](https://elixir-lang.org/install.html)\n* [Phoenix](https://hexdocs.pm/phoenix/installation.html)\n\n### Setup\nFrom the project root, run `make setup` to:\n1) Download and start the database Docker image for Postgres\n2) Fetch \u0026 compile elixir dependencies\n3) Create \u0026 migrate the database\n4) Stop the Docker container\n\n### Start the Server\nFrom the project root, run `make server` to:\n1) Start the Docker container\n2) Start the backend server\n3) Start the frontend web application\n4) Go to http://localhost:8080 to use the web application\n\n### Stop the Server\nFrom the project root, run `make stop` to:\n1) Stop the backend server\n2) Stop the frontend server\n3) Stop the Docker container\n\n## Notes on Approach\n\n### Dark Mode Toggle\n\nFull disclosure, I took these icons from a project I contributed them to previously, you can find that code [here](https://github.com/elixirschool/school_house/blob/master/lib/school_house_web/templates/layout/_dark_mode_toggle.html.leex).\n\n### Using Next.js\n\nI opted to use Next.js on the frontend because I have found it makes the spin up process for a new react app even quicker (at least for me) than `create-react-app`.\n\n### Using TypeScript\n\nI have not used TypeScript on the frontend before (aside from React Native), but I opted to for this project because it _feels_ like a safer choice than JavaScript in general and it provided piece of mind while rapidly developing this website.\n\n### Next Steps\nI did not want to overengineer this project at the risk of making it too time consuming to reason about, but some things I would add in the future are:\n* A caching mechanism on the backend (possibly using [this library](https://github.com/kinson/fiat)) to avoid a round trip to the database when querying a url\n* Continuous deployment to a free-tier service from a web hosting service\n* Better API response validation and typing using TypeScript\n* A feature to let people choose custom shortened URLs\n\n_If you have made it this far, thanks for reading :)_","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinson%2Flnk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkinson%2Flnk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinson%2Flnk/lists"}