Bozhidar Slaveykov 1 year ago
parent
commit
f91b189c4e
68 changed files with 1120 additions and 230 deletions
  1. 0 11
      cer.txt
  2. 1 1
      installers/Ubuntu/22.04/install.sh
  3. 0 0
      web/Modules/LetsEncrypt/App/Http/Controllers/.gitkeep
  4. 67 0
      web/Modules/LetsEncrypt/App/Http/Controllers/LetsEncryptController.php
  5. 0 0
      web/Modules/LetsEncrypt/App/Providers/.gitkeep
  6. 114 0
      web/Modules/LetsEncrypt/App/Providers/LetsEncryptServiceProvider.php
  7. 59 0
      web/Modules/LetsEncrypt/App/Providers/RouteServiceProvider.php
  8. 0 0
      web/Modules/LetsEncrypt/Database/Seeders/.gitkeep
  9. 16 0
      web/Modules/LetsEncrypt/Database/Seeders/LetsEncryptDatabaseSeeder.php
  10. 31 0
      web/Modules/LetsEncrypt/composer.json
  11. 0 0
      web/Modules/LetsEncrypt/config/.gitkeep
  12. 5 0
      web/Modules/LetsEncrypt/config/config.php
  13. 11 0
      web/Modules/LetsEncrypt/module.json
  14. 15 0
      web/Modules/LetsEncrypt/package.json
  15. 0 0
      web/Modules/LetsEncrypt/resources/assets/js/app.js
  16. 0 0
      web/Modules/LetsEncrypt/resources/assets/sass/app.scss
  17. 0 0
      web/Modules/LetsEncrypt/resources/views/.gitkeep
  18. 7 0
      web/Modules/LetsEncrypt/resources/views/index.blade.php
  19. 29 0
      web/Modules/LetsEncrypt/resources/views/layouts/master.blade.php
  20. 0 0
      web/Modules/LetsEncrypt/routes/.gitkeep
  21. 19 0
      web/Modules/LetsEncrypt/routes/api.php
  22. 19 0
      web/Modules/LetsEncrypt/routes/web.php
  23. 26 0
      web/Modules/LetsEncrypt/vite.config.js
  24. 0 0
      web/Modules/Microweber/App/Http/Controllers/.gitkeep
  25. 67 0
      web/Modules/Microweber/App/Http/Controllers/MicroweberController.php
  26. 0 0
      web/Modules/Microweber/App/Providers/.gitkeep
  27. 114 0
      web/Modules/Microweber/App/Providers/MicroweberServiceProvider.php
  28. 59 0
      web/Modules/Microweber/App/Providers/RouteServiceProvider.php
  29. 0 0
      web/Modules/Microweber/Database/Seeders/.gitkeep
  30. 16 0
      web/Modules/Microweber/Database/Seeders/MicroweberDatabaseSeeder.php
  31. 31 0
      web/Modules/Microweber/composer.json
  32. 0 0
      web/Modules/Microweber/config/.gitkeep
  33. 5 0
      web/Modules/Microweber/config/config.php
  34. 11 0
      web/Modules/Microweber/module.json
  35. 15 0
      web/Modules/Microweber/package.json
  36. 0 0
      web/Modules/Microweber/resources/assets/js/app.js
  37. 0 0
      web/Modules/Microweber/resources/assets/sass/app.scss
  38. 0 0
      web/Modules/Microweber/resources/views/.gitkeep
  39. 7 0
      web/Modules/Microweber/resources/views/index.blade.php
  40. 29 0
      web/Modules/Microweber/resources/views/layouts/master.blade.php
  41. 0 0
      web/Modules/Microweber/routes/.gitkeep
  42. 19 0
      web/Modules/Microweber/routes/api.php
  43. 19 0
      web/Modules/Microweber/routes/web.php
  44. 26 0
      web/Modules/Microweber/vite.config.js
  45. 1 1
      web/acme-php-test.sh
  46. 0 8
      web/app/Modules/Microweber/Installers/MicroweberWebsiteInstaller.php
  47. 0 18
      web/app/Modules/Microweber/MicroweberServiceProvider.php
  48. 13 4
      web/composer.json
  49. 262 48
      web/composer.lock
  50. 4 0
      web/modules_statuses.json
  51. 0 0
      web/public/css/filament/filament/app.css
  52. 0 0
      web/public/css/filament/forms/forms.css
  53. 0 0
      web/public/css/filament/support/support.css
  54. 0 0
      web/public/js/filament/filament/app.js
  55. 0 0
      web/public/js/filament/filament/echo.js
  56. 0 0
      web/public/js/filament/forms/components/color-picker.js
  57. 0 0
      web/public/js/filament/forms/components/file-upload.js
  58. 1 1
      web/public/js/filament/forms/components/key-value.js
  59. 0 0
      web/public/js/filament/forms/components/markdown-editor.js
  60. 0 0
      web/public/js/filament/forms/components/select.js
  61. 1 1
      web/public/js/filament/forms/components/tags-input.js
  62. 0 0
      web/public/js/filament/notifications/notifications.js
  63. 0 0
      web/public/js/filament/support/async-alpine.js
  64. 0 0
      web/public/js/filament/support/support.js
  65. 0 0
      web/public/js/filament/tables/components/table.js
  66. 0 0
      web/public/js/filament/widgets/components/chart.js
  67. 1 0
      web/routes/api.php
  68. 0 137
      web/routes/web.php

+ 0 - 11
cer.txt

@@ -1,11 +0,0 @@
-sudo ufw allow 22
-
-
-sudo apt install certbot python3-certbot-nginx -y
-sudo ufw allow 3036
-sudo ufw allow 'Nginx Full'
-sudo ufw delete allow 'Nginx HTTP'
-sudo ufw status
-
-sudo certbot --nginx -d webesembly.com -d www.webesembly.com
-sudo systemctl status certbot.timer

+ 1 - 1
installers/Ubuntu/22.04/install.sh

@@ -67,7 +67,7 @@ DEPENDENCIES_LIST=(
     "libcurl4-openssl-dev"
     "libssl-dev"
     "zlib1g-dev"
-    "php8.2-{bcmath,zlib,xml,bz2,curl,curl,dom,fileinfo,gd,intl,mbstring,mysql,opcache,sqlite3,xmlrpc,zip}"
+    "php8.2-{bcmath,zlib,xml,bz2,intl,curl,dom,fileinfo,gd,intl,mbstring,mysql,opcache,sqlite3,xmlrpc,zip}"
 )
 # Check if the dependencies are installed
 for DEPENDENCY in "${DEPENDENCIES_LIST[@]}"; do

+ 0 - 0
web/Modules/LetsEncrypt/App/Http/Controllers/.gitkeep


+ 67 - 0
web/Modules/LetsEncrypt/App/Http/Controllers/LetsEncryptController.php

