Coder Social home page Coder Social logo

mzakyz666 / yii2-minify-url Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gaalferov/yii2-minify-url

0.0 0.0 0.0 585 KB

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

Home Page: https://burl.pro

PHP 93.02% Batchfile 0.95% CSS 6.04%

yii2-minify-url's Introduction

Yii 2 Minify-URL Project (Shortener)

Codacy Badge

Project on Yii2 framework for create your short business url with analytics (geo position (country), browser, platform, referal url)

You can see demo

What can you do

  • Input your long url and get 'public' short link with analytics information
  • For registration you can use any popular social networks (VK, FB, Google+, etc)
  • After registration, you can input your long url and get 'private' shortlink. In 'private' url, analytic information hidden from other users

For example:

Example

Install via Composer


If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install the application using the following command:

git clone https://github.com/gaalferov/yii2-minify-url.git .
composer global update fxp/composer-asset-plugin --no-plugins
composer install

GETTING STARTED

After you install the application, you have to conduct the following steps to initialize the installed application. You only need to do these once for all.

  • Create a new database
  • Add and edit the file config/db-local.php with real data, for example:
<?php
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2',
    'username' => 'yourUsername',
    'password' => 'yourPassword',
    'charset' => 'utf8',
    'tablePrefix' => 'nix_',
];
  • Add to file config/web-local.php your oauth data, for example:
<?php
return  [
  'components' => [
    'authClientCollection' => [
      'clients' => [
        'vkontakte' => [
          'class' => 'budyaga\users\components\oauth\VKontakte',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
          'scope' => 'email'
        ],
        'google' => [
          'class' => 'budyaga\users\components\oauth\Google',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        'facebook' => [
          'class' => 'budyaga\users\components\oauth\Facebook',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        'github' => [
          'class' => 'budyaga\users\components\oauth\GitHub',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
          'scope' => 'user:email, user'
        ],
        'linkedin' => [
          'class' => 'budyaga\users\components\oauth\LinkedIn',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        'live' => [
          'class' => 'budyaga\users\components\oauth\Live',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        'yandex' => [
          'class' => 'budyaga\users\components\oauth\Yandex',
          'clientId' => 'XXX',
          'clientSecret' => 'XXX',
        ],
        'twitter' => [
          'class' => 'budyaga\users\components\oauth\Twitter',
          'consumerKey' => 'XXX',
          'consumerSecret' => 'XXX',
        ],
      ],
    ],
  ],
];
  • Apply migrations with console command:
php yii migrate

Now, you can use the application:

Admin user: [email protected]
Admin password: adminpassword

http://localhost/
https://localhost/user/admin (Manage all users)
https://localhost/url (Manage all urls)
https://localhost/user/rbac (Role-Based Access Control)
https://localhost/profile (Your profile)

TESTS

You can use any platforms for run tests:

Phantomj:

phantomjs --webdriver=4444 --ignore-ssl-errors=yes --ssl-protocol=TLSv1

Selenium:

java -jar selenium-server-standalone-2.xx.xxx.jar

Docker container

...
selenium:
  image: jesg/selenium:standalone
  ports:
   - 4444:4444
   - 5910:5910
...

Instruction:

  • Init codeception files:
php vendor/bin/codecept bootstrap
  • Change url to your project in file /tests/acceptance.suite.yml
config:
...
            url: 'http://you_url.loc'
  • Run tests:
php vendor/bin/codecept run
php vendor/bin/codecept run --env phantom
php vendor/bin/codecept run --env firefox

yii2-minify-url's People

Contributors

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