Giter Club home page Giter Club logo

altvel's Introduction

About AltVel/SevenPHP

- AltVel is developed by Elisha Temiloluwa a.k.a TemmyScope	

- Inspired By Phalcon & Laravel Php Web Application Frameworks.

***AltVel is a web application framework with priority on security, performance and standard-compliance (Im that order). We believe development must be enjoyable, flexible and creative; hence we take the "routines" out of web application development for php developers (code Engineers).


- Install using composer
composer require altvel/altvel
=> Recommended: Create Project automatically using composer
coomposer create-project altvel/altvel
- You can also download through github; This would involve a lot of manual configuration  

AltVel takes the pain out of development by easing common tasks used in many web projects, such as:

Simple, efficient & fast routing Engines

ModelTrait for database data retrieval built on Doctrine's dbal package

Supports all PHP PDO supported database types

Improved Model class for eloquent data retrieval[method chaining]

Engineer Console: [ To see all commands: php Engineer]

Automatically generate keys for secured session, cookie and salt

The following conventions are used:

=> All view files must reside in a folder within the view folder within the public folder with respect to the view they display.

Generate using the commandline:

To generate a home view folder and initialize an index blade file...

 php Engineer app::view home

To generate a specific file in an existing view folder: For example creating edit blade file in profile folder

 php Engineer app::view profile edit
=> The only file exempted is the app.blade.php which is the default view file for rendering.

=> All classes that extend the Model class, should be placed directly under the app folder.

AltVel is accessible, flexible, editable, powerful, and provides tools required for large, robust applications.

Learning AltVel

AltVel has no syntax of its own but uses the inherited php syntax, making it extremely easy for an average php developer to make use of.

AltVel How-To

The HTML template builder Helper class does not eliminate the need for a frontend designer:

=> Several helper methods are available for use.

=> Generates csrf token for each page to improve security against cross-site request forgery

=> Generates CSRF-secured Form using  Array construct passed to generateForm static method

Database Creation, Migrations & Populations

This section shows you how to :-

create database, migrate & populate table(s) using the name

Database Creation

=> Database can be created using the terminal, for example, to create a database called music, use:
	php Engineer app::db music

Population

You can check the link below to see how to populate a table using the console

Read Seven Consoler (Altvel-Only Use) Documentation.

To run Migrations

php Engineer app::populate

Creating & Running Migration & Population

Check Link to see how to create table migrations in Migration.php file

Read Seven Consoler (Altvel-Only Use) Documentation.

To run Migrations

php Engineer app::migrate

Connecting to a Database & Using Models

Models generated by Altvel Engineer are connected to this Library

Read Seven Model ORM Documentation.

AltVel Helpers: Global $app object, methods & functions

- App specific objects
$app->url(): #returns the APP_URL set in tee app.php config or .env file


$app->dateTime(); #returns the current time based on the application Time Zone


$app->encrypt(string $str); #encrypts passed string


$app->decrypt(string $str); # decrypts the passed encrypted string


$app->config()->get(string $str); #returns a data entry from the app.php config file


/**
* @example $arr1 = [
*           'function'=> 'strpos',
*           'parameters'=> ['home.php', '.']
*   ]; 
*   
* @example $arr2 = [
*           'function'=> 'strstr',
*           'parameters'=> ['home.php', '.']
*   ];
* $app->compareSpeed($arr1, $arr2);
*/
$app->compareSpeed(...$args);
- Request Object, Methods & Properties: $app->request() ... It is injected into every callable action for each endpoint
$request = $app->request();
  
$request->input(string $name): #To access all end user requests whether from form requests or json api calls

$request->has(string $name): #To access if an input is present; returns True OR False

$request->validate(array $rules); #provides an object of the Seven\Vars\Validation class, preloaded with the request body

$request->all(); #returns all inputs data as an associative array

$request->userAgent(); #returns processed user agent information if availale; returns an empty string if not available

$request->htmlSanitize(string $input); #returns html entities sanitizeed data
- Response Object, methods & Properties: $app->response() ... It is injected into every callable action for each endpoint
$response = $app->response();

$response->send(string | array $resp, int $code = 200, $headers = []);

$response->sendAndCache(string | array $response, int $code = 200, $timeInSeconds);

Preparing yo

Preparing your altvel application for deployment simply removes all files not loaded
by the PHP Server or Application in deployment.

Note: Make sure to keep a development backup.

php Engineer app::production

AltVel Sponsors

If you are interested in becoming a sponsor, please visit the AltVel Patreon page.

Contributing

Improve the code as much as possible; keeping syntax-flebility (ability to use plain php), security, standard-compliance and performance in mind. All Efforts will be appreciated. Ensure to add your name to the comment section on the index.php page.

Security Vulnerabilities

If you discover a security vulnerability within AltVel, please send an e-mail to TemmyScope via [[email protected]] All security vulnerabilities will be promptly addressed.

License

The AltVel framework is an open-source software.

Todos

Readme.md, Console helper, unit testing and intrinsic application configurations, such as logging, other helpers, structuring are still being improved.

Development & Library Integration

integrations are done to fit a minimal, lightweight and performant production version. Hence libraries that are not required for production are not added to the framework using composer, rather they are built into the Application, so they are only autoloaded when called. A loose and less-overwhelming feel is kept on the number of folders and files. Due to the PHP-8 feature for preloading, any simple library not necessary for development would not be added/required to reduce the memory effect of preloading autoloaded files.

altvel's People

Contributors

temmyscope avatar

Watchers

 avatar

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.