4ASuite / Developer tools

GluônFW · MICROFRAMEWORK

A little structure.
Room for your ideas.

A minimal PHP framework for small websites. Routing, controllers and views, with no external dependencies in the core.

PHP 8.1+ · MIT license · By 4ASuite

App / Config / routes.php
START WITH A ROUTE
return [
    'GET' => [
        '/' => [HomeController::class, 'index'],
        '/users/(:num:id)' => [
            UserController::class, 'show'
        ],
    ],
];
THEN WRITE YOUR RESPONSE
public function index(): Response
{
    return $this->view('home', [
        'title' => 'Your next project',
    ]);
}

A FOCUSED FOUNDATION

Keep the moving parts in sight.

01 / REQUEST

Routes & controllers

Map GET and POST routes to controller actions. Named numeric and slug parameters connect URLs to your code.

Routing guide ↗
03 / FOUNDATIONS

Security essentials

Session handling, CSRF helpers and response headers are included. Add token verification to your POST actions.

CSRF guide ↗

QUICK START

Your next project starts here.

TERMINAL
composer create-project 4asuite/nano-php myproject

01 / INSTALL

Create your project

Run the command above, then open the new project folder.

cd myproject
02 / SERVE

Set the web root

Point your web server at public/ and open the welcome page.

Explore the project structure
App/
├── Config/routes.php
├── Controllers/
├── Core/
├── Models/
├── views/
│   ├── layouts/
│   └── partials/
└── bootstrap.php
public/
├── index.php
└── .htaccess
composer.json

BEFORE YOU START

A familiar PHP setup.

Runtime and installation requirements from the project README.
PHP8.1 or later
Web serverApache with mod_rewrite, or an equivalent front-controller setup
InstallationComposer
Core dependenciesNo external packages
Environment configuration ↗

FREE & OPEN SOURCE

Take a look. Make it your own.

MIT licensed. Read the source and documentation on GitHub.

Read the license ↗
Get GluônFW ↗