From 84b337923351a4f90ab94aebc5fcbc20da9fe345 Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 9 Jul 2025 09:39:23 -0400
Subject: [PATCH 1/5] Replace MIT License with BSD-3-Clause in `LICENSE.md` and
update references in `README.md` and composer.json.
---
LICENSE | 21 ---------------------
LICENSE.md | 25 +++++++++++++++++++++++++
README.md | 4 ++--
composer.json | 2 +-
4 files changed, 28 insertions(+), 24 deletions(-)
delete mode 100644 LICENSE
create mode 100644 LICENSE.md
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index d89684f..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2023 yii2-extensions
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..1555f8e
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,25 @@
+Copyright © 2008 by Terabytesoftw ()
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Yii Software nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
index ac09d28..4c76db4 100644
--- a/README.md
+++ b/README.md
@@ -161,8 +161,8 @@ $ vendor/bin/codecept run --coverage-xml
## Our social networks
-[](https://twitter.com/Terabytesoftw)
+[](https://x.com/Terabytesoftw)
## License
-The MIT License. Please see [License File](LICENSE.md) for more information.
+[](LICENSE.md)
diff --git a/composer.json b/composer.json
index e730394..4a877da 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
"web",
"yii2"
],
- "license": "mit",
+ "license": "BSD-3-Clause",
"require": {
"php": ">=8.1",
"php-forge/foxy": "^0.1",
From eda880306b0ce289eaf8ad72db7666cc1387859f Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 9 Jul 2025 09:44:29 -0400
Subject: [PATCH 2/5] Fix badge link formatting in `README.md` for social media
follow button.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4c76db4..4243403 100644
--- a/README.md
+++ b/README.md
@@ -161,7 +161,7 @@ $ vendor/bin/codecept run --coverage-xml
## Our social networks
-[](https://x.com/Terabytesoftw)
+[](https://x.com/Terabytesoftw)
## License
From c7c28710520b6c87a1b3663575f5ecfb7ecbe1a9 Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 9 Jul 2025 10:20:42 -0400
Subject: [PATCH 3/5] docs: Refactor `README.md` to enhance clarity and
structure, update features section, and improve installation instructions.
---
README.md | 213 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 125 insertions(+), 88 deletions(-)
diff --git a/README.md b/README.md
index 4243403..3946b68 100644
--- a/README.md
+++ b/README.md
@@ -23,124 +23,153 @@
-
+A modern, Bootstrap-5 powered Yii2 application template designed for rapid development of web applications.
-
-Web Application Basic of Yii Version 2. Yii Framework application best for rapidly creating projects with Bootstrap 5.
-
+Built with best practices, clean architecture, and developer-friendly configuration.
-
+Perfect for creating production-ready web applications with minimal setup time while maintaining code quality and
+extensibility.

-
+## Features
-## Directory structure
+- ✅ **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.
+- ✅ **Contact Form** - Fully functional contact form with validation and email sending.
+- ✅ **Developer Tools** - Debugging tools, logging, and development-friendly configurations.
+- ✅ **Modern Bootstrap 5 UI** - Responsive, mobile-first design with latest Bootstrap components.
+- ✅ **Multi-language Support** - Built-in internationalization (i18n) support with message translations.
+- ✅ **Ready-to-Use Pages** - Pre-built pages including home, about, contact, and error handling.
+- ✅ **Security Features** - Built-in CSRF protection, input validation, and secure configurations.
+- ✅ **Testing Ready** - Codeception test suite with examples for functional and unit testing.
-```text
-root
-├── config
-│ ├── common Common configuration.
-│ │ └── components.php
-│ ├── console Console configuration.
-│ │ └── app.php
-│ ├── web Web configuration.
-│ │ ├── app.php
-│ │ ├── components.php
-│ │ └── modules.php
-│ ├── messages.php Translation configuration.
-│ ├── params-console.php Console parameters.
-│ └── params-web.php Web parameters.
-├── src
-│ ├── framework
-│ │ ├── asset Asset bundle files.
-│ │ ├── event Event handler files.
-│ │ └── resource
-│ │ ├── css Css files.
-│ │ ├── js Js files.
-│ │ ├── layout Layout files.
-│ │ ├── message Translation files.
-│ │ └── ApplicationParameters.php Configuration application parameters.
-│ └── usecase
-│ ├── contact Contact use case.
-│ ├── hello Hello use case (console).
-│ ├── security Security use case.
-│ └── site Site use case.
-├── tests Tests codeception.
-├── vendor Composer dependencies.
-└── public Web server public.
-```
+## Environment support
-## Features
+[](https://httpd.apache.org/)
+[](https://nginx.org/)
+[](https://www.docker.com/)
-The web application contains:
+## Quick start
-- [x] Pages - [Screenshots]:
- - [about](docs/about.png)
- - [contact](docs/contact.png)
- - [404](docs/404.png)
+### How it works
-
-It includes all commonly used configurations that would allow you to focus on adding new
-features to your application.
-
+The Yii2 Web Application Basic template provides a complete foundation for building modern web applications. Unlike starting from scratch, this template includes:
-## Installation
+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.
-
-If you do not have Composer, you may install it by following the instructions at getcomposer.org.
-
+#### Why use this template?
-You can then install this project app-basic using the following command:
+- **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.
-```shell
-composer create-project --prefer-dist --stability=dev yii2-extensions/app-basic myapp
+```text
+Application structure:
+
+Web App Basic
+├── Assets (CSS, JS, Images)
+├── Console (Background tasks)
+├── I18n (Multi-language support)
+├── Pages (Home, About, Contact, Error)
+├── Security (CSRF, Validation, Authentication)
+└── Testing (Unit, Functional tests)
```
-
-Now you should be able to access the application through the following URL, assuming `public` is the directory
-directly under the Web root.
-
+### Installation
-__*Virtual Host:*__
+**Quick start**
+```bash
+composer create-project --prefer-dist --stability=dev yii2-extensions/app-basic myapp
+cd myapp
```
-http://localhost:8080/
-```
-__*Server Yii:*__
+**Start development server**
+
+```bash
+# Using built-in PHP server
+php -S localhost:8080 -t public
-```shell
+# Or using Yii console command
./yii serve
```
-__Console commands:__
+**Access your application**
-```shell
-./yii hello/index
+```
+http://localhost:8080/
```
-## Generate translations
+### Basic usage
-
-To generate the Yii Web Application Basic translations, you can change the language settings in the configuration file.
-
+#### Directory structure
-```
-config/messages.php
+```text
+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
+│ │ ├── event/ Event handlers
+│ │ └── resource/ CSS, JS, layouts, messages
+│ └── usecase/ Application use cases
+│ ├── contact/ Contact functionality
+│ ├── hello/ Console command example
+│ ├── security/ Security features
+│ └── site/ Site pages
+├── tests/ Test suites
+├── vendor/ Composer dependencies
+└── public/ Web server document root
```
-
- Automatically the generator will create the folder of your language in `src/Framework/resource/message`,
- If any translation is needed, you can open an issue to add it.
-
+#### Creating your first page
-Root directory
+```php
+render('index');
+ }
+
+ public function actionAbout(): string
+ {
+ return $this->render('about');
+ }
+}
```
+
+#### Console commands
+
+```bash
+# Run the hello command
+./yii hello/index
+
+# Generate translations
./yii message config/messages.php
-```
+# Clear cache
+./yii cache/flush-all
+```
## Quality code
[](https://packagist.org/packages/yii2-extensions/app-basic)
@@ -149,15 +178,23 @@ Root directory
[](https://github.com/yii2-extensions/app-basic/actions/workflows/static.yml)
[](https://github.styleci.io/repos/698621511?branch=main)
-## Tests
+## Documentation
+
+For detailed configuration options and advanced usage:
+
+- 📚 [Installation Guide](docs/installation.md)
+- ⚙️ [Configuration Reference](docs/configuration.md)
+- 💡 [Usage Examples](docs/examples.md)
+- 🧪 [Testing Guide](docs/testing.md)
+
+## Screenshots
-~~~
-// download all composer dependencies root project
-$ composer update --prefer-dist -vvv
+The web application includes these ready-to-use pages:
-// run all tests with code coverage
-$ vendor/bin/codecept run --coverage-xml
-~~~
+- **[Home Page](docs/home.png)** - Welcome page with navigation
+- **[About Page](docs/about.png)** - Information about your application
+- **[Contact Page](docs/contact.png)** - Contact form with validation
+- **[404 Error Page](docs/404.png)** - Custom error handling
## Our social networks
From c6164ff0ecf0590d8f2017e4fa6ebf298bc495c9 Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 9 Jul 2025 10:23:42 -0400
Subject: [PATCH 4/5] docs: Fix formatting in `README.md` for clarity in the
"How it works" section.
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 3946b68..d951948 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,8 @@ extensibility.
### 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:
+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.
From 0aede8b8dd633b3cda619f971f5cc8f4abb2c5c4 Mon Sep 17 00:00:00 2001
From: Wilmer Arambula
Date: Wed, 9 Jul 2025 10:32:32 -0400
Subject: [PATCH 5/5] docs: Improve wording and formatting in `README.md` for
clarity and consistency.
---
README.md | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index d951948..6b0d728 100644
--- a/README.md
+++ b/README.md
@@ -23,12 +23,7 @@
-A modern, Bootstrap-5 powered Yii2 application template designed for rapid development of web applications.
-
-Built with best practices, clean architecture, and developer-friendly configuration.
-
-Perfect for creating production-ready web applications with minimal setup time while maintaining code quality and
-extensibility.
+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.

@@ -55,8 +50,7 @@ extensibility.
### 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.
+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.