{"id":17793399,"url":"https://github.com/jqshuv/short","last_synced_at":"2025-03-16T19:30:35.995Z","repository":{"id":257851838,"uuid":"872968543","full_name":"jqshuv/short","owner":"jqshuv","description":"☁️ Simple link shortener for Cloudflare Workers®.","archived":false,"fork":false,"pushed_at":"2025-02-24T23:40:48.000Z","size":762,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T04:51:10.448Z","etag":null,"topics":["cloudflare","cloudflare-workers","link-shortener","link-shortener-api","url-redirect","url-shortener","url-shortener-api","url-shortner","workers"],"latest_commit_sha":null,"homepage":"https://s.jqshuv.com/apidocs","language":"TypeScript","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/jqshuv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"jqshuv"}},"created_at":"2024-10-15T11:41:13.000Z","updated_at":"2025-02-24T23:40:51.000Z","dependencies_parsed_at":"2025-02-23T02:28:28.707Z","dependency_job_id":"0c7c6f2b-a4bc-4f24-ab90-6e9f9505da1c","html_url":"https://github.com/jqshuv/short","commit_stats":null,"previous_names":["jqshuv/short"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqshuv%2Fshort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqshuv%2Fshort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqshuv%2Fshort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqshuv%2Fshort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jqshuv","download_url":"https://codeload.github.com/jqshuv/short/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243919839,"owners_count":20368956,"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":["cloudflare","cloudflare-workers","link-shortener","link-shortener-api","url-redirect","url-shortener","url-shortener-api","url-shortner","workers"],"created_at":"2024-10-27T11:08:25.986Z","updated_at":"2025-03-16T19:30:35.985Z","avatar_url":"https://github.com/jqshuv.png","language":"TypeScript","funding_links":["https://ko-fi.com/jqshuv"],"categories":[],"sub_categories":[],"readme":"\u003c!--\n Copyright (c) 2024 Joshua Schmitt\n\n This software is released under the MIT License.\n https://opensource.org/licenses/MIT\n--\u003e\n\n\u003c!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --\u003e\n\u003ca id=\"readme-top\"\u003e\u003c/a\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![Wakatime][wakatime-shield]][wakatime-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/jqshuv/short\"\u003e\n    \u003cimg src=\".github/assets/short-logo-bordered.svg\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003eshort.\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Short is a lightweight and simple link shortener working on Cloudflare Workers®.\n    \u003cbr /\u003e\n    \u003ca href=\"https://s.jqshuv.com/apidocs\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://s.jqshuv.com/github\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/jqshuv/short/issues/new?assignees=\u0026labels=bug\u0026projects=\u0026template=🐛-bug-report.md\u0026title=[BUG]%20\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/jqshuv/short/issues/new?assignees=\u0026labels=enhancement\u0026projects=\u0026template=✨-feature-request.md\u0026title=\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#legal\"\u003eLegal\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n![short banner image][banner]\n\nThe goal of this project is to create a lightweight and simple url shortener that simply runs on Cloudflare Workers® and is deployed by GitHub Actions. It uses the native Cloudflare Workers® SDK without any additional packreges to be as minimal and cheap as possible. Short provides a simple API to create and manage new links.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n### Built With\n\n[![Cloudflare Workers][cf-workers]][cf-workers-url] \u003cbr /\u003e\n[![GitHub Actions][gh-actions]][gh-actions-url] \u003cbr /\u003e\n[![TypeScript][ts]][ts-url] \u003cbr /\u003e\n[![Vitest][vitest]][vitest-url] \u003cbr /\u003e\n[![Prettier][prettier]][prettier-url] \u003cbr /\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nThis is an explanation of how you can get your own instance of short up and running.\n\n### Prerequisites\n\nBefore you get started, you need to have a few things ready:\n\n\u003e [!CAUTION]\n\u003e When you fork the repository **unselect** \"Copy the `main` branch only\" else you will only be able to use the development version.\n\n* [Fork](https://github.com/jqshuv/short/fork) the repository to your own account **with all branches**.\n* A Cloudflare® API Key with the necessary permissions to create and manage workers.\n  * Follow the instructions [here](https://developers.cloudflare.com/workers/ci-cd/external-cicd/github-actions/#api-token) to get your API Key.\n* A Cloudflare® KV Namespace to store the links.\n  * Follow the instructions [here](https://developers.cloudflare.com/kv/get-started/#2-create-a-kv-namespace) to create a new KV Namespace. (Recommended: Select Dashboard in the documentation)\n\n\n### Deployment\n\n\n\u003e [!IMPORTANT]\n\u003e It is mandatory to follow the following steps to ensure that a stable version is deployed. If you want to deploy the development version, you can do so by selecting the `main` branch in the workflow.\n\n1. Create following secrets in your forked repository: (Settings \u003e Secrets and variables \u003e New Repository Secret)\n   * `CF_API_TOKEN` - Your Cloudflare® API Token\n   * `CF_KV_ID` - Your Cloudflare KV Namespace ID\n     * To get your KV Namespace ID, go to your Cloudflare® Dashboard, select your KV Namespace and copy the which is next to the name in the top left.\n   * `SHORT_API_KEY` - Recommended: A random string if you want to secure your API.\n\n2. Activate GitHub Actions in your repository.\n   1. Go to the `Actions` tab in your repository.\n   2. Click on the green button `I understand my workflows, go ahead and enable them` to enable GitHub Actions.\n\n3. Run the workflow `🚀 Deploy`.\n   1. On your repository page, click on the `Actions` tab.\n   2. Click on the `🚀 Deploy` workflow on the left side.\n   3. Click on the `Run workflow` button on the right side.\n      1. Click on the `Branch: main` dropdown.\n      2. Select the branch `production`.\n   4. Run the workflow by clicking the green `Run workflow` button.\n\n4. (Recommended) Install the [pull app](https://github.com/apps/pull) to the repository. It will automatically update the production branch. Just install it and you are done, everything is preconfigured and will be updated automatically.\n\n#### 🚀 All done! How simple huh? Now you can see your worker active [here](https://dash.cloudflare.com/?to=/:account/workers-and-pages) in your Cloudflare dashboard.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nShort provides a simple API to create and manage new links. The API is secured by an API key which you can set in the secrets of your repository.\n\n_For detailed documentation, please refer to the [API Documentation](https://s.jqshuv.com/apidocs)_\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\n- [ ] Simple web interface to create and manage links.\n- [X] Custom link expiration.\n- [ ] Custom link statistics.\n\nSee the [open issues](https://github.com/jqshuv/short/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Top contributors:\n\n\u003ca href=\"https://github.com/jqshuv/short/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=jqshuv/short\" alt=\"contrib.rocks image\" /\u003e\n\u003c/a\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See [`LICENSE`](https://github.com/jqshuv/short/blob/main/LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nJoshua Schmitt - [@jqshuv](https://github.com/jqshuv) - me@jqshuv.com\n\nProject Link: [https://github.com/jqshuv/short](https://github.com/jqshuv/short)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\n* [Cloudflare](https://cloudflare.com) and [GitHub](https://github.com) for the amazing services.\n* [Best-README-Template](https://github.com/othneildrew/Best-README-Template) for the README template.\n* [Cloudflare Worker - Status Page](https://github.com/eidam/cf-workers-status-page) for the actions workflow inspiration.\n* [YAML Update Action](https://github.com/fjogeleit/yaml-update-action) for the actions workflow tools.\n* [Bump.sh](https://bump.sh) for the API documentation platform.\n* [Contrib.rocks](https://contrib.rocks) for the contributors badge.\n* [Shields.io](https://shields.io) for the badges.\n* [API-Fiddle](https://api-fiddle.com) for the API documentation generation.\n* [Cloudflare Workers SDK](https://github.com/cloudflare/workers-sdk) for the SDK and inspiration for code structure.\n* [Devin's Badges](https://github.com/intergrav/devins-badges) for the badges and inspiration for the logo and banner.\n* **And of course, the amazing open-source community! 🚀**\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LEGAL --\u003e\n# Legal\n* Cloudflare, the Cloudflare logo, Cloudflare Workers® adn the Cloudflare Workers® logo are registered trademarks of Cloudflare, Inc. in the United States and other countries.\n* GitHub, GITHUB, the GitHub logo(s), and the GitHub Actions logo are registered trademarks of GitHub, Inc. in the United States and other countries.\n\nMe and this project are not affiliated with Cloudflare, Inc. or GitHub, Inc. in any way. The use of the trademarks is only for identification and explanation purposes. The use of the trademarks does not imply any endorsement by the trademark owners. If you have any questions or concerns, please contact me at me@jqshuv.com. I do not claim any ownership of the trademarks. All rights belong to their respective owners. Thank you for your understanding.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[docs-url]: https://s.jqshuv.com/apidocs\n\n[contributors-shield]: https://img.shields.io/github/contributors/jqshuv/short.svg?style=for-the-badge\n[contributors-url]: https://github.com/jqshuv/short/graphs/contributors\n\n[forks-shield]: https://img.shields.io/github/forks/jqshuv/short.svg?style=for-the-badge\n[forks-url]: https://github.com/jqshuv/short/network/members\n\n[stars-shield]: https://img.shields.io/github/stars/jqshuv/short.svg?style=for-the-badge\n[stars-url]: https://github.com/jqshuv/short/stargazers\n\n[issues-shield]: https://img.shields.io/github/issues/jqshuv/short.svg?style=for-the-badge\n[issues-url]: https://github.com/jqshuv/short/issues\n\n[license-shield]: https://img.shields.io/github/license/jqshuv/short.svg?style=for-the-badge\n[license-url]: https://github.com/jqshuv/short/blob/master/LICENSE\n\n[wakatime-shield]: https://wakatime.com/badge/user/b80127f3-fcf6-417a-9cdd-107757c5022f/project/691d39e9-e109-43f2-af91-657d977c1b18.svg?style=for-the-badge\n[wakatime-url]: https://wakatime.com/@jqshuv/projects/ttqahjjgfm\n\n[banner]: .github/assets/short-banner.svg\n\n[cf-workers]: https://img.shields.io/badge/Cloudflare_Workers-ffffff?style=for-the-badge\u0026logo=cloudflareworkers\u0026logoColor=F38020\n[cf-workers-url]: https://workers.cloudflare.com/\n\n[gh-actions]: https://img.shields.io/badge/GitHub_Actions-000000?style=for-the-badge\u0026logo=githubactions\u0026logoColor=2088FF\n[gh-actions-url]: https://github.com/features/actions\n\n[ts]: https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\n[ts-url]: https://www.typescriptlang.org/\n\n[vitest]: https://img.shields.io/badge/Vitest-1b1c1e?style=for-the-badge\u0026logo=vitest\u0026logoColor=6E9F18\n[vitest-url]: https://vitejs.dev/\n\n\n[prettier]: https://img.shields.io/badge/Prettier-1d2a33?style=for-the-badge\u0026logo=prettier\u0026logoColor=F7B93E\n[prettier-url]: https://prettier.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjqshuv%2Fshort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjqshuv%2Fshort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjqshuv%2Fshort/lists"}