Skip to content

mustang-framework/mustang

Repository files navigation

Mustang Banner
PHP Framework for building scalable and maintainable API's on top of Laravel.

About Mustang

Mustang is designed to help you build scalable PHP APIs faster, by providing tools and functionalities that facilitate the development of any API-Centric App.

Mustang integrated the best Laravel-compatible tools, packages, and conventions in a very creative way, to deliver a rich set of features for a modern PHP Application.

Basically, Mustang has developed to handle complexity and is suitable for medium or large projects and if you have a plan to develop a small or simple project, Mustang will not be a good framework for your project.

If you like Mustang Framework, give it a ⭐️ please

Mustang Banner

Infrastructure

  • Laravel 10.x
  • Apiato 11.x (Laravel 9) - Fixed incompatibilities with Laravel v10
  • Please use the main branch until final release of Mustang v10

Features

  • SOA (Service Oriented Architecture) compatible.
  • Inherits concepts from the DDD (Domain Driven Design).
  • MVC (Model View Controller).
  • ADR (Action Domain Responder) architectures.
  • Modular / Containerized structure.
  • Great option for medium to large sized web projects.
  • List of convenient design principles such as SOLID, OOP, LIFT, DRY, CoC, GRASP, Generalization, High Cohesion and Low Coupling.

Installation

Manual Installation

# Clone the project
git clone git@github.com:mustang-framework/mustang.git

# Goto cloned folder
cd mustang

# Install project dependencies
composer install

# Create projects environment file
cp .env.example .env
# Update your .env file and set the DB config, Project URL, blah, blah, ...
# Add your domains eg. mustang. test & API.mustang.test to your /etc/hosts file (IF REQUIRED)

# Open the set URL in the browser eg. 
    http://mustang.test for web view
    http://api.mustang.test for API view
# You should see the following default pages/outputs
# Ready to code ;)
Mustang WEB Mustang WEB

Docker Installation

Will be added soon

Documentation

Mustang is built using the new architectural pattern Porto.

Porto SAP is a modern Software Architectural Pattern, designed to help developers organize their Code in a super maintainable way. It is very helpful for big and long term projects, as they tend to have higher complexity with time.

It's completely optional to build your application using the Porto architecture. Alternatively, you can build it using the MVC architecture and still benefit from all the features of Mustang.

A Mustang application concluded three main layers according the Porto structure:

  • Ocean (Framework Layer)
  • Ship (Shared layer between different containers)
  • Container (Isolated Layer/Service)

Mustang Architecture

Laravel Framework 
    └── Mustang Application
        ├── Ship 
        └── Container(s)
            ├── App Containers
            └── Vendor Containers
    
Container
	├── Actions
	├── Tasks
	├── Models
	├── Values
	├── Events
	├── Listeners
	├── Policies
	├── Exceptions
	├── Contracts
	├── Traits
	├── Jobs
	├── Notifications
	├── Providers
	├── Configs
	├── Mails
	│   ├── Templates	
	├── Data
	│   ├── Migrations
	│   ├── Seeders
	│   ├── Factories
	│   ├── Criteria
	│   ├── Repositories
	│   ├── Validators
	│   ├── Transporters
	│   └── Rules
	├── Tests
	│   ├── Unit
	│   └── Traits
	└── UI
	    ├── API
	    │   ├── Routes
	    │   ├── Controllers
	    │   ├── Requests
	    │   ├── Transformers
	    │   └── Tests
	    │       └── Functional
	    ├── WEB
	    │   ├── Routes
	    │   ├── Controllers
	    │   ├── Requests
	    │   ├── Views
	    │   └── Tests
	    │       └── Acceptance
	    └── CLI
	        ├── Routes
	        ├── Commands
	        └── Tests
	            └── Functional

Mustang Banner

Contributing

Thank you for considering contributing to the Mustang framework! The contribution guide can be found in the Mustang documentation.

Sponsors

To make a donation click on this button Monzo

Code of Conduct

In order to ensure that the Mustang community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Mustang, please send an e-mail to Aboozar Ghaffari via aboozar.ghf@gmail.com. All security vulnerabilities will be promptly addressed.

Credits

License

The Mustang framework is open-sourced software licensed under the MIT license.