memran / marwa-php
MarwaPHP - Lightweight MVC PHP Framework
Requires
- php: >= 7.1
- ext-json: *
- memran/marwa-framework: dev-main
This package is auto-updated.
Last update: 2025-08-06 10:20:14 UTC
README
MarwaPHP is a fast, lightweight, and modular PHP framework built for modern web development. It simplifies API and application development with expressive routing, powerful CLI tools, and a clean MVC structure β all while staying minimal and extensible.
π¦ Features
- β Lightweight MVC structure
- π§ CLI tools for rapid scaffolding
- π Schema Builder, Migrations, and Seeders
- π JWT Authentication & Middleware
- π Built-in CORS support
- π Task Scheduling & Queues
- π§° Helper functions & Utilities
- π³ Docker-ready for scalable deployment
Why Another Framework?
I've been developing PHP projects for over 20 years and have extensively worked with frameworks like CodeIgniter. While these frameworks enabled rapid development, I encountered recurring pain points β frequent breaking changes, bloated general-purpose features, and backward-incompatible updates that rendered many of my projects obsolete. Maintaining legacy code became increasingly difficult as frameworks evolved.
Then came Laravel with a modern and elegant syntax, but it introduced its own challenges: too many built-in features, increased complexity, and unnecessary overhead for lightweight projects.
Thatβs when I decided to build my own framework β MarwaPHP. It's thoughtfully designed to be lightweight, modular, and efficient, using only the best libraries in the PHP ecosystem. MarwaPHP delivers a Laravel-like developer experience without the bloat, making it ideal for scalable, maintainable, and production-ready applications.
π Project Structure
marwa-php/
βββ app/ β Application Code (Controllers, Models, Views)
βββ config/ β Configuration files
βββ public/ β Web root (index.php)
βββ routes/ β Route definitions
βββ resources/ β Views & Assets
βββ database/ β Migrations, Seeders
βββ tests/ β Unit & Feature tests
βββ vendor/ β Composer packages
π Getting Started
# Clone the repo git clone https://github.com/memran/marwa-php.git # Enter project directory cd marwa-php # Install dependencies composer install # Run dev server php -S localhost:8000 -t public/
π Documentation
Visit the MarwaPHP GitHub Wiki to get started and learn all features:
- Getting Started
- Routing
- Controllers
- Models
- Views (Twig)
- Authentication
- Authorization (Roles & Policies)
- Session Management
- Queue System
- Task Scheduling
- Docker Setup
π» Examples
- π¦ Build a RESTful API in minutes
- π Secure routes with policies
- π§ Schedule background tasks
- π Queue jobs with Redis
- π§ͺ Run PHPUnit tests
π€ Contributing
We welcome contributions! Open an issue, submit a PR, or improve documentation.
π License
MIT Β© Mohammad Emran