The Evolutionary PHP Ecosystem
Building tools that adapt to developers, not the other way around.
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.
|
🚀 Exceptional Performance APIs
|
🎯 Developer First
|
🧪 Research & Development
|
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 requireto production deploy - 🌱 Evolution is encouraged, letting your code grow naturally
|
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 boilerplateFeatures:
|
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 optimizationFeatures:
|
|
Roteamento modular extraído do core para flexibilidade máxima. Recursos:
|
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)
- 📐 Semantic Versioning - Strict SemVer with a documented deprecation cycle (removals in v3.0.0)
- 🎓 Educational Architecture - Simple over complex implementations
- 🛡️ Security Suite - CSRF, XSS, Rate limiting built-in
- 📊 Performance Monitoring - Real-time metrics and profiling
// 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-extensionon Packagist
| 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 |
| Status | Research & Development |
// 📝 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()]);
});# 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# Join the development
git clone https://github.com/PivotPHP/pivotphp-core.git
cd pivotphp-core
composer install && composer testWe 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 Discussions
- Spread the word by starring our repos and sharing with friends
Like DNA that adapts to different environments, PivotPHP evolves with your project. Start simple, scale complex, never rewrite.
Every line of code is optimized. We measure everything and make performance visible, because fast APIs make happy users.
The best framework is the one you don't think about. PivotPHP stays out of your way while providing the tools you need.
Built by developers, for developers. Every decision is made with real-world usage in mind, not academic ideals.
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: MIT (free for commercial use)
- Support: Community-driven via GitHub
- Sponsorship: GitHub Sponsors
💎 Core Framework • 🗄️ Cycle ORM • 📚 Website • 🎓 Examples
Made with love by the PHP community, for the PHP community.
PivotPHP: Code that evolves with you.