Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://packagist.org/packages/binaryk/laravel-restify"><img src="https://poser.pugx.org/binaryk/laravel-restify/license.svg" alt="License"></a>
</p>

The first fully customizable Laravel [JSON:API](https://jsonapi.org) builder. "CRUD" and protect your resources with 0 (zero) extra line of code.
The first fully customizable Laravel [JSON:API](https://jsonapi.org) builder with MCP and GraphQL support. "CRUD" and protect your resources with 0 (zero) extra line of code.

<div>
<a href="https://restifytemplates.com">
Expand Down Expand Up @@ -75,6 +75,42 @@ PUT: http://laravel.test/api/restify/dreams/1
DELETE: http://laravel.test/api/restify/dreams/1
```

## πŸ€– AI-Powered Development with MCP

Laravel Restify now includes **Model Context Protocol (MCP)** integration, enabling seamless AI agent interactions with your API resources. This powerful feature allows AI agents to understand, query, and manipulate your data through structured tool interfaces.

> **πŸ”₯ New!** MCP support enables AI agents to work directly with your Laravel Restify APIs, providing intelligent data access, automated operations, and enhanced development workflows.

**Key MCP Features:**
- **AI Agent Integration**: Connect Claude, GPT, and other AI agents directly to your APIs
- **Structured Tool Interfaces**: Automatically generated tools for CRUD operations
- **Security & Authorization**: Full Laravel authorization integration maintained
- **Developer MCP Server**: Dedicated server for enhanced Laravel Restify development

## MCP Server for Developers

Laravel Restify provides an MCP (Model Context Protocol) server designed for developers working with Laravel Restify APIs. This server enables AI agents to access documentation, create repositories, actions, and getters through structured tools.

**Repository**: [https://github.com/BinarCode/laravel-restify-mcp](https://github.com/BinarCode/laravel-restify-mcp)

### Features

- **Documentation Access**: Query Laravel Restify documentation directly
- **Repository Generation**: Create new repositories with proper structure
- **Action Creation**: Generate custom actions for your API resources
- **Getter Development**: Build custom getters for data retrieval
- **Code Examples**: Get contextual code examples and best practices

### Installation

```bash
npm install -g @binarcode/laravel-restify-mcp
```

### Usage with AI Agents

Configure your AI agent (Claude Desktop, etc.) to use the MCP server for enhanced Laravel Restify development assistance.

## Usage

See the [official documentation](https://restify.binarcode.com).
Expand Down
139 changes: 139 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,142 @@
- [x] Custom namespace and base directory for repositories
- [ ] Deprecate `show` and use `view` as default policy method for `show` requests
- [ ] Deprecate `store` and use `create` as default policy method for `store` requests so it's Laravel compatible

9.x

### Fixes & Improvements

- [ ] Complete Larastan integration and PHPStan Level 4 support
- [ ] Finalize PestPHP testing framework migration
- [ ] Request validation system overhaul
- [ ] Policy method standardization (`view` instead of `show`, `create` instead of `store`)
- [ ] Performance optimization for large datasets
- [ ] Memory usage optimization for bulk operations

10.0.0 - MCP

### Features

- [x] Model Context Protocol (MCP) integration for AI agents
- [x] Token-optimized field serialization for AI contexts
- [x] Advanced MCP server implementation with authentication
- [ ] Complete UI for Restify (web-based API management interface)
- [ ] Enhanced action logging with detailed audit trails
- [ ] Advanced query caching with intelligent invalidation
- [ ] Support for Laravel 12.x

10.0.0 - The Breakthrough Release

## Vision
Laravel Restify 10.0.0 represents a paradigm shift, positioning itself as the definitive Laravel API framework with enterprise-grade features, cutting-edge developer experience, and industry-first innovations.

### πŸš€ Tier 1: Core Differentiators

#### **Auto-Generated GraphQL Schema & Resolvers** βœ…
- [x] Dual REST/GraphQL API support from existing repositories
- [x] Automatic schema generation with `php artisan restify:graphql:generate`
- [x] GraphQL type mapping from Restify fields
- [x] Resolver class generation for CRUD operations
- [x] Authentication mocking for console context
- [x] Preview mode with detailed file generation overview
- [x] Lighthouse GraphQL integration support
- [ ] Built-in GraphQL subscriptions for real-time data (planned for future)
- **Impact**: Only Laravel package offering unified REST/GraphQL APIs

#### **TypeScript SDK Auto-Generation**
- Auto-generated TypeScript client from API routes
- Full type safety with IntelliSense support
- React/Vue/Angular integration helpers
- Automatic API client updates on schema changes
- **Impact**: Best-in-class developer experience

#### **Real-Time Broadcasting Integration**
- WebSocket support for live API updates
- Server-Sent Events for real-time notifications
- Built-in broadcasting for CRUD operations
- Laravel Echo integration out of the box
- **Impact**: Enables collaborative and live applications

### 🏒 Tier 2: Enterprise Features

#### **Built-in Multi-Tenancy & Team Management**
- Native tenant isolation with automatic scoping
- Organization and team management APIs
- Hierarchical permission systems
- Tenant-aware caching and performance optimization
- **Impact**: Enterprise SaaS applications ready out of the box

#### **Advanced Monitoring & Observability**
- Request tracing and performance metrics
- Health check endpoints with custom monitors
- Prometheus/Grafana integration
- Query performance insights and slow query detection
- Rate limiting with detailed analytics
- **Impact**: Production-ready monitoring and optimization

#### **Visual API Designer & Documentation**
- Interactive schema designer with drag-drop interface
- Auto-generated OpenAPI 3.0 specifications
- Live API playground with authentication
- Automated testing suite generation
- **Impact**: 60% faster API development and documentation

### πŸ€– Tier 3: AI & Modern Features

#### **Enhanced MCP Capabilities** (Building on existing foundation)
- AI-powered query optimization suggestions
- Natural language to API query translation
- Automated test case generation from AI analysis
- Smart field recommendations based on usage patterns
- **Impact**: Most AI-friendly API framework in the market

#### **Advanced Caching & Performance**
- Redis-based intelligent response caching
- Query result caching with dependency-based invalidation
- CDN integration for file fields and static content
- Background job integration for heavy operations
- Database query optimization with automated indexing suggestions
- **Impact**: 10x performance improvement for complex APIs

#### **Developer Experience Revolution**
- Hot-reload API development with instant updates
- Visual debugging tools for API requests/responses
- Automated API testing with AI-generated test scenarios
- One-command deployment with Docker containers
- **Impact**: Fastest API development cycle in Laravel ecosystem

## 🎯 Market Positioning

With Laravel Restify 10.0.0, we establish market leadership by becoming:

- **The Only Unified Solution**: First Laravel package offering both REST and GraphQL APIs
- **Most Developer-Friendly**: Auto-generated TypeScript SDKs and visual tools
- **Enterprise-Ready**: Built-in multi-tenancy, monitoring, and scalability
- **AI-First Architecture**: Most advanced AI integration in API frameworks
- **Performance Leader**: Advanced caching and optimization built-in

## πŸ“ˆ Success Metrics

- **Developer Adoption**: 50k+ monthly downloads (current: ~15k)
- **Enterprise Clients**: 100+ companies using multi-tenancy features
- **Community Growth**: 5k+ GitHub stars (current: ~2k)
- **Documentation Quality**: 95%+ developer satisfaction scores
- **Performance Benchmarks**: 10x improvement in response times

## πŸ—“ Implementation Timeline

### Phase 1 (Months 1-3): Foundation Revolution
1. GraphQL Schema Generation
2. TypeScript SDK Auto-Generation
3. Real-Time Broadcasting

### Phase 2 (Months 4-6): Enterprise Transformation
1. Multi-Tenancy System
2. Advanced Monitoring & Observability
3. Visual API Designer

### Phase 3 (Months 7-8): AI & Performance Excellence
1. Enhanced MCP Features
2. Advanced Caching & Performance
3. Developer Experience Tools

7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
}
],
"require": {
"php": "^8.2",
"php": "^8.2|^8.3",
"illuminate/contracts": "^11.0|^12.0",
"laravel/pint": "^1.0",
"laravel/mcp": "^0.1.0",
"spatie/laravel-data": "^4.4",
"spatie/laravel-package-tools": "^1.12",
"spatie/once": "^3.0"
Expand All @@ -38,6 +39,10 @@
"spatie/laravel-ray": "^1.9",
"vimeo/psalm": "^6.0@dev"
},
"suggest": {
"nuwave/lighthouse": "For GraphQL schema generation and resolvers (^6.0)",
"pusher/pusher-php-server": "For real-time broadcasting features (^7.0)"
},
"autoload": {
"files": [
"src/helpers.php"
Expand Down
Loading