{"id":15118670,"url":"https://github.com/GermanHeim/svelte-shortener","last_synced_at":"2025-09-28T01:30:35.325Z","repository":{"id":158754858,"uuid":"585734290","full_name":"GermanHeim/svelte-shortener","owner":"GermanHeim","description":"An open-source URL Shortener written in SvelteKit with PocketBase.","archived":false,"fork":false,"pushed_at":"2023-01-09T13:32:16.000Z","size":2094,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-26T02:01:28.326Z","etag":null,"topics":["pocketbase","svelte","sveltejs","sveltekit","url-shortener"],"latest_commit_sha":null,"homepage":"https://demo-svelte-shortener.vercel.app","language":"Svelte","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/GermanHeim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-01-05T23:47:14.000Z","updated_at":"2024-06-22T16:18:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"50cb263a-e9e8-487b-99de-fee7bfdb3dce","html_url":"https://github.com/GermanHeim/svelte-shortener","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GermanHeim%2Fsvelte-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GermanHeim%2Fsvelte-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GermanHeim%2Fsvelte-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GermanHeim%2Fsvelte-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GermanHeim","download_url":"https://codeload.github.com/GermanHeim/svelte-shortener/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234475315,"owners_count":18839358,"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":["pocketbase","svelte","sveltejs","sveltekit","url-shortener"],"created_at":"2024-09-26T01:53:33.515Z","updated_at":"2025-09-28T01:30:30.010Z","avatar_url":"https://github.com/GermanHeim.png","language":"Svelte","funding_links":[],"categories":["JavaScript/TypeScript"],"sub_categories":["Svelte"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/GermanHeim/svelte-shortener\"\u003e\n    \u003cimg src=\"static/favicon.png\" alt=\"Logo\" width=\"100\" height=\"100\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1 align=\"center\"\u003eSvelte Shortener\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    An open-source URL Shortener written in SvelteKit with PocketBase\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GermanHeim/svelte-shortener/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GermanHeim/svelte-shortener/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\u003cp align=\"center\"\u003eWork in progress\u003c/p\u003e\n\u003cbr /\u003e\n\n### Table of Contents\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#demo\"\u003eDemo\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#tech-stack\"\u003eTech Stack\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n        \u003ca href=\"#deployment\"\u003eDeployment\u003c/a\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\n            \u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#deploy\"\u003eDeploy\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#pocketbase-schema\"\u003ePocketBase Schema\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#run-locally\"\u003eRun Locally\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=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\n\n## Demo\n![Demo GIF](https://media1.giphy.com/media/t4PxHCFR2A6b0hw9Wo/giphy.gif?cid=790b76114c582f0c52f3f1f4e2a6b1b85f591f426542a013\u0026rid=giphy.gif\u0026ct=g)\n\n[Live demo](https://demo-svelte-shortener.vercel.app/)\n\n* Email: test@user.com\n* Password: testuser123\n\n## Tech Stack\n* [SvelteKit](https://kit.svelte.dev/)\n* [PocketBase](https://pocketbase.io)\n\nAlso uses [svelte-french-toast](https://svelte-french-toast.com/) and [svelte-icons-pack](https://leshak.github.io/svelte-icons-pack/).\n\n## Deployment\n### Prerequisites\nTo setup your own instance of Svelte Shortener you will need a PocketBase deployment. If you don't already have one, consider hosting in [Fly.io](https://fly.io) (see [Host for free in Fly.io](https://github.com/pocketbase/pocketbase/discussions/537)) or [PocketHost](https://pockethost.io/).\n\nTo configure your PocketBase, you will need to import the [schema](/pocketbase/pb_schema.json) by going to your PocketBase instance, and clicking on `Import collections` inside settings. After this, you will need to create a new verified user. This will be the user you will use to authenticate yourself. \n\n### Deploy\nAfter getting your database set up, you will need to deploy the actual WebApp. You can do this by clicking the button below, and filling in the required environment variable (your PocketBase URL):\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FGermanHeim%2Fsvelte-shortener\u0026env=POCKETBASE_URL\u0026envDescription=Set%20your%20PocketBase%20URL%20(without%20%2F_%2F%20or%20%2Fapi%2F))\n\nYou can also deploy it manually by cloning the repo and running `npm run build` and `npm run preview` (or `npm run start`).\n\n## Run Locally\n\nTo run Svelte Shortener locally, you will need to clone the repo and install the dependencies:\n\n```bash\n# Clone the project\ngit clone https://github.com/GermanHeim/svelte-shortener\n\n# Go to the project directory\ncd svelte-shortener\n\n# Install dependencies\nnpm install\n```\n\nAfter this, you will need to run the PocketBase instance. To do so, you will need to donwload the executable from [here](https://pocketbase.io/) and move it to the `pocketbase` directory.\nYou can now run `./pocketbase serve` inside the pocketbase directory. This will start a PocketBase instance in `127.0.0.1:8090`.\n\nImport the [schema](/pocketbase/pb_schema.json) by going to your PocketBase instance, and clicking on `Import collections` inside settings. After this, you will need to create a new verified user. This will be the user you will use to authenticate yourself.\n\nCreate an `.env` file in the root directory of the project, and add the following variable:\n* `POCKETBASE_URL` - The URL of your PocketBase instance (without `/_/` or `/api/`)\n\nNow go to the root directory of the project and run `npm run dev`. This will start the SvelteKit instance.\n\n## PocketBase Schema\n\nThe PocketBase schema is located in the [pocketbase](/pocketbase) folder. You can import it by going to your PocketBase instance, and clicking on `Import collections` inside settings.\n\nIt consists of the following collections:\n* `users` - Stores the users that are used for authentication\n* `links` - Stores the links that are shortened, including the slug to be used and the original URL\n\nThe slug field inside the `links` collection is a unique index, so you can't have two links with the same slug. Also, only users that are verified can create links, to avoid anyone else to create links.\n\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\".\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## License\n\nDistributed under the MIT License. See [`LICENSE.md`](/LICENSE.md) for more information.\n\n## Acknowledgments\n\nThe UI is highly inspired on PocketBase.\u003c/br\u003e\nThe logo was made from the PocketBase's logo, using Feather's link icon.\nThe background that is used was made by [rawpixel.com](https://rawpixel.com) and it was downloaded from [Freepik](https://www.freepik.com/free-vector/monochrome-abstract-contour-line-illustration_3841780.htm#query=topography\u0026position=10\u0026from_view=keyword).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGermanHeim%2Fsvelte-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGermanHeim%2Fsvelte-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGermanHeim%2Fsvelte-shortener/lists"}