Skip to content

ThalissonM/knot

Repository files navigation

Knot URL Shortener

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.

Features

  • 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.

Requirements

  • PHP 8.5+
  • MySQL 8.0+
  • Composer
  • Node.js & NPM (for frontend assets)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd knot
  2. Install dependencies:

    composer install
    npm install
  3. Configure Environment: Copy .env.example to .env and configure accordingly:

    cp .env.example .env
    php artisan key:generate

    Ensure DB_CONNECTION, DB_DATABASE, DB_USERNAME, and DB_PASSWORD are set correctly.

  4. Initialize Database:

    php artisan migrate --seed

    The seed will create an admin user: admin@exemplo.com / Admin@123

  5. Storage Link:

    php artisan storage:link
  6. Compile Assets:

    npm run build
  7. Run the application:

    php artisan serve

Authentication Configuration

To enable Social Login or LDAP, fill the corresponding variables in the .env file:

  • GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET
  • LDAP_HOST / LDAP_BASE_DN

License

This project is open-sourced software licensed under the MIT license.

About

A high-speed URL shortener and customizable Link Hub (Linktree-style) built with Laravel 13, featuring native LDAP, Google Auth, and dynamic redirection.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages