{"id":21070633,"url":"https://github.com/wisembly/qrcode-shortener","last_synced_at":"2025-10-09T03:10:20.904Z","repository":{"id":229298417,"uuid":"776017924","full_name":"Wisembly/qrcode-shortener","owner":"Wisembly","description":"Simple shorten QRCode lib to easily scan urls","archived":false,"fork":false,"pushed_at":"2024-03-23T13:15:16.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T02:46:54.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Wisembly.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":"2024-03-22T14:10:56.000Z","updated_at":"2024-03-22T14:11:19.000Z","dependencies_parsed_at":"2024-04-09T15:06:14.971Z","dependency_job_id":null,"html_url":"https://github.com/Wisembly/qrcode-shortener","commit_stats":null,"previous_names":["wisembly/qrcode-shortener"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Wisembly/qrcode-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wisembly%2Fqrcode-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wisembly%2Fqrcode-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wisembly%2Fqrcode-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wisembly%2Fqrcode-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wisembly","download_url":"https://codeload.github.com/Wisembly/qrcode-shortener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wisembly%2Fqrcode-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000778,"owners_count":26082911,"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-09T02:00:07.460Z","response_time":59,"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-19T18:47:39.399Z","updated_at":"2025-10-09T03:10:20.883Z","avatar_url":"https://github.com/Wisembly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QRCode shortener\n\nThis very small lib allows to generate a very simple and readable QRCode for a given URL. Under the hood, it shortens the url to a 4 characters url (use a small domain too) and generates a QRCode for it. This way, the QRCode is very small and can be printed on a small surface or scanned from a distance.\n\nOn top of that, you can access a very simple count stat on the QRCode usage.\n\n# Pre-requisites\n\n- Node.js (LTS version recommended)\n- Redis (LTS version recommended)\n\n# Installation\n\n```bash\nnpm install\n```\n\n# Run\n\npm2 is recommended to run the server in production.\nAn ecosystem dist file is provided in the repository for file structure and variables.\n\n```bash\npm2 start ecosystem.config.js\n```\n\n# Usage\n\n## Shorten a URL\n\n```bash\ncurl -X GET \"http://localhost:3322/shorten?url=https://www.google.com\"\n```\n\nOptional parameters:\n\n- `desiredShort`: the desired short url. If not provided, a random 4 characters string will be generated.\n- `secureKey`: the secret key to access the stats. If not provided, the stats will be public.\n\nExample: `http://localhost:3322/shorten?url=https://www.google.com\u0026desiredShort=goog\u0026secureKey=yourPublicKey`\n\n## Register a secureKey\n\nA secure key is used to generate short codes whose stats won't be public. To register a secure key, use the following command:\n\n```bash\ncurl -X POST \"http://localhost:3322/secure\" -d \"key=yourPublicKey\u0026secret=yourSecretKey\" -H \"Content-Type: application/x-www-form-urlencoded\" -H \"Accept: application/json\"\n```\n\nRegister it once, and use `secureKey=yourPublicKey` on each request to generate a short code.\nTo retrieve stats of a shortcode, use `secret=yourSecretKey` as the secret key.\n\n## Get shortcode stats\n\n```bash\ncurl -X GET \"http://localhost:3322/stats?{short}+\"\n```\n\nUse the shortcode you want to get the stats from, followed by a `+` sign.\n\nOptional parameters:\n\n- `secret`: the secret key to access the stats if the shortcode is secured\n\n## Dynamically generate a QRCode\n\n```html\n\u003ca href=\"http://localhost:3322/qrcode?url=https://www.google.com\"\u003e\n```\n\nOptional parameters:\n\n- `desiredShort`: the desired short url. If not provided, a random 4 characters string will be generated.\n- `size`: the size of the QRCode. Default is 512x512.\n- `quality`: the quality of the QRCode (L, M, H). Default is M.\n- `output`: the output format of the QRCode (png, data). Default is png.\n- `secureKey`: the secret key used to secure the shortcode stats\n\nExample: `http://localhost:3322/qrcode?url=https://www.google.com\u0026desiredShort=goog\u0026size=256x256\u0026quality=H\u0026output=data\u0026secureKey=yourPublicKey`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisembly%2Fqrcode-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisembly%2Fqrcode-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisembly%2Fqrcode-shortener/lists"}