+
Skip to content
@PivotPHP

PivotPHP

PivotPHP - O framework que evolui com sua aplicação

PivotPHP Banner


The Evolutionary PHP Ecosystem

Building tools that adapt to developers, not the other way around.

Inglês Português GitHub followers Twitter Follow Discord


⚡ High-Performance Benchmarks | 🚀 Express.js syntax | 🧪 Active Development | 🔬 Research Project


🎯 Our Mission

Making PHP development joyful again.

After years of wrestling with heavyweight frameworks and rigid architectures, we believe PHP developers deserve better. PivotPHP is an experimental framework exploring Express.js-inspired patterns in PHP.

🧪 Project Status: PivotPHP is a research and development project. Perfect for prototyping, learning, and validating API concepts. Currently not recommended for production use.

🤔 Why PivotPHP?

🚀 High-Performance APIs

  • Up to 70.9M requests/hour (ReactPHP)
  • 32.4M requests/hour (Core)
  • 16.5M requests/hour (with ORM)
  • 6-12MB memory footprint
  • Docker-standardized benchmarks

🎯 Developer First

  • Express.js-like simplicity
  • Zero configuration
  • Intuitive API design

🧪 Research & Development

  • Rapid API prototyping
  • Framework concept validation
  • Experimental features testing

We're building an ecosystem where:

  • Performance comes first, not as an afterthought
  • 🔧 Flexibility is the default, not a premium feature
  • 💝 Developer experience matters, from first composer require to production deploy
  • 🌱 Evolution is encouraged, letting your code grow naturally

🌐 Our Ecosystem

Core Framework & Official Extensions

💎 Core Framework

pivotphp-core Packagist Downloads

The heart of PivotPHP. Fast, unopinionated microframework with Express.js-inspired syntax.

// 🚀 Build APIs in seconds
$app = new Application();

$app->get('/hello/:name', fn($req, $res) =>
    $res->json(['message' => "Hello, {$req->params->name}!"])
);

$app->run(); // That's it! Zero boilerplate

Features:

  • Express.js-inspired routing with regex constraints
  • PSR-7/PSR-15 hybrid implementation
  • Built-in security middleware (CSRF, XSS, Rate limiting)
  • JWT & API Key authentication
  • v1.1.0: High-performance mode with object pooling & lazy loading

🗄️ Cycle ORM Extension

pivotphp-cycle-orm Packagist Downloads

composer require pivotphp/cycle-orm

Powerful database ORM integration with zero configuration.

// 🔍 One line connection, type-safe queries
$app->register(new CycleServiceProvider([
    'dbal' => ['databases' => ['default' => [
        'connection' => 'mysql://user:pass@localhost/db'
    ]]]
]));

$users = User::where('active', true)
    ->with('posts')
    ->limit(10)
    ->get(); // Automatic query optimization

Features:

  • Zero-configuration setup
  • Automatic migrations & schema compilation
  • Repository pattern with type safety
  • Transaction middleware & monitoring
  • Multiple database connections (SQLite, MySQL)
  • v1.0.1: Performance profiling & query logging

⚡ ReactPHP Extension

pivotphp-reactphp Packagist Downloads

composer require pivotphp/reactphp

Async runtime for long-running applications.

// 🔄 Continuous server without restarts
$app->register(new ReactServiceProvider([
    'server' => ['host' => '0.0.0.0', 'port' => 8080]
]));

$app->runAsync(); // Non-blocking event loop

Features:

  • Continuous runtime without restarts
  • PSR-7 bridge compatibility
  • Event-driven architecture
  • Memory management & isolation
  • Global state protection
  • v0.0.2: Stable production runtime

Community Extensions

The PivotPHP ecosystem is designed to be extended! We're excited to see what the community will build.

Built-in Core Features:

  • 📝 OpenAPI/Swagger - Automatic API documentation generation
  • High-Performance Mode - Object pooling & lazy loading (v1.1.0)
  • 🚀 JSON Optimization - Buffer pooling for JSON operations (v1.1.1)
  • 🛡️ Security Suite - CSRF, XSS, Rate limiting built-in
  • 📊 Performance Monitoring - Real-time metrics and profiling

Planned Extensions:

  • 📧 Mail Service - Email abstraction layer
  • 🚦 Queue System - Background job processing
  • 💾 Advanced Caching - Multi-driver support
  • 🔌 WebSocket Server - Real-time communication
  • 📊 GraphQL - Modern API queries

Creating Your Own Extension

// 1. Create Service Provider
class MyExtensionServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->container->singleton('myservice', MyService::class);
    }
    
    public function boot(): void
    {
        $this->app->get('/my-route', [MyController::class, 'handle']);
    }
}

// 2. Register in your app
$app->register(new MyExtensionServiceProvider());

Extension Guidelines:

  • Follow pivotphp-{name} naming convention
  • Provide comprehensive tests
  • Document with examples
  • Tag as pivotphp-extension on Packagist

