After building and managing 25+ enterprise applications (ERP, HRM, CRM, LMS, SaaS), I realized most PHP frameworks are powerful but heavy for small, API-only or microservice projects.
So, I decided to build a custom, production-ready REST API framework in raw PHP β clean, lightweight, and fully modular β now open-sourced on GitHub! π
βοΈ Why I Built This
I wanted complete control over every layer: routing, middleware, authentication, and performance.
I needed something faster and leaner than Laravel for internal APIs and microservices.
I wanted to learn deeply how an API framework works under the hood β HTTP handling, dependency injection, error management, and versioning.
π§© Framework Highlights
β
Lightweight & Fast β built on raw PHP 8+, PSR-4 autoloading
β
JWT Authentication β secure token-based access
β
Clean Modular Structure β controllers, routes, middleware
β
Built-in CLI & Job Queue System
β
Debug Mode β track queries, memory, and response time
β
API Versioning Support
β
Error Handling, CORS, and Rate Limiting
β
Ready for Docker & Production
π Folder Structure Example
app/
βββ core/
βββ controllers/
βββ middleware/
βββ models/
βββ routes/
βββ storage/
public/
βββ index.php
This structure keeps everything modular, testable, and scalable.
π§ Learn the Full Process
I documented every step β from architecture planning to deployment β in this detailed Medium article:
π Building a Production-Ready PHP REST API Framework β A Complete Guide
π» Explore the Source Code
You can explore, fork, or contribute on GitHub:
π https://github.com/jmrashed/php-rest-api-pro-kit
π€ Contribute & Feedback
Iβd love your feedback and suggestions!
If you find it useful:
β Star the repo
π Report issues
π¬ Share ideas to improve
Letβs make this the go-to starting point for developers who want to build fast, clean, production-ready APIs with PHP!
Top comments (0)