GitPedia

Slug

๐ŸŒฑ An open-source URL shortener built with T3 Stack.

From pheralbยทUpdated June 13, 2026ยทView on GitHubยท

Dashboard   โ–   Roadmap   โ–   Contribute   โ–   Create issue   โ–   X/Twitter The project is written primarily in TypeScript, distributed under the GNU General Public License v3.0 license, first published in 2022. Key topics include: hacktoberfest, next-auth, nextjs, prisma, shadcn-ui.

Latest release: v3โ€” v3.0.0-beta
<div align="center"> <a href="https://slug.vercel.app"> <img src="https://raw.githubusercontent.com/pheralb/slug/refs/heads/main/public/images/logo_svg.svg" alt="Slug Logo" height="64" /> </a> <p></p> <p> <b> An open-source URL shortener built with T3 Stack. </b> </p>

<a href="https://slug.vercel.app/dashboard">Dashboard</a>
<span>ย ย โ–ย ย </span>
<a href="#-roadmap">Roadmap</a>
<span>ย ย โ–ย ย </span>
<a href="#-getting-started">Contribute</a>
<span>ย ย โ–ย ย </span>
<a href="https://github.com/pheralb/slug/issues/new/choose">Create issue</a>
<span>ย ย โ–ย ย </span>
<a href="https://twitter.com/pheralb_">X/Twitter</a>

<div align="center"> <a href="https://slug.vercel.app"> <img src="public/images/screenshot_png.png"> </a> <p></p> </div>

Next.js Badge
Turso Badge
Check workflow
GitHub stars
GitHub releases
GitHub issues
GitHub license

</div>

๐Ÿ‘จโ€๐Ÿš€ Introduction

Slug is a service that offers to shorten urls in a simple, fast and secure way. It's built with T3 Stack, a web development stack made by Theo focused on simplicity, modularity, and full-stack typesafety.

This project uses the following technologies:

โš ๏ธ This is a community project, not associated with Vercel.

๐Ÿš€ Getting Started

Requirements:

Steps:

  1. Fork this project:
  1. Clone the repository:
bash
git clone git@github.com:YOU_USER/slug.git
  1. Install dependencies:
bash
# Install pnpm globally if you don't have it: npm install -g pnpm # and install dependencies: pnpm install
  1. Create a .env file with the following content:

๐Ÿšง The environment variables must match the following schema.

bash
# Database: DATABASE_URL= # "file:./dev.db" TURSO_DATABASE_URL= TURSO_AUTH_TOKEN= # Auth.js => AUTH_SECRET= # Github Provider => GITHUB_ID= GITHUB_CLIENT_SECRET= # Google Provider => GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET=

Database:

Auth.js:

Github Credentials:

Google Credentials:

  1. Generate a new migration file with Prisma:
bash
pnpm db:migrate
  1. Insert the migration data into the Turso database. To do this, go to package.json, modify the db:push command with the name of the migration folder (2024xxxxxxxxxx_init) and run it in your terminal:
bash
pnpm db:push
  1. Run:
  • Development server:
bash
pnpm dev

and open http://localhost:3000 with your browser ๐Ÿš€

  • Prisma Studio:
bash
pnpm db:studio

and open http://localhost:5555 with your browser โœจ

๐Ÿ”ญ Roadmap

This is the roadmap I will be following for the complete migration to v3:

  • โœ… = Stable, completed.
  • ๐Ÿ”” = Stable, but unexpected errors may appear.
  • โš™๏ธ = In progress.

โฌ†๏ธ Known issues:

  • โš™๏ธ Fix issue when logging in with different provider but with the same email. Redirect to an existing route in the app (authjs error).

โฌ†๏ธ Dependencies:

  • โœ… Update @prisma/adapter-libsql, @prisma/client & prisma to the stable version when it's released.
  • โš™๏ธ Update authjs to the stable version (v5) when it's released.

โฌ†๏ธ Auth:

  • โœ… Sign In with Github.
  • ๐Ÿ”” Sign In with Google.

๐Ÿ”” Only for users who have not previously logged in with an existing email address in their Github account. This is an issue that will be worked on soon.

โฌ†๏ธ Middleware:

  • โœ… Redirect with /* and /s/*.
  • โœ… Separate public, protected & authentication routes.

โฌ†๏ธ Dashboard (main):

  • โœ… Create a new short URL.
  • โœ… List all shorted URLs.
  • โœ… Delete a shorted URL.
  • โœ… Update a shorted URL.`

โฌ†๏ธ Dashboard (tags):

  • โœ… Add search links by tags in the dashboard.
  • ๐Ÿ”” Create a new tag.
  • โœ… Delete a tag.
  • โš™๏ธ Update the tags of a link.

๐Ÿ”” Add option to change tag color.

โฌ†๏ธ Dashboard (settings):

  • โœ… Change name.
  • โœ… Change email.
  • โœ… Delete account.
  • โœ… Download all links data.

โœŒ๏ธ Contributing

<a href="https://github.com/pheralb/slug/graphs/contributors"> <img src="https://contrib.rocks/image?repo=pheralb/slug" /> </a> <p></p>

โ˜๏ธ Deploy on Vercel

๐Ÿ”‘ License

Contributors

Showing top 10 contributors by commit count.

View all contributors on GitHub โ†’

This article is auto-generated from pheralb/slug via the GitHub API.Last fetched: 6/23/2026