- 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
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
=> 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.
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.
=> 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
This section shows you how to :-
create database, migrate & populate table(s) using the name
=> Database can be created using the terminal, for example, to create a database called music, use:
php Engineer app::db music
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
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
Models generated by Altvel Engineer are connected to this Library
Read Seven Model ORM Documentation.
- 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 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
If you are interested in becoming a sponsor, please visit the AltVel Patreon page.
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.
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.
The AltVel framework is an open-source software.
Readme.md, Console helper, unit testing and intrinsic application configurations, such as logging, other helpers, structuring are still being improved.
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.