PHPackages                             yii2-extensions/app-basic - 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. yii2-extensions/app-basic

ActiveProject

yii2-extensions/app-basic
=========================

Web Application Basic

0.1.2(7mo ago)173711BSD-3-ClausePHPPHP &gt;=8.1CI passing

Since Aug 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/yii2-extensions/app-basic)[ Packagist](https://packagist.org/packages/yii2-extensions/app-basic)[ GitHub Sponsors](https://github.com/terabytesoftw)[ RSS](/packages/yii2-extensions-app-basic/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (23)Versions (13)Used By (0)

    ![Yii Framework](https://camo.githubusercontent.com/6f0a7c6c5e9ed8d389db5c82af26a2f70418756b736357378178997e52296488/68747470733a2f2f7777772e7969696672616d65776f726b2e636f6d2f696d6167652f64657369676e2f6c6f676f2f796969335f66756c6c5f666f725f6461726b2e737667)

Web Application Basic
=====================

[](#web-application-basic)

 [ ![Codeception](https://camo.githubusercontent.com/1b129d870ca6f0deb016f92ebda2820440c77e014543513dce121e9f55775d1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969322d657874656e73696f6e732f6170702d62617369632f6275696c642e796d6c3f6272616e63683d6d61696e267374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d436f646563657074696f6e) ](https://github.com/yii2-extensions/app-basic/actions/workflows/build.yml) [ ![PHPStan](https://camo.githubusercontent.com/53dedbd5dd8a67951ea666ac3edba83960b0d52e45a27cc88482ac135edfdbed/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969322d657874656e73696f6e732f6170702d62617369632f7374617469632e796d6c3f6272616e63683d6d61696e267374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d5048505374616e) ](https://github.com/yii2-extensions/app-basic/actions/workflows/static.yml)

 **A modern, Bootstrap 5-powered Yii2 application template for rapid development**
 *Clean architecture, production-ready features, and developer-friendly configuration*

   ![Web Application Basic](docs/images/home.png)Features
--------

[](#features)

  ![Feature Overview](./docs/svgs/features-mobile.svg)Available deployment options
----------------------------

[](#available-deployment-options)

### Traditional Web Servers

[](#traditional-web-servers)

Classic web-server + PHP-FPM setup; simple and widely supported for deployment.

[![Apache](https://camo.githubusercontent.com/e6f73e2815f477c4a67131c2db8b74a3fc15cea1bbee6224f1cf11901f56d78c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6170616368652d2532334434323032392e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d617061636865266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-extensions/app-basic/tree/apache)[![Nginx](https://camo.githubusercontent.com/278a3e7e3e82c210e5ffc2710eafb402dd4f8a4b0b7cc37361b43c42875434f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e67696e782d2532333030393633392e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6e67696e78266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-extensions/app-basic/tree/nginx)[![FrankenPHP Classic](https://camo.githubusercontent.com/a75bcd80621123b406bf73e2f69aaa720cb8ac17a73c14b7d284635e315f73d2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4672616e6b656e5048502d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-extensions/app-basic/tree/franken-php-classic)

### High-Performance Worker Mode

[](#high-performance-worker-mode)

Long-running PHP workers for higher throughput and lower latency.

[![FrankenPHP](https://camo.githubusercontent.com/a75bcd80621123b406bf73e2f69aaa720cb8ac17a73c14b7d284635e315f73d2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4672616e6b656e5048502d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-extensions/app-basic/tree/franken-php)[![RoadRunner](https://camo.githubusercontent.com/e1067aaf596acc202795ef275901a356a575922d7f6bb006a1d4d74951dd3e1b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526f616452756e6e65722d2532334646364233352e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d646174613a696d6167652f7376672b786d6c3b6261736536342c50484e325a79423361575230614430694d6a51694947686c6157646f644430694d6a516949485a705a58644362336739496a41674d4341794e4341794e4349675a6d6c7362443069626d39755a53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a344b50484268644767675a4430695454457949444a4d4d6a49674d544a4d4d5449674d6a4a4d4d6941784d6b77784d694179576949675a6d6c736244306949305a47526b5a475269497650676f38634746306143426b50534a4e4f4341795444453249444577544467674d5468614969426d615778735053496a526b5932516a4d314969382b436a78775958526f49475139496b30784e69413254444977494445775444453249444530576949675a6d6c736244306949305a474e6b497a4e53497650676f384c334e325a7a344b266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-extensions/app-basic/tree/road-runner)

Important

For setup instructions, see `README.md` in each branch.

How it works
------------

[](#how-it-works)

The Yii2 Web Application Basic template provides a complete foundation for building modern web applications. Unlike starting from scratch, this template includes.

1. **Pre-configured structure** with organized directories for assets, views, models, and controllers.
2. **Bootstrap 5 integration** for responsive, mobile-first user interfaces.
3. **Security features** including CSRF protection and input validation.
4. **Development tools** for debugging, logging, and testing.

**Why use this template**

- **Rapid development**: Start building features immediately without setup overhead.
- **Best practices**: Follow Yii2 conventions and modern web development standards.
- **Extensible**: Easy to customize and extend for specific project requirements.
- **Production-ready**: Includes security features and optimizations for deployment.

Note

Also, make sure to install [`npm`](https://nodejs.org/en/download/) for frontend dependency management.

### Installation

[](#installation)

```
composer create-project --prefer-dist yii2-extensions/app-basic:^0.1 app-basic
cd app-basic
```

### Quick start

[](#quick-start)

Start development server

```
# Using built-in PHP server
php -S localhost:8080 -t web

# Or using Yii console command
./yii serve
```

Important

Your application will be available at `http://localhost:8080` or at the address set in `--address` option.

#### Directory structure

[](#directory-structure)

```
root/
├── config/                Configuration files
│   ├── common/            Common configuration
│   ├── console/           Console configuration
│   ├── web/               Web configuration
│   └── messages.php       Translation config
├── src/
│   ├── framework/         Framework assets & resources
│   │   ├── asset/         Asset bundles
│   │   └── resource/      CSS, JS, layouts, messages
│   └── usecase/           Application use cases
│       ├── hello/         Console command example
│       └── site/          Site pages
├── tests/                 Test suites
├── vendor/                Composer dependencies
└── web/                   Web server document root

```

#### Creating your first page

[](#creating-your-first-page)

```
