PHPackages                             jeanisahakyan/motion-dots - 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. jeanisahakyan/motion-dots

ActiveLibrary

jeanisahakyan/motion-dots
=========================

1.11(2y ago)64561MITPHPPHP &gt;=8.1

Since Feb 12Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/JeanIsahakyan/motion-dots)[ Packagist](https://packagist.org/packages/jeanisahakyan/motion-dots)[ RSS](/packages/jeanisahakyan-motion-dots/feed)WikiDiscussions master Synced today

READMEChangelog (10)DependenciesVersions (16)Used By (0)

MotionDots
==========

[](#motiondots)

**MotionDots** is a lightweight PHP framework designed to simplify API development by providing tools for dynamic method invocation, input validation, structured responses, and TypeScript generation. It streamlines the process of building APIs by handling common tasks such as parameter validation, response formatting, error handling, and supports the use of native PHP 8.1 enums for robust type definitions.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/7663c9d53dc13cedaf0660a8745a7e77d2dd711257f36aa86ebce12a0600ef42/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c75652e737667)](https://www.php.net/)

✨ Key Features
--------------

[](#-key-features)

- **🚀 Dynamic Method Invocation**: Automatically maps API requests to methods in your classes
- **🛡️ Type Safety**: Validates and sanitizes input parameters using custom types
- **📋 Structured Responses**: Ensures consistent response formats across your API
- **⚡ Error Handling**: Comprehensive error system with predefined error codes
- **🔧 Enum Support**: Native PHP 8.1 enums for robust type definitions
- **🔄 Context Management**: Shares data across methods and types during a request
- **📱 TypeScript Generation**: Automatic TypeScript definitions for frontend integration
- **🔍 System Methods**: Built-in introspection and utility methods

🎯 Perfect For
-------------

[](#-perfect-for)

- **API Developers** looking to quickly build robust APIs
- **Projects** requiring strict input validation and type safety
- **Teams** needing consistent response formats across endpoints
- **Applications** where dynamic method routing is beneficial
- **Frontend Teams** requiring TypeScript integration
- **Systems** needing shared context between methods and types

📚 Documentation
---------------

[](#-documentation)

For comprehensive documentation, visit our [Documentation Index](docs/index.md):

- **[Quick Start Guide](docs/README.md)** - Get up and running quickly
- **[Architecture Overview](docs/architecture.md)** - Understand the system design
- **[API Reference](docs/api-reference.md)** - Complete API documentation
- **[Examples &amp; Patterns](docs/examples.md)** - Real-world usage examples
- **[TypeScript Integration](docs/typescript-generation.md)** - Frontend type generation

---

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

[](#-quick-start)

### Requirements

[](#requirements)

- **PHP 8.1+** (required for enum support and modern features)
- **Composer** for dependency management
- **JSON extension** (usually included with PHP)

### Installation

[](#installation)

Install MotionDots via Composer:

```
composer require jeanisahakyan/motion-dots
```

### Basic Setup

[](#basic-setup)

Create a simple API endpoint in just a few lines:

```