@@ -0,0 +1,67 @@
+<?php
+
+namespace Modules\LetsEncrypt\App\Http\Controllers;
+
+use App\Http\Controllers\Controller;
+use Illuminate\Http\RedirectResponse;
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
+
+class LetsEncryptController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     */
+    public function index()
+    {
+        return view('letsencrypt::index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     */
+    public function create()
+    {
+        return view('letsencrypt::create');
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     */
+    public function store(Request $request): RedirectResponse
+    {
+        //
+    }
+
+    /**
+     * Show the specified resource.
+     */
+    public function show($id)
+    {
+        return view('letsencrypt::show');
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     */
+    public function edit($id)
+    {
+        return view('letsencrypt::edit');
+    }
+
+    /**
+     * Update the specified resource in storage.
+     */
+    public function update(Request $request, $id): RedirectResponse
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 0 - 0
web/Modules/LetsEncrypt/App/Providers/.gitkeep


+ 114 - 0
web/Modules/LetsEncrypt/App/Providers/LetsEncryptServiceProvider.php

@@ -0,0 +1,114 @@
+<?php
+
+namespace Modules\LetsEncrypt\App\Providers;
+
+use Illuminate\Support\Facades\Blade;
+use Illuminate\Support\ServiceProvider;
+
+class LetsEncryptServiceProvider extends ServiceProvider
+{
+    protected string $moduleName = 'LetsEncrypt';
+
+    protected string $moduleNameLower = 'letsencrypt';
+
+    /**
+     * Boot the application events.
+     */
+    public function boot(): void
+    {
+        $this->registerCommands();
+        $this->registerCommandSchedules();
+        $this->registerTranslations();
+        $this->registerConfig();
+        $this->registerViews();
+        $this->loadMigrationsFrom(module_path($this->moduleName, 'Database/migrations'));
+    }
+
+    /**
+     * Register the service provider.
+     */
+    public function register(): void
+    {
+        $this->app->register(RouteServiceProvider::class);
+    }
+
+    /**
+     * Register commands in the format of Command::class
+     */
+    protected function registerCommands(): void
+    {
+        // $this->commands([]);
+    }
+
+    /**
+     * Register command Schedules.
+     */
+    protected function registerCommandSchedules(): void
+    {
+        // $this->app->booted(function () {
+        //     $schedule = $this->app->make(Schedule::class);
+        //     $schedule->command('inspire')->hourly();
+        // });
+    }
+
+    /**
+     * Register translations.
+     */
+    public function registerTranslations(): void
+    {
+        $langPath = resource_path('lang/modules/'.$this->moduleNameLower);
+
+        if (is_dir($langPath)) {
+            $this->loadTranslationsFrom($langPath, $this->moduleNameLower);
+            $this->loadJsonTranslationsFrom($langPath);
+        } else {
+            $this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower);
+            $this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang'));
+        }
+    }
+
+    /**
+     * Register config.
+     */
+    protected function registerConfig(): void
+    {
+        $this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower.'.php')], 'config');
+        $this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower);
+    }
+
+    /**
+     * Register views.
+     */
+    public function registerViews(): void
+    {
+        $viewPath = resource_path('views/modules/'.$this->moduleNameLower);
+        $sourcePath = module_path($this->moduleName, 'resources/views');
+
+        $this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower.'-module-views']);
+
+        $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
+
+        $componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.config('modules.paths.generator.component-class.path'));
+        Blade::componentNamespace($componentNamespace, $this->moduleNameLower);
+    }
+
+    /**
+     * Get the services provided by the provider.
+     */
+    public function provides(): array
+    {
+        return [];
+    }
+
+    private function getPublishableViewPaths(): array
+    {
+        $paths = [];
+        foreach (config('view.paths') as $path) {
+            if (is_dir($path.'/modules/'.$this->moduleNameLower)) {
+                $paths[] = $path.'/modules/'.$this->moduleNameLower;
+            }
+        }
+
+        return $paths;
+    }
+}

+ 59 - 0
web/Modules/LetsEncrypt/App/Providers/RouteServiceProvider.php

@@ -0,0 +1,59 @@
+<?php
+
+namespace Modules\LetsEncrypt\App\Providers;
+
+use Illuminate\Support\Facades\Route;
+use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
+
+class RouteServiceProvider extends ServiceProvider
+{
+    /**
+     * The module namespace to assume when generating URLs to actions.
+     */
+    protected string $moduleNamespace = 'Modules\LetsEncrypt\App\Http\Controllers';
+
+    /**
+     * Called before routes are registered.
+     *
+     * Register any model bindings or pattern based filters.
+     */
+    public function boot(): void
+    {
+        parent::boot();
+    }
+
+    /**
+     * Define the routes for the application.
+     */
+    public function map(): void
+    {
+        $this->mapApiRoutes();
+
+        $this->mapWebRoutes();
+    }
+
+    /**
+     * Define the "web" routes for the application.
+     *
+     * These routes all receive session state, CSRF protection, etc.
+     */
+    protected function mapWebRoutes(): void
+    {
+        Route::middleware('web')
+            ->namespace($this->moduleNamespace)
+            ->group(module_path('LetsEncrypt', '/routes/web.php'));
+    }
+
+    /**
+     * Define the "api" routes for the application.
+     *
+     * These routes are typically stateless.
+     */
+    protected function mapApiRoutes(): void
+    {
+        Route::prefix('api')
+            ->middleware('api')
+            ->namespace($this->moduleNamespace)
+            ->group(module_path('LetsEncrypt', '/routes/api.php'));
+    }
+}

+ 0 - 0
web/Modules/LetsEncrypt/Database/Seeders/.gitkeep


+ 16 - 0
web/Modules/LetsEncrypt/Database/Seeders/LetsEncryptDatabaseSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace Modules\LetsEncrypt\Database\Seeders;
+
+use Illuminate\Database\Seeder;
+
+class LetsEncryptDatabaseSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     */
+    public function run(): void
+    {
+        // $this->call([]);
+    }
+}

+ 31 - 0
web/Modules/LetsEncrypt/composer.json

@@ -0,0 +1,31 @@
+{
+    "name": "nwidart/letsencrypt",
+    "description": "",
+    "authors": [
+        {
+            "name": "Nicolas Widart",
+            "email": "n.widart@gmail.com"
+        }
+    ],
+    "extra": {
+        "laravel": {
+            "providers": [],
+            "aliases": {
+
+            }
+        }
+    },
+    "autoload": {
+        "psr-4": {
+            "Modules\\LetsEncrypt\\": "",
+            "Modules\\LetsEncrypt\\App\\": "app/",
+            "Modules\\LetsEncrypt\\Database\\Factories\\": "database/factories/",
+            "Modules\\LetsEncrypt\\Database\\Seeders\\": "database/seeders/"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "Modules\\LetsEncrypt\\Tests\\": "tests/"
+        }
+    }
+}

+ 0 - 0
web/Modules/LetsEncrypt/config/.gitkeep


+ 5 - 0
web/Modules/LetsEncrypt/config/config.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+    'name' => 'LetsEncrypt',
+];

