alexsoftdev/yii2-app-advanced

Enhanced Yii 2 Advanced Project Template

2.0.14 2018-02-18 22:42 UTC

README

993323

Yii 2 Advanced Project Template

Improved by Alexander Sorokin


Yii 2 Advanced Project Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers.

The template includes three tiers: front end, back end, and console, each of which is a separate Yii application.

The template is designed to work in a team development environment. It supports deploying the application in different environments.

Improvements that were made by Alexander Sorokin:

  • Actions have been grouped in different controllers. No more god-like SiteController! Instead, we have HomeController, CaptchaController, ErrorController, AccountController and so on. Corresponding views have been renamed too.
  • Completely standalone authentication for backend and frontend. Now template has model Admin and its own LoginForm, which is used in backend AccountController in conjunction with Captcha.
  • Backend contains users CRUD
  • Commands "php yii serve-fronted" and "php yii serve-backend" have been added
  • Migrations contains default admin user creation. Now after php yii migrate you have fully functional backend admin, which can be accessed via admin \ admin .
  • Timestamp to static resources' path has been enabled by default
  • Minification and concatenation of static resources have been added (rmrevin/yii2-minify-view)
  • localhost in configs has been replaces via 127.0.0.1 due to incompatibility errors on mac os
  • Popular kartik' widgets such as gridview, select2 and date-range have been added
  • Useful widget for batch operations has been added ( mickgeek/yii2-actionbar )
  • Social Auth at frontend has been added (yii2-authclient). Integration with AccountController has been made, but you still need to obtain client id and secret key for services.
  • Database schema caching has been enabled for production config
  • Date and time default format has been changed to "Y-m-d" and "H:i:S" accordingly
  • Pretty urls have been enabled by default

Now, all that you need to start project is:

composer create-project --prefer-dist alexsoftdev/yii2-app-advanced myapp @dev
cd myapp
php init # select (0)Development or (1)Production 
# create new database and write its name down at common/configs/main.local, parameter "dsn" 
php yii migrate
php yii serve-backend  
# Open another terminal window
cd myapp
php yii serve-frontend
# It's alive (c) Victor Frankenstein 

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads

DIRECTORY STRUCTURE

common
    config/              contains shared configurations
    mail/                contains view files for e-mails
    models/              contains model classes used in both backend and frontend
    tests/               contains tests for common classes    
console
    config/              contains console configurations
    controllers/         contains console controllers (commands)
    migrations/          contains database migrations
    models/              contains console-specific model classes
    runtime/             contains files generated during runtime
backend
    assets/              contains application assets such as JavaScript and CSS
    config/              contains backend configurations
    controllers/         contains Web controller classes
    models/              contains backend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for backend application    
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
frontend
    assets/              contains application assets such as JavaScript and CSS
    config/              contains frontend configurations
    controllers/         contains Web controller classes
    models/              contains frontend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for frontend application
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
    widgets/             contains frontend widgets
vendor/                  contains dependent 3rd-party packages
environments/            contains environment-based overrides