PHPackages                             dektrium/yii2-app-skeleton - 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. dektrium/yii2-app-skeleton

ActiveProject[Framework](/categories/framework)

dektrium/yii2-app-skeleton
==========================

Yii2 application template

1.0.0(9y ago)51231MITPHPPHP &gt;=5.4.0

Since Jan 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/dektrium/yii2-app-skeleton)[ Packagist](https://packagist.org/packages/dektrium/yii2-app-skeleton)[ RSS](/packages/dektrium-yii2-app-skeleton/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Yii2-app-skeleton
=================

[](#yii2-app-skeleton)

Yii2-app-skeleton is an Yii2 application template with minimum requirements and dependencies.

Features
--------

[](#features)

- Uses [Asset-packagist](https://asset-packagist.org/) instead of fxp/composer-asset-plugin to install bower and npm packages.
- Uses [PHP dotenv](https://github.com/vlucas/phpdotenv) for handling configuration
- Init command which creates needed directories and warms up dotenv config
- Preconfigured multiple cache and session backends which can be switched easily
- No junk you need to remove every time you start (e.g. contact or registration forms as in yiisoft/yii2-app-basic)

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

[](#requirements)

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

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

[](#installation)

```
composer create-project dektrium/yii2-app-skeleton
```

That's all. After project is created, composer will run `php yii init`, which will create needed directories and config files. However when you deploy your project to server (or download it using git or zip archive), you will need to run following commands:

```
php yii init
# Run following if you are on production
php yii init/env prod
```

Overview
--------

[](#overview)

### Top level directories

[](#top-level-directories)

##### commands

[](#commands)

The `commands` directory contains your console application's controllers (commands).

##### config

[](#config)

The `config` directory contains all of your application's configuration files.

##### controllers

[](#controllers)

The `controllers` directory contains your web application's controllers.

##### mail

[](#mail)

The `mail` directory contains your application's mail view files.

##### migrations

[](#migrations)

The `migrations` directory contains database migration files.

##### runtime

[](#runtime)

The `runtime` directory contains application logs, cache and debug information.

##### vendor

[](#vendor)

The `vendor` directory contains your Composer dependencies.

##### views

[](#views)

The `views` directory containes your application's view files.

##### web

[](#web)

THe `web` directory contains the index.php file, which is the entry point for all requests entering your application.

### Configuration

[](#configuration)

All of the configuration files are stored in the config directory.

#### Environment configuration

[](#environment-configuration)

It is often helpful to have different configuration values based on the environment the application is running in. For example, you may wish to use a different cache driver locally than you do on your production server.

To solve this problem Yii2-app-skeleton uses [PHP dotenv](https://github.com/vlucas/phpdotenv). After installation you will find file called `.env.example` in your config directory. If you install Yii2-app-skeleton via Composer, this file will automatically be renamed to .env. Otherwise, you need to run initialize command.

All of the variables in this file will be loaded into `$_ENV` PHP super global. You can retrieve them by using `env`function which is declared inside `config/helpers.php` file. If you look closer at configuration files in `config`directory you will see how often function `env` is used.

Your .env file should not be committed to your application's source control, since each developer / server using your application could require a different environment configuration.

You may want to add custom variables to `.env.example` file. After you do that, you can run `php yii init` command and they will be automatically injected in `.env` file.

#### Changing application environment

[](#changing-application-environment)

Out of the box Yii2-app-skeleton comes with enabled YII\_DEBUG and with YII\_ENV="dev". You should change it when deploying your app to production servers (or sometimes you may need it to be done locally on your machine). To do it you can use init/env command:

```
php yii init/env prod
# Or if you want to change to dev environment:
php yii init/env dev
```

What's next?
------------

[](#whats-next)

Check out following links:

- [The Definitive Guide to Yii 2.0](http://www.yiiframework.com/doc-2.0/guide-index.html)
- [Yii2 cookbook](https://github.com/samdark/yii2-cookbook) by SamDark

IDE tweaks
----------

[](#ide-tweaks)

-
-

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3461d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1734389?v=4)[Dmitry Erofeev](/maintainers/dmeroff)[@dmeroff](https://github.com/dmeroff)

---

Top Contributors

[![dmeroff](https://avatars.githubusercontent.com/u/1734389?v=4)](https://github.com/dmeroff "dmeroff (7 commits)")

---

Tags

yii2dektriumapplication templateyii2-application-template

### Embed Badge

![Health badge](/badges/dektrium-yii2-app-skeleton/health.svg)

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

###  Alternatives

[yii2-starter-kit/yii2-starter-kit

Yii2 Starter Kit Application Template

1.4k6.6k](/packages/yii2-starter-kit-yii2-starter-kit)[nenad/yii2-advanced-template

Improved Yii 2 Advanced Application Template By Nenad Zivkovic

9111.1k](/packages/nenad-yii2-advanced-template)[funson86/yii2-adminlte

Yii 2 Advanced Application Template with Adminlte Theme

1492.2k](/packages/funson86-yii2-adminlte)[nenad/yii2-basic-template

Improved Yii 2 Basic Application Template By Nenad Zivkovic

466.5k](/packages/nenad-yii2-basic-template)[kartik-v/yii2-app-practical-a

Yii 2 Practical A Application Template

343.7k](/packages/kartik-v-yii2-app-practical-a)[kartik-v/yii2-app-practical-b

Yii 2 Practical-B Application Template

312.7k](/packages/kartik-v-yii2-app-practical-b)

PHPackages © 2026

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