Knot is a high-performance, lightweight URL shortener built with Laravel 13 and PHP 8.5. It features custom slugs, dynamic sub-path redirection, click tracking, hybrid authentication, and public "Linktree-style" pages.
- Short Links: Create shortened URLs with automatic or custom slugs.
- Dynamic Redirection: Support for sub-paths and query parameters forwarding.
- Click Tracking: Detailed tracking of clicks (IP, User Agent, Timestamp).
- Public Link Pages: Create beautiful, customizable landing pages for multiple links (Linktree-style).
- Hybrid Authentication: Support for Email/Password, Google Socialite, and LDAP.
- Role-Based Access: Admin and User roles with different permission levels.
- User Management: Admins can block/unblock users and create new accounts manually.
- Infrastructure flexibility: Built-in fallback for Redis and configurable Sentry integration.
- QR Code Generation: Generate QR codes for any link or public page with download support.
- Log Viewer: Integrated log monitoring for administrators.
- PHP 8.5+
- MySQL 8.0+
- Composer
- Node.js & NPM (for frontend assets)
-
Clone the repository:
git clone <repository-url> cd knot
-
Install dependencies:
composer install npm install
-
Configure Environment: Copy
.env.exampleto.envand configure accordingly:cp .env.example .env php artisan key:generate
Ensure
DB_CONNECTION,DB_DATABASE,DB_USERNAME, andDB_PASSWORDare set correctly. -
Initialize Database:
php artisan migrate --seed
The seed will create an admin user:
admin@exemplo.com/Admin@123 -
Storage Link:
php artisan storage:link
-
Compile Assets:
npm run build
-
Run the application:
php artisan serve
To enable Social Login or LDAP, fill the corresponding variables in the .env file:
GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRETLDAP_HOST/LDAP_BASE_DN
This project is open-sourced software licensed under the MIT license.