Minibase
Small footprint framework for PHP 5.4+, goal to be small and use best practices and good design patterns.
Install / Use
/learn @peec/MinibaseREADME
Minibase (PHP 5.4+)
Minibase is a framework for RESTful PHP applications, based on Event Driven Architecture. Minibase is what a framework should do, it gives you a minimum base to extend on as you go. Plugins can be downloaded from anywhere and included easily.
Minibase is not fullstack, but with plugins it is.
For a fullstack framework see the Sample Minibase App. The sample app contains some architecture using best practices and includes some plugins to show the capabilities of Minibase.
Configurable
We use JSON for configuration files, because its known, easy and good performance. You can create a routes.json file and put your route binding there. You can create a app.json file and put app configuration there. For those who likes the programmatic way of binding these things you don't have to use configuration files.
Extensible
Minibase uses event based architecture with a simple on / trigger system. Using Minibase Plugin system along with the Events makes it easy to create standalone plugins.
Event based architecture makes this framework stand out, all kinds of plugins can be created. Also it's easy. Take a look at 3rdparty plugins to see some plugins that are already created for those who are looking for forexample Twig templating engine, and Doctrine ORM support.
Install
You can install Minibase with Composer, if you are not using composer, start using it.
- Install composer.
- Create composer.json and put a require dependency.
{
"require": {
"minibase/minibase": "dev-master"
}
}
- Run
composer install
Documentation.
- Minibase: Configure the Minibase object.
- Routing: See how to do routing, reverse routing and such.
- Events: Minibase events, listen to these to extend minibase.
- Commandline: Minibase includes symfony CLI, CLI and also be extended with custom commands.
- Plugins: Create your own plugins publish them to composer and share.
- 3rdparty plugins: Browse plugins to extend minibase.
- Internationalization: I18n for your apps with gettext. Full workflow control.
- Assetic: Manage your assets!
Simple (if you want)
If you really want no OO-code you can create your apps really fast.
Note, there are also OO-way of routing using Controller.method approach. See more about Routing.
Creating your app in ~11 lines of code
require 'vendor/autoload.php'; // Include composer autoloader
$mb = \Minibase\MB::create(); // Create one application object.
// Add a route for your homepage
$mb->route("get", "/", function () {
// some logic.
// And return a HtmlResponse object
return $this->respond("html")->view("views/test.html.php");
});
// Start the router engine.
$mb->start();
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
ui-ux-pro-max-skill
60.4kAn AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
ui-ux-pro-max-skill
60.4kAn AI SKILL that provide design intelligence for building professional UI/UX multiple platforms

