Rori-PHP is custom non production web application framework inspired by Laravel syntax

Related tags

Frameworks php
Overview

UnknownRori PHP (WIP)

Table of Contents

Overview

Rori-PHP is custom non production web application framework inspired by Laravel syntax. A web framework provides a structure and starting point for your application allowing you to focus on creating something amazing.

Rori-PHP also come with CLI, type in terminal php cli.

Request Lifecycle Overview

First Step

The entry point for all request to Rori-PHP Application is in public/index.php, this file does not contain a lot of code, but rather loading a starting point for framework. this file will load server.php to load composer autoload.php and bootstrap.php in app, core and vendor directory.

Kernel

Next, the incoming request will be sent to Core\Kernel to check http request is requesting a web page or a resource.

HTTP Request & Route

Next, the request will be sent to Route to depending on type of the request, these Route serve as central location that all request will flow through, Runtime Middleware will be fired via Core\Support\Http\Middleware if the request is not a resource, if the request available in Routing, then Core\Support\Http\Route will fired the Controller Method.

Finishing

Lastly, after the client get the response the Runtime Middleware will fired for the second time, and we finished the request lifecycle!

Installation

  • Clone this repository.
  • enter the cloned directory.
  • run composer install
  • run composer dump-autoload.
  • create something amazing!

OR using UnknownRori PHP CLI

  • Clone this repository.
  • enter the clone directory.
  • enter php cli in terminal.
  • type install.
  • create something amazing!

Requirement

Minimum

  • PHP : 7.3.
  • Composer.

Recommended

  • PHP : 8+.
  • Database : Yes.

Tested Database

  • Mysql
  • Sqlite

Dependency

  • vlucas/phpdotenv.

Usage

WIP

For usage please read this for more information.

Roadmap

  • Basic CLI
  • Basic Route
  • Simple Controller
  • Middleware
  • Basic Database
  • Basic Framework Custom Exception
  • Namespace Overhaul
  • Session
  • Cookie
  • Cache
  • CLI Overhaul
  • Pre-defined Database Function
  • Collection
  • Model
  • SEO Friendly URI
  • Controller Overhaul
  • User Authentication
  • Storage

Note

Q : Why you create this custom non production framework?

A : Because i want to polish my backend skill, documentation making, decision making, and of course code efficiency.


Q : Is this can be used in production.

A : Short answer no, Why? because i cannot guarantee the security, unless you modify some of the source code.


Q : Can i use this for future my project?

A : Yea sure, if something goes wrong you can create issues, feedback encouraged.

You might also like...
Opulence is a PHP web application framework that simplifies the difficult parts of creating and maintaining a secure, scalable website.

Opulence Introduction Opulence is a PHP web application framework that simplifies the difficult parts of creating and maintaining a secure, scalable w

Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

Framework X Framework X – the simple and fast micro framework for building reactive web applications that run anywhere. Quickstart Documentation Tests

This repository contains custom View classes for the template frameworks

Slim Views This repository contains custom View classes for the template frameworks listed below. You can use any of these custom View classes by eith

A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire.
A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire.

Malzahar A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire. Re

FrankenPHP is a modern application server for PHP built on top of the Caddy web server
FrankenPHP is a modern application server for PHP built on top of the Caddy web server

FrankenPHP: Modern App Server for PHP FrankenPHP is a modern application server for PHP built on top of the Caddy web server. FrankenPHP gives superpo

💫 Vega is a CLI mode HTTP web framework written in PHP support Swoole, WorkerMan / Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、WorkerMan

Mix Vega 中文 | English Vega is a CLI mode HTTP web framework written in PHP support Swoole, WorkerMan Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、Work

Newsprint is a simple web application that will fetch the front page of a newspaper and display it on an eink display
Newsprint is a simple web application that will fetch the front page of a newspaper and display it on an eink display

Newsprint is a simple web application that will fetch the front page of a newspaper and display it on an eink display. The specific resolutions and sizes have been setup to work with a 32" eInk place & play display from Visionect but can be modified for other screen resolutions.

