{"id":23849047,"url":"https://github.com/mishnit/shorts","last_synced_at":"2026-04-11T19:03:13.482Z","repository":{"id":147577951,"uuid":"199603864","full_name":"mishnit/Shorts","owner":"mishnit","description":"A microservice for shortening Long URLs to short Emoji URLs","archived":false,"fork":false,"pushed_at":"2019-07-30T11:25:01.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T07:14:38.975Z","etag":null,"topics":["docker","flask","graphql","postgresql","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mishnit.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":"2019-07-30T07:57:40.000Z","updated_at":"2019-07-30T11:25:03.000Z","dependencies_parsed_at":"2023-05-31T16:30:54.706Z","dependency_job_id":null,"html_url":"https://github.com/mishnit/Shorts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mishnit/Shorts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishnit%2FShorts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishnit%2FShorts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishnit%2FShorts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishnit%2FShorts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mishnit","download_url":"https://codeload.github.com/mishnit/Shorts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishnit%2FShorts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891748,"owners_count":26063861,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":["docker","flask","graphql","postgresql","python3"],"created_at":"2025-01-02T21:50:37.097Z","updated_at":"2025-10-08T05:24:12.488Z","avatar_url":"https://github.com/mishnit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 😎 Shorts- URl shortening service \n\nThis service will take a standard URL, and return a much shorter URL comprised of a hand-selected set of very special emoji characters.\n\nThis API is built with `Python 3.6`, `Flask 1.0.3`, `Graphene 2.1.3`, `SQLAlchemy 1.3.3` and `PostgreSQL 9.6`.\n\n\n__Endpoints:__\n\n*GraphQL*\n\n* GraphQL interface is available at  `http://localhost:3001/graphql/`\n\n*Query*\n\n```\n{\n  \tredirectForSlug (slug: \"💃😕\") \n  \tslugs\n}\n```\n\n* `slugs` returns a list of all short urls currencly registered\n* `redirectForSlug` return the redirect URL for a given slug\n\n*Mutation*\n\n```\nmutation myFirstMutation { \n  createShortUrl(redirectUrl: \"https://github.com/mishnit/shorts\") {\n  \tshort\n    ok\n  }\n}\n```\n\n*REST*\n\n* GET `/\u003cshort-url\u003e` return a http redirect (302) if an associated URL is found.\n* POST `/` posting a request containing a body of `{url: \u003clong-url\u003e}` will result in the creation of your own short silly emoji URL that you can share with your friends.\n\n### 🙈 Caveats \n\nThis is a small example service demonstrating flask, sqlalchemy, and graphQL. There aren't many tests,\nand I'm not adhering to strict pep8. I've considered scalability, performance, and security, and\nlook forward to discussing my choices.\n\nAt the moment this is a backend service only, responding to GraphQL or REST requests. I might throw together a quick React frontend and add CORS support if I find spare time.\n\nIn all seriousness this is not a great idea for general URL shortening, as many browsers and middleware technologies still have a difficult time with emoji characters. Still fun though. 👯\n\n### 😼 Dependencies\n\n* docker:\n```\nsudo apt-get update\nsudo apt-get remove docker docker-engine docker.io (Uninstall Old Versions of Docker)\nsudo apt install docker.io\nsudo systemctl start docker\nsudo systemctl enable docker\ndocker --version\nsudo chown $USER:docker /var/run/docker.sock\n```\n\n* docker-compose:\n```\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\nsudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose\ndocker-compose --version\n```\n\n### 🚀 Start it up\n\n* run `./bin/start.sh` to build images, run containers and start the server on 127.0.0.1:3001\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishnit%2Fshorts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmishnit%2Fshorts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishnit%2Fshorts/lists"}