Giter VIP home page Giter VIP logo

noesis's Introduction

Noesis Framework (Slim, InertiaJS, React, TailwindCSS)

InteriaJS, React (v18) and TailwindCSS with a Slim Framework (v4) backend and normal PHP views based on Slim/PHP-View

Origins

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.

Installation

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.git

Install Composer packages

composer install

Install NPM packages:

yarn install

Frontend Development

yarn watch
# or yarn dev

Build JS for production

yarn build

Run PHP server

php -S localhost:80 -t public

# or start noe server
php noe serve

Console

Noesis has console commands (like most other frameworks) called 'noe' (pronounced 'know')

php noe list

List all available command

php noe help

Show help documentation for Noesis console

php noe pest

Run all Pest tests

php noe pest:init

Initialize all pest files. Run this to setup tests folder in a new project

php noe pest:cover

Run all Pest tests with code coverage. Requires XDEBUG with env variable XDEBUG_MODE=coverage

php noe create:presenter {presenter_name}

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!']);
    }
}

php noe create:provider {provider_name}

Generates a boilerplate Provider class in server/app/Providers

php noe create:react-page {page_name}

Generates boilerplate React page in client/js/Pages

php noe create:react-component {component_name}

Generates boilerplate React component in client/js/Components

php noe inspect

REPL for inspecting and debugging Noesis code directly in the terminal during development (like Laravel's php artisan tinker)

noesis's People

Contributors

cherifgsoul avatar lukewatts avatar

Watchers

 avatar

Forkers

lukewatts

noesis's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.