A modern, feature-rich URL shortener built with Laravel that allows you to create short, memorable links with optional expiration dates and click limits.
LinkTinker is a powerful URL shortener that helps you create short, shareable links. It's built with Laravel and comes with features like custom slugs, link expiration, and click tracking. Whether you're sharing links on social media, in emails, or anywhere else, LinkTinker makes your links more manageable and trackable.
- URL Shortening: Convert long URLs into short, shareable links
- Custom Slugs: Option to set custom short URLs (e.g., yourdomain.com/myslug)
- Link Expiration: Set expiration dates for your shortened links
- Click Limits: Restrict the number of times a link can be accessed
- Click Tracking: Monitor how many times each link has been clicked
- Responsive Design: Works on desktop and mobile devices
- Copy to Clipboard: One-click copy of shortened URLs
- Automatic Cleanup: Expired and maxed-out links are automatically deactivated
The clean and intuitive interface for creating short links
- Backend: Laravel 12.x
- Frontend: Blade Templates, Tailwind CSS
- Database: MySQL/PostgreSQL/SQLite
- JavaScript: Vanilla JS for interactivity
- Deployment: Compatible with any PHP 8.3+ server
-
Clone the repository
git clone https://github.com/yourusername/LinkTinker.git cd LinkTinker -
Install PHP dependencies
composer install
-
Install NPM dependencies
npm install npm run build
-
Create and configure .env file
cp .env.example .env php artisan key:generate
-
Configure your database Update the
.envfile with your database credentials:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=linktinker DB_USERNAME=your_username DB_PASSWORD=your_password -
Run migrations
php artisan migrate
-
Start the development server
php artisan serve
-
Access the application Open your browser and visit:
http://localhost:8000
Create a .env file in the root directory and configure the following variables:
APP_NAME=LinkTinker
APP_ENV=local
APP_KEY=your_application_key
APP_DEBUG=true
APP_URL=http://localhost:8000
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=linktinker
DB_USERNAME=root
DB_PASSWORD=
# Optional: Set to true to force HTTPS URLs
FORCE_HTTPS=false
# Optional: Set your application timezone
timezone=UTC
# Optional: Configure mail settings if you want to enable email notifications
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
-
Creating a Short Link
- Visit the homepage
- Enter your long URL
- (Optional) Set a custom slug
- (Optional) Set an expiration date
- (Optional) Set a maximum number of clicks
- Click "Shorten Link"
- Copy your shortened URL
-
Accessing a Short Link
- Simply visit the shortened URL
- You'll be automatically redirected to the original URL
-
Link Expiration
- If an expiration date is set, the link will stop working after that date
- If a click limit is set, the link will stop working after reaching the maximum number of clicks
| Column | Type | Description |
|---|---|---|
| id | bigint | Primary key |
| slug | string | The short URL identifier |
| url | string | The original URL |
| clicks | integer | Number of times the link has been clicked |
| max_clicks | integer | Maximum allowed clicks (null for unlimited) |
| expires_at | timestamp | Expiration date (null for never) |
| deleted_at | timestamp | For soft deletes |
| created_at | timestamp | When the link was created |
| updated_at | timestamp | When the link was last updated |
Built from bytes by Kush