Giter Site home page Giter Site logo

bootgly / bootgly Goto Github PK

View Code? Open in Web Editor NEW
204.0 5.0 1.0 6.05 MB

Base PHP Framework for Multi Projects

Home Page: https://docs.bootgly.com/

License: MIT License

PHP 99.37% HTML 0.31% Dockerfile 0.32%
framework frameworks php php-framework web http server cli bootgly http-server

bootgly's Introduction

bootgly-logo

Bootgly

Base PHP Framework for Multi Projects.

Bootgly License
Github Actions - Bootgly Workflow Github Actions - Docker Workflow

Bootgly is the first PHP framework to use the I2P (Interface-to-Platform) architecture.

Warning

๐Ÿšง DO NOT USE IT IN PRODUCTION ENVIRONMENTS. ๐Ÿšง

Bootgly is in beta testing. A major version (1.0) is soon to release.

Documentation is under construction.

Table of Contents


๐Ÿค” About

Bootgly is a base framework for developing APIs and Apps for both CLI (Console) ๐Ÿ“Ÿ and WPI (Web) ๐ŸŒ.

"Bootgly is focused on efficiency and follows a minimum dependency policy. Thanks to this approach, its unique I2P architecture, along with some uncommon code conventions and design patterns, allows Bootgly to offer superior performance while providing an easy-to-understand Code APIs."

Bootgly CLI ๐Ÿ“Ÿ

Command Line Interface

For the base CLI development, Bootgly already has the following UI components: Alert, Fieldset, Header, Menu, Progress, Table.

Bootgly WPI ๐ŸŒ

Web Programming Interface

  • Interface: WPI
  • Platform: Web (IN DEVELOPMENT)

For the base Web development, Bootgly has a HTTP Server CLI, a TCP Client CLI and a TCP Server CLI.

More news may come until the release of v1.0. Stay tuned.


๐ŸŸข Boot Requirements

๐Ÿค Compatibility

Operation System
โœ… Linux (Debian based)
โŒ Windows
โ” Unix

--

โœ… = Compatible

โŒ = Incompatible

โ” = Untested

Above is the native compatibility, of course it is possible to run on Windows and Unix using Docker containers.

โš™๏ธ Dependencies

  • PHP 8.2+ โš ๏ธ
  • Opcache with JIT enabled (+50% performance) ๐Ÿ‘

- Bootgly CLI ๐Ÿ“Ÿ

  • php-cli โš ๏ธ
  • php-mbstring โš ๏ธ
  • php-readline โš ๏ธ

- Bootgly WPI ๐ŸŒ

WPI in CLI *APIยน (eg. Bootgly HTTP Server CLI):
  • * See Bootgly CLI dependencies *
WPI in Non-CLI (apache2handler, litespeed and nginx) SAPIยฒ:
  • rewrite module enabled โš ๏ธ

--

โš ๏ธ = Required

๐Ÿ‘ = Recommended

ยน *API = Can be Server API (SAPI), Client API (CAPI), etc.

ยฒ SAPI = Server API


๐ŸŒฑ Community

Join us and help the community.

Love Bootgly? Give our repo a star โญ!

๐Ÿ’ป Contributing

Wait for the "contributing guidelines" to start your contribution.

๐Ÿ›‚ Code of Conduct

Help us keep Bootgly open and inclusive. Please read and follow our Code of Conduct.

๐Ÿ”— Social networks

๐Ÿ’– Sponsorship

A lot of time and energy is devoted to Bootgly projects. To accelerate your growth, if you like this project or depend on it for your stack to work, consider sponsoring it.

Your sponsorship will keep this project always up to date with new features and improvements / bug fixes.


๐Ÿš€ Getting started

๐Ÿ“Ÿ Bootgly CLI:

Run Bootgly CLI demo
  1. See the examples in projects/Bootgly/CLI/examples/;
  2. Check the file projects/Bootgly/CLI.php;
  3. Run the Bootgly CLI demo in terminal:
php bootgly demo
Setup Bootgly CLI globally
  1. Run the Bootgly CLI setup command in terminal (with sudo):
sudo php bootgly setup
Perform Bootgly tests
  1. Check the bootstrap tests file tests/@.php;
  2. Run the Bootgly CLI test command in terminal:
bootgly test

๐ŸŒ Bootgly WPI:

Running a HTTP Server
Option 1: Non-CLI SAPI (Apache, LiteSpeed, Nginx, etc)
  1. Enable support to rewrite;
  2. Configure the WPI boot file in projects/Bootgly/WPI.boot.php file;
  3. Run the Non-CLI HTTP Server pointing to index.php.
Option 2: CLI SAPI

Directly in Linux OS (max performance):

  1. Configure the Bootgly HTTP Server script in scripts/http-server-cli file;
  2. Configure the HTTP Server API in projects/Bootgly/WPI/HTTP_Server_CLI-1.SAPI.php file;
  3. Run the Bootgly HTTP Server CLI in the terminal:
bootgly serve

or

php scripts/http-server-cli

--

or using Docker:

  1. Pull the image:
docker pull bootgly/http-server-cli
  1. Run the container in interactive mode and in the host network for max performance:
