PHPackages                             net-code/laravel-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. [API Development](/categories/api)
4. /
5. net-code/laravel-kit

ActiveLibrary[API Development](/categories/api)

net-code/laravel-kit
====================

Small, reusable conventions for building Laravel REST APIs: a Clock port, sort direction, paginated-response envelope, an idempotency middleware, ISO country-code rule, and a base context service provider.

v0.4.0(1mo ago)073MITPHPPHP ^8.5

Since Jul 10Pushed 1mo agoCompare

[ Source](https://github.com/Net-Tech-Marek-Rode-Sp-z-o-o/laravel-kit)[ Packagist](https://packagist.org/packages/net-code/laravel-kit)[ RSS](/packages/net-code-laravel-kit/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (17)Versions (6)Used By (3)

net-code/laravel-kit
====================

[](#net-codelaravel-kit)

Small, reusable conventions for building Laravel REST APIs — the framework-level glue that would otherwise be copy-pasted between projects. Extracted from the net-tech portfolio API.

No service provider, no config, no magic: just a handful of classes you reach for directly.

Install
-------

[](#install)

```
composer require net-code/laravel-kit
```

What's inside
-------------

[](#whats-inside)

ClassPurpose`NetCode\Kit\Clock` / `SystemClock`Injectable time port + system implementation. Bind `Clock` to `SystemClock` (or a fixed clock in tests).`NetCode\Kit\SortDirection``asc` / `desc` string enum for list queries.`NetCode\Kit\Http\PaginatedResponse`Builds the `{meta, links}` half of a paginated JSON envelope from the request + page numbers.`NetCode\Kit\Http\Idempotency`HTTP idempotency middleware — replays the first successful response for a repeated `Idempotency-Key` on POST, with a concurrency lock. Cache-store agnostic (the host-provided cache repository); register it under a middleware alias.`NetCode\Kit\Validation\CountryCode`Validation rule accepting any ISO 3166-1 alpha-2 country code.`NetCode\Kit\ContextServiceProvider`Base service provider with `registerBindings()` / `bootContext()` hooks for modular-monolith bounded contexts.Usage
-----

[](#usage)

```
use NetCode\Kit\Clock;
use NetCode\Kit\SystemClock;

$this->app->bind(Clock::class, SystemClock::class);
```

```
use NetCode\Kit\Http\PaginatedResponse;

return response()->json([
    'data' => $rows,
    ...PaginatedResponse::meta($request, $page, $perPage, $total),
]);
```

```
use NetCode\Kit\Validation\CountryCode;

$request->validate(['country' => ['required', new CountryCode]]);
```

> Scramble/OpenAPI operation transformers previously shipped here have moved to the dedicated [`net-code/laravel-scramble`](https://github.com/Net-Tech-Marek-Rode-Sp-z-o-o/laravel-scramble)package, keeping this kit dependency-light.

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance91

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community10

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

Total

5

Last Release

43d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1537b84454509a8f558fa6772528d6ef0942cd74e39c5224ae39e41ea9c841e?d=identicon)[mrode-net-tech](/maintainers/mrode-net-tech)

---

Top Contributors

[![mrode-net-tech](https://avatars.githubusercontent.com/u/158272218?v=4)](https://github.com/mrode-net-tech "mrode-net-tech (5 commits)")

---

Tags

apilaravelclockpaginationdddidempotencyconventions

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/net-code-laravel-kit/health.svg)

```
[![Health](https://phpackages.com/badges/net-code-laravel-kit/health.svg)](https://phpackages.com/packages/net-code-laravel-kit)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80427.1M249](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k12.2M128](/packages/nuwave-lighthouse)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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