PHPackages                             monkeyscloud/monkeyslegion-skeleton - 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. monkeyscloud/monkeyslegion-skeleton

ActiveProject[Framework](/categories/framework)

monkeyscloud/monkeyslegion-skeleton
===================================

Starter project for the MonkeysLegion framework

2.0.3(1mo ago)13528↓91.1%1[1 PRs](https://github.com/MonkeysCloud/MonkeysLegion-Skeleton/pulls)MITPHPPHP ^8.4CI passing

Since Jul 25Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/MonkeysCloud/MonkeysLegion-Skeleton)[ Packagist](https://packagist.org/packages/monkeyscloud/monkeyslegion-skeleton)[ Docs](https://github.com/monkeyscloud/monkeyslegion-skeleton)[ RSS](/packages/monkeyscloud-monkeyslegion-skeleton/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (46)Versions (32)Used By (0)

MonkeysLegion Skeleton v2
=========================

[](#monkeyslegion-skeleton-v2)

[![PHP Version](https://camo.githubusercontent.com/d6cefa91b9fa29b5f2f840c25f8f6e94cc663f0a21793fe0f7adb597a3a006ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e342532422d3838393242462e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Tests](https://camo.githubusercontent.com/b1408d03ae186571ffefc080bc8ebe6b76e9aeac3532bee3227438c78d02ade1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d3133392532307061737365642d627269676874677265656e2e737667)](#-testing)[![Packagist](https://camo.githubusercontent.com/a5304e80158a958029bd67caf0813a50d98097429b2afbeb7c9931738fc0685d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6e6b657973636c6f75642f6d6f6e6b6579736c6567696f6e2d736b656c65746f6e2e737667)](https://packagist.org/packages/monkeyscloud/monkeyslegion-skeleton)

**Production-ready PHP 8.4 skeleton for building web apps &amp; APIs with the MonkeysLegion framework v2.**

Built on attribute-first routing, property hooks, asymmetric visibility, and a zero-magic PSR-15 pipeline.

---

✨ What's New in v2
------------------

[](#-whats-new-in-v2)

Featurev1v2**Entry point**`HttpBootstrap::run()``Application::create()->run()`**Entity properties**Getters/settersPHP 8.4 property hooks**Visibility**Public/private`public private(set)` asymmetric**Configuration**`.php` arrays`.mlc` typed config**Routing**Manual registration`#[Route]` attributes**Auth**Manual middleware`#[Authenticated]`, `#[RequiresRole]`**Rate limiting**Custom`#[Throttle(max: 60, per: 1)]`**Events**Manual dispatch`#[Listener]` auto-discovery**DI**Config-first`#[Singleton]`, `#[Provider]`**PHPStan**Level 8Level 9**Tests**12 tests139 tests, 289 assertions---

✨ Features Overview
-------------------

[](#-features-overview)

CategoryFeatures**HTTP Stack**PSR-7/15 compliant, middleware pipeline, SAPI emitter**Routing**Attribute-based v2, auto-discovery, constraints, caching**Dependency Injection**PSR-11 container with `#[Singleton]`, `#[Provider]`**Database**Native PDO MySQL 8.4, Query Builder, Micro-ORM**Authentication**JWT, RBAC, 2FA, OAuth, API keys**API Documentation**Live OpenAPI 3.1 &amp; Swagger UI**Validation**DTO binding with attribute constraints**Rate Limiting**`#[Throttle]` attribute, sliding-window (IP + User)**Templating**MLView with components, slots, caching**CLI**Migrations, cache, key-gen, scaffolding, Tinker REPL**Files**Multi-driver storage, image processing, chunked uploads**I18n**Full internationalization &amp; localization support**Telemetry**Prometheus metrics, distributed tracing, PSR-3 logging**Mail**SMTP, Markdown templates, DKIM support**Caching**Multiple drivers (File, Redis, Memcached)---

🚀 Quick Start
-------------

[](#-quick-start)

```
composer create-project monkeyscloud/monkeyslegion-skeleton my-app
cd my-app

cp .env.example .env
php ml key:generate

composer serve
# → http://127.0.0.1:8000
```

---

📁 Project Structure
-------------------

[](#-project-structure)

```
my-app/
├─ app/
│  ├─ Controller/          # Attribute-routed controllers
│  │  └─ Api/              # API controllers (UserController, PostController, AuthController)
│  ├─ Dto/                 # Request DTOs with validation attributes
│  ├─ Entity/              # Entities with PHP 8.4 property hooks
│  ├─ Enum/                # Backed enums with business logic
│  ├─ Event/               # Domain events (final readonly)
│  ├─ Job/                 # Queue jobs (ShouldQueue)
│  ├─ Listener/            # Event listeners (#[Listener])
│  ├─ Middleware/           # PSR-15 middleware
│  ├─ Policy/              # Authorization policies
│  ├─ Providers/            # Service providers (#[Provider])
│  ├─ Repository/           # EntityRepository extensions
│  ├─ Resource/             # JSON:API resource transformers
│  └─ Service/              # Business logic (#[Singleton])
├─ config/
│  ├─ app.php              # DI container bindings (only PHP config file)
│  ├─ app.mlc              # Application settings
│  ├─ database.mlc         # Database connection
│  ├─ auth.mlc             # JWT, guards, 2FA
│  ├─ cache.mlc            # Cache drivers
│  ├─ cors.mlc             # CORS policy
│  ├─ logging.mlc          # Log channels
│  ├─ mail.mlc             # SMTP/mailer
│  ├─ middleware.mlc        # Middleware pipeline
│  ├─ queue.mlc            # Queue drivers
│  └─ session.mlc          # Session config
├─ public/index.php        # Application::create()->run()
├─ bootstrap.php           # Application::create()->boot()
├─ ml                      # CLI entry point
├─ src/helpers.php         # Global helper functions (base_path, asset, csrf, auth)
├─ resources/
│  └─ views/               # MLView templates & components
├─ storage/                # File uploads, logs
├─ var/
│  ├─ cache/               # Compiled templates, route cache
│  └─ migrations/          # Auto-generated SQL
├─ tests/
│  ├─ Unit/                # 100+ unit tests
│  ├─ Integration/         # Integration tests with DI container
│  ├─ Feature/             # Full HTTP pipeline tests
│  └─ Performance/         # Benchmark suite (11 benchmarks)
├─ phpunit.xml
├─ phpstan.neon            # Level 9
└─ composer.json

```

---

🏗️ v2 Architecture
------------------

[](#️-v2-architecture)

### Entry Point

[](#entry-point)

```
// public/index.php — the entire entry point