Web application runner for RoadRunner
Web application runner for RoadRunner

Yii RoadRunner Runner The package contains a bootstrap for running Yii3 applications using RoadRunner. Requirements PHP 7.4 or higher. Installation Th

The package contains a bootstrap for running Yii3 web application.
The package contains a bootstrap for running Yii3 web application.

Yii Web Runner The package contains a bootstrap for running Yii3 web application. Requirements PHP 8.0 or higher. Installation The package could be in

Comments
  • Deep nested route fix

    Deep nested route fix

    Describe the solution.

    Because the issue in #4 it's seem creating very deep nesting route definition might cause unexptected behavior, to solve this problem is by creating stack like data structure and it's seem deep nesting problem solved itself.

    Describe alternatives you've considered.

    Well, it's fatal bug.

    Reference

    None

    opened by UnknownRori 0
  • Deep Nested Route Bug

    Deep Nested Route Bug

    Describe the bug When defining deep nested route, it's seem when the group callback is out of scope it produce unexpected behavior, something like remove some prefixes on route group

    To Reproduce Write some deep nested route

    Expected behavior It's should not missing one or two thing for example (middleware, name, prefix).

    Screenshot

    Deep Nested Route image

    bug 
    opened by UnknownRori 0
  • We will not be forced to env and add symfony dump

    We will not be forced to env and add symfony dump

    Similar to laravel it doesn't force env and serves config as the base We will leave it without require until we provide a config method and I have it

    • Created env function so we can control env more
    • The env function allows you to choose a value if the key env does not exist, in short a default value
    • Use the function in DB.php
    • add Symfony dump
    • autoload helpers.php
    • format add phpunit test
    • disable dd function on debug
    opened by i74ifa 0
Releases(2.0.3)
  • 2.0.3(Jun 15, 2022)

    🔨 Fix :

    • Buggy filter in built in model.
    • Remove unused use.

    ⚒️ Improvement :

    • Improve documentation.
    • Automatic Controller and Model using CLI to follow psr-2 standard.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.2(Jun 11, 2022)

    🔨 Fix :

    • Fixed deep nesting route issue.
    • Update docs version.
    • Fixed Path from storage::upload.
    • added guard in collection pagination method so it doesnt throw an exception.
    • change from left join to inner join in base model class.

    ⚒️ Changes :

    • change the default link on collection pagination.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Jun 8, 2022)

  • 2.0(Jun 1, 2022)

    How to Install

    run composer create-project unknownrori/unknownrori-php

    New Feature 🚀

    • New Request Validator.
    • Added Regex Helper class.
    • New Cache system.
    • Added more typecasting helper function.
    • Added randomizer helper class.
    • Improved Exception display.
    • Added File helper class.
    • Added Json helper class.
    • Added new parameter for where method in DB class.
    • Added session helper function.
    • Added report helper function.
    • Added new format method for time class.
    • New resource method in Route class.
    • Added CSRF protection.
    • Added response class and it's helper function.
    • New route group definition.

    Breaking Change 🔥

    • Moving Http Folder from Support folder.
    • Rename Model class to BaseModel class.
    • Change insert method in DB class to create.
    • Change destroy method in DB class to destroy.
    • Remove Autoload command in CLI.
    • Change function and method name into camelCase.
    • Route grouping method from by to group.
    • Remove destroy method in collection class.

    Fix 🔨

    • Remove unused file.
    • Refactor Authentication.
    • DB sometime throw an error if it return an empty result.
    • Fix route redirect doesn't correctly pass the parameter.
    • Remove unused controller.
    • Fix nesting view causing an error.
    • Env variable boolean is not converted to boolean.
    • Refactor Route class.
    • Fixed nested route group definition problem.
    Source code(tar.gz)
    Source code(zip)
  • 2.0-beta.1(May 26, 2022)

    New Feature 🚀

    • New Request Validator.
    • Added Regex Helper class.
    • New Cache system.
    • Added more typecasting helper function.
    • Added randomizer helper class.
    • Improved Exception display.
    • Added File helper class.
    • Added Json helper class.
    • Added new parameter for where method in DB class.
    • Added session helper function.
    • Added report helper function.
    • Added new format method for time class.
    • New resource method in Route class.
    • Added CSRF protection.
    • Added response class and it's helper function.
    • New route group definition.

    Breaking Change 🔥

    • Moving Http Folder from Support folder.
    • Rename Model class to BaseModel class.
    • Change insert method in DB class to create.
    • Change destroy method in DB class to destroy.
    • Remove Autoload command in CLI.
    • Change function and method name into camelCase.
    • Route grouping method from by to group.
    • Remove destroy method in collection class.

    Fix 🔨

    • Remove unused file.
    • Refactor Authentication.
    • DB sometime throw an error if it return an empty result.
    • Fix route redirect doesn't correctly pass the parameter.
    • Remove unused controller.
    • Fix nesting view causing an error.
    • Env variable boolean is not converted to boolean.
    • Refactor Route class.
    • Fixed nested route group definition problem.
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Feb 18, 2022)

    Changes :

    • bugfix : route name doesn't exist doesn't throw an error but stop the execution.
    • bugfix :blade one undefined array key name when change authentication unique_key.
    • update : remodel cache folder structure.
    • remove : .lock files.
    • added : exception on route.
    • added : TimeExecutionMonitor Middleware for calculating the execution time every page load.
    Source code(tar.gz)
    Source code(zip)
  • 1.2(Feb 14, 2022)

    Changes :

    • Added Tailwind CSS framework.
    • Added Str wrapper class and Str helper function.
    • Added Blade One Package.
    • Update Collection data manipulation affect only data property.
    • Fix : auth logout method doesn't fully logout the user.
    • Added Session check and update unset method.
    • Added Collection removeKeyInt method.
    • Remove key int in returned database interaction.
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Feb 12, 2022)

    Change :

    • Rollback before the dropping core folder since it will pain to customize the core framework
    • Change auth middleware to Authenticate middleware
    • submitted to packagist
    Source code(tar.gz)
    Source code(zip)
  • 1.1(Feb 12, 2022)

    Changes :

    • Add : route, collect, redirect helper function.
    • Add : pop method in Core\Support\Collection.
    • Fix : get route cannot passed data.
    • Update : kernel configuration added svg file to be included as resource category.
    Source code(tar.gz)
    Source code(zip)
  • 1.0(Feb 9, 2022)

