Um encurtador de URL's gratuito e Open source. Torne suas URL's um tanto pequenas forma rápida e gratuita

Overview

Slim Framework 4 Skeleton Application

Coverage Status

Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This application uses the latest Slim 4 with Slim PSR-7 implementation and PHP-DI container implementation. It also uses the Monolog logger.

This skeleton application was built for Composer. This makes setting up a new Slim Framework application quick and easy.

Install the Application

Run this command from the directory in which you want to install your new Slim Framework application.

composer create-project slim/slim-skeleton [my-app-name]

Replace [my-app-name] with the desired directory name for your new application. You'll want to:

  • Point your virtual host document root to your new application's public/ directory.
  • Ensure logs/ is web writable.

To run the application in development, you can run these commands

cd [my-app-name]
composer start

Or you can use docker-compose to run the app with docker, so you can run these commands:

cd [my-app-name]
docker-compose up -d

After that, open http://localhost:8080 in your browser.

Run this command in the application directory to run the test suite

composer test

That's it! Now go build something cool.

Comments
  • Install and setup Phinx

    Install and setup Phinx

    Install https://phinx.org/ tool to make it easier version database. It's necessary create the migration scripts to tables urls and url_logs;

    Follow the table structure:

    Url Table

    create table urls
    (
        id             binary(16)                                 not null,
        uuid           varchar(36)                                not null,
        user_id        binary(16)                                 null,
        long_url       longtext                                   not null,
        short_url_path varchar(15)                                not null,
        type           enum ('RANDOM', 'CUSTOM') default 'RANDOM' not null,
        economy_rate   decimal(10, 2)            default 0.00     not null,
        meta           json                                       null,
        created_at     timestamp                                  not null,
        constraint urls_id_uindex
            unique (id),
        constraint urls_short_url_path_uindex
            unique (short_url_path),
        constraint urls_uuid_uindex
            unique (uuid)
    );
    
    alter table urls
        add primary key (id);
    

    Url Logs Table

    create table urls_logs
    (
        id         binary(16)  not null,
        uuid       varchar(36) not null,
        url_id     binary(16)  not null,
        created_at timestamp   not null,
        meta       json        null,
        constraint urls_logs_id_uindex
            unique (id),
        constraint urls_logs_uuid_uindex
            unique (uuid),
        constraint fk_urls_logs_url_id
            foreign key (url_id) references urls (id)
                on update cascade on delete cascade
    );
    
    alter table urls_logs
        add primary key (id);
    

    These are the procedures to make it easy to convert UUID to Binary and vice versa:

    BIN_TO_UUID()

    CREATE DEFINER=`smll_main`@`%.%.%.%` FUNCTION `smll_main`.`BIN_TO_UUID`(b BINARY(16)) RETURNS char(36) CHARSET latin1
    BEGIN
        DECLARE hexStr CHAR(32);
        SET hexStr = HEX(b);
        RETURN LOWER(CONCAT(
            SUBSTR(hexStr, 1, 8), '-',
            SUBSTR(hexStr, 9, 4), '-',
            SUBSTR(hexStr, 13, 4), '-',
            SUBSTR(hexStr, 17, 4), '-',
            SUBSTR(hexStr, 21)
        ));
    END;
    

    UUID_TO_BIN()

    CREATE DEFINER=`smll_main`@`%.%.%.%` FUNCTION `smll_main`.`UUID_TO_BIN`(uuid CHAR(36)) RETURNS binary(16)
    RETURN UNHEX(REPLACE(uuid, '-', ''));
    
    feature hacktoberfest 
    opened by dersonsena 2
  • Issue #14 - Adding Phinx as migration manager

    Issue #14 - Adding Phinx as migration manager

    • To create a new migration: docker exec -it smallish-app vendor/bin/phinx create <MyNewMigration>
    • To run all migrations: docker exec -it smallish-app vendor/bin/phinx migrate -e <environment> (all environments are configured in phinx.php file on root folder)
    • To rollback all migrations: docker exec -it smallish-app vendor/bin/phinx rollback -e <environment> -t 0

    To check more commands available, you can visit the Phinx documentation: https://book.cakephp.org/phinx/0/en/intro.html

    hacktoberfest-accepted 
    opened by lucascavalcante 1
  • Arrange Project Error Handler

    Arrange Project Error Handler

    • Exception classes organization
    • Add the https://github.com/filp/whoops when requests are via template
    • Add the https://github.com/omniti-labs/jsend convention to async request (REST)
    feature hacktoberfest 
    opened by dersonsena 0
  • Basic metrics to URL

    Basic metrics to URL

    If the user adds the + sign at the end of the shortened URL (https://.../abcde**+**) the user should be redirected to a page and show basic shortened URL metrics: total clicks, origin and last ten clicks informations

    feature hacktoberfest 
    opened by dersonsena 0
  • Notification when Url is not clicked

    Notification when Url is not clicked

    When the URL is linked to a user and it has not been clicked within a certain time, send a reminder via email and/or browser notification.

    It should have a setting of 3 days by default, but the user who owns the URL can change it at any time.

    feature hacktoberfest 
    opened by dersonsena 0
  • Report URL

    Report URL

    Creation of a page so that any user can report a link that does not comply with the project's policies and terms. It's very important that the page has a captcha verification, something like the follow image:

    image

    feature hacktoberfest 
    opened by dersonsena 0
  • Browser plugin

    Browser plugin

    Creation of a plugin for Firefox and Chrome browsers. The idea would be to give the user the possibility to shorten a URL when the user selects a URL on some page and the plugin can quickly and easily create a shortened URL

    feature hacktoberfest 
    opened by dersonsena 0
Releases(v1.1.0)
Owner
Kilderson Sena
Cearense arretado e amante da programação. Full Stack Dev, Pai do Kauan Lucas, adora café, Muay Thai, futebol e Rock'n Roll
Kilderson Sena
A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain.

A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain. Table of Contents Full documentation Dock

null 1.7k Dec 29, 2022
Create and validate signed URLs with a limited lifetime

THIS PACKAGE IS NOT MAINTAINED ANYMORE. SIGNING URLS IS NOW PART OF LARAVEL: https://laravel-news.com/signed-routes Create secured URLs with a limited

Spatie 652 Dec 31, 2022
Laravel based API to shorten URLs and share them easily. Redirects to the real URL by entering a short URL generated by the API

URL Shortener Requirements: PHP 7.4 or above composer node / npm Installation clone the project from the Github repository, enter the project folder,

Julio Vergara 5 Nov 20, 2021
A Laravel package to shorten urls

Laravel Short Url Laravel Short Url is a package allowing you to shorten urls. Installation With composer composer require gallib/laravel-short-url t

Alain Pellaux 153 Dec 16, 2022
A simple PHP library to parse and manipulate URLs

Url is a simple library to ease creating and managing Urls in PHP.

The League of Extraordinary Packages 351 Dec 30, 2022
Heitor Pedroso 27 Jul 14, 2021
Michael Pratt 307 Dec 23, 2022
PHP 7+ Payment processing library. It offers everything you need to work with payments: Credit card & offsite purchasing, subscriptions, payouts etc. - provided by Forma-Pro

Supporting Payum Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our

Payum 1.7k Jan 5, 2023
Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro

Supporting Enqueue Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and

Enqueue 2.1k Dec 22, 2022
Jéssica Paula 7 Aug 12, 2022
Crea rutas en php de la forma mas fácil posible.

SimpleRouter-php Te permitirá crear un routing de la forma mas fácil posible, recibiendo todo lo enviado por un usuario a través de un callback. Prime

null 7 Dec 27, 2022
PHP 7+ Payment processing library. It offers everything you need to work with payments: Credit card & offsite purchasing, subscriptions, payouts etc. - provided by Forma-Pro

Supporting Payum Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our

Payum 1.7k Dec 27, 2022
📁 As Sessões são uma forma simples de armazenar dados para usuários, ficando mais confiável em manipular dados importantes

?? As Sessões são uma forma simples de armazenar dados para usuários, ficando mais confiável em manipular dados importantes

Gustavo de Oliveira 4 Jan 25, 2022
Biblioteca para obter dados dos calendários acadêmicos da UFFS de forma automatizada

uffs-ca-scraping Um pacote PHP para raspagem dos calendários acadêmicos da Universidade Federal da Fronteira Sul. A ideia desse pacote é permitir que

CC - UFFS 2 Mar 20, 2022
Livro de introdução ao PHP orientado a objetos com MVC de forma prática

phpoo-livro Livro de introdução ao PHP orientado a objetos usando MVC com rotas. Porque de forma prática, por conta da criação, passo a passo, de um a

Ribamar FS 8 Dec 24, 2022
A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

URLify for PHP A fast PHP slug generator and transliteration library, started as a PHP port of URLify.js from the Django project. Handles symbols from

Aband*nthecar 667 Dec 20, 2022
PHP library to parse urls from string input

Url highlight - PHP library to parse URLs from string input. Works with complex URLs, edge cases and encoded input. Features: Replace URLs in string b

Volodymyr Stelmakh 77 Sep 16, 2022
Generate Laravel route URLs from JavaScript.

Laroute Laravel has some pretty sweet helper functions for generating urls/links and its auto-json-magic makes it building APIs super easy. It's my go

Aaron Lord 785 Dec 30, 2022
Easy multilingual urls and redirection support for the Laravel framework

Linguist - Multilingual urls and redirects for Laravel This package provides an easy multilingual urls and redirection support for the Laravel framewo

Tanel Tammik 189 Jul 18, 2022