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


⚡ 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?

🚀 Exceptional Performance APIs

  • 2.122 req/sec peak HTTP (Docker v1.2.0)
  • 1.418 req/sec average HTTP performance
  • 3.6M ops/sec OpenAPI generation
  • Array Callable support (PHP 8.4+)
  • Docker-validated 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.2.0: Simplicity Edition - "Simplicidade sobre Otimização Prematura"

🗄️ 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 (NEW v1.2.0)
  • 🎯 Interactive Swagger UI - Zero-config API testing interface (/swagger)
  • 🔄 15+ Automatic Aliases - Zero breaking changes guaranteed
  • 🎓 Educational Architecture - Simple over complex implementations
  • 🛡️ Security Suite - CSRF, XSS, Rate limiting built-in
  • 📊 Performance Monitoring - Real-time metrics and profiling

Future Extensions:

  • 🔌 WebSocket Server - Real-time communication (planned)
  • 💾 Advanced Caching - Multi-driver support (concept)
  • 📊 Additional Middleware - Extended security and performance features

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
HTTP Peak 2.122 req/sec (Docker v1.2.0)
OpenAPI Generation 3.6M ops/sec (Swagger UI)
HTTP Average 1.418 req/sec
Memory Usage ~17.5MB (all operations)
Extensions Core + ORM + ReactPHP
Status Research & Development

🔥 Built for Modern PHP

// 📝 Automatic OpenAPI/Swagger in 3 lines (NEW v1.2.0)
use PivotPHP\Core\Middleware\Http\ApiDocumentationMiddleware;

$app->use(new ApiDocumentationMiddleware());
// ✅ Access: http://localhost:8080/swagger (Swagger UI)
// ✅ Access: http://localhost:8080/docs (OpenAPI JSON)

// 🔒 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);
});

// 📚 PHPDoc-powered automatic documentation
$app->get('/users', function($req, $res) {
    /**
     * @summary List all users
     * @description Returns paginated list of users
     * @tags Users
     * @response 200 array List of users
     */
    return $res->json(['users' => User::all()]);
});

🚀 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.1.0 ✅
  • Performance benchmarking suite ✅
  • OpenAPI/Swagger integration v1.2.0 ✅
  • Interactive API documentation ✅
  • Simplified educational architecture ✅
  • Zero breaking changes system ✅
Coming Soon (Q4 2025)

Community Extensions:

  • WebSocket integration for ReactPHP extension
  • Enhanced middleware collection
  • Testing utilities and helpers

Developer Tools:

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

Research Extensions:

  • Enhanced performance monitoring
  • Advanced middleware patterns
  • Extended PSR compliance features

Long-term Vision:

  • Framework stabilization for production use
  • Extended documentation and examples
  • Community-driven development
  • Educational resources and tutorials

👨‍💻 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…