Git Product home page Git Product logo

yii2-app's Introduction

Yii2 Fast Simple Advanced App Packagist Version Total Downloads

Yii2-app is Fast and Ready-to-production advanced project template.

For you, I downgrade requirement to PHP v5.6. But PHP 7.1 is better! because it is really fast.

Please, enable php intl extension for better work.

Default, the template includes three tiers: frontend, backend, and console, each of which is a separate Yii application.

NOTE: Template is in initial development. Anything may change at any time.

Features

  • Gentelella Admin template is beautiful and simple bootstrap, compatible with yii2 assets: yiister/yii2-gentelella, Demo
  • Yii2 User is strong and proved user-module with many features: dektrium/yii2-user (login adminus, password adminus)
  • Frontend and Backend User Controllers are filtered (by dektrium/yii2-user)
  • DB cache, but I recommend Redis Cache - it is really fast
  • Yii2 queue (DB table queue), but you can use Redis-queue or other yii2-queue docs
  • Queue Manager with backend (/queuemanager/default/index) using ignatenkovnikita/yii2-queuemanager
  • Log DB Target with backend (/log/index) - simply view log messages
  • .htaccess - config for pretty urls (rewrite index.php), may be later add nginx config
  • UrlManagerFrontend for backend app (all url rules in file frontend/config/urls.php, hostInfo in common/config/params.php)
  • i18n translations in common/messages with config (current only English and Russian, language translation are welcome!)
  • ContactForm in frontend app is improved: himiklab/yii2-recaptcha-widget, all email are saved to DB (common/models/EmailForm Model), optionally send message to Viber messenger via bot (install requirements Bogdaan/viber-bot-php and config, uncomment code in Model)
  • postcss config (frontend/web/src/pcss//*.css)
  • Gii generator:
  1. added yii2-queue Jobs generator
  2. yii2 migration generator (from existing table) Insolita/yii2-migrik
  3. schmunk42/yii2-giiant - really steroid, but in development with bugs

Available modules

These modules can be easy installed to Yii2-App using Composer:

Installation

Yii2-app template can be installed using composer. Run following command to download and install Yii2-app:

composer create-project --prefer-dist akiraz2/yii2-app my-site

After installation run init

Migrations

NOTE: Make sure that you have properly configured db application component and run the following command

php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations
php yii migrate --migrationPath=@yii/log/migrations/
php yii migrate --migrationPath=vendor/ignatenkovnikita/yii2-queuemanager/migrations/
php yii migrate/up

First Steps

  1. You need to create default domain site.ru and admin sub-domain backend.site.ru, for example. .htaccess for apache in web folder, or see next chapter web server config
  2. Read docs of yii2-user module -https://github.com/dektrium/yii2-user/blob/master/docs/README.md 2.1. for example - URL of Login and Registration - https://github.com/dektrium/yii2-user/blob/master/docs/available-actions.md 2.2. Overriding models, views and controllers - also in docs! 2.3. Need RBAC? ok, https://github.com/dektrium/yii2-rbac

Web server config

For newbies, I will recommend to read these instructions yiisoft/yii2-app-advanced/start-installation.md (apache, nginx, etc\hosts)

Development

Messages

Change in common/config/main.php

'language' => 'ru-RU',
'sourceLanguage' => 'en-US',

Add your language in common/messages/config.php

    'languages' => [
        'ru-RU',
    ],

In shell

php yii message/extract common/messages/config.php

POSTCSS

NOTE: Dont forget install nodejs :) and run command npm install if you want use post locally

Add WebStorm file-watcher, postcss.config.js is ready for use

  1. scope file[my-site]:frontend/web/src/pcss//*.css
  2. program C:\Users\user4957\AppData\Roaming\npm\postcss.cmd
  3. arguments $ContentRoot$\frontend\web\css\style.css --config $ContentRoot$\post.config.js

Support

If you have any questions or problems with Yii2-App you can ask them directly by using following email address: [email protected].

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome. +PSR-2 style coding.

I can apply patch, PR in 2-3 days! If not, please write me [email protected]

Licensing

Yii2-App is released under the BSD License. See the bundled LICENSE.md for details.

yii2-app's People

Contributors

akiraz2 avatar

Watchers

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