Giter VIP home page Giter VIP logo

dub's Introduction

Dub – an open-source link shortener SaaS with built-in analytics + free custom domains.

An open-source link shortener SaaS with built-in analytics + free custom domains.

Introduction · Deploy Your Own · Tech Stack · Implementation · Contributing


Introduction

Dub is an open-source link shortener with built-in analytics + free custom domains. Built with Vercel Edge Functions and Upstash Redis.

Here are some of the features that Dub provides out-of-the-box:

Built-in Analytics

Dub provides a powerful analytics dashboard for your links, including geolocation, device, and browser information.

Analytics Dashboard

Custom domains

You can easily configure custom domains on Dub – just add an A/CNAME record to your DNS provider and you're good to go. This is built on the Vercel Domains API.

Custom Domains

OG Image Proxy

Add a custom OG image in front of your target URL. Bots like Twitter/Facebook will be served this image, while users will be redirected to your target URL.

OG Image Proxy

Deploy Your Own

You can deploy your own hosted version of Dub for greater privacy & control. Just click the link below to deploy a ready-to-go version of Dub to Vercel.

Deploy with Vercel

Tech Stack

Implementation

Dub is built as a standard Next.js application with Middleware to handle multi-tenancy, inspired by the Vercel Platforms Starter Kit.

Redis is used as the database for storing links and analytics data, which works well for key-value data types. Redis also has the Sorted Set data type, which is perfect for storing & retrieving time-series analytics data. Here's the full schema:

  • {hostname}:links – hashmap of all links for a given hostname (e.g. dub.sh:links)
  • {hostname}:links:timestamps – sorted set of all link timestamps for a given hostname (e.g. dub.sh:links:timestamps)
  • {hostname}:clicks:{linkId} – sorted set of all clicks for a given link (e.g. dub.sh:clicks:github)
  • {hostname}:root:clicks – sorted set of all root link clicks for a given hostname (e.g. dub.sh:root:clicks)

Contributing

We love our contributors! Here's how you can contribute:

  • Open an issue if you believe you've encountered a bug.
  • Make a pull request to add new features/make quality-of-life improvements/fix bugs.

Author

License

Inspired by Plausible, Dub is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find it here.

dub's People

Contributors

steven-tey avatar matthewstanciu avatar itsmingjie avatar snazzah avatar theabhayprajapati avatar imbios avatar mxkaske avatar shuding avatar ynbh avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.