kzarshenas / crazyphp
My crazy framework for creating ultra-fast webapps.
Requires
- catfan/medoo: ^2.1
- delight-im/auth: ^8.3
- laminas/laminas-httphandlerrunner: ^2.3
- league/climate: ^3.8
- mezon/router: ^1.5
- monolog/monolog: ^3.8
- nyholm/psr7: ^1.5
- nyholm/psr7-server: ^1.0
- ozdemirburak/iris: ^3.1
- pelago/emogrifier: ^7.3
- phpfastcache/phpfastcache: ^9.1
- phpmyadmin/sql-parser: ^5.9
- psr/http-message: ^1.0
- splitbrain/php-cli: ^1.1
- symfony/finder: ^6.1
- symfony/yaml: ^6.1
- vlucas/phpdotenv: ^5.6
- workerman/workerman: ^5.0
- zordius/lightncandy: ^1.2
Requires (Dev)
- phpunit/phpunit: ^11
This package is auto-updated.
Last update: 2025-07-16 20:25:50 UTC
README
My crazy framework for creating ultra-fast webapps.
Installation
Install via composer :
composer require kzarshenas/crazyphp
Project
New project :
php vendor/kzarshenas/crazyphp/bin/CrazyCommand new project
Update project :
php vendor/kzarshenas/crazyphp/bin/CrazyCommand update project
Delete project :
php vendor/kzarshenas/crazyphp/bin/CrazyCommand delete project
Router
New router
php vendor/kzarshenas/crazyphp/bin/CrazyCommand new router
Delete router
php vendor/kzarshenas/crazyphp/bin/CrazyCommand delete router
Router Type
New router type
php vendor/kzarshenas/crazyphp/bin/CrazyCommand new routerType
Delete router type
php vendor/kzarshenas/crazyphp/bin/CrazyCommand delete routerType
Partial
New partial
php vendor/kzarshenas/crazyphp/bin/CrazyCommand new partial
Delete partials
php vendor/kzarshenas/crazyphp/bin/CrazyCommand delete partial
Extension
New router type
php vendor/kzarshenas/crazyphp/bin/CrazyCommand new extension
Update extension
php vendor/kzarshenas/crazyphp/bin/CrazyCommand update extension
Delete router type
php vendor/kzarshenas/crazyphp/bin/CrazyCommand delete extension
Trash
Clean trash
When you remove router... a backup of the files removed are copy into the trash.
php vendor/kzarshenas/crazyphp/bin/CrazyCommand delete trash
Docker (optionnal)
Create docker compose :
php vendor/kzarshenas/crazyphp/bin/CrazyDocker new
Delete docker compose :
php vendor/kzarshenas/crazyphp/bin/CrazyDocker delete
Up docker compose :
php vendor/kzarshenas/crazyphp/bin/CrazyDocker up
Down docker compose :
php vendor/kzarshenas/crazyphp/bin/CrazyDocker down
Dev
Run test (usign PHPUnit)
php vendor/phpunit/phpunit/phpunit
Default env variables
Env variables of the app are stored in
$GLOBALS["__CRAZY_APP"]
Name | Tokken | Type | Description |
---|---|---|---|
CRAZY_ROOT | @crazyphp_root | <string> | Root of crazyphp vendor folder |
APP_ROOT | @app_root | <string> | Root of your crazy application |
PHPUNIT_TEST | @phpunit_test | <bool> | Determine if we are in a test context |
CONFIG_LOCATION | @config_location | <string> | Determine the location of the configs files |
ROUTER_APP_PATH | @router_app_path | <string> | Determine the path of the front files of the routers |
ROUTER_CONTROLLER_PATH | @router_controller_path | <string> | Determine the path of the back end controller of routers |
ROUTER_TYPE_PATH | @router_type_path | <string> | Determine the path of the back end router type |
TRASH_PATH | @trash_path | <string> | Determine the path of the trash |
TRASH_DISABLE | @trash_disable | <string> | Determine if the trash is disable |
PARAMETERS_URL_OVERRIDE | @parameters_url_override | <object> | Override parameters passed by url |
Documentation
- New Project : How to create a new crazy project
- Api
- Api v2
- About Api V2 : All you need to know about Api v2
- Schema of Api Response : Schema of a api request.
- Schema of Api Response : Schema of a json request from backend.
- Special Get Parameters : Special get parameters
- Api v2
- CLI
- Crazy Asset : Register a Crazy Asset
- Crazy Router : Register a Crazy Router
- Core
- Context : Data defined in context
- Docker
- Install Docker : Setup docker of your app
- Mariadb : Docker command for manipulate Mariadb
- Mongo : Docker command for manipulate Mongo DB
- Mysql : Docker command for manipulate Mysql
- Node : Docker command for manipulate NodeJS
- Php : Docker command for manipulate PHP
- Postgresql : Docker command for manipulate Postgresql
- Model
- About Model : How to define a model with Api v2
- Script
- Comment Headers : Rules for the comment header of files like PHP, JS, JSON, YAML...
- Condig Router : Rules for config router
- Context : Schema of the context
- Favicon : Schema of favicons
- Test : Test of the code
- Structure
- Create Folder Structure : Tutoriel to learn how to create folder schema
License
This framework is licensed under the MPL 2.0.
You are free to use, modify, and redistribute it, provided that any modified files are also distributed under the same license.
For a commercial license or professional support, please contact kevin.zashenas@gmail.com.