PHPackages                             delagics/yii2-app-another - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. delagics/yii2-app-another

ActiveProject[Framework](/categories/framework)

delagics/yii2-app-another
=========================

Yii 2 Another Project Template

1.0.5(9y ago)101874[1 issues](https://github.com/delagics/yii2-app-another/issues)BSD-3-ClausePHPPHP &gt;=5.4.0

Since May 7Pushed 9y ago6 watchersCompare

[ Source](https://github.com/delagics/yii2-app-another)[ Packagist](https://packagist.org/packages/delagics/yii2-app-another)[ Docs](http://www.delagics.com/)[ RSS](/packages/delagics-yii2-app-another/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (6)Dependencies (9)Versions (8)Used By (0)

Yii 2 Another Project Template
==============================

[](#yii-2-another-project-template)

[![Latest Stable Version](https://camo.githubusercontent.com/aecd9c3e6cf85abff1569e58b8259b1157d775842429e29be36ea0a2bd0eb4ad/68747470733a2f2f706f7365722e707567782e6f72672f64656c61676963732f796969322d6170702d616e6f746865722f762f737461626c652e737667)](https://packagist.org/packages/delagics/yii2-app-another)[![Total Downloads](https://camo.githubusercontent.com/2879f0d024faa3059691ea0e9f6bc982dbbb4c0e511008220749ab058ed84f31/68747470733a2f2f706f7365722e707567782e6f72672f64656c61676963732f796969322d6170702d616e6f746865722f646f776e6c6f616473)](https://packagist.org/packages/delagics/yii2-app-another)[![Latest Unstable Version](https://camo.githubusercontent.com/278ee12feeae992bb53bf708596b11bec5d8b20371bef0a4177b19ee4153b5cd/68747470733a2f2f706f7365722e707567782e6f72672f64656c61676963732f796969322d6170702d616e6f746865722f762f756e737461626c652e737667)](https://packagist.org/packages/delagics/yii2-app-another)[![Code Climate](https://camo.githubusercontent.com/0f054d788742b39dcafd6145e73104f2bd7ce71e9c65ea1496a3f240a47f8984/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64656c61676963732f796969322d6170702d616e6f746865722f6261646765732f6770612e737667)](https://codeclimate.com/github/delagics/yii2-app-another)[![License](https://camo.githubusercontent.com/7a99f31788fd02900ab4352948528ca7bd5235cf526bb5d6f8cc130a37fdcbd4/68747470733a2f2f706f7365722e707567782e6f72672f64656c61676963732f796969322d6170702d616e6f746865722f6c6963656e73652e737667)](https://packagist.org/packages/delagics/yii2-app-another)[![Yii2](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](http://www.yiiframework.com/extension/yii2-app-another)

Yii 2 Another Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for developing complex Web applications with multiple tiers.

The template includes three tiers: front, back, 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.

What's inside:
--------------

[](#whats-inside)

- Improved project structure (see [Directory structure](#directory-structure));
- Language management through URLs with help of [codemix/yii2-localeurls](https://github.com/codemix/yii2-localeurls);
- Flexible user registration and authentication module ([dektrium/yii2-user](https://github.com/dektrium/yii2-user));
- RBAC management module ([dektrium/yii2-rbac](https://github.com/dektrium/yii2-rbac));
- `yii init` console command which simplifies project preparation;
- [PHP dotenv](https://github.com/vlucas/phpdotenv) support, for easier project configuration, with Laravel like environment variable getter: `env('YII_ENV', 'dev')`;

> **Note**: tests are currently not included.

Requirements
------------

[](#requirements)

The minimum requirement by this project template is that your Web server supports PHP 5.4.0. Recommended is PHP 7.

Installation
------------

[](#installation)

### Install using `composer`

[](#install-using-composer)

If you do not have [Composer](http://getcomposer.org/), follow the instructions in the [Installing Yii](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#installing-via-composer) section of the definitive guide to install it.

With Composer installed, you can then install the application using the following commands:

```
composer global require "fxp/composer-asset-plugin:~1.2"
composer create-project --prefer-dist delagics/yii2-app-another another.dev

```

The first command installs the [composer asset plugin](https://github.com/francoispluchino/composer-asset-plugin/)which allows managing bower and npm package dependencies through Composer. You only need to run this command once for all. The second command installs the *another* application in a directory named `another.dev`. You can choose a different directory name if you want.

Then follow the instructions given in the [Preparing application](#preparing-application) section.

### Install with `git`

[](#install-with-git)

Clone repository as a web root.

```
git clone git@github.com:delagics/yii2-app-another.git another.dev

```

> Directory named `another.dev` is your Web root.

Then install the [composer asset plugin](https://github.com/francoispluchino/composer-asset-plugin/), go to the web root folder in a console terminal and run `composer install`:

```
composer global require "fxp/composer-asset-plugin:~1.2"

cd /var/www/another.dev
composer install

```

Then follow the instructions given in the [Preparing application](#preparing-application) section.

Preparing application
---------------------

[](#preparing-application)

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.

1. Create a new database.
2. Open a console terminal in the root directory of your project and execute the `php yii init/environment && php yii init/initialize` command, and follow the steps of the script.

When switching to production environment, execute `php yii init/env` and choose `PROD` environment.

```
php yii init/env

```

3. Set document roots of your web server:

    - for `/path/to/another.dev/public/` and using the URL `http://another.dev/`

    For **nginx** it could be the following:

```
    server {
        listen 80;
        charset utf-8;
        client_max_body_size 128M;
        root /var/www/another.dev/public;
        server_name another.dev www.another.dev;
        index index.php index.html index.htm;
        # access_log /var/www/another.dev/logs/access_log.txt;
        # error_log /var/www/another.dev/logs/error_log.txt error;
        location / {
            try_files $uri $uri/ /index.php?$args;
        }
        location /admin {
            try_files $uri $uri/ /admin/index.php?$args;
        }
        location ~ \.php$ {
            #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
            try_files $uri =404;
            include fastcgi_params;
            fastcgi_index index.php;
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
        location /storage {
            # Deny access to any files with a .php extension in the storage directory
            location ~ \.php$ {
                deny all;
            }
            location ~* ^/.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
                expires max;
                add_header Cache-Control public;
                log_not_found off;
                access_log off;
            }
        }
        # Deny all attempts to access hidden files and folders such as .git, .htaccess, .htpasswd, .DS_Store.
        location ~ /\. {
            deny all;
        }
        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }
        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }
    }
```

4. Change the hosts file to point the domain to your server.

    - Windows: `c:\Windows\System32\Drivers\etc\hosts`
    - Linux: `/etc/hosts`

    Add the following lines:

    ```
    127.0.0.1   another.dev

    ```

To login into the application, use your username and password created when running `php yii init/up` command, or sing up with new credentials.

Generating apps translations
----------------------------

[](#generating-apps-translations)

```
# For frontend:
php yii message app/front/messages/config.php

# For backend:
php yii message app/back/messages/config.php

```

Directory structure
-------------------

[](#directory-structure)

```
app/
    base/                    contains classes shared between all apps
        config/              contains shared configurations
        mail/                contains view files for e-mails
        models/              contains model classes used in both backend and frontend apps
    console/                 contains classes for the console app
        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
    back/                    contains classes for the backend app
        assets/              contains backend app assets
        config/              contains backend configurations
        controllers/         contains backend Web controller classes
        models/              contains backend-specific model classes
        runtime/             contains files generated during backend app runtime
        views/               contains view files for the backend Web app
    front/                   contains classes for the frontend app
        assets/              contains frontend app assets
        config/              contains frontend configurations
        controllers/         contains frontend Web controller classes
        models/              contains frontend-specific model classes
        runtime/             contains files generated during frontend app runtime
        views/               contains view files for the frontend Web app
        widgets/             contains frontend widgets
    vendor/                  contains dependent 3rd-party packages
public/                      contains the entry script and Web resources for the frontend app
    storage/                 contains files such as user uploaded images, docs, archives shared between all appliactions
    admin/                   contains the entry script and Web resources for the backend app
        assets/              contains Web resources published by AssetBundles of backend app
        index.php            contains the entry script of the backend app
    assets/                  contains Web resources published by AssetBundles of the frontend app
    index.php                contains the entry script of the frontend app
.env.example                 contains template for a dotenv file.

```

*Made with ❤️ by @delagics*

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~33 days

Total

6

Last Release

3571d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ef985e81e42ebe1488368ae22646d22346d213aede0c0daf9a5a9eb9ede6799?d=identicon)[delagics](/maintainers/delagics)

---

Top Contributors

[![insane-dev](https://avatars.githubusercontent.com/u/3304603?v=4)](https://github.com/insane-dev "insane-dev (44 commits)")

---

Tags

applicationtemplateyii2yii2advancedproject templateanotherdelagics

### Embed Badge

![Health badge](/badges/delagics-yii2-app-another/health.svg)

```
[![Health](https://phpackages.com/badges/delagics-yii2-app-another/health.svg)](https://phpackages.com/packages/delagics-yii2-app-another)
```

###  Alternatives

[beaten-sect0r/yii2-core

Yii2 Core project template

761.1k](/packages/beaten-sect0r-yii2-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
