diff --git a/.env.example.json b/.env.example.json index 5c452ccd..24fdd440 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", @@ -24,17 +25,18 @@ "DB_SOCKET": "", "DB_PREFIX": "", - "SESSION_NAME": "BOW", + "SESSION_DRIVER": "file", + "SESSION_NAME": "BOW_APP", "SESSION_LIFE": 648000, "SESSION_PATH": "/", "SESSION_DOMAIN": null, "SESSION_SECURE": false, "SESSION_HTTPONLY": true, - "S3_KEY": "", - "S3_SECRET": "", - "S3_REGION": "", - "S3_BUCKET": "", + "AWS_KEY": "", + "AWS_SECRET": "", + "AWS_REGION": "us-east-1", + "S3_BUCKET": "buckets", "FTP_HOSTNAME": "localhost", "FTP_PASSWORD": "password", 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 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: 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/Configurations/ApplicationConfiguration.php b/app/Configurations/ApplicationConfiguration.php index 26c037c7..c918d8c2 100644 --- a/app/Configurations/ApplicationConfiguration.php +++ b/app/Configurations/ApplicationConfiguration.php @@ -10,12 +10,12 @@ class ApplicationConfiguration extends Configuration /** * Launch configuration * - * @param Loader $config + * @param Loader $config * @return void */ public function create(Loader $config): void { - // Event::on("user.created", UserCreatedListener::class); + // } /** diff --git a/app/Controllers/Controller.php b/app/Controllers/Controller.php deleted file mode 100644 index 157ba239..00000000 --- a/app/Controllers/Controller.php +++ /dev/null @@ -1,183 +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 d1df61e0..4769b42d 100644 --- a/app/Controllers/WelcomeController.php +++ b/app/Controllers/WelcomeController.php @@ -3,18 +3,17 @@ namespace App\Controllers; use Bow\Http\Request; -use App\Controllers\Controller; -class WelcomeController extends Controller +class WelcomeController { /** * Show index * - * @param Request $request - * @return string + * @param Request $request + * @return string|null */ public function __invoke(Request $request): ?string { - return $this->render('welcome'); + return view('welcome'); } } diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php index b670ec3a..9885c0fa 100644 --- a/app/Exceptions/ErrorHandle.php +++ b/app/Exceptions/ErrorHandle.php @@ -2,110 +2,46 @@ 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 Policier\Exception\TokenExpiredException; -use Policier\Exception\TokenInvalidException; +use Bow\Http\Exception\HttpException; +use Bow\Application\Exception\BaseErrorHandler; +use Bow\Database\Exception\NotFoundException as ModelNotFoundException; -class ErrorHandle +class ErrorHandle extends BaseErrorHandler { /** * handle the error * - * @param Exception $exception - * @return void + * @param Exception $exception + * @return mixed|string */ - public function handle(Exception $exception) + public function handle(Exception $exception): mixed { if (request()->isAjax()) { return $this->json($exception); } - if ($exception instanceof ModelNotFoundException || $exception instanceof HttpException) { + if ( + $exception instanceof ModelNotFoundException + || $exception instanceof HttpException + ) { $code = $exception->getStatusCode(); - return $this->render('errors.' . $code, [ - 'code' => 404, - 'exception' => $exception - ]); - } - if ($exception instanceof HttpResponseException) { - return $this->render('errors.500', [ + return $this->render( + 'errors.' . $code, + [ 'code' => 404, '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 - * - * @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); + return $this->render( + 'errors.500', + [ + 'code' => 404, + 'exception' => $exception + ] + ); } } diff --git a/app/Kernel.php b/app/Kernel.php index 351af523..7a395cd0 100644 --- a/app/Kernel.php +++ b/app/Kernel.php @@ -2,6 +2,7 @@ namespace App; +use Bow\Router\Router; use Bow\Configuration\Loader as ApplicationLoader; class Kernel extends ApplicationLoader @@ -36,13 +37,14 @@ public function namespaces(): array 'event' => 'App\\Events', 'listener' => 'App\\Listeners', 'exception' => 'App\\Exceptions', - 'producer' => 'App\\Producers', + 'task' => 'App\\Tasks', 'command' => 'App\\Commands', + 'messaging' => 'App\\Messages', ]; } /** - * Define the app middlewares + * Define the app middleware * * @return array */ @@ -67,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, @@ -101,6 +102,22 @@ public function boot(): ApplicationLoader { parent::boot(); + $this->routes(); + return $this; } + + /** + * Load the define route + * + * @return void + */ + public function routes(): void + { + global $router; + + $router = Router::getInstance(); + + require_once base_path('routes/app.php'); + } } 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..956eef69 100644 --- a/app/Middlewares/GuestMiddleware.php +++ b/app/Middlewares/GuestMiddleware.php @@ -11,9 +11,9 @@ class GuestMiddleware implements BaseMiddleware /** * Launch function of the middleware. * - * @param Request $request + * @param Request $request * @param callable $next - * @param array $args + * @param array $args * @return mixed */ public function process(Request $request, callable $next, array $args = []): mixed @@ -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 ]; } } 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 cd66b861..d51e031e 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,13 +22,23 @@ public function __construct(User $user) $this->user = $user; } + /** + * Get all available users + * + * @return Collection|null + */ + public function fetchAll(): ?Collection + { + return $this->user->get(); + } + /** * Create new user * - * @param string $name - * @param string $lastname - * @param string $email - * @return User + * @param string $name + * @param string $lastname + * @param string $email + * @return User|null */ public function create(string $name, string $lastname, string $email): ?User { 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/frontend/js/Example.jsx b/assets/js/Example.jsx similarity index 95% rename from frontend/js/Example.jsx rename to assets/js/Example.jsx index 1c109a36..2c39c911 100644 --- a/frontend/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 ( -
`php bow generate:key`
*/
- 'key' => app_env('APP_KEY', file_get_contents(__DIR__. "/.key")),
+ 'key' => app_env('APP_KEY'),
/**
* The Encrypt method
@@ -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/session.php b/config/session.php
index 1053f7a0..b61904e3 100644
--- a/config/session.php
+++ b/config/session.php
@@ -9,7 +9,7 @@
/**
* The session driver
*/
- 'driver' => 'file',
+ 'driver' => app_env('SESSION_DRIVER', "file"),
/**
* The session database drive option
@@ -31,7 +31,7 @@
*
* @see: http://php.net/manual/fr/session.configuration.php#ini.session.cookie-path.
*/
- 'path' => '/',
+ 'path' => app_env('SESSION_PATH', '/'),
/**
* The cookie domain, for example 'www.example.com'.
@@ -40,21 +40,21 @@
*
* @see http://php.net/manual/fr/session.configuration.php#ini.session.cookie-domain
*/
- 'domain' => null,
+ 'domain' => app_env('SESSION_DOMAIN', 'localhost'),
/**
* If true, the cookie will only be sent over a secure connection.
*
* @see: http://php.net/manual/fr/session.configuration.php#ini.session.cookie-secure
*/
- 'secure' => false,
+ 'secure' => (bool) app_env('SESSION_SECURE', false),
/**
* If true, PHP will attempt to send the httponly option when configuring the cookie.
*
* @see http://php.net/manual/fr/session.configuration.php#ini.session.cookie-httponly
*/
- 'httponly' => false,
+ 'httponly' => (bool) app_env('SESSION_HTTPONLY', true),
/**
* Session data path.
@@ -63,6 +63,6 @@
* On some operating systems, you will have to choose a path to a folder
* able to handle a large number of small files efficiently.
* For example, on Linux, reiserfs can be more efficient than ext2fs.
- */
+ */
'save_path' => __DIR__ . '/../var/session',
];
diff --git a/config/storage.php b/config/storage.php
index 42bb134c..b3ed31c4 100644
--- a/config/storage.php
+++ b/config/storage.php
@@ -30,26 +30,27 @@
'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)
],
/**
* S3 configuration
+ * Supports both AWS S3 and MinIO (S3-compatible storage)
*/
's3' => [
'driver' => 's3',
+ 'bucket' => app_env('S3_BUCKET', 'settlements'),
+ 'region' => app_env('AWS_REGION', 'us-east-1'),
+ 'version' => 'latest',
'credentials' => [
- 'key' => app_env('S3_KEY'),
- 'secret' => app_env('S3_SECRET'),
+ 'key' => app_env('AWS_KEY'),
+ 'secret' => app_env('AWS_SECRET'),
],
- 'bucket' => app_env('S3_BUCKET'),
- 'region' => app_env('S3_REGION'),
- 'version' => 'latest'
- ]
+ // MinIO configuration (optional)
+ 'endpoint' => app_env('AWS_ENDPOINT'), // e.g., 'http://localhost:9000' for MinIO
+ 'use_path_style_endpoint' => app_env('AWS_USE_PATH_STYLE_ENDPOINT', false), // Set to true for MinIO
+ ],
],
];
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/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/config/worker.php b/config/worker.php
deleted file mode 100644
index 413b2a45..00000000
--- a/config/worker.php
+++ /dev/null
@@ -1,38 +0,0 @@
- "beanstalkd",
-
- /**
- * The queue drive connection
- */
- "connections" => [
- /**
- * The sync connexion
- */
- "sync" => [
- "directory" => storage_path("cache/queue")
- ],
-
- /**
- * The beanstalkd connexion
- */
- "beanstalkd" => [
- "hostname" => "127.0.0.0",
- "port" => 11300,
- "timeout" => 10,
- ],
-
- /**
- * The sqs connexion
- */
- "sqs" => [
- "hostname" => "127.0.0.0",
- "port" => 11300,
- "timeout" => 10,
- ]
- ]
-];
diff --git a/frontend/lang/en/validation.php b/frontend/lang/en/validation.php
deleted file mode 100644
index ae786e4c..00000000
--- a/frontend/lang/en/validation.php
+++ /dev/null
@@ -1,25 +0,0 @@
- '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.',
- '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.',
- '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',
-];
diff --git a/lang/en/validation.php b/lang/en/validation.php
new file mode 100644
index 00000000..b0fc4fb2
--- /dev/null
+++ b/lang/en/validation.php
@@ -0,0 +1,25 @@
+ '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 {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 {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/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 89%
rename from frontend/lang/fr/validation.php
rename to lang/fr/validation.php
index 32cf675a..d53eaf00 100644
--- a/frontend/lang/fr/validation.php
+++ b/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",
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
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]);
diff --git a/package.json b/package.json
index adb06129..094e9d8e 100644
--- a/package.json
+++ b/package.json
@@ -1,32 +1,24 @@
{
- "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,
+ "type": "module",
+ "scripts": {
+ "build": "vite build",
+ "dev": "vite"
+ },
+ "devDependencies": {
+ "@tailwindcss/vite": "^4.0.1",
+ "@vitejs/plugin-react": "^4.3.4",
+ "@vitejs/plugin-vue": "^5.2.1",
+ "autoprefixer": "^10.4.20",
+ "axios": "^1.7.4",
+ "concurrently": "^9.0.1",
+ "laravel-vite-plugin": "^1.2.0",
+ "postcss": "^8.4.47",
+ "tailwindcss": "^3.4.17",
+ "vite": "^6.0.11"
+ },
+ "dependencies": {
+ "react": "^19.0.0",
+ "react-dom": "^19.0.0"
+ }
}
diff --git a/phpunit.xml b/phpunit.xml
index 13ee1585..56125fee 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,6 +1,5 @@
-
-
+
## Bow Framework
@@ -29,8 +29,9 @@ You must make sure the following items are installed on your machine.
We would like to extend our thanks to the following sponsors for funding Bow Framework development. If you are interested in becoming a sponsor, please contact [Franck DAKIA](https://github.com/papac):
+- [Papac & Co](https://papacandco.com)
- [Adjemin](https://adjemin.com)
-- [Akil Technologies](https://akiltechnologies.com/)
+- [Akil Technologies](https://akiltechnologies.com)
- [Etudesk](https://etudesk.com)
## Contributing
@@ -40,16 +41,10 @@ Thank you for considering contributing to Bow Framework! The contribution guide
- [Franck DAKIA](https://github.com/papac)
- [Thank's collaborators](https://github.com/bowphp/app/graphs/contributors)
-## Contact
-
-- [Franck DAKIA](https://github.com/papac)
-- [Thank's collaborators](https://github.com/bowphp/docs/graphs/contributors)
-
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
-Please, if there is a bug on the project contact me by email or leave me a message on [Slack](https://bowphp.slack.com). or [join us on Slask](https://join.slack.com/t/bowphp/shared_invite/enQtNzMxOTQ0MTM2ODM5LTQ3MWQ3Mzc1NDFiNDYxMTAyNzBkNDJlMTgwNDJjM2QyMzA2YTk4NDYyN2NiMzM0YTZmNjU1YjBhNmJjZThiM2Q)
-
+Please, if there is a bug on the project contact me by email or leave me a message on [Telegram](https://t.me/+PiAXH-w9qLUyOTU0)
diff --git a/routes/app.php b/routes/app.php
index f7357c02..d40657fb 100644
--- a/routes/app.php
+++ b/routes/app.php
@@ -2,4 +2,4 @@
use App\Controllers\WelcomeController;
-$app->get('/', WelcomeController::class)->name('app.index');
+$router->get('/', WelcomeController::class)->name('app.index');
diff --git a/routes/console.php b/routes/console.php
index cecf8f90..26dff233 100644
--- a/routes/console.php
+++ b/routes/console.php
@@ -2,7 +2,11 @@
use Bow\Console\Color;
use Bow\Console\Argument;
+use App\Commands\TestCommand;
$console->addCommand('hello', function (Argument $argument) {
+ $index = route('app.index');
echo Color::green("hello, bow task runner.");
});
+
+$console->addCommand('test:hello', TestCommand::class);
diff --git a/seeders/20251220174703-user-seeder.php b/seeders/20251220174703-user-seeder.php
new file mode 100644
index 00000000..5d403c6f
--- /dev/null
+++ b/seeders/20251220174703-user-seeder.php
@@ -0,0 +1,25 @@
+ $faker->name,
+ 'description' => $faker->text(100),
+ 'email' => $faker->email,
+ 'password' => app_hash('password'),
+ 'created_at' => date('Y-m-d H:i:s'),
+ 'updated_at' => date('Y-m-d H:i:s'),
+ ];
+
+ User::create($user);
+ }
+ }
+}
diff --git a/seeders/users.php b/seeders/users.php
deleted file mode 100644
index 36957536..00000000
--- a/seeders/users.php
+++ /dev/null
@@ -1,27 +0,0 @@
- $faker->name,
- 'description' => $faker->text,
- 'email' => $faker->email,
- 'password' => app_hash('password'),
- 'created_at' => date('Y-m-d H:i:s'),
- 'updated_at' => date('Y-m-d H:i:s'),
- ];
-}
-
-return [User::class => $seeds];
diff --git a/tailwind.config.js b/tailwind.config.js
new file mode 100644
index 00000000..f6b2f2f9
--- /dev/null
+++ b/tailwind.config.js
@@ -0,0 +1,24 @@
+import defaultTheme from "tailwindcss/defaultTheme";
+
+/** @type {import('tailwindcss').Config} */
+export default {
+ content: [
+ "./templates/**/*.{blade,tintin}.php",
+ "./templates/**/*.twig",
+ "./templates/**/*.{js,jsx,ts,tsx,vue}",
+ "./assets/js/**/*.{js,jsx,ts,tsx,vue}",
+ "./var/views/**/*.php",
+ ],
+ theme: {
+ extend: {
+ fontFamily: {
+ sans: ["Figtree", ...defaultTheme.fontFamily.sans],
+ },
+ },
+ },
+ plugins: [
+ // require('@tailwindcss/forms'),
+ // require('@tailwindcss/typography'),
+ // Add more plugins as needed
+ ],
+};
diff --git a/templates/layouts/default.tintin.php b/templates/layouts/default.tintin.php
index 944f7ef8..941c8f62 100644
--- a/templates/layouts/default.tintin.php
+++ b/templates/layouts/default.tintin.php
@@ -6,8 +6,8 @@
-