Giter Club home page Giter Club logo

picolink's Introduction

PicoLink


PicoLink is not the regular url shortner. It provide super power to your links.

โšก๏ธ Super Powers

  • Custom short link code, even with emojis: https://yoursite.com/๐Ÿš€
  • Customized tags and advanced search to find your shorts faster ๐Ÿ”Ž
  • Quick sharing and qrcode creation ๐Ÿ’ป
  • Complete reports with visits by day, devices, referrers and countries ๐Ÿ“Š
  • Simple API for createating new shorts ๐Ÿค–
  • Multilingual short link with automatic redirect based on client browser language ๐Ÿ’ฅ

๐Ÿ› ๏ธ How to install

๐Ÿณ Docker File

services:
    server:
        container_name: "picolink-server"
        image: ghcr.io/andreazorzi/picolink:latest
        restart: unless-stopped
        ports:
            - '80:80'
        environment:
            APP_ENV: 'production'
            APP_DEBUG: 'false'
            APP_URL: 'https://yourdomain.com'
            DB_DATABASE: 'laravel'
            DB_USERNAME: 'picolink'
            DB_PASSWORD: '_db_password_'
            
            ADMIN_USERNAME: 'admin'
            ADMIN_PASSWORD: '_password_'
        networks:
            - sail
        depends_on:
            - mysql
    mysql:
        container_name: "picolink-db"
        image: 'mysql/mysql-server:8.0'
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: '_root_password_'
            MYSQL_ROOT_HOST: '%'
            MYSQL_DATABASE: 'laravel'
            MYSQL_USER: 'picolink'
            MYSQL_PASSWORD: '_db_password_'
        volumes:
            - 'pathtodocker/picolink/mysql:/var/lib/mysql'
        networks:
            - sail
networks:
    sail:
        driver: bridge

๐ŸŽ Additional .env configurations

# API Token
API_TOKEN: _api_token_

# Authentik
AUTHENTIK_BASE_URL: "https://auth.host.com"
AUTHENTIK_CLIENT_ID: ""
AUTHENTIK_CLIENT_SECRET: ""
AUTHENTIK_REDIRECT_URI: "/auth/authentik/callback"
AUTHENTIK_SLUG: "picolink"

๐Ÿค– API Endpoint

// Create multiple shorts
// PUT /api/short/create
// -H Authorization: Bearer _api_token_

// Data
{
    "shorts": [
        {
            "code": "short1", // set null for generated code
            "description": "link to website",
            "url": "https://website.com/default-redirect-url",
            "languages": [
                {
                    "language": "it",
                    "url": "https://website.com/italian-redirect-url"
                },
                {
                    "language": "de",
                    "url": "https://website.com/german-redirect-url"
                },
                ...
            ],
            "tags": ["Tag1", "Tag2", "Tag3"]
        },
        ...
    ]
}

// JSON Response
{
    "status": "success", // or danger
    "message": "Short links created successfully.", // or the errors
    "shorts": [ // if success, get the shorted link
        "https://website.com/default-redirect-url": "https://short.com/short1"
    ]
}

picolink's People

Contributors

andreazorzi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.