+ 11 - 0
web/Modules/LetsEncrypt/module.json

@@ -0,0 +1,11 @@
+{
+    "name": "LetsEncrypt",
+    "alias": "letsencrypt",
+    "description": "",
+    "keywords": [],
+    "priority": 0,
+    "providers": [
+        "Modules\\LetsEncrypt\\App\\Providers\\LetsEncryptServiceProvider"
+    ],
+    "files": []
+}

+ 15 - 0
web/Modules/LetsEncrypt/package.json

@@ -0,0 +1,15 @@
+{
+  "private": true,
+  "type": "module",
+  "scripts": {
+    "dev": "vite",
+    "build": "vite build"
+  },
+  "devDependencies": {
+    "axios": "^1.1.2",
+    "laravel-vite-plugin": "^0.7.5",
+    "sass": "^1.69.5",
+    "postcss": "^8.3.7",
+    "vite": "^4.0.0"
+  }
+}

+ 0 - 0
web/Modules/LetsEncrypt/resources/assets/js/app.js


+ 0 - 0
web/Modules/LetsEncrypt/resources/assets/sass/app.scss


+ 0 - 0
web/Modules/LetsEncrypt/resources/views/.gitkeep


+ 7 - 0
web/Modules/LetsEncrypt/resources/views/index.blade.php

@@ -0,0 +1,7 @@
+@extends('letsencrypt::layouts.master')
+
+@section('content')
+    <h1>Hello World</h1>
+
+    <p>Module: {!! config('letsencrypt.name') !!}</p>
+@endsection

+ 29 - 0
web/Modules/LetsEncrypt/resources/views/layouts/master.blade.php

@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="csrf-token" content="{{ csrf_token() }}">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+
+    <title>LetsEncrypt Module - {{ config('app.name', 'Laravel') }}</title>
+
+    <meta name="description" content="{{ $description ?? '' }}">
+    <meta name="keywords" content="{{ $keywords ?? '' }}">
+    <meta name="author" content="{{ $author ?? '' }}">
+
+    <!-- Fonts -->
+    <link rel="preconnect" href="https://fonts.bunny.net">
+    <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
+
+    {{-- Vite CSS --}}
+    {{-- {{ module_vite('build-letsencrypt', 'resources/assets/sass/app.scss') }} --}}
+</head>
+
+<body>
+    @yield('content')
+
+    {{-- Vite JS --}}
+    {{-- {{ module_vite('build-letsencrypt', 'resources/assets/js/app.js') }} --}}
+</body>

+ 0 - 0
web/Modules/LetsEncrypt/routes/.gitkeep


+ 19 - 0
web/Modules/LetsEncrypt/routes/api.php

@@ -0,0 +1,19 @@
+<?php
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Route;
+
+/*
+    |--------------------------------------------------------------------------
+    | API Routes
+    |--------------------------------------------------------------------------
+    |
+    | Here is where you can register API routes for your application. These
+    | routes are loaded by the RouteServiceProvider within a group which
+    | is assigned the "api" middleware group. Enjoy building your API!
+    |
+*/
+
+Route::middleware(['auth:sanctum'])->prefix('v1')->name('api.')->group(function () {
+    Route::get('letsencrypt', fn (Request $request) => $request->user())->name('letsencrypt');
+});

+ 19 - 0
web/Modules/LetsEncrypt/routes/web.php

@@ -0,0 +1,19 @@
+<?php
+
+use Illuminate\Support\Facades\Route;
+use Modules\LetsEncrypt\App\Http\Controllers\LetsEncryptController;
+
+/*
+|--------------------------------------------------------------------------
+| Web Routes
+|--------------------------------------------------------------------------
+|
+| Here is where you can register web routes for your application. These
+| routes are loaded by the RouteServiceProvider within a group which
+| contains the "web" middleware group. Now create something great!
+|
+*/
+
+Route::group([], function () {
+    Route::resource('letsencrypt', LetsEncryptController::class)->names('letsencrypt');
+});

+ 26 - 0
web/Modules/LetsEncrypt/vite.config.js

@@ -0,0 +1,26 @@
+import { defineConfig } from 'vite';
+import laravel from 'laravel-vite-plugin';
+
+export default defineConfig({
+    build: {
+        outDir: '../../public/build-letsencrypt',
+        emptyOutDir: true,
+        manifest: true,
+    },
+    plugins: [
+        laravel({
+            publicDirectory: '../../public',
+            buildDirectory: 'build-letsencrypt',
+            input: [
+                __dirname + '/resources/assets/sass/app.scss',
+                __dirname + '/resources/assets/js/app.js'
+            ],
+            refresh: true,
+        }),
+    ],
+});
+
+//export const paths = [
+//    'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss',
+//    'Modules/$STUDLY_NAME$/resources/assets/js/app.js',
+//];

+ 0 - 0
web/Modules/Microweber/App/Http/Controllers/.gitkeep


+ 67 - 0
web/Modules/Microweber/App/Http/Controllers/MicroweberController.php

@@ -0,0 +1,67 @@
+<?php
+
+namespace Modules\Microweber\App\Http\Controllers;
+
+use App\Http\Controllers\Controller;
+use Illuminate\Http\RedirectResponse;
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
+
+class MicroweberController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     */
+    public function index()
+    {
+        return view('microweber::index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     */
+    public function create()
+    {
+        return view('microweber::create');
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     */
+    public function store(Request $request): RedirectResponse
+    {
+        //
+    }
+
+    /**
+     * Show the specified resource.
+     */
+    public function show($id)
+    {
+        return view('microweber::show');
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     */
+    public function edit($id)
+    {
+        return view('microweber::edit');
+    }
+
+    /**
+     * Update the specified resource in storage.
+     */
+    public function update(Request $request, $id): RedirectResponse
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 0 - 0
web/Modules/Microweber/App/Providers/.gitkeep


+ 114 - 0
web/Modules/Microweber/App/Providers/MicroweberServiceProvider.php

@@ -0,0 +1,114 @@
+<?php
+
+namespace Modules\Microweber\App\Providers;
+
+use Illuminate\Support\Facades\Blade;
+use Illuminate\Support\ServiceProvider;
+
+class MicroweberServiceProvider extends ServiceProvider
+{
+    protected string $moduleName = 'Microweber';
+
+    protected string $moduleNameLower = 'microweber';
+
+    /**
+     * Boot the application events.
+     */
+    public function boot(): void
+    {
+        $this->registerCommands();
+        $this->registerCommandSchedules();
+        $this->registerTranslations();
+        $this->registerConfig();
+        $this->registerViews();
+        $this->loadMigrationsFrom(module_path($this->moduleName, 'Database/migrations'));
+    }
+
+    /**
+     * Register the service provider.
+     */
+    public function register(): void
+    {
+        $this->app->register(RouteServiceProvider::class);
+    }
+
+    /**
+     * Register commands in the format of Command::class
+     */
+    protected function registerCommands(): void
+    {
+        // $this->commands([]);
+    }
+
+    /**
+     * Register command Schedules.
+     */
+    protected function registerCommandSchedules(): void
+    {
+        // $this->app->booted(function () {
+        //     $schedule = $this->app->make(Schedule::class);
+        //     $schedule->command('inspire')->hourly();
+        // });
+    }
+
+    /**
+     * Register translations.
+     */
+    public function registerTranslations(): void
+    {
+        $langPath = resource_path('lang/modules/'.$this->moduleNameLower);
+
+        if (is_dir($langPath)) {
+            $this->loadTranslationsFrom($langPath, $this->moduleNameLower);
+            $this->loadJsonTranslationsFrom($langPath);
+        } else {
+            $this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower);
+            $this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang'));
+        }
+    }
+
+    /**
+     * Register config.
+     */
+    protected function registerConfig(): void
+    {
+        $this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower.'.php')], 'config');
+        $this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower);
+    }
+
+    /**
+     * Register views.
+     */
+    public function registerViews(): void
+    {
+        $viewPath = resource_path('views/modules/'.$this->moduleNameLower);
+        $sourcePath = module_path($this->moduleName, 'resources/views');
+
+        $this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower.'-module-views']);
+
+        $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
+
+        $componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.config('modules.paths.generator.component-class.path'));
+        Blade::componentNamespace($componentNamespace, $this->moduleNameLower);
+    }
+
+    /**
+     * Get the services provided by the provider.
+     */
+    public function provides(): array
+    {
+        return [];
+    }
+
+    private function getPublishableViewPaths(): array
+    {
+        $paths = [];
+        foreach (config('view.paths') as $path) {
+            if (is_dir($path.'/modules/'.$this->moduleNameLower)) {
+                $paths[] = $path.'/modules/'.$this->moduleNameLower;
+            }
+        }
+
+        return $paths;
+    }
+}

+ 59 - 0
web/Modules/Microweber/App/Providers/RouteServiceProvider.php

@@ -0,0 +1,59 @@
+<?php
+
+namespace Modules\Microweber\App\Providers;
+
+use Illuminate\Support\Facades\Route;
+use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
+
+class RouteServiceProvider extends ServiceProvider
+{
+    /**
+     * The module namespace to assume when generating URLs to actions.
+     */
+    protected string $moduleNamespace = 'Modules\Microweber\App\Http\Controllers';
+
+    /**
+     * Called before routes are registered.
+     *
+     * Register any model bindings or pattern based filters.
+     */
+    public function boot(): void
+    {
+        parent::boot();
+    }
+
+    /**
+     * Define the routes for the application.
+     */
+    public function map(): void
+    {
+        $this->mapApiRoutes();
+
+        $this->mapWebRoutes();
+    }
+
+    /**
+     * Define the "web" routes for the application.
+     *
+     * These routes all receive session state, CSRF protection, etc.
+     */
+    protected function mapWebRoutes(): void
+    {
+        Route::middleware('web')
+            ->namespace($this->moduleNamespace)
+            ->group(module_path('Microweber', '/routes/web.php'));
+    }
+
+    /**
+     * Define the "api" routes for the application.
+     *
+     * These routes are typically stateless.
+     */
+    protected function mapApiRoutes(): void
+    {
+        Route::prefix('api')
+            ->middleware('api')
+            ->namespace($this->moduleNamespace)
+            ->group(module_path('Microweber', '/routes/api.php'));
+    }
+}

+ 0 - 0
web/Modules/Microweber/Database/Seeders/.gitkeep


+ 16 - 0
web/Modules/Microweber/Database/Seeders/MicroweberDatabaseSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace Modules\Microweber\Database\Seeders;
+
+use Illuminate\Database\Seeder;
+
+class MicroweberDatabaseSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     */
+    public function run(): void
+    {
+        // $this->call([]);
+    }
+}

+ 31 - 0
web/Modules/Microweber/composer.json

@@ -0,0 +1,31 @@
+{
+    "name": "nwidart/microweber",
+    "description": "",
+    "authors": [
+        {
+            "name": "Nicolas Widart",
+            "email": "n.widart@gmail.com"
+        }
+    ],
+    "extra": {
+        "laravel": {
+            "providers": [],
+            "aliases": {
+
+            }
+        }
+    },
+    "autoload": {
+        "psr-4": {
+            "Modules\\Microweber\\": "",
+            "Modules\\Microweber\\App\\": "app/",
+            "Modules\\Microweber\\Database\\Factories\\": "database/factories/",
+            "Modules\\Microweber\\Database\\Seeders\\": "database/seeders/"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "Modules\\Microweber\\Tests\\": "tests/"
+        }
+    }
+}

+ 0 - 0
web/Modules/Microweber/config/.gitkeep


+ 5 - 0
web/Modules/Microweber/config/config.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+    'name' => 'Microweber',
+];

+ 11 - 0
web/Modules/Microweber/module.json

@@ -0,0 +1,11 @@
+{
+    "name": "Microweber",
+    "alias": "microweber",
+    "description": "",
+    "keywords": [],
+    "priority": 0,
+    "providers": [
+        "Modules\\Microweber\\App\\Providers\\MicroweberServiceProvider"
+    ],
+    "files": []
+}

+ 15 - 0
web/Modules/Microweber/package.json

@@ -0,0 +1,15 @@
+{
+  "private": true,
+  "type": "module",
+  "scripts": {
+    "dev": "vite",
+    "build": "vite build"
+  },
+  "devDependencies": {
+    "axios": "^1.1.2",
+    "laravel-vite-plugin": "^0.7.5",
+    "sass": "^1.69.5",
+    "postcss": "^8.3.7",
+    "vite": "^4.0.0"
+  }
+}

+ 0 - 0
web/Modules/Microweber/resources/assets/js/app.js


+ 0 - 0
web/Modules/Microweber/resources/assets/sass/app.scss


+ 0 - 0
web/Modules/Microweber/resources/views/.gitkeep


+ 7 - 0
web/Modules/Microweber/resources/views/index.blade.php

@@ -0,0 +1,7 @@
+@extends('microweber::layouts.master')
+
+@section('content')
+    <h1>Hello World</h1>
+
+    <p>Module: {!! config('microweber.name') !!}</p>
+@endsection

+ 29 - 0
web/Modules/Microweber/resources/views/layouts/master.blade.php

@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="csrf-token" content="{{ csrf_token() }}">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+
+    <title>Microweber Module - {{ config('app.name', 'Laravel') }}</title>
+
+    <meta name="description" content="{{ $description ?? '' }}">
+    <meta name="keywords" content="{{ $keywords ?? '' }}">
+    <meta name="author" content="{{ $author ?? '' }}">
+
+    <!-- Fonts -->
+    <link rel="preconnect" href="https://fonts.bunny.net">
+    <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
+
+    {{-- Vite CSS --}}
+    {{-- {{ module_vite('build-microweber', 'resources/assets/sass/app.scss') }} --}}
+</head>
+
+<body>
+    @yield('content')
+
+    {{-- Vite JS --}}
+    {{-- {{ module_vite('build-microweber', 'resources/assets/js/app.js') }} --}}
+</body>

+ 0 - 0
web/Modules/Microweber/routes/.gitkeep


+ 19 - 0
web/Modules/Microweber/routes/api.php

@@ -0,0 +1,19 @@
+<?php
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Route;
+
+/*
+    |--------------------------------------------------------------------------
+    | API Routes
+    |--------------------------------------------------------------------------
+    |
+    | Here is where you can register API routes for your application. These
+    | routes are loaded by the RouteServiceProvider within a group which
+    | is assigned the "api" middleware group. Enjoy building your API!
+    |
+*/
+
+Route::middleware(['auth:sanctum'])->prefix('v1')->name('api.')->group(function () {
+    Route::get('microweber', fn (Request $request) => $request->user())->name('microweber');
+});

+ 19 - 0
web/Modules/Microweber/routes/web.php

@@ -0,0 +1,19 @@
+<?php
+
+use Illuminate\Support\Facades\Route;
+use Modules\Microweber\App\Http\Controllers\MicroweberController;
+
+/*
+|--------------------------------------------------------------------------
+| Web Routes
+|--------------------------------------------------------------------------
+|
+| Here is where you can register web routes for your application. These
+| routes are loaded by the RouteServiceProvider within a group which
+| contains the "web" middleware group. Now create something great!
+|
+*/
+
+Route::group([], function () {
+    Route::resource('microweber', MicroweberController::class)->names('microweber');
+});

+ 26 - 0
web/Modules/Microweber/vite.config.js

@@ -0,0 +1,26 @@
+import { defineConfig } from 'vite';
+import laravel from 'laravel-vite-plugin';
+
+export default defineConfig({
+    build: {
+        outDir: '../../public/build-microweber',
+        emptyOutDir: true,
+        manifest: true,
+    },
+    plugins: [
+        laravel({
+            publicDirectory: '../../public',
+            buildDirectory: 'build-microweber',
+            input: [
+                __dirname + '/resources/assets/sass/app.scss',
+                __dirname + '/resources/assets/js/app.js'
+            ],
+            refresh: true,
+        }),
+    ],
+});
+
+//export const paths = [
+//    'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss',
+//    'Modules/$STUDLY_NAME$/resources/assets/js/app.js',
+//];

+ 1 - 1
web/acme-php-test.sh

@@ -1,4 +1,4 @@
-PHYRE_PHP=php
+PHYRE_PHP=/usr/local/phyre/php/bin/php
 
 $PHYRE_PHP -r "copy('https://github.com/acmephp/acmephp/releases/download/1.0.1/acmephp.phar', 'acmephp.phar');"
 $PHYRE_PHP -r "copy('https://github.com/acmephp/acmephp/releases/download/1.0.1/acmephp.phar.pubkey', 'acmephp.phar.pubkey');"

+ 0 - 8
web/app/Modules/Microweber/Installers/MicroweberWebsiteInstaller.php

@@ -1,8 +0,0 @@
-<?php
-
-namespace App\Modules\Microweber\Installers;
-
-class MicroweberWebsiteInstaller
-{
-
-}

+ 0 - 18
web/app/Modules/Microweber/MicroweberServiceProvider.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace App\Modules\Microweber;
-
-use Illuminate\Support\ServiceProvider;
-
-class MicroweberServiceProvider extends ServiceProvider
-{
-    public function boot()
-    {
-
-    }
-
-    public function register()
-    {
-
-    }
-}

+ 13 - 4
web/composer.json

@@ -11,13 +11,16 @@
         "php": "^8.1",
         "acmephp/core": "*",
         "calebporzio/sushi": "^2.4",
-        "filament/filament": "^3.0-stable",
+        "coolsam/modules": "^3.0@beta",
+        "filament/filament": "^3.0",
         "guzzlehttp/guzzle": "^7.2",
         "laravel/framework": "^10.10",
         "laravel/sanctum": "^3.3",
         "laravel/tinker": "^2.8",
         "mkocansey/bladewind": "^2.4",
-        "symfony/process": "^6.3"
+        "nwidart/laravel-modules": "^10.0",
+        "symfony/process": "^6.3",
+        "wikimedia/composer-merge-plugin": "^2.1"
     },
     "require-dev": {
         "fakerphp/faker": "^1.9.1",
@@ -59,6 +62,11 @@
     "extra": {
         "laravel": {
             "dont-discover": []
+        },
+        "merge-plugin": {
+            "include": [
+                "Modules/*/composer.json"
+            ]
         }
     },
     "config": {
@@ -67,9 +75,10 @@
         "sort-packages": true,
         "allow-plugins": {
             "pestphp/pest-plugin": true,
-            "php-http/discovery": true
+            "php-http/discovery": true,
+            "wikimedia/composer-merge-plugin": true
         }
     },
-    "minimum-stability": "stable",
+    "minimum-stability": "dev",
     "prefer-stable": true
 }

+ 262 - 48
web/composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "86c4eb85802ad24dd9ef0bcc55a79f51",
+    "content-hash": "91465f398b2f15e47d8ac1fb10247588",
     "packages": [
         {
             "name": "acmephp/core",
@@ -526,6 +526,76 @@
             ],
             "time": "2023-12-11T17:09:12+00:00"
         },
+        {
+            "name": "coolsam/modules",
+            "version": "v3.0.0-beta.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/savannabits/filament-modules.git",
+                "reference": "740b5f108ea50f4f6dbfae5ac1809a5afa973676"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/savannabits/filament-modules/zipball/740b5f108ea50f4f6dbfae5ac1809a5afa973676",
+                "reference": "740b5f108ea50f4f6dbfae5ac1809a5afa973676",
+                "shasum": ""
+            },
+            "require": {
+                "filament/filament": "^3.0.0-beta",
+                "illuminate/contracts": "^9.1|^10.0",
+                "nwidart/laravel-modules": "^10.0",
+                "php": "^8.1",
+                "spatie/laravel-package-tools": "^1.14.0"
+            },
+            "require-dev": {
+                "laravel/pint": "^1.0",
+                "nunomaduro/collision": "^7.9",
+                "orchestra/testbench": "^8.0",
+                "pestphp/pest": "^2.0",
+                "pestphp/pest-plugin-arch": "^2.0",
+                "pestphp/pest-plugin-laravel": "^2.0",
+                "spatie/laravel-ray": "^1.26"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Coolsam\\FilamentModules\\ModulesServiceProvider"
+                    ],
+                    "aliases": {
+                        "Modules": "Coolsam\\FilamentModules\\Facades\\Modules"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Coolsam\\FilamentModules\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Sam Maosa",
+                    "email": "smaosa@savannabits.com",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Support for nwidart/laravel-modules in filamentphp",
+            "homepage": "https://github.com/coolsam/modules",
+            "keywords": [
+                "coolsam",
+                "laravel",
+                "modules"
+            ],
+            "support": {
+                "issues": "https://github.com/savannabits/filament-modules/issues",
+                "source": "https://github.com/savannabits/filament-modules/tree/v3.0.0-beta.3"
+            },
+            "time": "2023-07-31T08:20:09+00:00"
+        },
         {
             "name": "danharrin/date-format-converter",
             "version": "v0.3.0",
@@ -1348,16 +1418,16 @@
         },
         {
             "name": "filament/actions",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/actions.git",
-                "reference": "95c8842023399cdf2508a86c2af3db579b125cc7"
+                "reference": "1a177564e1f707315ac9aee7cc4d345fbc1ea37e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/actions/zipball/95c8842023399cdf2508a86c2af3db579b125cc7",
-                "reference": "95c8842023399cdf2508a86c2af3db579b125cc7",
+                "url": "https://api.github.com/repos/filamentphp/actions/zipball/1a177564e1f707315ac9aee7cc4d345fbc1ea37e",
+                "reference": "1a177564e1f707315ac9aee7cc4d345fbc1ea37e",
                 "shasum": ""
             },
             "require": {
@@ -1397,20 +1467,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:36:15+00:00"
+            "time": "2024-04-01T18:41:00+00:00"
         },
         {
             "name": "filament/filament",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/panels.git",
-                "reference": "6aa99147005785e0528e9eca77ee029c7c57d620"
+                "reference": "2dba8d47a87f9fadb65fb6422e813bcb845e60fc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/panels/zipball/6aa99147005785e0528e9eca77ee029c7c57d620",
-                "reference": "6aa99147005785e0528e9eca77ee029c7c57d620",
+                "url": "https://api.github.com/repos/filamentphp/panels/zipball/2dba8d47a87f9fadb65fb6422e813bcb845e60fc",
+                "reference": "2dba8d47a87f9fadb65fb6422e813bcb845e60fc",
                 "shasum": ""
             },
             "require": {
@@ -1462,20 +1532,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:36:01+00:00"
+            "time": "2024-04-01T18:41:06+00:00"
         },
         {
             "name": "filament/forms",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/forms.git",
-                "reference": "1237e83354fd28a1a4cf5d6585f57adc56954e6c"
+                "reference": "25a1f9b93f27865608e727c47d677ce0b44ad043"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/forms/zipball/1237e83354fd28a1a4cf5d6585f57adc56954e6c",
-                "reference": "1237e83354fd28a1a4cf5d6585f57adc56954e6c",
+                "url": "https://api.github.com/repos/filamentphp/forms/zipball/25a1f9b93f27865608e727c47d677ce0b44ad043",
+                "reference": "25a1f9b93f27865608e727c47d677ce0b44ad043",
                 "shasum": ""
             },
             "require": {
@@ -1518,20 +1588,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:35:57+00:00"
+            "time": "2024-04-01T18:40:59+00:00"
         },
         {
             "name": "filament/infolists",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/infolists.git",
-                "reference": "aa2f266ce113b13cf24e8752970bed9d2fb62b4f"
+                "reference": "cf5a23020b219bd5e3d930c24e9b380a004206c8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/infolists/zipball/aa2f266ce113b13cf24e8752970bed9d2fb62b4f",
-                "reference": "aa2f266ce113b13cf24e8752970bed9d2fb62b4f",
+                "url": "https://api.github.com/repos/filamentphp/infolists/zipball/cf5a23020b219bd5e3d930c24e9b380a004206c8",
+                "reference": "cf5a23020b219bd5e3d930c24e9b380a004206c8",
                 "shasum": ""
             },
             "require": {
@@ -1569,20 +1639,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:36:20+00:00"
+            "time": "2024-04-01T18:41:04+00:00"
         },
         {
             "name": "filament/notifications",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/notifications.git",
-                "reference": "069a37c9f260918741fd80167859d7578ea18887"
+                "reference": "0739152934bd238b838e1abd1d3c9b037f9e6da3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/notifications/zipball/069a37c9f260918741fd80167859d7578ea18887",
-                "reference": "069a37c9f260918741fd80167859d7578ea18887",
+                "url": "https://api.github.com/repos/filamentphp/notifications/zipball/0739152934bd238b838e1abd1d3c9b037f9e6da3",
+                "reference": "0739152934bd238b838e1abd1d3c9b037f9e6da3",
                 "shasum": ""
             },
             "require": {
@@ -1621,20 +1691,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:36:01+00:00"
+            "time": "2024-04-01T18:40:59+00:00"
         },
         {
             "name": "filament/support",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/support.git",
-                "reference": "6f7f6fe72f8c206bd28297fbf41f863358c95c07"
+                "reference": "7b156b35791a7ff990621ec59fc8ec8cfdbb0782"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/support/zipball/6f7f6fe72f8c206bd28297fbf41f863358c95c07",
-                "reference": "6f7f6fe72f8c206bd28297fbf41f863358c95c07",
+                "url": "https://api.github.com/repos/filamentphp/support/zipball/7b156b35791a7ff990621ec59fc8ec8cfdbb0782",
+                "reference": "7b156b35791a7ff990621ec59fc8ec8cfdbb0782",
                 "shasum": ""
             },
             "require": {
@@ -1650,6 +1720,7 @@
                 "spatie/color": "^1.5",
                 "spatie/invade": "^1.0|^2.0",
                 "spatie/laravel-package-tools": "^1.9",
+                "symfony/console": "^6.0|^7.0",
                 "symfony/html-sanitizer": "^6.1|^7.0"
             },
             "type": "library",
@@ -1678,20 +1749,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:36:25+00:00"
+            "time": "2024-04-01T18:41:17+00:00"
         },
         {
             "name": "filament/tables",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/tables.git",
-                "reference": "38e01c5d5e841d36365d2acf581ed60095b0f768"
+                "reference": "38bf31ffed24ca98647879eb99bdb1efc788b4ec"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/tables/zipball/38e01c5d5e841d36365d2acf581ed60095b0f768",
-                "reference": "38e01c5d5e841d36365d2acf581ed60095b0f768",
+                "url": "https://api.github.com/repos/filamentphp/tables/zipball/38bf31ffed24ca98647879eb99bdb1efc788b4ec",
+                "reference": "38bf31ffed24ca98647879eb99bdb1efc788b4ec",
                 "shasum": ""
             },
             "require": {
@@ -1731,20 +1802,20 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-27T12:36:41+00:00"
+            "time": "2024-04-01T18:41:19+00:00"
         },
         {
             "name": "filament/widgets",
-            "version": "v3.2.61",
+            "version": "v3.2.62",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filamentphp/widgets.git",
-                "reference": "38a011b9a556a2786028eb80aa135e171569d2af"
+                "reference": "23c69ba79ba9f39429e48327676db3117585a5f8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filamentphp/widgets/zipball/38a011b9a556a2786028eb80aa135e171569d2af",
-                "reference": "38a011b9a556a2786028eb80aa135e171569d2af",
+                "url": "https://api.github.com/repos/filamentphp/widgets/zipball/23c69ba79ba9f39429e48327676db3117585a5f8",
+                "reference": "23c69ba79ba9f39429e48327676db3117585a5f8",
                 "shasum": ""
             },
             "require": {
@@ -1775,7 +1846,7 @@
                 "issues": "https://github.com/filamentphp/filament/issues",
                 "source": "https://github.com/filamentphp/filament"
             },
-            "time": "2024-03-14T10:54:33+00:00"
+            "time": "2024-04-01T18:41:27+00:00"
         },
         {
             "name": "fruitcake/php-cors",
@@ -4328,6 +4399,91 @@
             ],
             "time": "2023-02-08T01:06:31+00:00"
         },
+        {
+            "name": "nwidart/laravel-modules",
+            "version": "10.0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/nWidart/laravel-modules.git",
+                "reference": "a6f2c8b53ae7945ef41d296735e963cee885ebde"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/a6f2c8b53ae7945ef41d296735e963cee885ebde",
+                "reference": "a6f2c8b53ae7945ef41d296735e963cee885ebde",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "php": ">=8.1"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^3.6",
+                "laravel/framework": "^10.41",
+                "mockery/mockery": "^1.5",
+                "orchestra/testbench": "^8.0",
+                "phpstan/phpstan": "^1.4",
+                "phpunit/phpunit": "^10.0",
+                "spatie/phpunit-snapshot-assertions": "^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Nwidart\\Modules\\LaravelModulesServiceProvider"
+                    ],
+                    "aliases": {
+                        "Module": "Nwidart\\Modules\\Facades\\Module"
+                    }
+                },
+                "branch-alias": {
+                    "dev-master": "10.0-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/helpers.php"
+                ],
+                "psr-4": {
+                    "Nwidart\\Modules\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Widart",
+                    "email": "n.widart@gmail.com",
+                    "homepage": "https://nicolaswidart.com",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Laravel Module management",
+            "keywords": [
+                "laravel",
+                "module",
+                "modules",
+                "nwidart",
+                "rad"
+            ],
+            "support": {
+                "issues": "https://github.com/nWidart/laravel-modules/issues",
+                "source": "https://github.com/nWidart/laravel-modules/tree/10.0.6"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/dcblogdev",
+                    "type": "github"
+                },
+                {
+                    "url": "https://github.com/nwidart",
+                    "type": "github"
+                }
+            ],
+            "time": "2024-01-28T10:04:15+00:00"
+        },
         {
             "name": "openspout/openspout",
             "version": "v4.23.0",
@@ -8084,6 +8240,62 @@
                 "source": "https://github.com/webmozarts/assert/tree/1.11.0"
             },
             "time": "2022-06-03T18:03:27+00:00"
+        },
+        {
+            "name": "wikimedia/composer-merge-plugin",
+            "version": "v2.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/wikimedia/composer-merge-plugin.git",
+                "reference": "a03d426c8e9fb2c9c569d9deeb31a083292788bc"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/a03d426c8e9fb2c9c569d9deeb31a083292788bc",
+                "reference": "a03d426c8e9fb2c9c569d9deeb31a083292788bc",
+                "shasum": ""
+            },
+            "require": {
+                "composer-plugin-api": "^1.1||^2.0",
+                "php": ">=7.2.0"
+            },
+            "require-dev": {
+                "composer/composer": "^1.1||^2.0",
+                "ext-json": "*",
+                "mediawiki/mediawiki-phan-config": "0.11.1",
+                "php-parallel-lint/php-parallel-lint": "~1.3.1",
+                "phpspec/prophecy": "~1.15.0",
+                "phpunit/phpunit": "^8.5||^9.0",
+                "squizlabs/php_codesniffer": "~3.7.1"
+            },
+            "type": "composer-plugin",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev"
+                },
+                "class": "Wikimedia\\Composer\\Merge\\V2\\MergePlugin"
+            },
+            "autoload": {
+                "psr-4": {
+                    "Wikimedia\\Composer\\Merge\\V2\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bryan Davis",
+                    "email": "bd808@wikimedia.org"
+                }
+            ],
+            "description": "Composer plugin to merge multiple composer.json files",
+            "support": {
+                "issues": "https://github.com/wikimedia/composer-merge-plugin/issues",
+                "source": "https://github.com/wikimedia/composer-merge-plugin/tree/v2.1.0"
+            },
+            "time": "2023-04-15T19:07:00+00:00"
         }
     ],
     "packages-dev": [
@@ -10311,16 +10523,16 @@
         },
         {
             "name": "spatie/laravel-ignition",
-            "version": "2.5.0",
+            "version": "2.5.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/spatie/laravel-ignition.git",
-                "reference": "e23f4e8ce6644dc3d68b9d8a0aed3beaca0d6ada"
+                "reference": "0c864b3cbd66ce67a2096c5f743e07ce8f1d6ab9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/e23f4e8ce6644dc3d68b9d8a0aed3beaca0d6ada",
-                "reference": "e23f4e8ce6644dc3d68b9d8a0aed3beaca0d6ada",
+                "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/0c864b3cbd66ce67a2096c5f743e07ce8f1d6ab9",
+                "reference": "0c864b3cbd66ce67a2096c5f743e07ce8f1d6ab9",
                 "shasum": ""
             },
             "require": {
@@ -10399,7 +10611,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2024-03-29T14:14:55+00:00"
+            "time": "2024-04-02T06:30:22+00:00"
         },
         {
             "name": "symfony/yaml",
@@ -10524,8 +10736,10 @@
         }
     ],
     "aliases": [],
-    "minimum-stability": "stable",
-    "stability-flags": [],
+    "minimum-stability": "dev",
+    "stability-flags": {
+        "coolsam/modules": 10
+    },
     "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {

+ 4 - 0
web/modules_statuses.json

@@ -0,0 +1,4 @@
+{
+    "LetsEncrypt": true,
+    "Microweber": true
+}

File diff suppressed because it is too large
+ 0 - 0
web/public/css/filament/filament/app.css


File diff suppressed because it is too large
+ 0 - 0
web/public/css/filament/forms/forms.css


File diff suppressed because it is too large
+ 0 - 0
web/public/css/filament/support/support.css


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/filament/app.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/filament/echo.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/forms/components/color-picker.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/forms/components/file-upload.js


+ 1 - 1
web/public/js/filament/forms/components/key-value.js

@@ -1 +1 @@
-function r({state:i}){return{state:i,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0&&this.addRow(),this.updateState(),this.$watch("state",(t,e)=>{let s=o=>o===null?0:Array.isArray(o)?o.length:typeof o!="object"?0:Object.keys(o).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows),s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.rows=e,this.updateState()},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default};
+function r({state:i}){return{state:i,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(t,e)=>{let s=o=>o===null?0:Array.isArray(o)?o.length:typeof o!="object"?0:Object.keys(o).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows),s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.rows=e,this.updateState()},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default};

File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/forms/components/markdown-editor.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/forms/components/select.js


+ 1 - 1
web/public/js/filament/forms/components/tags-input.js

@@ -1 +1 @@
-function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
+function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};

File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/notifications/notifications.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/support/async-alpine.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/support/support.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/tables/components/table.js


File diff suppressed because it is too large
+ 0 - 0
web/public/js/filament/widgets/components/chart.js


+ 1 - 0
web/routes/api.php

@@ -17,3 +17,4 @@ use Illuminate\Support\Facades\Route;
 Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
     return $request->user();
 });
+

+ 0 - 137
web/routes/web.php

@@ -36,140 +36,3 @@ Route::get('/', function () {
     return view('welcome');
 
 });
-
-
-Route::get('/testx', function () {
-
-    $storagePath = storage_path('ssl-keys-cache');
-    if (!file_exists($storagePath)) {
-        mkdir($storagePath, 0755, true);
-    }
-
-    $publicKeyPath = $storagePath . '/public-account.pub.pem';
-    $privateKeyPath = $storagePath . '/private-account.pem';
-
-    if (!file_exists($privateKeyPath)) {
-        $keyPairGenerator = new KeyPairGenerator();
-        $keyPair = $keyPairGenerator->generateKeyPair();
-
-        file_put_contents($publicKeyPath, $keyPair->getPublicKey()->getPEM());
-        file_put_contents($privateKeyPath, $keyPair->getPrivateKey()->getPEM());
-    } else {
-        $publicKey = new PublicKey(file_get_contents($publicKeyPath));
-        $privateKey = new PrivateKey(file_get_contents($privateKeyPath));
-
-        $keyPair = new KeyPair($publicKey, $privateKey);
-    }
-
-    $secureHttpClientFactory = new SecureHttpClientFactory(
-        new GuzzleHttpClient(),
-        new Base64SafeEncoder(),
-        new KeyParser(),
-        new DataSigner(),
-        new ServerErrorHandler()
-    );
-
-// $accountKeyPair instance of KeyPair
-    $secureHttpClient = $secureHttpClientFactory->createSecureHttpClient($keyPair);
-
-    $acmeClient = new AcmeClient($secureHttpClient, 'https://acme-staging-v02.api.letsencrypt.org/directory');
-    //$regAccount = $acmeClient->registerAccount('bobi@microweber.com');
-
-    //$authorizationChallenges = $acmeClient->requestAuthorization('basi-qkoto.test.multiweber.com');
-
-//
-//    -domain: "basi-qkoto.test.multiweber.com"
-//    -status: "pending"
-//    -type: "http-01"
-//    -url: "https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/11864378814/9FukXQ"
-//    -token: "XzOcwy8qddkoewJ-4r4N0NYDyc04WcYAVVOQL_1RxAg"
-//    -payload: "XzOcwy8qddkoewJ-4r4N0NYDyc04WcYAVVOQL_1RxAg.3m75GPL4YOUq0AfwzgzbRQfGWS2vqiVOyQtF4RmedHQ"
-
-//    $authorizationChallenge = \AcmePhp\Core\Protocol\AuthorizationChallenge::fromArray([
-//        'domain' => 'basi-qkoto.test.multiweber.com',
-//        'status' => 'pending',
-//        'type' => 'http-01',
-//        'url' => 'https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/11864378814/9FukXQ',
-//        'token' => 'XzOcwy8qddkoewJ-4r4N0NYDyc04WcYAVVOQL_1RxAg',
-//        'payload' => 'XzOcwy8qddkoewJ-4r4N0NYDyc04WcYAVVOQL_1RxAg.3m75GPL4YOUq0AfwzgzbRQfGWS2vqiVOyQtF4RmedHQ'
-//    ]);
-//
-//    $check = $acmeClient->challengeAuthorization($authorizationChallenge);
-
-
-
-
-    $dn = new \AcmePhp\Ssl\DistinguishedName('basi-qkoto.test.multiweber.com');
-
-    $keyPairGenerator = new KeyPairGenerator();
-
-// Make a new key pair. We'll keep the private key as our cert key
-    $domainKeyPair = $keyPairGenerator->generateKeyPair();
-
-// This is the private key
-
-    $storagePath = storage_path('ssl-keys-domain-test');
-    if (!file_exists($storagePath)) {
-        mkdir($storagePath, 0755, true);
-    }
-
-    $publicKeyPath = $storagePath . '/glavno-public-key.pem';
-    $privateKeyPath = $storagePath . '/glavno-private-key.pem';
-
-
-    file_put_contents($publicKeyPath, $domainKeyPair->getPublicKey()->getPEM());
-    file_put_contents($privateKeyPath, $domainKeyPair->getPrivateKey()->getPEM());
-
-
-// Generate CSR
-    $csr = new \AcmePhp\Ssl\CertificateRequest($dn, $domainKeyPair);
-
-    $certificateResponse = $acmeClient->requestCertificate('basi-qkoto.test.multiweber.com', $csr);
-
-    $certKeyPublicPath = $storagePath . '/cert.pem';
-    $certKeyPrivatePath = $storagePath . '/cert-key.private.pem';
-    $certFullChainPath = $storagePath . '/cert-fullchain.pem';
-
-
-    file_put_contents($certKeyPrivatePath, $certificateResponse->getCertificate()->getPEM());
-    file_put_contents($certKeyPublicPath, $certificateResponse->getCertificate()->getPublicKey()->getPEM());
-    file_put_contents($certFullChainPath, $certificateResponse->getCertificate()->getIssuerCertificate()->getPEM());
-
-
-    dd($certificateResponse->getCertificate());
-
-    //sudo apachectl configtest
-});
-
-
-// sudo apt-get remove nginx nginx-full nginx-common nginx-light nginx-extras nginx-core
-
-
-//
-//<VirtualHost *:443>
-//    ServerName basi-qkoto.test.multiweber.com
-//    DocumentRoot /var/www/basi-qkoto.test.multiweber.com
-//    SSLEngine on
-//
-//    SSLCertificateFile      /home/basi-qkoto/.acmephp/master/certs/basi-qkoto.test.multiweber.com/public/cert.pem
-//    SSLCertificateKeyFile   /home/basi-qkoto/.acmephp/master/certs/basi-qkoto.test.multiweber.com/private/key.private.pem
-//
-//    # enable HTTP/2, if available
-//    Protocols h2 http/1.1
-//
-//    # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
-//    Header always set Strict-Transport-Security "max-age=63072000"
-//</VirtualHost>
-//
-//# modern configuration
-//SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2
-//SSLHonorCipherOrder     off
-//SSLSessionTickets       off
-//
-//SSLUseStapling On
-//SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"
-//
-//
-
-
-

Some files were not shown because too many files changed in this diff