From 38c8bc06a60de8690afa320f617d3201fceff2d6 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 2 May 2023 13:31:44 +0000 Subject: [PATCH 01/48] Fixes returns types --- app/Middlewares/AuthenticateMiddleware.php | 2 +- app/Middlewares/GuestMiddleware.php | 2 +- app/Middlewares/RequestCsrfMiddleware.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Middlewares/AuthenticateMiddleware.php b/app/Middlewares/AuthenticateMiddleware.php index d356be8a..5e9d6931 100644 --- a/app/Middlewares/AuthenticateMiddleware.php +++ b/app/Middlewares/AuthenticateMiddleware.php @@ -11,7 +11,7 @@ class AuthenticateMiddleware extends AuthMiddleware * * @return string */ - public function redirectTo() + public function redirectTo(): string { return '/login'; } diff --git a/app/Middlewares/GuestMiddleware.php b/app/Middlewares/GuestMiddleware.php index e38211e6..336dd88d 100644 --- a/app/Middlewares/GuestMiddleware.php +++ b/app/Middlewares/GuestMiddleware.php @@ -30,7 +30,7 @@ public function process(Request $request, callable $next, array $args = []): mix * * @return string */ - public function redirectTo() + public function redirectTo(): string { return '/'; } diff --git a/app/Middlewares/RequestCsrfMiddleware.php b/app/Middlewares/RequestCsrfMiddleware.php index 470b529f..982fc861 100644 --- a/app/Middlewares/RequestCsrfMiddleware.php +++ b/app/Middlewares/RequestCsrfMiddleware.php @@ -9,9 +9,10 @@ class RequestCsrfMiddleware extends CsrfMiddleware /** * {@inheritdoc} */ - public function preventOn() + public function preventOn(): array { return [ + // Add the route pattern for escape the X-CSRF checker ]; } } From e2ee536804063cd3882116afd9e53eb8589dd49f Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 2 May 2023 13:39:49 +0000 Subject: [PATCH 02/48] Add snapdevhq as partener --- templates/welcome.tintin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/welcome.tintin.php b/templates/welcome.tintin.php index cb6b582e..961e71b7 100644 --- a/templates/welcome.tintin.php +++ b/templates/welcome.tintin.php @@ -13,7 +13,10 @@ adjemin - akiltechnologie + akiltechnologie + + + Snapdev Côte d'ivoire etudesk From 851c3df46e3a8ce0e155e367dbaa2ba53a3dcb29 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 2 May 2023 23:45:10 +0000 Subject: [PATCH 03/48] Update require extension --- composer.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 40cc360c..65bc2ae7 100644 --- a/composer.json +++ b/composer.json @@ -16,16 +16,19 @@ }, "require": { "php": "^8.1", - "bowphp/framework": "5.x-dev", - "bowphp/policier": "^2.1", + "ext-intl": "*", + "ext-json": "*", + "ext-mbstring": "*", "ext-openssl": "*", "ext-pdo": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-json": "*", "ext-pdo_mysql": "*", - "ext-intl": "*", - "ext-pdo_sqlite": "*" + "ext-pdo_sqlite": "*", + "ext-pdo_pgsql": "*", + "ext-xml": "*", + "ext-redis": "*", + "bowphp/framework": "5.x-dev", + "bowphp/meta-manager": "^1.0", + "bowphp/policier": "^2.1" }, "require-dev": { "phpunit/phpunit": "^8", From 66e022043e1d18e50356bf7bd9744ff748c5a9bb Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 2 May 2023 23:45:25 +0000 Subject: [PATCH 04/48] Add new method --- app/Services/UserService.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Services/UserService.php b/app/Services/UserService.php index cd66b861..e513f1e4 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -3,6 +3,7 @@ namespace App\Services; use App\Models\User; +use Bow\Database\Collection; class UserService { @@ -21,6 +22,16 @@ public function __construct(User $user) $this->user = $user; } + /** + * Get all available users + * + * @return Collection + */ + public function fetchAll() + { + return $this->user->get(); + } + /** * Create new user * From a8e649a369a7bfb405f871ad49eb74293aca54da Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 2 May 2023 23:47:31 +0000 Subject: [PATCH 05/48] Update partener image --- app/Services/UserService.php | 2 +- templates/welcome.tintin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/UserService.php b/app/Services/UserService.php index e513f1e4..88049267 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -27,7 +27,7 @@ public function __construct(User $user) * * @return Collection */ - public function fetchAll() + public function fetchAll(): ?Collection { return $this->user->get(); } diff --git a/templates/welcome.tintin.php b/templates/welcome.tintin.php index 961e71b7..b95d5434 100644 --- a/templates/welcome.tintin.php +++ b/templates/welcome.tintin.php @@ -16,7 +16,7 @@ akiltechnologie - Snapdev Côte d'ivoire + Snapdev Côte d'ivoire etudesk From 02f84fcdee8a2cf00ae8c92735e5f3b86ba5cdf1 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Wed, 10 May 2023 18:53:34 +0000 Subject: [PATCH 06/48] App performance opt --- .env.example.json | 4 +-- .gitignore | 25 ++++++++------- app/Exceptions/ErrorHandle.php | 7 ++-- composer.json | 6 ++-- config/storage.php | 6 ++-- phpunit.xml | 11 +++---- public/index.php | 58 ++++++++++++++++++---------------- 7 files changed, 60 insertions(+), 57 deletions(-) diff --git a/.env.example.json b/.env.example.json index 5c452ccd..85cf5996 100644 --- a/.env.example.json +++ b/.env.example.json @@ -33,8 +33,8 @@ "S3_KEY": "", "S3_SECRET": "", - "S3_REGION": "", - "S3_BUCKET": "", + "S3_REGION": "us-east-1", + "S3_BUCKET": "buckets", "FTP_HOSTNAME": "localhost", "FTP_PASSWORD": "password", diff --git a/.gitignore b/.gitignore index 64e79540..50dfc72a 100755 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,13 @@ -.idea/ -!.gitignore -composer.lock -node_modules -vendor/ -package-lock.json -!.gitkeep -!public/**/.gitkeep -!var/**/.gitkeep -.env.json -config/.key -mix-manifest.json +.idea/ +!.gitignore +composer.lock +node_modules +vendor/ +package-lock.json +!.gitkeep +!public/**/.gitkeep +!var/**/.gitkeep +.env.json +config/.key +mix-manifest.json +.phpunit.result.cache diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index b670ec3a..dc3b0d2e 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -2,13 +2,14 @@ namespace App\Exceptions; -use Bow\Database\Exception\NotFoundException as ModelNotFoundException; -use Bow\Http\Exception\HttpException; -use Bow\Http\Exception\ResponseException as HttpResponseException; use Exception; use PDOException; +use Bow\Http\Exception\HttpException; +use Bow\Router\Exception\RouterException; use Policier\Exception\TokenExpiredException; use Policier\Exception\TokenInvalidException; +use Bow\Http\Exception\ResponseException as HttpResponseException; +use Bow\Database\Exception\NotFoundException as ModelNotFoundException; class ErrorHandle { diff --git a/composer.json b/composer.json index 65bc2ae7..887b42e1 100644 --- a/composer.json +++ b/composer.json @@ -22,10 +22,10 @@ "ext-openssl": "*", "ext-pdo": "*", "ext-pdo_mysql": "*", - "ext-pdo_sqlite": "*", "ext-pdo_pgsql": "*", - "ext-xml": "*", + "ext-pdo_sqlite": "*", "ext-redis": "*", + "ext-xml": "*", "bowphp/framework": "5.x-dev", "bowphp/meta-manager": "^1.0", "bowphp/policier": "^2.1" @@ -45,7 +45,7 @@ }, "scripts": { "lint": "phpcbf --standard=psr12 --tab-width=4 app tests config migrations seeders routes", - "test": "phpunit --configuration phpunit.dist.xml", + "test": "phpunit --configuration phpunit.xml", "post-root-package-install": [ "@php -r \"file_exists('.env.json') || copy('.env.example.json', '.env.json');\"" ], diff --git a/config/storage.php b/config/storage.php index 42bb134c..e14eb02d 100644 --- a/config/storage.php +++ b/config/storage.php @@ -43,13 +43,13 @@ */ 's3' => [ 'driver' => 's3', + 'bucket' => app_env('S3_BUCKET', 'settlements'), + 'region' => app_env('S3_REGION'), + 'version' => 'latest', 'credentials' => [ 'key' => app_env('S3_KEY'), 'secret' => app_env('S3_SECRET'), ], - 'bucket' => app_env('S3_BUCKET'), - 'region' => app_env('S3_REGION'), - 'version' => 'latest' ] ], ]; diff --git a/phpunit.xml b/phpunit.xml index 13ee1585..56125fee 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,5 @@ - - - - tests/ - - + + + tests/ + + diff --git a/public/index.php b/public/index.php index d8e16b97..8475f0ee 100644 --- a/public/index.php +++ b/public/index.php @@ -1,28 +1,30 @@ -bind($kernel); - -// Load application routing -require __DIR__ . "/../routes/app.php"; - -// Run The Application -$app->send(); +bind( + Kernel::configure(realpath(__DIR__ . '/../config')) +); + +// Load application routing +require __DIR__ . "/../routes/app.php"; + +// Run The Application +$app->send(); From 957d4f1c7a3358fc1091e8c74d3355e4dc9fd0de Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Thu, 11 May 2023 11:34:54 +0000 Subject: [PATCH 07/48] Update security config --- config/security.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/security.php b/config/security.php index 3a54263a..88dc8c2f 100644 --- a/config/security.php +++ b/config/security.php @@ -6,7 +6,7 @@ * Can be reorder by the command * `php bow generate:key` */ - 'key' => app_env('APP_KEY', file_get_contents(__DIR__. "/.key")), + 'key' => app_env('APP_KEY'), /** * The Encrypt method From 5665e509b71ab8001953fd4d811e51c854af0309 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Thu, 11 May 2023 13:03:31 +0000 Subject: [PATCH 08/48] Change framework version for release --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 887b42e1..6a406b25 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "ext-pdo_sqlite": "*", "ext-redis": "*", "ext-xml": "*", - "bowphp/framework": "5.x-dev", + "bowphp/framework": "^5.0", "bowphp/meta-manager": "^1.0", "bowphp/policier": "^2.1" }, From 1d0f921ff33d8419bae7e2afa8bd59cfc5255f14 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 16 May 2023 05:51:16 +0000 Subject: [PATCH 09/48] Remove extension require --- composer.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/composer.json b/composer.json index 6a406b25..82c28e56 100644 --- a/composer.json +++ b/composer.json @@ -16,16 +16,6 @@ }, "require": { "php": "^8.1", - "ext-intl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-pdo": "*", - "ext-pdo_mysql": "*", - "ext-pdo_pgsql": "*", - "ext-pdo_sqlite": "*", - "ext-redis": "*", - "ext-xml": "*", "bowphp/framework": "^5.0", "bowphp/meta-manager": "^1.0", "bowphp/policier": "^2.1" From 8cc6911d0b02b094633e40b7082e8e4f6ceeacbe Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 16 May 2023 06:23:20 +0000 Subject: [PATCH 10/48] Add the application exception --- app/Exceptions/ErrorHandle.php | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index dc3b0d2e..bf2afce8 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -5,21 +5,21 @@ use Exception; use PDOException; use Bow\Http\Exception\HttpException; -use Bow\Router\Exception\RouterException; use Policier\Exception\TokenExpiredException; use Policier\Exception\TokenInvalidException; +use Bow\Application\Exception\BaseErrorHandler; use Bow\Http\Exception\ResponseException as HttpResponseException; use Bow\Database\Exception\NotFoundException as ModelNotFoundException; -class ErrorHandle +class ErrorHandle extends BaseErrorHandler { /** * handle the error * * @param Exception $exception - * @return void + * @return mixed */ - public function handle(Exception $exception) + public function handle($exception): mixed { if (request()->isAjax()) { return $this->json($exception); @@ -41,23 +41,6 @@ public function handle(Exception $exception) } } - /** - * Render view as response - * - * @param string $view - * @param array $data - * @return mixed - */ - private function render($view, $data = [], $code = 200) - { - if (is_numeric($data)) { - $code = $data; - $data = []; - } - - return view($view, $data, $code); - } - /** * Send the json as response * From a7b54df2b09f67df1aa789686ea021c2dcdb6aa0 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 16 May 2023 12:03:55 +0000 Subject: [PATCH 11/48] Fixes error handler and basic unity tests --- app/Exceptions/ErrorHandle.php | 4 +++- tests/ApplicationTest.php | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index bf2afce8..8dd6e887 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -27,10 +27,12 @@ public function handle($exception): mixed if ($exception instanceof ModelNotFoundException || $exception instanceof HttpException) { $code = $exception->getStatusCode(); - return $this->render('errors.' . $code, [ + $source = $this->render('errors.' . $code, [ 'code' => 404, 'exception' => $exception ]); + + return $source; } if ($exception instanceof HttpResponseException) { diff --git a/tests/ApplicationTest.php b/tests/ApplicationTest.php index f5acecc4..8205872d 100644 --- a/tests/ApplicationTest.php +++ b/tests/ApplicationTest.php @@ -10,4 +10,11 @@ public function test_show_the_welcome_page() $response->assertStatus(200)->assertContentType('text/html'); } + + public function test_cannot_show_the_not_found_page() + { + $response = $this->get('/not-found-page'); + + $response->assertStatus(404)->assertContentType('text/html'); + } } From 3ccf2f953bfdf444678310973f85e3796f30f1c9 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Thu, 18 May 2023 20:21:02 +0000 Subject: [PATCH 12/48] Fixes type errors --- app/Controllers/Controller.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Controller.php b/app/Controllers/Controller.php index 157ba239..5a0a7559 100644 --- a/app/Controllers/Controller.php +++ b/app/Controllers/Controller.php @@ -4,11 +4,13 @@ use Bow\Http\Request; use Bow\Http\Response; -use Bow\Configuration\Loader as Config; use Bow\Database\Database; use Bow\Validation\Validate; use Bow\Validation\Validator; use Bow\Queue\ProducerService; +use Bow\Contracts\ResponseInterface; +use Bow\Configuration\Loader as Config; +use Bow\Database\QueryBuilder; class Controller { @@ -28,9 +30,9 @@ public function queue(ProducerService $producer) * * @param mixed $url * @param array $parameters - * @return mixed + * @return ResponseInterface */ - public function redirect($url = null, array $parameters = []): RedirectInterface + public function redirect($url = null, array $parameters = []): ResponseInterface { if (is_null($url)) { return redirect(); @@ -101,9 +103,9 @@ public function db(?string $name = null, ?callable $cb = null) * * @param $name * @param string $connexion - * @return \Bow\Database\Query\Builder + * @return QueryBuilder */ - public function table(string $name, ?string $connexion = null): \Bow\Database\Query\Builder + public function table(string $name, ?string $connexion = null): QueryBuilder { return table($name, $connexion); } From e57aa173cd198fdae63613164533b954a64dd0ca Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Thu, 18 May 2023 20:21:21 +0000 Subject: [PATCH 13/48] Set the APP_DEBUG mode variable --- .env.example.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example.json b/.env.example.json index 85cf5996..785e353c 100644 --- a/.env.example.json +++ b/.env.example.json @@ -1,6 +1,7 @@ { - "APP_ENV": "development", "APP_NAME": "Bow Application", + "APP_ENV": "development", + "APP_DEBUG": true, "APP_KEY": "", "APP_URL": "http://localhost:5000", From eefabe79d8ae9e0110108dd91db4191a3c7ff3bc Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Mon, 22 May 2023 09:10:00 +0000 Subject: [PATCH 14/48] Update default validation translate content --- frontend/lang/en/validation.php | 34 ++++++++++++++++----------------- frontend/lang/fr/validation.php | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/frontend/lang/en/validation.php b/frontend/lang/en/validation.php index ae786e4c..b0fc4fb2 100644 --- a/frontend/lang/en/validation.php +++ b/frontend/lang/en/validation.php @@ -1,25 +1,25 @@ 'The field {attribute} must be an email.', - 'required' => 'The field {attribute} is required.', - 'empty' => 'The field {attribute} is missing in the fields to be validated.', - 'min' => 'The field {attribute} must be at least {length} characters long.', - 'max' => 'The field {attribute} must not exceed {length} characters.', - 'same' => 'The field {attribute} must be the same as {value}.', - 'number' => 'The field {attribute} must be a number.', - 'int' => 'The field {attribute} must be an integer.', - 'float' => 'The field {attribute} must be a decimal.', + 'email' => 'The {attribute} field must be an email.', + 'required' => 'The {attribute} field is required.', + 'empty' => 'The {attribute} field is missing in the fields to be validated.', + 'min' => 'The {attribute} field must be at least {length} characters long.', + 'max' => 'The {attribute} field must not exceed {length} characters.', + 'same' => 'The {attribute} field must be the same as {value}.', + 'number' => 'The {attribute} field must be a number.', + 'int' => 'The {attribute} field must be an integer.', + 'float' => 'The {attribute} field must be a decimal.', 'alphanum' => 'Only alphanumeric characters are allowed for field {attribute}.', - 'in' => 'The field {attribute} must be one of the following {value}.', - 'size' => 'The field {attribute} must be {length} characters long.', + 'in' => 'The {attribute} field must be one of the following {value}.', + 'size' => 'The {attribute} field must be {length} characters long.', 'lower' => 'Only lowercase letters are allowed for field {attribute}.', 'upper' => 'Only uppercase letters are allowed for field {attribute}.', 'alpha' => 'Only alphabetic characters are allowed for field {attribute}.', - 'exists' => 'The field {attribute} does not exists.', - 'not_exists' => 'The field {attribute} already exists.', - 'unique' => 'The field {attribute} must be unique.', - 'date' => 'The field {attribute} must use the format: yyyy-mm-dd', - 'datetime' => 'The field {attribute} must use the format: yyyy-mm-dd hh:mm:ss', - 'regex' => 'The field {attribute} does not match the pattern', + 'exists' => 'The {attribute} field does not exists.', + 'not_exists' => 'The {attribute} field already exists.', + 'unique' => 'The {attribute} field must be unique.', + 'date' => 'The {attribute} field must use the format: yyyy-mm-dd', + 'datetime' => 'The {attribute} field must use the format: yyyy-mm-dd hh:mm:ss', + 'regex' => 'The {attribute} field does not match the pattern', ]; diff --git a/frontend/lang/fr/validation.php b/frontend/lang/fr/validation.php index 32cf675a..d53eaf00 100644 --- a/frontend/lang/fr/validation.php +++ b/frontend/lang/fr/validation.php @@ -16,9 +16,9 @@ 'lower' => "Le champ {attribute} doit avoir un contenu en miniscule.", 'upper' => "Le champ {attribute} doit avoir un contenu en majiscule.", 'alpha' => "Le champ {attribute} doit avoir un contenu en alphabetique.", - 'exists' => "le champe {attribute} n'existe pas.", - 'not_exists' => "le champ {attribute} existe.", - 'unique' => "le champ {attribute} doit être unique.", + 'exists' => "Le champ {attribute} n'existe pas.", + 'not_exists' => "Le champ {attribute} existe.", + 'unique' => "Le champ {attribute} doit être unique.", 'date' => "Le champ {attribute} n'est pas une date au format yyyy-mm-dd", 'datetime' => "Le champ {attribute} n'est pas une date au format yyyy-mm-dd hh:mm:ss", 'regex' => "Le champ {attribute} n'est pas valide", From f0acecf447125bf029c8b8d3f6cb67cb9002ba9d Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Wed, 24 May 2023 16:37:18 +0000 Subject: [PATCH 15/48] Update the policer config --- composer.json | 3 +-- config/policier.php | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 82c28e56..277a92ca 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,7 @@ "require": { "php": "^8.1", "bowphp/framework": "^5.0", - "bowphp/meta-manager": "^1.0", - "bowphp/policier": "^2.1" + "bowphp/policier": "^3.0" }, "require-dev": { "phpunit/phpunit": "^8", diff --git a/config/policier.php b/config/policier.php index 05a83df1..a9b86150 100644 --- a/config/policier.php +++ b/config/policier.php @@ -13,6 +13,13 @@ */ "iss" => app_env("APP_JWT_ISSUER", "app.example.com"), + /** + * Hashing algorithm being used + * + * HS256, HS384, HS512, ES256, ES384, ES512 + */ + "alg" => "HS512", + /** * Configures the audience */ From d1e9ec12f6df2b04379329a2d7925bd3e9819c56 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Fri, 26 May 2023 22:21:27 +0000 Subject: [PATCH 16/48] Remove the json method on error handler --- .../ApplicationConfiguration.php | 2 +- app/Exceptions/ErrorHandle.php | 55 ------------------- 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/app/Configurations/ApplicationConfiguration.php b/app/Configurations/ApplicationConfiguration.php index 26c037c7..fe047b6e 100644 --- a/app/Configurations/ApplicationConfiguration.php +++ b/app/Configurations/ApplicationConfiguration.php @@ -15,7 +15,7 @@ class ApplicationConfiguration extends Configuration */ public function create(Loader $config): void { - // Event::on("user.created", UserCreatedListener::class); + // } /** diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index 8dd6e887..dfeb52f4 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -3,10 +3,7 @@ namespace App\Exceptions; use Exception; -use PDOException; use Bow\Http\Exception\HttpException; -use Policier\Exception\TokenExpiredException; -use Policier\Exception\TokenInvalidException; use Bow\Application\Exception\BaseErrorHandler; use Bow\Http\Exception\ResponseException as HttpResponseException; use Bow\Database\Exception\NotFoundException as ModelNotFoundException; @@ -42,56 +39,4 @@ public function handle($exception): mixed ]); } } - - /** - * Send the json as response - * - * @param string $data - * @param mixed $code - * @return mixed - */ - private function json($exception, $code = null) - { - if ($exception instanceof TokenInvalidException) { - $code = 'TOKEN_INVALID'; - } - - if ($exception instanceof TokenExpiredException) { - $code = 'TOKEN_EXPIRED'; - } - - if (is_null($code)) { - if (method_exists($exception, 'getStatus')) { - $code = $exception->getStatus(); - } else { - $code = 'INTERNAL_SERVER_ERROR'; - } - } - - if (app_env("APP_ENV") == "production" && $exception instanceof PDOException) { - $message = 'Internal error occured'; - } else { - $message = $exception->getMessage(); - } - - $error = [ - 'message' => $message, - 'code' => $code, - 'time' => date('Y-m-d H:i:s') - ]; - - if (config('app.error_trace')) { - $trace = $exception->getTrace(); - } else { - $trace = []; - } - - if ($exception instanceof HttpException) { - $status = $exception->getStatusCode(); - } else { - $status = 500; - } - - return json(compact('error', 'trace'), $status); - } } From 4d992d227a8eb6e3782b3a160631cbdf4e04fce7 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 27 May 2023 17:11:50 +0000 Subject: [PATCH 17/48] Change lang folder location --- config/translate.php | 2 +- {frontend/lang => lang}/en/validation.php | 0 {frontend/lang => lang}/en/welcome.php | 0 {frontend/lang => lang}/fr/validation.php | 0 {frontend/lang => lang}/fr/welcome.php | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename {frontend/lang => lang}/en/validation.php (100%) rename {frontend/lang => lang}/en/welcome.php (100%) rename {frontend/lang => lang}/fr/validation.php (100%) rename {frontend/lang => lang}/fr/welcome.php (100%) diff --git a/config/translate.php b/config/translate.php index b7db4db4..20dd61f1 100644 --- a/config/translate.php +++ b/config/translate.php @@ -15,5 +15,5 @@ /** * Path to the language repeater */ - 'dictionary' => __DIR__ . '/../frontend/lang', + 'dictionary' => __DIR__ . '/../lang', ]; diff --git a/frontend/lang/en/validation.php b/lang/en/validation.php similarity index 100% rename from frontend/lang/en/validation.php rename to lang/en/validation.php diff --git a/frontend/lang/en/welcome.php b/lang/en/welcome.php similarity index 100% rename from frontend/lang/en/welcome.php rename to lang/en/welcome.php diff --git a/frontend/lang/fr/validation.php b/lang/fr/validation.php similarity index 100% rename from frontend/lang/fr/validation.php rename to lang/fr/validation.php diff --git a/frontend/lang/fr/welcome.php b/lang/fr/welcome.php similarity index 100% rename from frontend/lang/fr/welcome.php rename to lang/fr/welcome.php From 3a11aa53cb8fe8b767219109287862e6c3be245f Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 27 May 2023 18:59:37 +0000 Subject: [PATCH 18/48] Fix typo --- app/Kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Kernel.php b/app/Kernel.php index 351af523..f73090ef 100644 --- a/app/Kernel.php +++ b/app/Kernel.php @@ -42,7 +42,7 @@ public function namespaces(): array } /** - * Define the app middlewares + * Define the app middleware * * @return array */ From 20dd483e99cdf04f6d09f62cb08dcb1620d22065 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Tue, 6 Jun 2023 21:57:20 +0000 Subject: [PATCH 19/48] Update redis configuration --- config/cache.php | 12 +++++------- config/database.php | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/config/cache.php b/config/cache.php index fec74924..581aff29 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,29 +1,27 @@ "file", "stores" => [ + // The filesystem connection "file" => [ "driver" => "file", "path" => __DIR__ . '/../var/cache' ], + // The database connection "database" => [ "driver" => "database", "connection" => app_env('DB_DEFAULT', 'mysql'), "table" => "caches", ], + // The redis connection "redis" => [ 'driver' => 'redis', - 'host' => app_env('REDIS_HOSTNAME', '127.0.0.1'), - 'port' => app_env('REDIS_PORT', 6379), - 'timeout' => 2.5, - 'ssl' => false, - 'username' => app_env('REDIS_USERNAME'), - 'password' => app_env('REDIS_PASSWORD'), - 'database' => app_env('REDIS_CACHE_DB', '1'), + 'database' => app_env('REDIS_CACHE_DB', 5), "prefix" => "__app__", ] ] diff --git a/config/database.php b/config/database.php index c9736f89..a47a1658 100644 --- a/config/database.php +++ b/config/database.php @@ -14,7 +14,7 @@ /** * The migration memory table */ - 'migration' => 'bow_migration_status', + 'migration' => 'migrations', /** * The database on which the default application will connect. @@ -66,6 +66,20 @@ 'charset' => app_env('DB_CHARSET', 'utf8'), 'prefix' => app_env('DB_PREFIX', ''), 'foreign_key_constraints' => app_env('DB_FOREIGN_KEYS', true), - ] + ], + ], + + /** + * Connexion redis + */ + "redis" => [ + 'driver' => 'redis', + 'host' => app_env('REDIS_HOSTNAME', '127.0.0.1'), + 'port' => app_env('REDIS_PORT', 6379), + 'timeout' => 2.5, + 'ssl' => false, + 'username' => app_env('REDIS_USERNAME'), + 'password' => app_env('REDIS_PASSWORD'), + 'database' => app_env('REDIS_CACHE_DB', '1'), ] ]; From 46403ffa1e6e98af1cb51f9bc07b8003bd57700b Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Fri, 22 Sep 2023 10:48:41 +0000 Subject: [PATCH 20/48] Update queue configuration --- .env.example.json | 6 +++--- config/{worker.php => queue.php} | 17 ++++++++++++++--- config/storage.php | 6 +++--- 3 files changed, 20 insertions(+), 9 deletions(-) rename config/{worker.php => queue.php} (59%) diff --git a/.env.example.json b/.env.example.json index 785e353c..8f3a6f7e 100644 --- a/.env.example.json +++ b/.env.example.json @@ -32,9 +32,9 @@ "SESSION_SECURE": false, "SESSION_HTTPONLY": true, - "S3_KEY": "", - "S3_SECRET": "", - "S3_REGION": "us-east-1", + "AWS_KEY": "", + "AWS_SECRET": "", + "AWS_REGION": "us-east-1", "S3_BUCKET": "buckets", "FTP_HOSTNAME": "localhost", diff --git a/config/worker.php b/config/queue.php similarity index 59% rename from config/worker.php rename to config/queue.php index 413b2a45..96b04fcb 100644 --- a/config/worker.php +++ b/config/queue.php @@ -30,9 +30,20 @@ * The sqs connexion */ "sqs" => [ - "hostname" => "127.0.0.0", - "port" => 11300, - "timeout" => 10, + "url" => app_env("SQS_URL"), + 'region' => app_env('AWS_REGION'), + 'version' => 'latest', + 'credentials' => [ + 'key' => app_env('AWS_KEY'), + 'secret' => app_env('AWS_SECRET'), + ], + ], + + /** + * The database connexion + */ + "database" => [ + "table" => "queues", ] ] ]; diff --git a/config/storage.php b/config/storage.php index e14eb02d..0833b076 100644 --- a/config/storage.php +++ b/config/storage.php @@ -44,11 +44,11 @@ 's3' => [ 'driver' => 's3', 'bucket' => app_env('S3_BUCKET', 'settlements'), - 'region' => app_env('S3_REGION'), + 'region' => app_env('AWS_REGION'), 'version' => 'latest', 'credentials' => [ - 'key' => app_env('S3_KEY'), - 'secret' => app_env('S3_SECRET'), + 'key' => app_env('AWS_KEY'), + 'secret' => app_env('AWS_SECRET'), ], ] ], From 3bbf5f1160de3fe6ba0eafd1829d84b3c3227001 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Fri, 22 Sep 2023 11:59:55 +0000 Subject: [PATCH 21/48] Update github config --- .github/workflows/tests.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 40ab31b8..92a6e0ff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,16 +1,6 @@ name: Tests -on: - push: - branches: - - master - - '*.x' - pull_request: - schedule: - - cron: '0 0 * * *' - -permissions: - contents: read +on: [ push, pull_request ] jobs: run: From b7404130ba8dc719c776746976101b3c26daf4f9 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Fri, 22 Sep 2023 12:11:24 +0000 Subject: [PATCH 22/48] Refactoring errors handlers --- app/Exceptions/ErrorHandle.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index dfeb52f4..c70188eb 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -14,22 +14,22 @@ class ErrorHandle extends BaseErrorHandler * handle the error * * @param Exception $exception - * @return mixed */ - public function handle($exception): mixed + public function handle($exception) { if (request()->isAjax()) { return $this->json($exception); } - if ($exception instanceof ModelNotFoundException || $exception instanceof HttpException) { + if ( + $exception instanceof ModelNotFoundException + || $exception instanceof HttpException + ) { $code = $exception->getStatusCode(); - $source = $this->render('errors.' . $code, [ + return $this->render('errors.' . $code, [ 'code' => 404, 'exception' => $exception ]); - - return $source; } if ($exception instanceof HttpResponseException) { From 116fe5b7096401e267ccd15efe345e0e15a9a401 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 23 Sep 2023 18:38:38 +0000 Subject: [PATCH 23/48] Update tests.yml --- .github/workflows/tests.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 40ab31b8..2d58e22b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,13 +1,6 @@ name: Tests -on: - push: - branches: - - master - - '*.x' - pull_request: - schedule: - - cron: '0 0 * * *' +on: [ push, pull_request ] permissions: contents: read From 7c2819da9a7c84745550242fac4ada50d8aa7a6c Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 23 Sep 2023 18:49:02 +0000 Subject: [PATCH 24/48] Update pull-requests.yml --- .github/workflows/pull-requests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 1bc67d39..33de0af6 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -4,9 +4,6 @@ on: pull_request_target: types: [opened] -permissions: - pull-requests: write - jobs: uneditable: uses: bowphp/.github/.github/workflows/pull-requests.yml@main From acdbd5cf46fb8fd5539388dab411c31e498b66cc Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Mon, 16 Dec 2024 23:30:21 +0000 Subject: [PATCH 25/48] fix: error handler return result --- app/Exceptions/ErrorHandle.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index c70188eb..c184e05a 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -5,7 +5,6 @@ use Exception; use Bow\Http\Exception\HttpException; use Bow\Application\Exception\BaseErrorHandler; -use Bow\Http\Exception\ResponseException as HttpResponseException; use Bow\Database\Exception\NotFoundException as ModelNotFoundException; class ErrorHandle extends BaseErrorHandler @@ -26,17 +25,16 @@ public function handle($exception) || $exception instanceof HttpException ) { $code = $exception->getStatusCode(); + return $this->render('errors.' . $code, [ 'code' => 404, 'exception' => $exception ]); } - if ($exception instanceof HttpResponseException) { - return $this->render('errors.500', [ - 'code' => 404, - 'exception' => $exception - ]); - } + return $this->render('errors.500', [ + 'code' => 404, + 'exception' => $exception + ]); } } From 0147485c8836f4b7c18902ceb3b853749a23b75d Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Mon, 13 Jan 2025 21:05:17 +0000 Subject: [PATCH 26/48] chore: update phpunit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 277a92ca..b6110cde 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "bowphp/policier": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^8", + "phpunit/phpunit": "^9", "monolog/monolog": "^1.22", "squizlabs/php_codesniffer": "3.*" }, From bfbb3a71bfc9bf5aa292fe369e92650b276c47c3 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Mon, 13 Jan 2025 21:21:23 +0000 Subject: [PATCH 27/48] feat: add defaut queue name --- config/queue.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/queue.php b/config/queue.php index 96b04fcb..715454a5 100644 --- a/config/queue.php +++ b/config/queue.php @@ -14,7 +14,7 @@ * The sync connexion */ "sync" => [ - "directory" => storage_path("cache/queue") + "queue" => "default", ], /** @@ -24,12 +24,14 @@ "hostname" => "127.0.0.0", "port" => 11300, "timeout" => 10, + "queue" => "default", ], /** * The sqs connexion */ "sqs" => [ + "queue" => "default", "url" => app_env("SQS_URL"), 'region' => app_env('AWS_REGION'), 'version' => 'latest', @@ -43,6 +45,7 @@ * The database connexion */ "database" => [ + "queue" => "default", "table" => "queues", ] ] From 3bd6891cb8f2e57da6a40835c68cfd8dca1a4aab Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 18 Jan 2025 13:11:44 +0000 Subject: [PATCH 28/48] refactor: update config and default view --- app/Controllers/WelcomeController.php | 2 +- app/Exceptions/ErrorHandle.php | 3 +- app/Models/User.php | 10 ++++- app/Services/UserService.php | 4 +- bow | 2 +- composer.json | 8 +++- config/app.php | 4 +- config/cache.php | 6 ++- config/database.php | 2 +- config/helpers.php | 17 ++++---- config/mail.php | 4 +- config/policier.php | 2 +- config/queue.php | 2 +- config/security.php | 2 +- config/storage.php | 3 -- config/view.php | 6 +-- frontend/js/app.js | 19 ++++----- frontend/sass/app.scss | 18 ++++---- package.json | 57 ++++++++++++-------------- public/img/logo.png | Bin 0 -> 15649 bytes public/img/logo.svg | 1 - public/index.php | 2 +- seeders/_database.php | 7 ++++ seeders/users.php | 3 +- templates/layouts/default.tintin.php | 13 +++--- templates/welcome.tintin.php | 9 ++-- tests/bootstrap.php | 2 +- vite.config.js | 6 +++ webpack.mix.js | 4 -- 29 files changed, 114 insertions(+), 104 deletions(-) create mode 100644 public/img/logo.png delete mode 100644 public/img/logo.svg create mode 100644 seeders/_database.php create mode 100644 vite.config.js delete mode 100644 webpack.mix.js diff --git a/app/Controllers/WelcomeController.php b/app/Controllers/WelcomeController.php index d1df61e0..100d24d0 100644 --- a/app/Controllers/WelcomeController.php +++ b/app/Controllers/WelcomeController.php @@ -11,7 +11,7 @@ class WelcomeController extends Controller * Show index * * @param Request $request - * @return string + * @return string|null */ public function __invoke(Request $request): ?string { diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index c184e05a..ac3a2549 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -13,8 +13,9 @@ class ErrorHandle extends BaseErrorHandler * handle the error * * @param Exception $exception + * @return mixed|string */ - public function handle($exception) + public function handle(Exception $exception): mixed { if (request()->isAjax()) { return $this->json($exception); diff --git a/app/Models/User.php b/app/Models/User.php index bc54caad..3d691f53 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,9 +2,15 @@ namespace App\Models; -use Bow\Auth\Authentication as AuthenticatableModel; +use Bow\Auth\Authentication as AuthenticationModel; -class User extends AuthenticatableModel +/** + * @property mixed|string $name + * @property mixed|string $lastname + * @property mixed|string $email + * @property bool|mixed|string $password + */ +class User extends AuthenticationModel { /** * The list of hidden field when toJson is called diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 88049267..69b03d54 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -25,7 +25,7 @@ public function __construct(User $user) /** * Get all available users * - * @return Collection + * @return Collection|null */ public function fetchAll(): ?Collection { @@ -38,7 +38,7 @@ public function fetchAll(): ?Collection * @param string $name * @param string $lastname * @param string $email - * @return User + * @return User|null */ public function create(string $name, string $lastname, string $email): ?User { diff --git a/bow b/bow index 03da0aa9..b1e4e9ca 100755 --- a/bow +++ b/bow @@ -7,7 +7,7 @@ use Bow\Console\Console; // Register The Auto Loader if (!file_exists(__DIR__."/vendor/autoload.php")) { - die("Please install the depencencies with 'composer update'"); + die("Please install the dependencies with 'composer update'"); } require __DIR__."/vendor/autoload.php"; diff --git a/composer.json b/composer.json index b6110cde..c06c5ce8 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,12 @@ }, "require": { "php": "^8.1", - "bowphp/framework": "^5.0", - "bowphp/policier": "^3.0" + "bowphp/framework": "^5.x-dev", + "bowphp/policier": "^3.0", + "ext-pdo": "*", + "ext-redis": "*", + "ext-curl": "*", + "ext-ftp": "*" }, "require-dev": { "phpunit/phpunit": "^9", diff --git a/config/app.php b/config/app.php index 8c5b8bec..15237eaf 100644 --- a/config/app.php +++ b/config/app.php @@ -7,10 +7,10 @@ 'name' => app_env('APP_NAME', 'Bow Application'), /** - * The auto csrf enable csrf protected automaticly + * The auto csrf enable csrf protected automatically * on POST, DELETE, PUT */ - "auto_csrf" => app_env("APP_AUTO_CSRF", true), + "auto_csrf" => (bool) app_env("APP_AUTO_CSRF", true), /** * Root of the application diff --git a/config/cache.php b/config/cache.php index 581aff29..9dddd72c 100644 --- a/config/cache.php +++ b/config/cache.php @@ -8,7 +8,8 @@ // The filesystem connection "file" => [ "driver" => "file", - "path" => __DIR__ . '/../var/cache' + "path" => __DIR__ . '/../var/cache', + "prefix" => "", ], // The database connection @@ -16,13 +17,14 @@ "driver" => "database", "connection" => app_env('DB_DEFAULT', 'mysql'), "table" => "caches", + "prefix" => "", ], // The redis connection "redis" => [ 'driver' => 'redis', 'database' => app_env('REDIS_CACHE_DB', 5), - "prefix" => "__app__", + "prefix" => "", ] ] ]; diff --git a/config/database.php b/config/database.php index a47a1658..209e667a 100644 --- a/config/database.php +++ b/config/database.php @@ -19,7 +19,7 @@ /** * The database on which the default application will connect. * - * The database by default, it is on this data base that will connects + * The database by default, it is on this database that will connect * automatically. So you absolutely must not edit the default key. * * In the opposite box you must execute the code in each route. diff --git a/config/helpers.php b/config/helpers.php index 6790b529..3cd06063 100644 --- a/config/helpers.php +++ b/config/helpers.php @@ -2,12 +2,13 @@ if (!function_exists('mix')) { /** - * Get mixfile chunkhash version + * Get mix file chunk hash version * * @param string $path * @return string + * @throws Exception */ - function mix($path) + function mix(string $path) { $manifest = config('app.mixfile_path'); @@ -34,7 +35,7 @@ function mix($path) * @param string $path * @return string */ - function public_path($path = '') + function public_path(string $path = ''): string { return __DIR__ . '/../public/' . ltrim($path, '/'); } @@ -47,7 +48,7 @@ function public_path($path = '') * @param string $path * @return string */ - function frontend_path($path = '') + function frontend_path(string $path = '') { return __DIR__ . '/../frontend/' . ltrim($path, '/'); } @@ -60,7 +61,7 @@ function frontend_path($path = '') * @param string $path * @return string */ - function storage_path($path = '') + function storage_path(string $path = '') { return __DIR__ . '/../var/' . ltrim($path, '/'); } @@ -72,7 +73,7 @@ function storage_path($path = '') * * @return string */ - function base_path($path = '') + function base_path($path = ''): string { return rtrim(rtrim(realpath(__DIR__ . '/..'), '/') . '/' . $path, '/'); } @@ -86,7 +87,7 @@ function base_path($path = '') * @param int $len * @return string */ - function gen_slix($len = 4) + function gen_slix(int $len = 4): string { return substr(str_shuffle(uniqid()), 0, $len); } @@ -98,7 +99,7 @@ function gen_slix($len = 4) * * @return string */ - function gen_unique_id() + function gen_unique_id(): string { $id = base_convert(microtime(false), 10, 36); diff --git a/config/mail.php b/config/mail.php index a98b81cc..29eb0fe2 100644 --- a/config/mail.php +++ b/config/mail.php @@ -20,7 +20,7 @@ "from" => "sender@example.com", /** - * SMTP authentification + * SMTP authentication */ "smtp" => [ "hostname" => app_env("SMTP_HOSTNAME"), @@ -33,7 +33,7 @@ ], /** - * SMTP authentification + * SMTP authentication */ "ses" => [ "profile" => app_env("SES_PROFILE", "default"), diff --git a/config/policier.php b/config/policier.php index a9b86150..3de15a3e 100644 --- a/config/policier.php +++ b/config/policier.php @@ -1,7 +1,7 @@ app_env("APP_JWT_SECRET", "FivwuTmpJlwfXB/WMjAyMS0wMS0yNCAyMDozMTozMTE2MTE1MjAyOTEuMDEwOA=="), + "signkey" => app_env("APP_JWT_SECRET"), /** * Token expiration time diff --git a/config/queue.php b/config/queue.php index 715454a5..c85750b6 100644 --- a/config/queue.php +++ b/config/queue.php @@ -2,7 +2,7 @@ return [ /** - * The defaut connexion + * The default connexion */ "default" => "beanstalkd", diff --git a/config/security.php b/config/security.php index 88dc8c2f..b0f6a2f3 100644 --- a/config/security.php +++ b/config/security.php @@ -30,7 +30,7 @@ ], /** - * When using token. This is the life time of a token. + * When using token. This is the lifetime of a token. * It is strongly advised to program with tokens. */ 'token_expirate_time' => 50000 diff --git a/config/storage.php b/config/storage.php index 0833b076..61d31437 100644 --- a/config/storage.php +++ b/config/storage.php @@ -30,11 +30,8 @@ 'password' => app_env('FTP_PASSWORD'), 'username' => app_env('FTP_USERNAME'), 'port' => app_env('FTP_PORT', 21), - // The basic folder of the server 'root' => app_env('FTP_STARTROOT', null), - // A `true` to activate a secure connection. 'tls' => app_env('FTP_TLS', false), - // Connection waiting time 'timeout' => app_env('FTP_TIMEOUT', 50) ], diff --git a/config/view.php b/config/view.php index 252bc558..22c5f72a 100644 --- a/config/view.php +++ b/config/view.php @@ -3,7 +3,7 @@ return [ /** * The views directory. It is in this repertory that you will put all your views. - * The views must have the instantion you have defined in 'template_extension' + * The views must have the installation you have defined in 'template_extension' * if no error will be launched */ 'path' => __DIR__ . '/../templates', @@ -17,7 +17,7 @@ * Template supported twig, php, tintin * Define the template name. * Example: define twig with package twig/twig for define twig template - * Bow Framework support actualy twig, tintin, php + * Bow Framework support actually twig, tintin, php */ 'engine' => 'tintin', @@ -36,7 +36,7 @@ /** * Additional option */ - 'aditionnal_options' => [ + 'additional_options' => [ // 'auto_reload_cache' => true ] ]; diff --git a/frontend/js/app.js b/frontend/js/app.js index a139db8b..a326af64 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -1,7 +1,6 @@ -/** - * import Vue from "vue" - * import Example from "./Example.vue" - */ +// import Vue from "vue" +// import Example from "./Example.vue" + window.axios = require('axios'); window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; @@ -16,10 +15,8 @@ if (token) { */ require('./Example.jsx'); -/* - * Vue.component('example', Example); - * - * new Vue({ - * el: "#main" - * }); - */ +// Vue.component('example', Example); + +// new Vue({ +// el: "#main" +// }); diff --git a/frontend/sass/app.scss b/frontend/sass/app.scss index e7f35b52..b74955d9 100644 --- a/frontend/sass/app.scss +++ b/frontend/sass/app.scss @@ -1,9 +1,9 @@ -@import "variables"; - -#main { - position: relative; - margin: 10% auto; - width: 550px; - text-align: center; - font-family: $font-family; -} +@use "variables"; + +#main { + position: relative; + margin: 10% auto; + width: 550px; + text-align: center; + font-family: $font-family; +} diff --git a/package.json b/package.json index adb06129..88d620f7 100644 --- a/package.json +++ b/package.json @@ -1,32 +1,29 @@ { - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "format": "composer run-script lint" - }, - "dependencies": { - "axios": ">=0.21.1", - "babel-loader": "^8.0.4", - "bootstrap": "^4.0.0", - "cross-env": "^5.1", - "css-loader": "^2.0.2", - "jquery": "^3.2", - "laravel-mix": "^6.0.49", - "lodash": "^4.17.5", - "popper.js": "^1.12", - "react": "^16.7.0", - "react-dom": "^16.7.0", - "resolve-url-loader": "^5.0.0", - "sass": "^1.15.2", - "sass-loader": "^7.1.0", - "vue": "^2.5.17" - }, - "devDependencies": { - "@babel/preset-react": "^7.0.0", - "vue-template-compiler": "^2.5.21" - } + "private": true, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "axios": "^1.7.9", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@types/react": "^18.3.18", + "@types/react-dom": "^18.3.5", + "@vitejs/plugin-react": "^4.3.4", + "eslint": "^9.17.0", + "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-refresh": "^0.4.16", + "globals": "^15.14.0", + "typescript": "~5.6.2", + "typescript-eslint": "^8.18.2", + "vite": "^6.0.5" + } } diff --git a/public/img/logo.png b/public/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..dd384b515ce2b2b8b038b9f5585bfcb9586f01b2 GIT binary patch literal 15649 zcmeIZWmuHm*Ec+bAfSXIB07YqfYOpfcQ?`@4Bf)O&>@0I3<45LOG}H0zz~9fh@^BX zJ@nAcyTR*!-S_<*&xiMTm6(PY0)bprkeAkkKybFt ze=ZY%Cmn-R;oujMi@d%Y1VZ}l{0Arg5$SCR1V7nUTMwb9q6~vOJF=TuIGbCtdpf!R zY6wJF%+tjTZf}X8H@CF5brNA(uWewWx3v&q(&bg*RB@5Aw6T@4OiaY||A>}AAY5(D|CR3K#%^};#QmIw9T?4FX5q%c#m;%I7CpW2UwW8? zh1>b^?;%>2&n^~!R}QupC%Krpx>;&_xmb!YX<+g%H${~DU$Xyt zc0nu5aqe9Q+rLh^Sp4Iae>wiT>@VSe3(NogP+7qL4U>zztHT8ZEZ`iL4wjCVPKfg$ zas3k{3pfm6i*T^~uMkN%ApU2F0QO)GW=_^3OrC5OmR4r&4hSYuNoSL7$f=Rd|Y@A(1WnImj;P&*= z5=sgZ!slfF*#LmQaQpuw*Mf}v*SG&e4^K0f{|0_Q2D<>Qv#YkVvxBIVnUjYZJ+r2z zlZB}4T0#!4JQ9#z6? zOTDI#c+E`-)TOT&@}pMW4et!;*w=EmG|9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^UI`ei1+wM|t#pi~A zac)Esh*@UL?dqcHS6vMO=+E3a3hN)t?mC1>k_FipsNGipR}@;+s^L(aK>lo@ceA>t z$M0hox4&ucK%Py3NotFC6Z5{ F|6dSzg=GK$ literal 0 HcmV?d00001 diff --git a/public/img/logo.svg b/public/img/logo.svg deleted file mode 100644 index 0739265c..00000000 --- a/public/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/index.php b/public/index.php index 8475f0ee..0783293c 100644 --- a/public/index.php +++ b/public/index.php @@ -11,7 +11,7 @@ // Register The Auto Loader if (!file_exists(__DIR__ . "/../vendor/autoload.php")) { - die("Please install the depencencies with 'composer update'"); + die("Please install the dependencies with 'composer update'"); } require __DIR__."/../vendor/autoload.php"; diff --git a/seeders/_database.php b/seeders/_database.php new file mode 100644 index 00000000..aba6a35c --- /dev/null +++ b/seeders/_database.php @@ -0,0 +1,7 @@ + - %inject('title', 'It\'s Worked') - -
- %inject('content') -
+
+ %inject('content') +
From 36de3b25eac42d08d5e06c8839d10e89bf0010be Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sat, 20 Dec 2025 20:40:33 +0000 Subject: [PATCH 39/48] Fix class names --- app/Controllers/Controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Controllers/Controller.php b/app/Controllers/Controller.php index 55331e02..da2e7404 100644 --- a/app/Controllers/Controller.php +++ b/app/Controllers/Controller.php @@ -7,7 +7,7 @@ use Bow\Database\Database; use Bow\Validation\Validate; use Bow\Validation\Validator; -use Bow\Queue\Worker; +use Bow\Queue\QueueJob; use Bow\Contracts\ResponseInterface; use Bow\Configuration\Loader as Config; use Bow\Database\QueryBuilder; @@ -17,12 +17,12 @@ class Controller /** * Push the producer on queue list * - * @param Worker $producer + * @param QueueJob $job * @return mixed */ - public function queue(Worker $worker) + public function queue(QueueJob $job) { - queue($worker); + queue($job); } /** From 7c5808c8303d83c76cac72b96ad6c799b07444e7 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Fri, 26 Dec 2025 14:02:55 +0000 Subject: [PATCH 40/48] Refactoring --- app/Kernel.php | 1 - assets/css/app.css | 3 + assets/js/Example.jsx | 32 +- assets/js/app.js | 1 + config/mail.php | 9 +- config/queue.php | 2 +- .../Version20170407084225CreateUsersTable.php | 21 +- public/css/app.css | 585 +++++++++++++++++- tailwind.config.js | 15 +- vite.config.js | 57 +- 10 files changed, 666 insertions(+), 60 deletions(-) create mode 100644 assets/css/app.css diff --git a/app/Kernel.php b/app/Kernel.php index 3c44ab7e..c9907658 100644 --- a/app/Kernel.php +++ b/app/Kernel.php @@ -69,7 +69,6 @@ public function configurations(): array * Internal configuration of the framework */ \Bow\Configuration\LoggerConfiguration::class, - \Bow\Configuration\EnvConfiguration::class, \Bow\Cache\CacheConfiguration::class, \Bow\Mail\MailConfiguration::class, diff --git a/assets/css/app.css b/assets/css/app.css new file mode 100644 index 00000000..b5c61c95 --- /dev/null +++ b/assets/css/app.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/assets/js/Example.jsx b/assets/js/Example.jsx index 1c109a36..2c39c911 100644 --- a/assets/js/Example.jsx +++ b/assets/js/Example.jsx @@ -1,16 +1,16 @@ -import React, { Component } from 'react'; -import ReactDOM from 'react-dom'; - -export default class Example extends Component { - render() { - return ( -
- I'm an example React Component. -
- ); - } -} - -if (document.getElementById('main')) { - ReactDOM.render(, document.getElementById('main')); -} +import React, { Component } from 'react'; +import ReactDOM from 'react-dom'; + +export default class Example extends Component { + render() { + return ( +
+ I'm an example React Component. +
+ ); + } +} + +if (document.getElementById('main')) { + ReactDOM.render(, document.getElementById('main')); +} diff --git a/assets/js/app.js b/assets/js/app.js index a326af64..36f372c9 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -6,6 +6,7 @@ window.axios = require('axios'); window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; const token = document.querySelector('meta[name="csrf-token"]'); + if (token) { window.axios.defaults.headers.common['X-Csrf-Token'] = token.getAttribute('content'); } diff --git a/config/mail.php b/config/mail.php index f976fb46..703663c5 100644 --- a/config/mail.php +++ b/config/mail.php @@ -91,5 +91,12 @@ "username" => "Address information" ] ] - ] + ], + + /** + * Log driver configuration + */ + "log" => [ + "path" => sys_get_temp_dir() . '/bow/mails', + ], ]; diff --git a/config/queue.php b/config/queue.php index 1d9574c9..15e57da5 100644 --- a/config/queue.php +++ b/config/queue.php @@ -21,7 +21,7 @@ * The beanstalkd connexion */ "beanstalkd" => [ - "hostname" => "127.0.0.0", + "hostname" => "127.0.0.1", "port" => 11300, "timeout" => 10, "queue" => "default", diff --git a/migrations/Version20170407084225CreateUsersTable.php b/migrations/Version20170407084225CreateUsersTable.php index 43e0bca1..82cff066 100644 --- a/migrations/Version20170407084225CreateUsersTable.php +++ b/migrations/Version20170407084225CreateUsersTable.php @@ -10,18 +10,15 @@ class Version20170407084225CreateUsersTable extends Migration */ public function up(): void { - $this->create( - "users", - function (SQLGenerator $table) { - $table->addIncrement('id'); - $table->addString('name'); - $table->addString('email', ['unique' => true]); - $table->addString('description', ['nullable' => true]); - $table->addString('password'); - $table->addTimestamps(); - $table->withEngine('InnoDB'); - } - ); + $this->create("users", function (SQLGenerator $table) { + $table->addIncrement('id'); + $table->addString('name'); + $table->addString('email', ['unique' => true]); + $table->addString('description', ['nullable' => true]); + $table->addString('password'); + $table->addTimestamps(); + $table->withEngine('InnoDB'); + }); } /** diff --git a/public/css/app.css b/public/css/app.css index 28698a20..afe577fb 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1 +1,584 @@ -#main{position:relative;margin:10% auto;width:550px;text-align:center;font-family:Lato,console,monospace,serif,"sans-serif"} \ No newline at end of file +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +/* +! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #e5e7eb; + /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: Figtree, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-feature-settings: normal; + /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + letter-spacing: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden]:where(:not([hidden="until-found"])) { + display: none; +} + +.relative { + position: relative; +} + +.block { + display: block; +} + +.flex { + display: flex; +} + +.hidden { + display: none; +} + +.underline { + text-decoration-line: underline; +} + +.grayscale { + --tw-grayscale: grayscale(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.filter { + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} diff --git a/tailwind.config.js b/tailwind.config.js index acb111d6..f6b2f2f9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,10 +3,11 @@ import defaultTheme from "tailwindcss/defaultTheme"; /** @type {import('tailwindcss').Config} */ export default { content: [ - "./storage/views/*.php", - "./templates/**/*.blade.php", - "./templates/**/*.js", - "./templates/**/*.vue", + "./templates/**/*.{blade,tintin}.php", + "./templates/**/*.twig", + "./templates/**/*.{js,jsx,ts,tsx,vue}", + "./assets/js/**/*.{js,jsx,ts,tsx,vue}", + "./var/views/**/*.php", ], theme: { extend: { @@ -15,5 +16,9 @@ export default { }, }, }, - plugins: [], + plugins: [ + // require('@tailwindcss/forms'), + // require('@tailwindcss/typography'), + // Add more plugins as needed + ], }; diff --git a/vite.config.js b/vite.config.js index aa13fde7..f11bb773 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,52 +1,63 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; -import vue from "@vitejs/plugin-vue"; -import path from "path"; -import tailwindcss from "@tailwindcss/vite"; + +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; +import react from '@vitejs/plugin-react'; +import path from 'path'; +import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ - plugins: [react(), vue(), tailwindcss()], + plugins: [ + vue(), + react(), + tailwindcss(), + ], root: path.resolve(__dirname, 'assets'), build: { outDir: path.resolve(__dirname, 'public'), emptyOutDir: true, rollupOptions: { input: { - app: path.resolve(__dirname, 'assets/js/app.js') + app: path.resolve(__dirname, 'assets/js/app.js'), }, output: { entryFileNames: 'js/[name].js', chunkFileNames: 'js/[name]-[hash].js', assetFileNames: (assetInfo) => { - const info = assetInfo.name.split('.') - const ext = info[info.length - 1] + // Place images/fonts in their own folders, css in css/ + const ext = assetInfo.name.split('.').pop(); if (/\.(css|scss|sass|less)$/.test(assetInfo.name)) { - return 'css/[name]-[hash][extname]' + return 'css/[name]-[hash][extname]'; + } + if (/\.(png|jpe?g|gif|svg|webp|ico)$/.test(assetInfo.name)) { + return 'img/[name]-[hash][extname]'; + } + if (/\.(woff2?|eot|ttf|otf)$/.test(assetInfo.name)) { + return 'fonts/[name]-[hash][extname]'; } - return `${ext}/[name]-[hash][extname]` - } - } - } + return '[ext]/[name]-[hash][extname]'; + }, + }, + }, }, css: { preprocessorOptions: { scss: { - additionalData: `@import "${path.resolve(__dirname, 'assets/sass/variables.scss')}";` + additionalData: `@import "${path.resolve(__dirname, 'assets/sass/variables.scss')}";`, }, less: { - javascriptEnabled: true - } - } + javascriptEnabled: true, + }, + }, }, resolve: { alias: { '@': path.resolve(__dirname, 'assets/js'), - '@sass': path.resolve(__dirname, 'assets/sass') - } + '@sass': path.resolve(__dirname, 'assets/sass'), + }, }, server: { watch: { - usePolling: true - } - } + usePolling: true, + }, + }, }); From e082ee46ff97738a5b4b359e8060d66ad7d3eb2b Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sun, 18 Jan 2026 20:21:16 +0000 Subject: [PATCH 41/48] Set update notifier --- app/Controllers/Controller.php | 185 ------------------------- app/Controllers/WelcomeController.php | 5 +- bow | 2 +- config/{messaging.php => notifier.php} | 0 4 files changed, 3 insertions(+), 189 deletions(-) delete mode 100644 app/Controllers/Controller.php rename config/{messaging.php => notifier.php} (100%) diff --git a/app/Controllers/Controller.php b/app/Controllers/Controller.php deleted file mode 100644 index da2e7404..00000000 --- a/app/Controllers/Controller.php +++ /dev/null @@ -1,185 +0,0 @@ -all(), $rule); - - return $validation; - } - - /** - * Format API response - * - * @param string $message - * @param string $code - * @param array $data - * @param int $status - * @return array - */ - public function nativeApiErrorResponse( - $message = 'Internal Server Error', - $code = 'INTERNAL_SERVER_ERROR', - $data = [], - $status = 500 - ) { - $time = date('Y-m-d H:i:s'); - $error = compact('message', 'code', 'time'); - - $this->response()->status($status); - - return compact('error', 'data'); - } - - /** - * Fire Event - * - * @param string $event - * @return void - */ - public function emit($event) - { - $data = func_get_args(); - - array_shift($data); - array_unshift($data, $event); - - call_user_func_array('emit_event', $data); - } -} diff --git a/app/Controllers/WelcomeController.php b/app/Controllers/WelcomeController.php index 21ae3289..4769b42d 100644 --- a/app/Controllers/WelcomeController.php +++ b/app/Controllers/WelcomeController.php @@ -3,9 +3,8 @@ namespace App\Controllers; use Bow\Http\Request; -use App\Controllers\Controller; -class WelcomeController extends Controller +class WelcomeController { /** * Show index @@ -15,6 +14,6 @@ class WelcomeController extends Controller */ public function __invoke(Request $request): ?string { - return $this->render('welcome'); + return view('welcome'); } } diff --git a/bow b/bow index 14d8417f..c203d782 100755 --- a/bow +++ b/bow @@ -36,7 +36,7 @@ $setting->setConfigDirectory(__DIR__.'/config'); $setting->setPublicDirectory(__DIR__.'/public'); $setting->setJobDirectory(__DIR__.'/app/Jobs'); $setting->setCommandDirectory(__DIR__.'/app/Commands'); -$setting->setMessagingDirectory(__DIR__.'/app/Messages'); +$setting->setNotifierDirectory(__DIR__.'/app/Notifiers'); // Defines the local server starter $setting->setServerFilename(__DIR__.'/server.php'); diff --git a/config/messaging.php b/config/notifier.php similarity index 100% rename from config/messaging.php rename to config/notifier.php From 586956312ffdc08da03a19fb3ffb0476fd7007d4 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Wed, 21 Jan 2026 11:02:32 +0000 Subject: [PATCH 42/48] Refactoring notifier sms config --- config/notifier.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/config/notifier.php b/config/notifier.php index 830d1474..4a723d4c 100644 --- a/config/notifier.php +++ b/config/notifier.php @@ -12,9 +12,20 @@ 'webhook_url' => app_env('SLACK_WEBHOOK_URL'), ], - 'twilio' => [ - 'account_sid' => app_env('TWILIO_ACCOUNT_SID'), - 'auth_token' => app_env('TWILIO_AUTH_TOKEN'), - 'from' => app_env('TWILIO_FROM'), + 'sms' => [ + 'provider' => app_env('SMS_PROVIDER', 'twilio'), // Default SMS provider + + 'twilio' => [ + 'account_sid' => app_env('TWILIO_ACCOUNT_SID'), + 'auth_token' => app_env('TWILIO_AUTH_TOKEN'), + 'from' => app_env('TWILIO_FROM'), + ], + + 'callisto' => [ + 'access_key' => app_env('CALLISTO_ACCESS_KEY'), + 'access_secret' => app_env('CALLISTO_ACCESS_SECRET'), + 'notify_url' => app_env('CALLISTO_NOTIFY_URL'), + 'sender' => app_env('CALLISTO_SENDER'), + ], ], ]; From bf8ef7da5c789f064df9b884328c1a261d6bb74e Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Wed, 21 Jan 2026 11:33:00 +0000 Subject: [PATCH 43/48] Update config loading settings --- bow | 2 +- public/index.php | 2 +- seeders/20251220174703-user-seeder.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bow b/bow index c203d782..2582323c 100755 --- a/bow +++ b/bow @@ -13,7 +13,7 @@ if (!file_exists(__DIR__."/vendor/autoload.php")) { require __DIR__."/vendor/autoload.php"; // Make kernel instance -$kernel = Kernel::configure(__DIR__.'/config'); +$kernel = Kernel::configure(__DIR__)->withConfigPath(__DIR__ . '/config'); // Create command instance and set filename $setting = new Setting(__DIR__); diff --git a/public/index.php b/public/index.php index 218334ba..0d7683ec 100644 --- a/public/index.php +++ b/public/index.php @@ -20,7 +20,7 @@ // Bind kernel to application $app->bind( - Kernel::configure(base_path('config')) + Kernel::configure(dirname(__DIR__))->withConfigPath(dirname(__DIR__) . '/config') ); // Run The Application diff --git a/seeders/20251220174703-user-seeder.php b/seeders/20251220174703-user-seeder.php index 2f558869..5d403c6f 100644 --- a/seeders/20251220174703-user-seeder.php +++ b/seeders/20251220174703-user-seeder.php @@ -10,7 +10,7 @@ public function run() $faker = FakerFactory::create(); foreach (range(1, 5) as $value) { - $user =[ + $user = [ 'name' => $faker->name, 'description' => $faker->text(100), 'email' => $faker->email, From 44ee8811847570c2d8bc5b96cf2e4c370710022b Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Wed, 21 Jan 2026 13:39:12 +0000 Subject: [PATCH 44/48] Update welcome page --- templates/welcome.tintin.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/welcome.tintin.php b/templates/welcome.tintin.php index e7f6012c..d40bbb88 100644 --- a/templates/welcome.tintin.php +++ b/templates/welcome.tintin.php @@ -12,9 +12,6 @@ adjemin - - akiltechnologie - Snapdev Côte d'ivoire From 846d7cacf3bc9a35ff3a43f02415c509bd6457d8 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Wed, 21 Jan 2026 13:42:14 +0000 Subject: [PATCH 45/48] Fix tests bootstrap --- tests/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index a46ba9b5..fdd3c866 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,5 +8,5 @@ require __DIR__ . "/../vendor/autoload.php"; // boot kernel -$kernel = App\Kernel::configure(realpath(__DIR__ . '/../config')); +$kernel = App\Kernel::configure(realpath(dirname(__DIR__))); $kernel->boot(); From 51117ca374077176e06fccbf2b952968c9e0ed99 Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Fri, 23 Jan 2026 22:03:21 +0000 Subject: [PATCH 46/48] Update job to task --- app/Kernel.php | 2 +- bow | 2 +- config/notifier.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Kernel.php b/app/Kernel.php index c9907658..7a395cd0 100644 --- a/app/Kernel.php +++ b/app/Kernel.php @@ -37,7 +37,7 @@ public function namespaces(): array 'event' => 'App\\Events', 'listener' => 'App\\Listeners', 'exception' => 'App\\Exceptions', - 'job' => 'App\\Jobs', + 'task' => 'App\\Tasks', 'command' => 'App\\Commands', 'messaging' => 'App\\Messages', ]; diff --git a/bow b/bow index 2582323c..f4e43805 100755 --- a/bow +++ b/bow @@ -34,7 +34,7 @@ $setting->setSeederDirectory(__DIR__.'/seeders'); $setting->setComponentDirectory(__DIR__.'/assets'); $setting->setConfigDirectory(__DIR__.'/config'); $setting->setPublicDirectory(__DIR__.'/public'); -$setting->setJobDirectory(__DIR__.'/app/Jobs'); +$setting->setTaskDirectory(__DIR__.'/app/Tasks'); $setting->setCommandDirectory(__DIR__.'/app/Commands'); $setting->setNotifierDirectory(__DIR__.'/app/Notifiers'); diff --git a/config/notifier.php b/config/notifier.php index 4a723d4c..d58871f9 100644 --- a/config/notifier.php +++ b/config/notifier.php @@ -13,7 +13,7 @@ ], 'sms' => [ - 'provider' => app_env('SMS_PROVIDER', 'twilio'), // Default SMS provider + 'provider' => app_env('SMS_PROVIDER', 'callisto'), // Default SMS provider 'twilio' => [ 'account_sid' => app_env('TWILIO_ACCOUNT_SID'), From c16a61c9c723e113e3f4731e65a4f89c0f24ce1c Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Mon, 26 Jan 2026 08:55:58 +0000 Subject: [PATCH 47/48] Update framework version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c06c5ce8..77c17974 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ }, "require": { "php": "^8.1", - "bowphp/framework": "^5.x-dev", + "bowphp/framework": "^5.2", "bowphp/policier": "^3.0", "ext-pdo": "*", "ext-redis": "*", From 32b00541f2a58f424c3357909b92cd9ff8c6117a Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Mon, 26 Jan 2026 12:02:53 +0000 Subject: [PATCH 48/48] Fix migration definition --- migrations/Version20170407084225CreateUsersTable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/Version20170407084225CreateUsersTable.php b/migrations/Version20170407084225CreateUsersTable.php index 82cff066..7cc3fa6c 100644 --- a/migrations/Version20170407084225CreateUsersTable.php +++ b/migrations/Version20170407084225CreateUsersTable.php @@ -1,7 +1,7 @@ create("users", function (SQLGenerator $table) { + $this->create("users", function (Table $table) { $table->addIncrement('id'); $table->addString('name'); $table->addString('email', ['unique' => true]);