yii2-extensions / app-basic
Web Application Basic
Installs: 357
Dependents: 1
Suggesters: 0
Security: 0
Stars: 16
Watchers: 1
Forks: 2
Open Issues: 0
Type:project
Requires
- php: >=8.1
- php-forge/foxy: ^0.1
- ui-awesome/html-svg: ^0.2
- vlucas/phpdotenv: ^5.6
- yiisoft/yii2: ^2.0.53|^22
- yiisoft/yii2-bootstrap5: ^2.0.50|^22
Requires (Dev)
- codeception/c3: ^2.8
- codeception/codeception: ^5.0.0
- codeception/lib-innerbrowser: ^4.0
- codeception/module-asserts: ^3.0
- codeception/module-filesystem: ^3.0
- codeception/module-phpbrowser: ^3.0
- codeception/module-yii2: ^1.1
- codeception/verify: ^3.0
- maglnet/composer-require-checker: ^4.6
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-strict-rules: ^2.0.3
- rector/rector: ^2.0
- symfony/browser-kit: ^6.3
- symfony/process: ^6.3
- symplify/easy-coding-standard: ^12.3
- yii2-extensions/phpstan: ^0.3.0
- yiisoft/yii2-debug: ^2.1.27|^22
- yiisoft/yii2-gii: ^2.2.7|^22
Provides
- bower-asset/bootstrap: ^5.2
- bower-asset/inputmask: 5.0.9
- bower-asset/jquery: 3.6.1
- bower-asset/punycode: ^1.4
- bower-asset/yii2-pjax: ~2.0.1
This package is auto-updated.
Last update: 2025-09-13 22:42:20 UTC
README
Web Application Basic
A modern, Bootstrap 5-powered Yii2 application template designed for rapid web-application development. Built with best practices, clean architecture, and developer-friendly configuration, it lets you create production-ready apps with minimal setup while maintaining code quality and extensibility.

Features
- ✅ Asset Management - Optimized asset bundles for CSS, JS, and resource management.
- ✅ Clean Architecture - Well-organized directory structure following Yii2 best practices.
- ✅ Console Commands - Example console commands for background tasks and maintenance.
- ✅ Developer Tools - Debugging tools, logging, and development-friendly configurations.
- ✅ Modern Bootstrap 5 UI - Responsive, mobile-first design with latest Bootstrap components.
- ✅ Testing Ready - Codeception test suite with examples for functional and unit testing.
Available deployment options
Traditional Web Servers
Classic web-server + PHP-FPM setup; simple and widely supported for deployment.
High-Performance Worker Mode
Long-running PHP workers for higher throughput and lower latency.
For setup instructions, see
README.md
in each branch.
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.
- Pre-configured structure with organized directories for assets, views, models, and controllers.
- Bootstrap 5 integration for responsive, mobile-first user interfaces.
- Security features including CSRF protection and input validation.
- 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
for frontend dependency management.
Installation
composer create-project --prefer-dist yii2-extensions/app-basic:^0.1 app-basic
cd app-basic
Quick start
Start development server
# Using built-in PHP server php -S localhost:8080 -t web # Or using Yii console command ./yii serve
Your application will be available at
http://localhost:8080
or at the address set in--address
option.
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
<?php // src/usecase/site/SiteController.php declare(strict_types=1); namespace app\usecase\site; use yii\web\Controller; final class SiteController extends Controller { public function actionIndex(): string { return $this->render('index'); } }
Console commands
# Run the hello command ./yii hello/index # Generate translations ./yii message config/messages.php # Clear cache ./yii cache/flush-all
Package information
Quality code
Documentation
For detailed configuration options and advanced usage: