diff --git a/.env.example.json b/.env.example.json index 8f3a6f7..24fdd44 100644 --- a/.env.example.json +++ b/.env.example.json @@ -25,7 +25,8 @@ "DB_SOCKET": "", "DB_PREFIX": "", - "SESSION_NAME": "BOW", + "SESSION_DRIVER": "file", + "SESSION_NAME": "BOW_APP", "SESSION_LIFE": 648000, "SESSION_PATH": "/", "SESSION_DOMAIN": null, diff --git a/config/mail.php b/config/mail.php index 29eb0fe..f976fb4 100644 --- a/config/mail.php +++ b/config/mail.php @@ -29,7 +29,37 @@ "port" => app_env("SMTP_PORT"), "tls" => app_env("SMTP_TLS"), "ssl" => app_env("SMTP_SSL"), - "timeout" => app_env("SMTP_TIMEOUT") + "timeout" => app_env("SMTP_TIMEOUT"), + + /** + * DKIM (DomainKeys Identified Mail) allows an organization to take + * responsibility for a message by signing it. It allows the receiver + * to verify that the message was not modified in transit. + */ + 'dkim' => [ + 'enabled' => app_env('MAIL_DKIM_ENABLED', false), + 'domain' => app_env('MAIL_DKIM_DOMAIN'), + 'selector' => app_env('MAIL_DKIM_SELECTOR', 'default'), + 'private_key' => app_env('MAIL_DKIM_PRIVATE_KEY'), + 'passphrase' => app_env('MAIL_DKIM_PASSPHRASE'), + 'identity' => app_env('MAIL_DKIM_IDENTITY'), + 'algo' => 'rsa-sha256', + ], + + /** + * SPF (Sender Policy Framework) is an email authentication method designed + * to prevent email spoofing by allowing domain owners to specify which + * mail servers are authorized to send mail for their domains. + */ + 'spf' => [ + 'enabled' => app_env('MAIL_SPF_ENABLED', false), + 'strict' => app_env('MAIL_SPF_STRICT', true), + 'policies' => [ + 'fail' => 'reject', // reject, mark, accept + 'softfail' => 'mark', + 'neutral' => 'accept', + ], + ], ], /** @@ -51,7 +81,7 @@ */ "mail" => [ "default" => "contact", - "froms" => [ + "from" => [ "contact" => [ "address" => app_env("MAIL_FROM_EMAIL"), "name" => app_env("MAIL_FROM_NAME") diff --git a/config/messaging.php b/config/messaging.php new file mode 100644 index 0000000..830d147 --- /dev/null +++ b/config/messaging.php @@ -0,0 +1,20 @@ + [ + 'token' => app_env('TELEGRAM_TOKEN'), + 'chat_id' => app_env('TELEGRAM_CHAT_ID'), + ], + + 'slack' => [ + 'token' => app_env('SLACK_TOKEN'), + 'channel' => app_env('SLACK_CHANNEL'), + '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'), + ], +]; diff --git a/config/session.php b/config/session.php index 1053f7a..b61904e 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/package.json b/package.json index 88d620f..094e9d8 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,24 @@ { "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" + "build": "vite build", + "dev": "vite" }, "devDependencies": { - "@eslint/js": "^9.17.0", - "@types/react": "^18.3.18", - "@types/react-dom": "^18.3.5", + "@tailwindcss/vite": "^4.0.1", "@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" + "@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/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..2aa7205 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/readme.md b/readme.md index 0cbf327..c792b83 100644 --- a/readme.md +++ b/readme.md @@ -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/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..acb111d --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,19 @@ +import defaultTheme from "tailwindcss/defaultTheme"; + +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + "./storage/views/*.php", + "./templates/**/*.blade.php", + "./templates/**/*.js", + "./templates/**/*.vue", + ], + theme: { + extend: { + fontFamily: { + sans: ["Figtree", ...defaultTheme.fontFamily.sans], + }, + }, + }, + plugins: [], +}; diff --git a/vite.config.js b/vite.config.js index 081c8d9..edf10bd 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,52 @@ 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"; export default defineConfig({ - plugins: [react()], + plugins: [react(), vue(), tailwindcss()], + root: path.resolve(__dirname, 'frontend'), + build: { + outDir: path.resolve(__dirname, 'public'), + emptyOutDir: true, + rollupOptions: { + input: { + app: path.resolve(__dirname, 'frontend/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] + if (/\.(css|scss|sass|less)$/.test(assetInfo.name)) { + return 'css/[name]-[hash][extname]' + } + return `${ext}/[name]-[hash][extname]` + } + } + } + }, + css: { + preprocessorOptions: { + scss: { + additionalData: `@import "${path.resolve(__dirname, 'frontend/sass/variables.scss')}";` + }, + less: { + javascriptEnabled: true + } + } + }, + resolve: { + alias: { + '@': path.resolve(__dirname, 'frontend/js'), + '@sass': path.resolve(__dirname, 'frontend/sass') + } + }, + server: { + watch: { + usePolling: true + } + } });