memran/marwa-php

MarwaPHP - Lightweight MVC PHP Framework

dev-main 2025-08-06 10:16 UTC

This package is auto-updated.

Last update: 2025-08-06 10:20:14 UTC


README

License PHP Build

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:

πŸ’» 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