PHPackages                             hunwalk/yii2-basic-firestarter - 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. hunwalk/yii2-basic-firestarter

Abandoned → [hunwalk/yii2-app-forge](/?search=hunwalk%2Fyii2-app-forge)ArchivedProject[Framework](/categories/framework)

hunwalk/yii2-basic-firestarter
==============================

Yii 2 Firestarter Project Template

v1.1.1(6y ago)341071BSD-3-ClausePHPPHP &gt;=7.1.0

Since Jun 13Pushed 4y agoCompare

[ Source](https://github.com/hunwalk/yii2-basic-firestarter)[ Packagist](https://packagist.org/packages/hunwalk/yii2-basic-firestarter)[ RSS](/packages/hunwalk-yii2-basic-firestarter/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (15)Versions (5)Used By (0)

 [ ![](https://camo.githubusercontent.com/e29b711eea39383d639d94bb24972537f2df7cb8f7507bfb86dad4eac9ea7c4e/68747470733a2f2f692e696d6775722e636f6d2f794a433675616c2e706e67) ](https://github.com/yiisoft)

Yii 2 Basic Firestarter
=======================

[](#yii-2-basic-firestarter)

### This project is discontinued

[](#this-project-is-discontinued)

Please follow this link if you want something similar to this project:

This is a somewhat modified version of the basic template with some pregonfigured features. I've created this to save time upon creating a new project.

Please leave a star if you're considering to use this template in production.

Contains:

- that overly useful symfony VarDumper. Use the dump() method
- dotenv configuration ( idea by [@lostika86](https://github.com/lostika86) )
- The dektrium/yii2-user and dektrium/yii2-rbac packages with basic config
- An api identifier solution (Authorization header =&gt; Bearer token) / code by [bizley](https://github.com/bizley)
- An api module
- Predefined controllerMap to the console config (added migration commands)
- A conventional commits helper

Check out the packages
----------------------

[](#check-out-the-packages)

- [https://symfony.com/doc/current/components/var\_dumper.html](https://symfony.com/doc/current/components/var_dumper.html) / Symfony VarDumper Component
-  / User management
-  / Powerful RBAC manager
-  / The idea of the api key came from here. (and the code as well)
-  / The dotenv we're using
-  / A tool for conventional commits

Get started
-----------

[](#get-started)

Use the latest release

```
$ composer create-project hunwalk/yii2-basic-firestarter  --prefer-dist
```

Or use the current master branch, if you're in a hurry for features if there is any

```
$ git clone https://github.com/HunWalk/yii2-basic-firestarter
$ cd
$ composer install
$ composer run-script post-create-project-cmd

```

> post-create-project-cmd script sets up the permissions for some folders and generates the cookieValidationKey for you

Instructions
------------

[](#instructions)

### 1st step

[](#1st-step)

Create a .env file from the .env.example

OSX / LINUX

`$ cp .env.example .env`

Windows

`$ copy .env.example .env`

### 2nd step

[](#2nd-step)

- Fill in the .env file. Add or remove things, it's your choice entirely
- Run the following commands ```
    $ php yii migrate-user
    $ php yii migrate-rbac
    $ php yii migrate

    ```

### 3rd step

[](#3rd-step)

- Run the server and be happy :) ```
    $ php yii serve

    ```

About the API
-------------

[](#about-the-api)

You can reach the api at `api/v1`There is an example controller you can test. That is purely for demonstration, and can be better.

### Update user profile using the api (This is purely for testing purposes)

[](#update-user-profile-using-the-api-this-is-purely-for-testing-purposes)

Read this carefully, if you've never done something like this.

1. Start the server
2. Pop up your favourite api client
3. Set the url to `api/v1/user/settings/profile`
4. Set up a header with the key `Authorization`
5. The `Authorization` header value should be your token.
6. Keep in mind, that the token will expire within 60 seconds
7. Do a get request with these settings.
8. You should get back the users profile
9. Now do a post request. The body should be x-www-form-urlencoded
10. The key value pairs should be Profile\[name\] = {yourname}
11. Send. 😄

If you did everything right, you should get back the updated profile.

### Some additional information

[](#some-additional-information)

The token looks like this:

`1:1574952622:d1da75dd83fc643384c728ed7ecfb266574d6533`

It has 3 parts. The user\_id, the current timestamp, and the users api\_key sha1 hashed together with the current timestamp.

You can find more information about generating that token inside the v1 modules DefaultController Also, you should delete that before going to production.

You can obtain the users api\_key from the user table in the api\_key column.

Use Conventional Commits
------------------------

[](#use-conventional-commits)

Thanks to the conventional commits project and this guy:

It seems like, something broke after i released this update, and the fire/commit command does not really work. Requires some tweaking, but definitely going to fix this sometime. However feel free to use the idea of the conventional commits. It's really great 😄

Todo
----

[](#todo)

- Correct testing
- Mention every 3rd party package here (i hope i did, open an issue if something is missing)
- Test the API key functionality (tested, now it should work)
- Make a v1 api module with contentNegotiation HttpBearerAuth and verbFilter by default

Sites or projects ignited by this
---------------------------------

[](#sites-or-projects-ignited-by-this)

Send a PR if you have one :)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~56 days

Total

4

Last Release

2359d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a0bac21c796aa3caaa0110086c0c8800f09168a73f0183e2e4c3a974c39281?d=identicon)[HunWalk](/maintainers/HunWalk)

---

Top Contributors

[![hunwalk](https://avatars.githubusercontent.com/u/32835435?v=4)](https://github.com/hunwalk "hunwalk (27 commits)")

---

Tags

app-templatefirestarterframeworkframework-templatephpstartertemplateyii2yii2-app-templateyii2-basicyii2-basic-firestarteryii2-firestarteryii2-starteryii2-templateframeworkyii2project templatebasicfirestarter

### Embed Badge

![Health badge](/badges/hunwalk-yii2-basic-firestarter/health.svg)

```
[![Health](https://phpackages.com/badges/hunwalk-yii2-basic-firestarter/health.svg)](https://phpackages.com/packages/hunwalk-yii2-basic-firestarter)
```

###  Alternatives

[developeruz/yii-vue-app

Yii 2 + Vue.js Basic Project Template

1221.6k](/packages/developeruz-yii-vue-app)[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)

PHPackages © 2026

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