Skip to content

Latest commit

 

History

651 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slugy Banner

Slugy

Fast, secure, open-source link management.

Shorten URLs, use custom domains, generate QR codes, track analytics, and share bio links — all in one place.

MIT License Next.js TypeScript PRs Welcome

GitHub Stars GitHub Forks GitHub Issues

Live Demo · App · Report Bug · Request Feature


✨ Features

Feature Description
🔗 Link shortening Short, branded links with custom slugs, expiration & password protection
🌍 Custom domains Connect your own domain for fully branded links
📱 QR codes Generate and customize QR codes for any link
📊 Analytics Clicks, referrers, countries, devices & more
🌐 Bio links One personalized page for all your links (bio.slugy.co)
📦 Browser extension Shorten links without leaving the page
💳 Subscriptions Plans and billing powered by Polar

🛠 Tech Stack

Tech Icons

Category Tool
Framework Next.js (App Router, React 19)
Language TypeScript
Styling Tailwind CSS
Auth Better Auth
ORM Prisma
Database Neon Postgres
Cache / Queue Upstash Redis QStash
Background jobs Inngest
Analytics Tinybird
Email Resend
Storage Cloudflare R2
Billing Polar
Monitoring Sentry
Hosting Vercel

🚀 Getting Started

Prerequisites

  • Node.js 20+
  • A Postgres database (Neon recommended)
  • Upstash Redis account (for caching / rate limits)
  • Optional: Tinybird, Resend, Polar, Cloudflare R2, Vercel accounts for full functionality

1. Clone and install

git clone https://github.com/slugylink/slugy.git
cd slugy
npm install

2. Configure environment

cp .env.example .env.local

Fill in .env.local — at minimum:

  • DATABASE_URL
  • BETTER_AUTH_SECRET
  • UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN
  • NEXT_PUBLIC_ROOT_DOMAIN, NEXT_PUBLIC_APP_URL

See .env.example for the full list.

3. Set up the database

npx prisma generate
npm run db:push
# or, for migrations:
npm run db:migrate

Optional seed:

npm run seed

4. Run locally

npm run dev

Open:

Local subdomains (app.localhost) require custom-domain routing configured in next.config.ts. If app.localhost:3000 does not resolve, add 127.0.0.1 app.localhost to your hosts file.

Useful scripts

npm run dev        # start dev server
npm run build      # production build
npm run start      # start production server
npm run lint       # run ESLint
npm run db:studio  # open Prisma Studio

📁 Project Structure

src/
  app/          # Next.js App Router routes (root, app, api)
  components/   # Reusable UI components
  lib/          # Helpers, clients, utils
  content/      # Blog / marketing content
prisma/         # Schema and migrations
extension/      # Browser extension source
scripts/        # Maintenance scripts
tinybird/       # Analytics pipes and datasources

🤝 Contributing

Contributions are welcome. To contribute:

  1. Fork the repo
  2. Create a branch: git checkout -b feat/my-change
  3. Make your changes with Prettier / ESLint passing (npm run lint)
  4. Commit and push
  5. Open a pull request against main

Please open an issue first for large changes so we can discuss the approach.


💖 Sponsor

If Slugy helps you, consider sponsoring:

GitHub Sponsor

Supported by:

Neon

🔗 Connect

Website X Maintainer GitHub


📄 License

MIT © Slugy — see LICENSE.

Built with 🐌 by the Slugy team

About

Transform long URLs into beautiful, trackable short links with Slugy ✨

Topics

Resources

Stars

92 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages