Ahmedセカイ

Ugurly

Ugurly - A URL shortener service shorten Your URL, Expand Your Possibilities (LOL)

Ugurly

Ugurly (available at ugurly.vercel.app) is a free, open-source URL shortening service. It offers URL statistics, a versatile API, and customization features such as custom slugs, password protection, and link lifespan management.

  • Custom Slugs: Create personalized slugs for your URLs 🎯
  • Emoji Slugs: Use emojis as slugs for fun and uniqueness 😃
  • Password Protection: Secure your URLs with passwords 🔒
  • Click Limit: Control the maximum number of clicks on your URLs 📈
  • URL Statistics: Access detailed statistics for your shortened URLs 📊
  • API: Utilize a free and open-source API for URL shortening and analytics 🛠️
  • Open Source: Ugurly is open-source and free to use 📖
  • Ad-Free: No ads, no tracking, no distractions 🚫
  • Completely Free: No hidden costs, premium plans, or restrictions 💸
  • Self-Hosting: Deploy Ugurly on your own server for complete control 🏠

To access a shortened URL, use the basic structure: https://ugurly.vercel.app/r/:short-code

Example: https://ugurly.vercel.app/r/google

For password-protected URLs, follow the same structure. You'll be redirected to a password entry page.

Example: https://ugurly.vercel.app/r/google-protected Password: 1234

To bypass the password entry page, append the password as a URL parameter:

  • https://ugurly.vercel.app/r/<short_code>?password=<password>
  • https://ugurly.vercel.app/r/google-protected?password=1234

Note: All API routes are protected. Obtain your API key from Ugurly Settings.

Base URL: https://ugurly.vercel.app/api/v1 Required Headers:

HeaderDescriptionRequired
AuthorizationYour API key (Bearer API_KEY)Yes

Endpoint: https://ugurly.vercel.app/api/v1/url/create Method: POST

PayloadData TypeDescriptionRequired
urlStringLong URL to be shortenedYes
slugStringCustom alias for the shortened URLNo
passwordStringPassword for accessing the URLNo
maxClicksNumberMaximum allowed clicks for the URLNo

Endpoint: https://ugurly.vercel.app/api/v1/url/:url-id (Use ID, not slug) Method: GET

Endpoint: https://ugurly.vercel.app/api/v1/urls Method: GET

URLQueryParamData TypeDescriptionRequired
limitNumberPage size for resultsNo
cursorStringStarting cursor for paginationNo

Endpoint: https://ugurly.vercel.app/api/v1/url/edit/:url-id (Use ID, not slug) Method: POST

PayloadData TypeDescriptionRequired
urlStringUpdated long URLYes
slugStringUpdated custom alias for the URLNo
maxClicksNumberUpdated maximum allowed clicks for the URLNo
passwordStringUpdated password for accessing the URLNo

Endpoint: https://ugurly.vercel.app/api/v1/url/delete/:url-id (Use ID, not slug) Method: DELETE

bash

npm install

bash

mv .env.example .env

bash

TURSO_DATABASE_URL="libsql://db-name-user.turso.io"
TURSO_AUTH_TOKEN="longtoken"
 
# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
# NOTE: NEXTAUTH_SECRET is required for production
# NEXTAUTH_SECRET=""
NEXTAUTH_URL="http://localhost:3000"
 
# Next Auth Discord Provider
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""
 
# Next Google Auth Provider
GOOGLE_CLIENT_ID="your-app.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="GOCXXX-XXXX-XXXXXXXXXXXXX"
 
# Core
# This is used to generated urls server side and client side
NEXT_PUBLIC_REDIRECT_URL="https://ugurly.vercel.app"

bash

npm run dev

Open your browser and go to http://localhost:3000 to use your self-hosted Ugurly URL shortener.

セカイ

Copyright © 2024 Ahmed Mohamed.