📊 By the Numbers

Metric Value
API Throughput Up to 70.9M requests/hour
Core Performance 32.4M requests/hour
ORM Performance 16.5M requests/hour
Memory Usage 6-12MB (varies by variant)
Extensions Core + ORM + ReactPHP
Status Research & Development

🔥 Built for Modern PHP

// 🔒 Secure API with JWT auth in 5 lines
$app->group('/api/v1', function($group) {
    $group->middleware([Auth::jwt(), RateLimit::perMinute(100)]);
    $group->get('/profile', fn($req, $res) => $res->json($req->user));
    $group->resource('/posts', PostController::class);
});

// ✅ Type-safe validation out of the box
$data = $req->validate([
    'email' => 'required|email',
    'name' => 'required|string|max:100'
]);

// 🔌 Real-time features in 2 lines
$ws = new WebSocket\Server($app);
$ws->on('message', fn($socket, $data) => $socket->broadcast('update', $data));

🚀 Getting Started

👨‍💻 Quick Start (60 seconds)

# Create your first PivotPHP app
composer create-project pivotphp/skeleton my-api
cd my-api && php -S localhost:8000

# 🎉 Your API is now running at http://localhost:8000

🤝 For Contributors

# Join the development
git clone https://github.com/PivotPHP/pivotphp-core.git
cd pivotphp-core
composer install && composer test

🤝 Community

Join thousands of developers building the future of PHP

Discord GitHub Discussions Twitter

How to Contribute

We believe great software comes from great communities. Here's how you can help:

  • Report bugs and request features in our Issues
  • Submit code via Pull Requests to any of our repositories
  • Improve docs by editing our website
  • Help others in Discord and Discussions
  • Spread the word by starring our repos and sharing with friends

💡 Philosophy

🌱 Evolutionary Design

Like DNA that adapts to different environments, PivotPHP evolves with your project. Start simple, scale complex, never rewrite.

⚡ Performance First

Every line of code is optimized. We measure everything and make performance visible, because fast APIs make happy users.

💝 Developer Happiness

The best framework is the one you don't think about. PivotPHP stays out of your way while providing the tools you need.

🤝 Community Driven

Built by developers, for developers. Every decision is made with real-world usage in mind, not academic ideals.

🗺️ Roadmap

Current Focus (Q3 2025)
  • Core framework stabilization ✅
  • Cycle ORM integration v1.0.1 ✅
  • ReactPHP extension v0.0.2 ✅
  • Basic middleware collection ✅
  • Performance benchmarking suite ✅
  • High-performance mode v1.1.0 ✅
  • Production validation complete ✅
  • Testing utilities package (in progress)
Coming Soon (Q4 2025)

Community Extensions:

  • WebSocket server for real-time communication
  • Multi-driver caching (Redis, Memcached)
  • OpenAPI/Swagger auto-generation
  • Background job processing
  • Email service abstraction

Developer Tools:

  • Docker development containers
  • VS Code extension with snippets
  • PHPStorm plugin
  • Deployment guides (Heroku, AWS, DigitalOcean)
Future Vision (2026)

Advanced Extensions:

  • pivotphp/graphql - GraphQL server implementation
  • pivotphp/grpc - gRPC service support
  • pivotphp/events - Distributed event bus
  • pivotphp/admin - Auto-admin panel generator
  • pivotphp/testing - Advanced testing utilities

Enterprise Features:

  • Multi-tenancy support
  • Advanced security middleware
  • Microservices toolkit
  • Cloud platform integrations
  • Conference talks and workshops

👨‍💻 About the Creator

Caio Alberto Fernandes started PivotPHP after 6 years of frustration with existing PHP frameworks. What began as a weekend experiment to bring Express.js elegance to PHP has grown into a movement for better developer tools.

"I believe the best frameworks are invisible—they amplify your skills without imposing their opinions. PivotPHP is my attempt to build that invisible layer for PHP developers."

📜 License & Support

  • License: MIT (free for commercial use)
  • Support: Community-driven via Discord and GitHub
  • Sponsorship: GitHub Sponsors

⭐ Star our repositories to show your support!

💎 Core Framework🗄️ Cycle ORM📚 Website🎓 Examples


Made with love by the PHP community, for the PHP community.

PivotPHP: Code that evolves with you.

Pinned Loading

  1. pivotphp-core pivotphp-core Public

    The evolutionary PHP microframework for modern APIs. Built for performance, designed to evolve. Express.js-inspired syntax with 52M+ ops/sec.

    PHP

  2. pivotphp-cycle-orm pivotphp-cycle-orm Public

    Complete Cycle ORM integration for PivotPHP - zero-config database layer with high performance and type safety for the evolutionary microframework.

    PHP

Repositories

Showing 5 of 5 repositories

Top languages

Loading…

Most used topics

Loading…

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载