InteriaJS, React (v18) and TailwindCSS with a Slim Framework (v4) backend and normal PHP views based on Slim/PHP-View
Started as a fork of the amazing work of cherifGsoul/slim-inertiajs-demo, which uses Symfony Encore and Svelte. This project however does not use Encore and replaces Svelte with React.
Since then however, I have completely rewritten it and organised it into src (noesis-framework), server (php), client (js and react) folders and public (web root, css, js, images etc)
In server, the structure resembles Laravel, and I plan to enable many of the core feature of Laravel
The aim of this project will be to allow developers to have everything for a full featured MVC at their finger tips, but only enable the parts you actually need.
Clone
NOTE:
composer create-project noesis-framework will be available once the framework is mature in v1.0
For now, cloning is the only method to install
git clone https://github.com/lukewatts/noesis-framework.gitInstall Composer packages
composer installInstall NPM packages:
yarn installyarn watch
# or yarn devyarn buildphp -S localhost:80 -t public
# or start noe server
php noe serveNoesis has console commands (like most other frameworks) called 'noe' (pronounced 'know')
List all available command
Show help documentation for Noesis console
Run all Pest tests
Initialize all pest files. Run this to setup tests folder in a new project
Run all Pest tests with code coverage. Requires XDEBUG with env variable XDEBUG_MODE=coverage
Generates a boilerplate Presenter class in server/app/Presenter
Example:
php noesis create:presenter Test will generate TestPresenter in server/app/Presenter which have the following boilerplate code:
<?php
declare(strict_types=1);
namespace App\Presenter;
use Psr\Http\Message\ResponseInterface;
/**
* Test Presenter
*/
class TestPresenter extends \Noesis\Presenter\Presenter
{
public function index($request, $response): ResponseInterface
{
return inertia($request)->render('Index', ['var' => 'I can be used in JSX!']);
}
}Generates a boilerplate Provider class in server/app/Providers
Generates boilerplate React page in client/js/Pages
Generates boilerplate React component in client/js/Components
REPL for inspecting and debugging Noesis code directly in the terminal during development (like Laravel's php artisan tinker)