Owner
UnknownRori
your typical lazy highschool student
UnknownRori
I made my own simple php framework inspired from laravel framework.

Simple MVC About Since 2019, I started learning the php programming language and have worked on many projects using the php framework. Laravel is one

null 14 Aug 14, 2022
I made my own simple php framework inspired from laravel framework.

Simple MVC About Since 2019, I started learning the php programming language and have worked on many projects using the php framework. Laravel is one

Rizky Alamsyah 14 Aug 14, 2022
💡 Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks.

?? Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks

null 3 Nov 17, 2021
Event-driven, non-blocking I/O with PHP.

Event-driven, non-blocking I/O with PHP. ReactPHP is a low-level library for event-driven programming in PHP. At its core is an event loop, on top of

ReactPHP 8.5k Dec 26, 2022
The package provides definition syntax. Definition is describing a way to create and configure a service or an object.

Yii Definitions The package ... Requirements PHP 7.4 or higher. Installation The package could be installed with composer: composer require yiisoft/de

Yii Software 6 Jul 15, 2022
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.3.

Workerman What is it Workerman is an asynchronous event-driven PHP framework with high performance to build fast and scalable network applications. Wo

walkor 10.2k Dec 31, 2022
Implementing programming best practices and patterns, and creating a custom PHP framework from scratch.

Implementing programming best practices and patterns, and creating a custom PHP framework from scratch.

Sajidur Rahman 3 Jul 2, 2022
Slim Framework custom views

Slim Views This repository contains custom View classes for the template frameworks listed below. You can use any of these custom View classes by eith

Slim Framework 302 Feb 21, 2022
FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails.

FlyCubePHP FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Rub

Anton 1 Dec 21, 2021