PHPackages                             lark/app - 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. lark/app

ActiveProject[Framework](/categories/framework)

lark/app
========

Lark Application

0.25.0(3y ago)18MITPHP

Since Jul 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/shayanderson/lark)[ Packagist](https://packagist.org/packages/lark/app)[ Docs](https://github.com/shayanderson/lark)[ RSS](/packages/lark-app/feed)WikiDiscussions 0.x Synced today

READMEChangelog (3)Dependencies (1)Versions (16)Used By (0)

Lark
====

[](#lark)

Lark is a modern, lightweight app framework designed specifically for developing REST APIs.

Installation
------------

[](#installation)

Create project directory and move to the project directory:

```
mkdir myapp
cd myapp

```

Install using composer:

```
composer create-project lark/app ./

```

Then, initialize project:

```
./lark --init

```

Console
-------

[](#console)

Lark Console is available to assist in creating routes, schemas, models and revisions. Lark Console can be run from the project root directory.

```
./lark route items

```

Namespaces can also be used.

```
./lark route api/items

```

> View all commands with `./lark` or `./lark help`View command specific help with `./lark help COMMAND`

Middleware
----------

[](#middleware)

Create middleware files in the `app/Middleware` directory.

Example middleware class:

```
namespace App\Middleware;
use Lark\Request;
use Lark\Response;

class UserMiddleware
{
	public function auth(Request $req, Response $res): void
	{
		// auth here
	}
}
```

For this example, the middleware can be setup in `app/routes.php` like:

```
router()->matched([App\Middleware\UserMiddleware::class, "auth"]);
```

> Read the [framework docs](https://github.com/shayanderson/lark-framework#middleware) on middleware.

App Class
---------

[](#app-class)

\#todo docs about app class props + methods

MVC Application
---------------

[](#mvc-application)

Lark can use controllers that are common in MVC applications. Create controller files in the `app/Controller` directory and extend the base `App\Controller` class.

Example base controller class `app/Controller.php`:

```
namespace App;
use Lark\Response;

abstract class Controller
{
	protected Response $res;

	public function __construct()
	{
		$this->res = res();
	}
}
```

Example controller class `app/Controller/ItemsController.php`:

```
namespace App\Controller;
use App\Model\Item as ItemModel;

class ItemsController extends \App\Controller
{
    private ItemModel $model;

	public function __construct()
	{
		$this->model = new ItemModel;
	}

	public function get(): void
	{
		$this->res->json(
			$this->model->find()
		);
	}
}
```

For this example, a route can be setup in `app/routes.php` like:

```
router()->get("/items", [App\Controller\ItemsController::class, "get"]);
```

> Read the [framework docs](https://github.com/shayanderson/lark-framework#route-actions) on route actions.

Custom Validation Rules
-----------------------

[](#custom-validation-rules)

Custom validation rules should be created in the `app/Validator` directory like `app/Validator/MyRule.php`.

> Read the [framework docs](https://github.com/shayanderson/lark-framework#custom-validation-rule) on custom validation rules.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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 ~19 days

Recently: every ~47 days

Total

16

Last Release

1141d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/705163?v=4)[Wang Jian](/maintainers/lark)[@lark](https://github.com/lark)

---

Top Contributors

[![shayanderson](https://avatars.githubusercontent.com/u/888684?v=4)](https://github.com/shayanderson "shayanderson (19 commits)")

---

Tags

frameworklark

### Embed Badge

![Health badge](/badges/lark-app/health.svg)

```
[![Health](https://phpackages.com/badges/lark-app/health.svg)](https://phpackages.com/packages/lark-app)
```

###  Alternatives

[hemp/presenter

Easy Model Presenters in Laravel

247616.4k1](/packages/hemp-presenter)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

681.0M18](/packages/pestphp-pest-plugin-stressless)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1610.2k5](/packages/wpstarter-framework)

PHPackages © 2026

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