docker run -it --network host bootgly/http-server-cli

Routing HTTP Requests on the Server-side


๐Ÿ–ผ Highlights

- Bootgly CLI ๐Ÿ“Ÿ

Bootgly CLI - initial output

Progress component (with Bar) - Render โ‰ˆ7x faster than Laravel / Symfony

- Bootgly WPI ๐ŸŒ

Bootgly HTTP Server CLI (wrk benchmark) - +7% faster than Workerman in the Plain Text test

HTTP Server CLI - started in monitor mode

More Screenshots, videos and details can be found in the home page of Bootgly Docs.


๐Ÿ“ƒ License

The Bootgly is open-sourced software licensed under the MIT license.


๐Ÿ“‘ Versioning System

Bootgly uses Semantic Versioning 2.0.

bootgly's People

Contributors

rodrigoslayertech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

thiiagoms

bootgly's Issues

Bootgly Debugging - Roadmap Checklist

Backtrace

  • Backtrace class

Data

  • Data debug

Throwables

  • Throwables trace
  • Throwables report
  • Throwables debug

Errors

  • Errors collect
  • Errors trace
  • Errors report
  • Errors debug

Exceptions

Class responsible for correctly handling or translating the messages present in exceptions. For example, in a Template Engine, the compiled content is cached and will be executed as a file with a different location than the original template the user is using.

This class is responsible for catching the exception and modifying the file (and line if necessary), replacing it with the file and line that "contain the error" in the original template.

  • Exceptions collect
  • Exceptions trace
  • Exceptions report
  • Errors debug

Vars

  • Backtrace
  • Dump
  • Functions dump and dd helpers

Shutdown

  • Shutdown callback

doubt: Is it ok about change switch conditional for match operator ?

First things first, thank you for this awesome project โค๏ธ

So, i have a doubt about change switch conditional on Logging (Bootgly\CLI\Terminal\_\Logger) and change it to new php8.0 expression (match), for example

<?php

namespace Bootgly\CLI\Terminal\_\Logger;

use Bootgly\Logger;

trait Logging
{
    private function translate (int $level) : array
    {
      switch ($level) {
         case self::LOG_DEBUG_LEVEL:
            $severity = 'DEBUG';
            $color = self::_WHITE_FOREGROUND;
            break;
         case self::LOG_INFO_LEVEL:
            $severity = 'INFO';
            $color = self::_GREEN_BOLD;
            break;
         case self::LOG_NOTICE_LEVEL:
            $severity = 'NOTICE';
            $color = self::_CYAN_FOREGROUND;
            break;
         case self::LOG_WARNING_LEVEL:
            $severity = 'WARNING';
            $color = self::_YELLOW_BOLD;
            break;
         case self::LOG_ERROR_LEVEL:
            $severity = 'ERROR';
            $color = self::_RED_BRIGHT_FOREGROUND;
            break;
         case self::LOG_CRITICAL_LEVEL:
            $severity = 'CRITICAL';
            $color = self::_MAGENTA_FOREGROUND;
            break;
         case self::LOG_ALERT_LEVEL:
            $severity = 'ALERT';
            $color = self::_MAGENTA_BOLD;
            break;
         case self::LOG_EMERGENCY_LEVEL:
            $severity = 'EMERGENCY';
            $color = self::_RED_BOLD;
            break;

         default:
            $severity = 'LOG';
            $color = self::_DEFAULT_FOREGROUND;
      }

      return [
         $severity, $color
      ];
   }
}

To:

<?php
 return match(int $level): array {
            self::LOG_DEBUG_LEVEL => ['DEBUG', self::_WHITE_FOREGROUND],
            self::LOG_INFO_LEVEL => ['INFO', self::_GREEN_BOLD],
            self::LOG_NOTICE_LEVEL => ['NOTICE', self::_CYAN_BOLD]
        };

I made a litte script with this class method and match return
image

Bootgly CLI - Roadmap Checklist

Commands

Default/Global Options

  • Verbose -v|-vv|-vvv
  • Help -h --help
  • Interactive -it

commands

  • Implement bootgly project command (arguments and options)

Bootgly Template Engine - Roadmap Checklist

Namespace:
Bootgly\ABI\Templates\Template

Directives

Conditionals

Ifs

  • Simple Ifs (@if, @elseif, @else)
  • Short syntax in Ifs for !empty and isSet

Switchs

  • Switch

Outputs

Echos

  • Prepending break line echo (@.>)
  • Append break line echo (@>.)
  • Wrap break line echo (@.>.)
  • Simple echo (@>)

Escapes

  • Inline escape (@@)

Loops

Whiles

  • Only While
  • While with @break
  • While with @continue
  • While with @break in ... (conditional break)
  • While with @continue in ... (conditional continue)

Foreachs

  • Foreach
  • Foreach with Metavar ($@)
  • Foreach with Metavar and nested support

For

  • For

Raw

  • PHP Code (@:...@;)

Precompilers / Postcompile

Precompilers

  • Unident

Postcompilers

  • Join <?php tags

Debugging

  • Set Path of Template file as comment token

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.