2017 © Pedro Peláez
 

project yii2-minify-url

Project on YII2 framework for create short url (url shortener)

image

gaalferov/yii2-minify-url

Project on YII2 framework for create short url (url shortener)

  • Sunday, February 25, 2018
  • by gaalferov
  • Repository
  • 3 Watchers
  • 5 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Yii 2 Minify-URL Project (Url Shortener)

Codacy Badge, (*1)

URL Shortener on Yii2 Framework. Live demo - https://burl.pro, (*2)

Features

  • Public urls (without registration) with public analytics information
  • Private urls (after registration) with hidden analytics information
  • A lot of popular social networks for registration (VK, FB, Google+, etc)
  • Collect all client information geo position (country), browser, platform, referral

Docker setup

  • Install docker & docker-compose
  • Copy and customize your docker arguments with command: cp .env-dist .env
  • Create and set your own GitHub API Token to the field GITHUB_API_TOKEN for fixing problem with rate limits
  • Run docker build command: docker-compose up --build -d
  • Run Yii2 migrate command: docker exec yii2-minify-url_app_1 php yii migrate --interactive=0, (*3)

  • Url Shortener will be available at http://localhost, (*4)

  • PHPMyAdmin available at http://localhost:8080

Default credentials

Admin area:
User: admin@burl.pro
Password: adminpassword

MySQL (.env):
User: urlshorteneruser
Password: yii2shortenerpassword

Oauth configurations

  • Add to file app/config/web-local.php your oauth data, for example:
<?php
return  [
  'components' => [
    'authClientCollection' => [
      'clients' => [
        'google' => [
          'class' => 'app\components\oauth\Google',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        'facebook' => [
          'class' => 'budyaga\users\components\oauth\Facebook',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        // twitter, facebook, github, linkedin, live, yandex, vkontakte
      ],
    ],
  ],
];

Example:

  • Long url: https://gaalferov.com/about-me.html
  • Short url: https://burl.pro/QTkNRW Example

The Versions