PHPackages                             blurrywindows/yii2-api-kit - 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. blurrywindows/yii2-api-kit

AbandonedArchivedProject[Framework](/categories/framework)

blurrywindows/yii2-api-kit
==========================

Yii 2 based kit that may be used to quickly start building an api from it.

1.0.0-alpha(8y ago)111BSD-3-ClausePHPPHP &gt;=5.6.0

Since Jun 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/blurrywindows/yii2-api-kit)[ Packagist](https://packagist.org/packages/blurrywindows/yii2-api-kit)[ RSS](/packages/blurrywindows-yii2-api-kit/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Yii 2 API Kit
=============

[](#yii-2-api-kit)

[![GitHub tag](https://camo.githubusercontent.com/ec50ee1509a6d4f02f1fc5313b8676d771e18149c41568b2ed13ca373b27ce96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f626c7572727977696e646f77732f796969322d6170692d6b69742e737667)](https://github.com/blurrywindows/yii2-api-kit)[![Packagist](https://camo.githubusercontent.com/80eb3886f717d0aec63bd6db8f9bb4138c2d138f9393df5e2b8e9ad11581eaa9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c7572727977696e646f77732f796969322d6170692d6b69742e737667)](https://packagist.org/packages/blurrywindows/yii2-api-kit)[![Packagist](https://camo.githubusercontent.com/66e9e7c42e78939f359064b8e5504f96342a8f20b6c2de89364aa1110090cb94/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626c7572727977696e646f77732f796969322d6170692d6b69742e737667)](https://packagist.org/packages/blurrywindows/yii2-api-kit)[![GitHub issues](https://camo.githubusercontent.com/591a0ab44a5c35fe829bc25dd6c6281759ab531e4d6d714f8c60d12e7c385b03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f626c7572727977696e646f77732f796969322d6170692d6b69742e737667)](https://github.com/blurrywindows/yii2-api-kit/issues)

Heavily inspired by [trntv/yii2-starter-kit](https://github.com/trntv/yii2-starter-kit), this API kit may be used to quickly start building your Yii2-based API and not waste any time on initializing your project.

This kit is in development. Please do not use it yet! [Would you like to contribute?](#how-to-contribute)

TABLE OF CONTENTS
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Configuration](#configuration)
- [Testing](#testing)
- [Console commands](#console-commands)
- [How to contribute?](#how-to-contribute)
- [Issues](#issues)
- [Read more](#read-more)

FEATURES
--------

[](#features)

- Migrations for initial database with user-functionality
- AutoController which generates ActiveRecords models and API documentation based on apidoc
- Pre-created account functionality (register &amp; login)
- Authentication based on HTTP-header
- Json support
- dotenv support
- Test-ready
- [blurrywindows/yii2-key-helper](https://github.com/blurrywindows/yii2-key-helper) functionality

REQUIREMENTS
------------

[](#requirements)

- PHP &gt;= 5.6.0
- Composer &gt;= 1.1.2 ()
- Node.js &gt;= 8.1.0 ()

INSTALLATION
------------

[](#installation)

`composer create-project blurrywindows/yii2-api-kit`

CONFIGURATION
-------------

[](#configuration)

Please follow these instructions carefully to quickly start building your own API. The instructions must be executed in the order in which they are presented here to prevent errors.

### Composer

[](#composer)

- Install all required Composer packages (`composer install`).
- When deploying to production, only install production packages (`composer install --no-dev`).

### Node.js

[](#nodejs)

- Install all required Node.js packages (`npm install`).
- When deploying to production, only install production packages (`npm install --production`).

### Database

[](#database)

- Create a database you will use for your API.
- Make sure that a user with read/write access exists for this database.

### Environment

[](#environment)

- Rename `.env.demo` to `.env` in your project root and alter the variables to your current environment.
- Make sure that the `ENTRY_URL` variable has a trailing slash (/).

### Migrate

[](#migrate)

- Migrate (let Yii create initial database tables) using the `./yii migrate` command.
- If this command doesn't work, try adding `php` to the command: `php ./yii migrate`.

### Webserver

[](#webserver)

- Follow the instruction in the [Yii2 guide](http://www.yiiframework.com/doc-2.0/guide-start-installation.html) to make your API available to the internet (or to your local development environment).

TESTING
-------

[](#testing)

This api-kit is test-ready. The controllers and models are included in both acceptance and unit testing based on Codeception. They are located in `/tests`. To execute the tests, run `./vendor/bin/codecept run`.

CONSOLE COMMANDS
----------------

[](#console-commands)

### AutoController

[](#autocontroller)

These actions should normally not run on a production server. The actions mentioned here generate files and data that may be used in development or testing. When executing these actions in a production environment, the controller will generate a warning prompt that you may override.

#### ./yii auto/all

[](#yii-autoall)

Executes all the actions in the AutoController.

#### ./yii auto/gii-models

[](#yii-autogii-models)

Generates ActiveRecords for all the tables in your database in the `./models` folder. It automatically overwrites the ActiveRecords if they exist. The ActiveRecords are named `Base[Tablename]` and extend `BaseActiveRecord`. It also creates a class `[Tablename]` which extends `Base[Tablename]` for custom code, extra validation rules, etc. The `[Tablename]` class will not be overridden when executing the action again.

#### ./yii auto/apidoc

[](#yii-autoapidoc)

Generates API documentation based on [apidoc](http://apidocjs.com/) from the comments in the `./controllers` folder. It outputs the documentation in the Git-ignored folder `./web/apidoc`. You may include this folder in Git manually if you want to export the documentation to a production server. Please note, apidoc is a dev-dependency in Node.js. It will only be installed when using the `npm install` command.

HOW TO CONTRIBUTE
-----------------

[](#how-to-contribute)

You may contribute in any way you want, but please contact me beforehand to prevent merge-conflicts by [creating an issue](https://github.com/blurrywindows/yii2-api-kit/issues).

ISSUES
------

[](#issues)

If you have any questions or experience any issues with this kit, please [submit an issue](https://github.com/blurrywindows/yii2-api-kit/issues).

READ MORE
---------

[](#read-more)

-
-

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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

3253d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f436dbe6c54e7029bd7ba6584fab0d01a05cc118a538d816e2493262c12a695?d=identicon)[bart\_sysf](/maintainers/bart_sysf)

---

Tags

apiframeworkyii2project templatebasickit

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/blurrywindows-yii2-api-kit/health.svg)

```
[![Health](https://phpackages.com/badges/blurrywindows-yii2-api-kit/health.svg)](https://phpackages.com/packages/blurrywindows-yii2-api-kit)
```

###  Alternatives

[developeruz/yii-vue-app

Yii 2 + Vue.js Basic Project Template

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

PHPackages © 2026

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