{"repo":"Snazzah/stub","free":true,"listed":false,"github":"https://github.com/Snazzah/stub","clone":"git clone https://github.com/Snazzah/stub.git","description":"A self-hostable modified fork of Dub: An open-source link shortener.","language":"TypeScript","stars":218,"topics":["bitly","hacktoberfest","link-shortener"],"license":"AGPL-3.0","category":"self-hosted-apps","readme_excerpt":"# Stub A self-hostable modified fork of Dub: An open-source link shortener. Introduction · Why a fork? · Tech Stack · Deploy your Own · Contributing Introduction Stub is a heavily modified fork of Dub: An open-source link shortener with built-in analytics using Next.js and Redis. Warning This is still a work in progress. For a single-user instance, this works fine. User management doesn't exist yet. Why a fork of Dub? Dub relies a lot on serverless services (Vercel, Upstash) and wasn't all that good to self-host on your own server. There was also some hardcoded domains to dub.sh which wouldn't work when self-hosting. Stub serves to have a nice link shortener like Dub that can be hosted on your own server. Differences - Stripe and Plausible modules were removed. - @upstash/redis was replaced with ioredis , which caused a bit of problems and I ended up restructuring link routing like in the next point. - Dub uses Next.js middleware to route links, but the middleware itself is limited to edge functionality, which wouldn't work for Redis outside of Upstash's Redis client (which is just calling endpoints). The router was instead made into a separate node HTTP server hosted on a separate port (default 3001 ). This also allows for index links with no hassle. (Using :index as a key lets you create an index link!) - Getting location data is different since Dub used Vercel's geolocation data. Instead, Stub will lookup geo data from GeoLite2. (Make sure that you set your trust proxy var","default_branch":null,"files":null,"tree":[],"storefront":"/r/Snazzah","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Snazzah/stub/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}