{"id":14989473,"url":"https://github.com/irevenko/url-shortener","last_synced_at":"2025-04-12T01:16:22.848Z","repository":{"id":129864158,"uuid":"272080240","full_name":"irevenko/url-shortener","owner":"irevenko","description":"✂️ Service for Shortening links using Node.js","archived":false,"fork":false,"pushed_at":"2020-07-04T11:03:42.000Z","size":51,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T01:16:12.005Z","etag":null,"topics":["koa","koajs","mongodb","node","node-js","nodejs","tailwind","tailwind-css","tailwindcss","url-shortener","urlshortener"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irevenko.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}},"created_at":"2020-06-13T20:22:48.000Z","updated_at":"2023-03-04T04:40:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2eb3b6a-bc8c-43dc-8be0-82e94cbb111f","html_url":"https://github.com/irevenko/url-shortener","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"3b7f20a0f293798eb9557d20c51ac5bd4b7187e2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Furl-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Furl-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Furl-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Furl-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irevenko","download_url":"https://codeload.github.com/irevenko/url-shortener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501858,"owners_count":21114684,"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":["koa","koajs","mongodb","node","node-js","nodejs","tailwind","tailwind-css","tailwindcss","url-shortener","urlshortener"],"created_at":"2024-09-24T14:18:25.468Z","updated_at":"2025-04-12T01:16:22.802Z","avatar_url":"https://github.com/irevenko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cherry URL Shortener ✂️\nRed, Cherry 🍒 Themed Web Service for Shortening urls\n\n# How it works ❓\nFor example: we have our inital link which we need to short - ```github.com``` \u003cbr\u003e\nAnd we have our domen which is for instance - ```short.me``` \u003cbr\u003e\nWe generate a unique token for our URL and save it into DB. In my case i used [shortid](https://www.npmjs.com/package/shortid) library to generate it for me \u003cbr\u003e\nAnd we get a token - ```1kDdvurHW```. Then we have to hookup this token to our domen \u003cbr\u003e\nAfter this we compose our short URL by adding token after domen - ```short.me/1kDdvurHW``` \u003cbr\u003e\nIf URL is in DB we return it to user, Else we just create a new one by assembling our ```domen``` and ```token``` together.\u003cbr\u003e\nFinally when user enters this URL we redirect him to our initial site by checking the token from the DB and comparing it to our URL.  ```short.me/1kDdvurHW  -\u003e  github.com``` \u003cbr\u003e\nSo our DB Schema has URL collection which contains: ```Full URL, URL Token, Short URL``` \u003cbr\u003e\nAnd we store our Full URL together with unique URL Token\n\n# Technologies 🧾\n* Node.js \n  * koa\n  * shortid\n  * mongoose\n* Tailwind CSS\n\n# Preview 🔍\n\u003cimg src=\"https://i.imgur.com/iQPNQs3.png\"\u003e \n\u003cimg src=\"https://i.imgur.com/6g60tq8.png\"\u003e\n\n# Quick Start 🚀\n```git clone https://github.com/irevenko/url-shortener.git``` \u003cbr\u003e\n```cd url-shortener/src``` \u003cbr\u003e\n```npm install``` \u003cbr\u003e\n```touch .env (Add your variables)``` \u003cbr\u003e\n```node app.js```\n\n# What I Learned 🧠\n* koa, koa-router, koa-bodyparser\n* ejs Engine\n* MongoDB\n\n# ToDo\n* Deploy on Heroku\n\n# License 📑 \n(c) 2020 Ilya Revenko. [MIT License](https://tldrlegal.com/license/mit-license)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firevenko%2Furl-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firevenko%2Furl-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firevenko%2Furl-shortener/lists"}