first commit

main
boban 2025-09-28 11:18:07 +02:00
commit d433c940d3
106 changed files with 18891 additions and 0 deletions

61
README.md Normal file
View File

@ -0,0 +1,61 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
### Premium Partners
- **[Vehikl](https://vehikl.com)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Redberry](https://redberry.international/laravel-development)**
- **[Active Logic](https://activelogic.com)**
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

View File

@ -0,0 +1,147 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class ProvisionCert extends Command
{
protected $signature = 'mailwolt:provision-cert
{domain : z.B. mail.example.com}
{--email= : E-Mail für Let\'s Encrypt}
{--self-signed : Statt LE ein self-signed Zertifikat erzeugen}';
protected $description = 'Beschafft ein Zertifikat (LE oder self-signed) und setzt Nginx darauf.';
private string $sslDir = '/etc/mailwolt/ssl';
private string $certPath;
private string $keyPath;
public function handle(): int
{
$domain = $this->argument('domain');
$email = (string)$this->option('email');
$self = (bool)$this->option('self-signed');
$this->certPath = "{$this->sslDir}/cert.pem";
$this->keyPath = "{$this->sslDir}/key.pem";
if (!is_dir($this->sslDir)) {
@mkdir($this->sslDir, 0750, true);
@chgrp($this->sslDir, 'www-data');
}
if ($self) {
return $this->issueSelfSigned($domain);
}
// Versuche Let's Encrypt bei Fehler fallback self-signed
$rc = $this->issueLetsEncrypt($domain, $email);
if ($rc !== 0) {
$this->warn('Lets Encrypt fehlgeschlagen erstelle Self-Signed als Fallback…');
return $this->issueSelfSigned($domain);
}
return $rc;
}
private function issueLetsEncrypt(string $domain, string $email): int
{
if (empty($email)) {
$this->error('Für Lets Encrypt ist --email erforderlich.');
return 2;
}
// Webroot sicherstellen (Nginx-Standort ist im Installer bereits konfiguriert)
@mkdir('/var/www/letsencrypt', 0755, true);
$cmd = [
'bash','-lc',
// non-interactive, webroot challenge
"certbot certonly --webroot -w /var/www/letsencrypt -d {$domain} ".
"--email ".escapeshellarg($email)." --agree-tos --no-eff-email --non-interactive --rsa-key-size 2048"
];
$p = new Process($cmd, null, ['PATH' => getenv('PATH') ?: '/usr/bin:/bin']);
$p->setTimeout(600);
$p->run(function($type,$buff){ $this->output->write($buff); });
if (!$p->isSuccessful()) {
$this->error('Certbot-Fehler.');
return 1;
}
// Pfade vom Certbot-Store
$leBase = "/etc/letsencrypt/live/{$domain}";
$fullchain = "{$leBase}/fullchain.pem";
$privkey = "{$leBase}/privkey.pem";
if (!is_file($fullchain) || !is_file($privkey)) {
$this->error("LE-Dateien fehlen unter {$leBase}");
return 1;
}
// In unsere Standard-Pfade kopieren (Nginx zeigt bereits darauf)
if (!@copy($fullchain, $this->certPath) || !@copy($privkey, $this->keyPath)) {
$this->error('Konnte Zertifikate nicht in /etc/mailwolt/ssl kopieren.');
return 1;
}
@chown($this->certPath, 'root'); @chgrp($this->certPath, 'www-data'); @chmod($this->certPath, 0640);
@chown($this->keyPath, 'root'); @chgrp($this->keyPath, 'www-data'); @chmod($this->keyPath, 0640);
// Nginx reload
$reload = new Process(['bash','-lc','systemctl reload nginx']);
$reload->run();
$this->info('Lets Encrypt Zertifikat gesetzt und Nginx neu geladen.');
return 0;
}
private function issueSelfSigned(string $domain): int
{
$cfgPath = "{$this->sslDir}/openssl.cnf";
$cfg = <<<CFG
[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[dn]
CN = {$domain}
O = MailWolt
C = DE
[req_ext]
subjectAltName = @alt_names
[alt_names]
DNS.1 = {$domain}
CFG;
@file_put_contents($cfgPath, $cfg);
$cmd = [
'bash','-lc',
"openssl req -x509 -newkey rsa:2048 -days 825 -nodes -keyout {$this->keyPath} -out {$this->certPath} -config {$cfgPath}"
];
$p = new Process($cmd);
$p->setTimeout(60);
$p->run(function($t,$b){ $this->output->write($b); });
if (!$p->isSuccessful()) {
$this->error('Self-Signed Erstellung fehlgeschlagen.');
return 1;
}
@chown($this->certPath, 'root'); @chgrp($this->certPath, 'www-data'); @chmod($this->certPath, 0640);
@chown($this->keyPath, 'root'); @chgrp($this->keyPath, 'www-data'); @chmod($this->keyPath, 0640);
@chmod($this->sslDir, 0750);
$reload = new Process(['bash','-lc','systemctl reload nginx']);
$reload->run();
$this->info('Self-Signed Zertifikat erstellt und Nginx neu geladen.');
return 0;
}
}

7
app/Helpers/helpers.php Normal file
View File

@ -0,0 +1,7 @@
<?php
if (! function_exists('settings')) {
function settings(string $key, $default = null) {
return app(\App\Support\SettingsRepository::class)->get($key, $default);
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class LoginPageController extends Controller
{
public function show()
{
return view('auth.login'); // enthält @livewire('login-form')
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers\Setup;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SetupWizard extends Controller
{
public function show()
{
return view('setup.setup-wizard');
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Middleware;
use App\Models\Setting;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class EnsureSetupCompleted
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
// falls nicht eingeloggt oder bereits Setup, normal weiter
if (!auth()->check()) return $next($request);
$done = Setting::get('setup_completed', '0') === '1';
if (!$done && !$request->is('setup*')) {
return redirect()->to('/setup');
}
return $next($request);
}
}

View File

@ -0,0 +1,130 @@
<?php
namespace App\Jobs;
use App\Models\SystemTask;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Cache;
class ProvisionCertJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(
public string $domain,
public ?string $email,
public string $taskKey,
public bool $useLetsEncrypt // true => LE, false => self-signed
) {}
/** NEU: DB→Redis spiegeln (fehler-tolerant) */
private function syncCache(SystemTask $task, int $ttlMinutes = 30): void
{
try {
Cache::store('redis')->put($task->key, [
'type' => $task->type,
'status' => $task->status,
'message' => $task->message,
'payload' => $task->payload ?? ['domain' => $this->domain],
], now()->addMinutes($ttlMinutes));
} catch (\Throwable $e) {
// Redis down? Ignorieren der Banner würde dann einfach nichts finden.
}
}
public function handle(): void
{
$task = SystemTask::where('key', $this->taskKey)->first();
if (!$task) return;
// running
$task->update(['status' => 'running', 'message' => 'Starte Zertifikat-Provisionierung…']);
$this->syncCache($task);
if ($this->useLetsEncrypt) {
$task->update(['message' => 'Lets Encrypt wird ausgeführt…']);
$this->syncCache($task);
$exit = Artisan::call('mailwolt:provision-cert', [
'domain' => $this->domain,
'--email' => $this->email ?? '',
]);
if ($exit !== 0) {
$out = trim(Artisan::output());
$task->update(['message' => 'LE fehlgeschlagen: '.($out ?: 'Unbekannter Fehler Fallback auf Self-Signed…')]);
$this->syncCache($task);
// Fallback: Self-Signed
$exit = Artisan::call('mailwolt:provision-cert', [
'domain' => $this->domain,
'--self-signed' => true,
]);
}
} else {
$task->update(['message' => 'Self-Signed wird erstellt…']);
$this->syncCache($task);
$exit = Artisan::call('mailwolt:provision-cert', [
'domain' => $this->domain,
'--self-signed' => true,
]);
}
$out = trim(Artisan::output());
if ($exit === 0) {
$task->update(['status' => 'done', 'message' => 'Zertifikat aktiv. '.$out]);
$this->syncCache($task, 10);
} else {
$task->update(['status' => 'failed', 'message' => $out ?: 'Zertifikatserstellung fehlgeschlagen.']);
$this->syncCache($task, 30);
}
}
// public function handle(): void
// {
// $task = SystemTask::where('key', $this->taskKey)->first();
// if (!$task) return;
//
// $task->update(['status' => 'running', 'message' => 'Starte Zertifikat-Provisionierung…']);
//
// if ($this->useLetsEncrypt) {
// $task->update(['message' => 'Lets Encrypt wird ausgeführt…']);
// $exit = Artisan::call('mailwolt:provision-cert', [
// 'domain' => $this->domain,
// '--email' => $this->email ?? '',
// ]);
//
// if ($exit !== 0) {
// $out = trim(Artisan::output());
// $task->update(['message' => 'LE fehlgeschlagen: '.($out ?: 'Unbekannter Fehler Fallback auf Self-Signed…')]);
//
// // Fallback: Self-Signed
// $exit = Artisan::call('mailwolt:provision-cert', [
// 'domain' => $this->domain,
// '--self-signed' => true,
// ]);
// }
// } else {
// $task->update(['message' => 'Self-Signed wird erstellt…']);
// $exit = Artisan::call('mailwolt:provision-cert', [
// 'domain' => $this->domain,
// '--self-signed' => true,
// ]);
// }
//
// $out = trim(Artisan::output());
// if ($exit === 0) {
// $task->update(['status' => 'done', 'message' => 'Zertifikat aktiv. '.$out]);
// } else {
// $task->update(['status' => 'failed', 'message' => $out ?: 'Zertifikatserstellung fehlgeschlagen.']);
// }
// }
}

View File

@ -0,0 +1,40 @@
<?php
namespace App\Livewire\Auth;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Livewire\Component;
class LoginForm extends Component
{
public string $name = '';
public string $password = '';
public ?string $error = null;
public function login()
{
$this->resetErrorBag();
$this->error = null;
$this->validate([
'name' => 'required|string|min:2',
'password' => 'required|string|min:4',
]);
$field = filter_var($this->name, FILTER_VALIDATE_EMAIL) ? 'email' : 'username';
// Login-Versuch
if (Auth::attempt([$field => $this->name, 'password' => $this->password], true)) {
request()->session()->regenerate();
return redirect()->intended(route('setup.wizard')) ;
}
$this->error = 'Ungültige Zugangsdaten.';
}
public function render()
{
return view('livewire.auth.login-form');
}
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Livewire\Setup;
use App\Models\Setting;
use Livewire\Component;
class SetupWizard extends Component
{
public string $domain = '';
public string $timezone = 'Europe/Berlin';
public bool $agree_cert = false;
public function mount()
{
$this->domain = Setting::get('domain', '');
$this->timezone = Setting::get('timezone', config('app.timezone'));
}
public function save()
{
$this->validate([
'domain' => ['required','string'],
'timezone' => ['required','string'],
]);
Setting::set('domain', $this->domain);
Setting::set('timezone', $this->timezone);
Setting::set('setup_completed', '1');
if ($this->agree_cert) {
Setting::set('cert_requested', '1'); // Hook für deinen Installer/Daemon
}
session()->flash('ok', 'Setup gespeichert.');
return redirect()->route('dashboard');
}
public function render()
{
return view('livewire.setup.setup-wizard');
}
}

View File

@ -0,0 +1,213 @@
<?php
namespace App\Livewire\Setup;
use App\Jobs\ProvisionCertJob;
use App\Support\Setting;
use App\Models\SystemTask;
use App\Models\User;
use App\Support\EnvWriter;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Redis;
use Livewire\Attributes\Validate;
use Livewire\Component;
class Wizard extends Component
{
public int $step = 1;
// Step 1
#[Validate('required|string|min:3')]
public string $form_domain = '';
#[Validate('required|timezone')]
public string $form_timezone = 'UTC';
public bool $form_cert_force_https = true;
// Step 2
#[Validate('required|string|min:3')]
public string $form_admin_name = '';
#[Validate('required|email')]
public string $form_admin_email = '';
/** optional: wenn du Login auch über username erlauben willst */
public ?string $form_admin_username = null;
#[Validate('required|string|min:8|same:form_admin_password_confirmation')]
public string $form_admin_password = '';
public string $form_admin_password_confirmation = '';
// Step 3 (Zertifikat)
public bool $form_cert_create_now = false;
#[Validate('required_if:form_cert_create_now,true|email')]
public string $form_cert_email = '';
public function nextStep()
{
if ($this->step === 1) {
$this->validateOnly('form_domain');
$this->validateOnly('form_timezone');
} elseif ($this->step === 2) {
$this->validate([
'form_admin_name' => 'required|string|min:3',
'form_admin_email' => 'required|email',
'form_admin_password' => 'required|string|min:8|same:form_admin_password_confirmation',
]);
}
$this->step = min($this->step + 1, 3);
}
public function prevStep()
{
$this->step = max($this->step - 1, 1);
}
public function finish()
{
// Step 3 Validierung (nur wenn sofort erstellen)
if ($this->form_cert_create_now) {
$this->validateOnly('form_cert_email');
}
// 1) Settings persistieren
Setting::set('app.domain', $this->form_domain);
Setting::set('app.timezone', $this->form_timezone);
Setting::set('app.force_https', (bool)$this->form_cert_force_https);
// Optional: .env spiegeln, damit URLs/HMR etc. sofort passen
$scheme = $this->form_cert_force_https ? 'https' : 'http';
EnvWriter::set([
'APP_HOST' => $this->form_domain,
'APP_URL' => "{$scheme}://{$this->form_domain}",
'APP_TIMEZONE' => $this->form_timezone,
]);
// 2) Admin anlegen/aktualisieren
$user = User::query()
->where('email', $this->form_admin_email)
->when($this->form_admin_username, fn($q) => $q->orWhere('username', $this->form_admin_username)
)
->first();
if (!$user) {
$user = new User();
$user->email = $this->form_admin_email;
if ($this->form_admin_username) {
$user->username = $this->form_admin_username;
}
} else {
// vorhandene Email/Username harmonisieren
$user->email = $this->form_admin_email;
if ($this->form_admin_username) {
$user->username = $this->form_admin_username;
}
}
$user->name = $this->form_admin_name;
$user->is_admin = true;
$user->password = Hash::make($this->form_admin_password);
$user->must_change_pw = true;
$user->save();
// 3) Zertifikat jetzt ausstellen (optional)
$taskKey = 'issue-cert:' . $this->form_domain;
if ($this->form_cert_create_now) {
SystemTask::updateOrCreate(
['key' => $taskKey],
[
'type' => 'issue-cert',
'status' => 'queued',
'message' => 'Warte auf Ausführung…',
'payload' => [
'domain' => $this->form_domain,
'email' => $this->form_cert_email,
'mode' => 'letsencrypt'
],
]
);
Cache::store('redis')->put($taskKey, [
'type' => 'issue-cert',
'status' => 'queued',
'message' => 'Warte auf Ausführung…',
'payload' => [
'domain' => $this->form_domain,
'email' => $this->form_cert_create_now ? $this->form_cert_email : null,
'mode' => $this->form_cert_create_now ? 'letsencrypt' : 'self-signed',
],
], now()->addMinutes(30));
Redis::sadd('ui:toasts', $taskKey);
ProvisionCertJob::dispatch(
domain: $this->form_domain,
email: $this->form_cert_email,
taskKey: $taskKey,
useLetsEncrypt: true
);
session()->flash('task_key', $taskKey);
session()->flash('banner_ok', 'Lets Encrypt wird gestartet…');
} else {
// automatisch self-signed
SystemTask::updateOrCreate(
['key' => $taskKey],
[
'type' => 'issue-cert',
'status' => 'queued',
'message' => 'Warte auf Ausführung…',
'payload' => [
'domain' => $this->form_domain,
'mode' => 'self-signed'
],
]
);
Cache::store('redis')->put($taskKey, [
'type' => 'issue-cert',
'status' => 'queued',
'message' => 'Warte auf Ausführung…',
'payload' => [
'domain' => $this->form_domain,
'email' => $this->form_cert_create_now ? $this->form_cert_email : null,
'mode' => $this->form_cert_create_now ? 'letsencrypt' : 'self-signed',
],
], now()->addMinutes(30));
Cache::store('redis')->put($taskKey, [
'type' => 'issue-cert',
'status' => 'queued',
'message' => 'Warte auf Ausführung…',
'payload' => [
'domain' => $this->form_domain,
'email' => $this->form_cert_create_now ? $this->form_cert_email : null,
'mode' => $this->form_cert_create_now ? 'letsencrypt' : 'self-signed',
],
], now()->addMinutes(30));
Redis::sadd('ui:toasts', $taskKey);
ProvisionCertJob::dispatch(
domain: $this->form_domain,
email: null,
taskKey: $taskKey,
useLetsEncrypt: false
);
session()->flash('task_key', $taskKey);
session()->flash('banner_ok', 'Self-Signed Zertifikat wird erstellt…');
}
return redirect()->route('dashboard');
}
public function render()
{
return view('livewire.setup.wizard');
}
}

View File

@ -0,0 +1,200 @@
<?php
namespace App\Livewire\System;
use App\Models\SystemTask;
use Illuminate\Support\Facades\Cache;
use Livewire\Attributes\On;
use Livewire\Component;
class TaskBanner extends Component
{
// public ?array $task = null;
// public string $taskKey;
// public bool $finished = false;
// public string $position;
//
// public function mount(string $taskKey, string $position = 'top-right')
// {
// $this->taskKey = $taskKey;
// $this->position = $position;
// }
//
// public function loadTask()
// {
// $this->task = Cache::store('redis')->get($this->taskKey);
//
// if ($this->task && in_array($this->task['status'], ['done','failed'])) {
// $this->finished = true;
// }
// }
//
public string $taskKey;
public ?array $task = null;
// damit wir nur bei echtem Statuswechsel einen Toast schicken
public ?string $lastStatus = null;
public function mount(string $taskKey)
{
$this->taskKey = $taskKey;
}
public function loadTask()
{
$t = Cache::store('redis')->get($this->taskKey);
$this->task = $t;
if (!$t) return;
$status = $t['status'] ?? 'queued';
if ($status !== $this->lastStatus) {
$this->lastStatus = $status;
$type = match ($status) {
'done' => 'success',
'failed' => 'error',
'running' => 'update', // „spinner“
'queued' => 'info',
default => 'info',
};
$this->dispatch('notify', [
'id' => $this->taskKey, // <- gleiches ID = replace
'title' => strtoupper($t['type'] ?? 'TASK').' · '.($t['payload']['domain'] ?? ''),
'badge' => 'CERTBOT',
'message' => $t['message'] ?? '',
'type' => $type,
'duration' => in_array($status, ['done','failed']) ? 6000 : -1, // running = sticky
'close' => true,
// Phosphor Icon (optional):
'icon' => match ($status) {
'done' => 'ph-check-circle',
'failed' => 'ph-x-circle',
'running'=> 'ph-arrow-clockwise',
default => 'ph-info',
},
]);
}
// Pollen stoppen, sobald final
if (in_array($status, ['done','failed'])) {
$this->dispatch('stop-poll'); // falls du den Poll im Frontend beenden willst
}
}
public function render()
{
return view('livewire.system.task-banner');
}
// public string $taskKey;
//
// public ?SystemTask $task = null;
//
// public function mount(string $taskKey)
// {
// $this->taskKey = $taskKey;
// $this->loadTask();
// }
//
// public function loadTask()
// {
// $this->task = SystemTask::where('key', $this->taskKey)->first();
// }
//
// public function getFinishedProperty(): bool
// {
// return in_array(optional($this->task)->status, ['done','failed'], true);
// }
// public function render()
// {
// $status = $this->taskKey
// ? cache()->get("tasks:{$this->taskKey}", 'unbekannt')
// : null;
//
// return view('livewire.system.task-banner', [
// 'status' => $status,
// ]);
//
//// return view('livewire.system.task-banner');
// }
// public ?string $taskKey = null;
//
// /** @var array|null */
// public $task = null;
//
// public bool $finished = false;
//
// public function mount(?string $taskKey = null): void
// {
// // aus Session übernehmen, falls nicht als Prop übergeben
// $this->taskKey = $taskKey ?? session('task_key');
// $this->loadTask();
// }
//
// #[On('refresh-task-banner')]
// public function loadTask(): void
// {
// if (!$this->taskKey) {
// $this->task = null;
// return;
// }
//
// // Erwartete Cache-Struktur: array mit keys: type,status,payload,message
// $data = Cache::get("tasks:{$this->taskKey}");
//
// // Nichts gefunden -> Banner ausblenden
// if (!$data) {
// $this->task = null;
// return;
// }
//
// // Sicherstellen, dass wir array haben (kein Model nötig)
// $this->task = is_array($data) ? $data : (array) $data;
//
// // Fertig/Failed -> einmal anzeigen, dann Session-Key löschen
// if (in_array($this->task['status'] ?? '', ['done','failed'], true)) {
// $this->finished = true;
// session()->forget('task_key');
// }
// }
// public ?string $taskKey = null;
// public ?array $task = null;
//
// // Position: top-right|top-left|bottom-right|bottom-left
// public string $position = 'top-right';
//
// public bool $finished = false;
//
// public function mount(?string $taskKey = null, string $position = 'top-right'): void
// {
// $this->taskKey = $taskKey ?? session('task_key');
// $this->position = $position;
// $this->loadTask();
// }
//
// #[On('refresh-task-banner')]
// public function loadTask(): void
// {
// if (!$this->taskKey) { $this->task = null; return; }
//
// $data = Cache::get("tasks:{$this->taskKey}");
// $this->task = $data ? (array) $data : null;
//
// if ($this->task && in_array($this->task['status'] ?? '', ['done','failed'], true)) {
// $this->finished = true;
// session()->forget('task_key');
// }
// }
//
// public function dismiss(): void
// {
// $this->task = null;
// }
}

View File

@ -0,0 +1,173 @@
<?php
namespace App\Livewire\System;
use Illuminate\Support\Facades\Cache;
use Livewire\Component;
class TaskToast extends Component
{
// public string $taskKey;
// public ?string $lastStatus = null;
//
// public function mount(string $taskKey)
// {
// $this->taskKey = $taskKey;
// }
//
// public function load()
// {
// $task = Cache::store('redis')->get($this->taskKey);
// if (!$task) return;
//
// $status = $task['status'] ?? null;
//
// // nur wenn sich der Status geändert hat → neues Toast
// if ($status !== $this->lastStatus) {
// $this->lastStatus = $status;
//
// $this->dispatch('notify', [
// 'id' => $this->taskKey,
// 'title' => strtoupper($task['type']).' · '.$task['payload']['domain'],
// 'text' => $task['message'] ?? '',
// 'type' => match($status) {
// 'done' => 'success',
// 'failed' => 'error',
// 'running'=> 'info',
// default => 'info',
// },
// 'duration' => in_array($status, ['done','failed']) ? 6000 : 0,
// 'close' => true,
// ]);
// }
// }
// public function render()
// {
// return <<<'BLADE'
// <div class="absolute" wire:poll.3s="load"></div>
// BLADE;
// }
// public ?string $taskKey = null; // wird über Prop ODER Query ?task=… gesetzt
// public ?array $task = null;
// public ?string $last = null; // letzter Status, um doppelte Events zu vermeiden
// public bool $final = false; // done/failed => Poll stoppen (Frontend kann darauf reagieren)
//
// public function mount(?string $taskKey = null): void
// {
// // TaskKey aus Prop oder aus URL-Query (?task=issue-cert:domain)
// $this->taskKey = $taskKey ?: request('task');
// }
//
// public function load(): void
// {
// if (!$this->taskKey) return;
//
// $this->task = Cache::store('redis')->get($this->taskKey);
// if (!$this->task) return;
//
// $status = $this->task['status'] ?? 'queued';
// if ($status !== $this->last) {
// $this->last = $status;
//
//// $status = $this->task['status'] ?? 'queued'; // queued|running|done|failed
//
// $this->dispatch('notify', [
// 'id' => $this->taskKey, // gleiche ID => Toast wird ersetzt
// 'state' => $status, // 'queued' | 'running' | 'done' | 'failed'
// 'badge' => strtoupper($this->task['type'] ?? 'task'),// z.B. CERTBOT
// 'domain' => $this->task['payload']['domain'] ?? '', // erscheint rechts neben Badge
// 'message' => $this->task['message'] ?? '', // Text unten
// 'position' => 'bottom-center', // optional: top-right|… (Standard: bottom-right)
// 'duration' => in_array($status, ['done','failed']) ? 6000 : 0, // 0 = offen lassen
// 'close' => true, // X-Button anzeigen
// ]);
// }
//
// if (in_array($status, ['done','failed'])) {
// $this->final = true;
// }
// }
//
// public function render()
// {
// return view('livewire.system.task-toast');
// }
// public ?string $taskKey = null;
// public ?array $task = null;
// public ?string $last = null; // letzter gesehener Status
//
// public function mount(?string $taskKey = null): void
// {
// $this->taskKey = $taskKey ?: request('task');
// }
//
// public function load(): void
// {
// if (!$this->taskKey) return;
//
// $this->task = Cache::store('redis')->get($this->taskKey);
// if (!$this->task) return;
//
// $status = $this->task['status'] ?? 'queued'; // queued|running|done|failed
// if ($status !== $this->last) {
// $this->last = $status;
//
// $this->dispatch('notify', [
// 'id' => $this->taskKey, // gleiche ID => Toast wird ersetzt
// 'state' => $status, // 'queued' | 'running' | 'done' | 'failed'
// 'badge' => strtoupper($this->task['type'] ?? 'task'),// z.B. CERTBOT
// 'domain' => $this->task['payload']['domain'] ?? '', // erscheint rechts neben Badge
// 'message' => $this->task['message'] ?? '', // Text unten
// 'position' => 'bottom-center', // z.B. bottom-center
// 'duration' => in_array($status, ['done','failed']) ? 6000 : 0,
// 'close' => true,
// ]);
// }
// }
public ?string $taskKey = null;
public ?array $task = null;
public ?string $lastHash = null; // <— statt $last
public function mount(?string $taskKey = null): void
{
$this->taskKey = $taskKey ?: request('task');
}
public function load(): void
{
if (!$this->taskKey) return;
$this->task = \Cache::store('redis')->get($this->taskKey);
if (!$this->task) return;
$status = $this->task['status'] ?? 'queued';
$message = $this->task['message'] ?? '';
$hash = sha1($status.'|'.$message); // <— Fingerprint
if ($hash !== $this->lastHash) {
$this->lastHash = $hash;
$this->dispatch('notify', [
'id' => $this->taskKey,
'state' => $status, // queued|running|done|failed
'badge' => strtoupper($this->task['type'] ?? 'task'), // z.B. CERTBOT
'domain' => $this->task['payload']['domain'] ?? '',
'message' => $message,
'position' => 'bottom-center',
'duration' => in_array($status, ['done','failed']) ? 6000 : 0,
'close' => true,
]);
}
}
public function render()
{
// Minimaler Marker reicht, damit wire:poll arbeitet
return view('livewire.system.task-toast');
}
}

View File

@ -0,0 +1,128 @@
<?php
namespace App\Livewire\System;
use Livewire\Component;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Redis;
class ToastHub extends Component
{
// /** Merker pro Key, um doppelte Events zu vermeiden */
// public array $last = [];
//
// /** Poll alle X Sekunden */
// public function poll(): void
// {
// // Menge der aktuell sichtbaren Toast-Keys
// $keys = Redis::smembers('ui:toasts'); // Set enthält z.B. ["issue-cert:mail.example.com"]
//
// foreach ($keys as $key) {
// $task = Cache::store('redis')->get($key);
// if (!$task) {
// // Kein Datensatz mehr? Aufräumen.
// Redis::srem('ui:toasts', $key);
// continue;
// }
//
// $status = $task['status'] ?? 'queued'; // queued|running|done|failed
// $message = $task['message'] ?? '';
// $hash = $status.'|'.$message;
//
// // Nur senden, wenn sich etwas geändert hat
// if (($this->last[$key] ?? null) === $hash) {
// continue;
// }
// $this->last[$key] = $hash;
//
// $this->dispatch('toastra:show', [
// 'id' => $key, // gleicher Key => Toast wird ersetzt
// 'state' => $status, // queued|running|done|failed
// 'badge' => strtoupper($task['type'] ?? 'TASK'),
// 'domain' => $task['payload']['domain'] ?? '',
// 'message' => $message,
// 'position' => 'bottom-center',
// 'duration' => in_array($status, ['done','failed']) ? 6000 : 0,
// 'close' => true,
// ]);
//
// // Optionales Aufräumen, sobald final:
// if (in_array($status, ['done','failed'])) {
// // Im Set entfernen; der Client blendet selbst aus (Duration).
// Redis::srem('ui:toasts', $key);
// }
// }
// }
//
// public function render()
// {
// // Minimaler Root kein Inhalt, nur Poll
// return <<<'BLADE'
//<div wire:poll.3s="poll"></div>
//BLADE;
// }
public bool $active = false; // steuert, ob überhaupt gepollt wird
public int $idleHits = 0; // schützt vor Dauerklingeln
public function mount(): void
{
$this->active = $this->hasKeys();
}
protected function hasKeys(): bool
{
try {
return (int) Redis::command('SCARD', ['ui:toasts']) > 0;
} catch (\Throwable $e) {
return false;
}
}
public function loadAll(): void
{
// Wenn nix ansteht -> nach ein paar „leeren“ Runden Poll ganz stoppen
if (! $this->hasKeys()) {
if (++$this->idleHits >= 3) { // ~9 Sekunden bei poll.3s
$this->active = false;
}
return;
}
$this->idleHits = 0; // wieder aktiv
$keys = Redis::command('SMEMBERS', ['ui:toasts']) ?? [];
foreach ($keys as $key) {
$task = Cache::store('redis')->get($key);
if (! $task) {
Redis::command('SREM', ['ui:toasts', $key]);
continue;
}
$status = $task['status'] ?? 'queued';
// an deinen Glas-Toast weiterreichen
$this->dispatch('notify', [
'id' => $key,
'state' => $status, // queued|running|done|failed
'badge' => strtoupper($task['type'] ?? 'task'),
'domain' => $task['payload']['domain'] ?? '',
'message' => $task['message'] ?? '',
'position' => 'bottom-center',
'duration' => in_array($status, ['done','failed']) ? 6000 : 0,
'close' => true,
]);
// „fertige“ Tasks räumen wir sofort aus dem Set
if (in_array($status, ['done','failed'])) {
Redis::command('SREM', ['ui:toasts', $key]);
}
}
}
public function render()
{
return view('livewire.system.toast-hub');
}
}

18
app/Models/DkimKey.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class DkimKey extends Model
{
protected $fillable = [
'domain_id','selector','private_key_pem','public_key_txt','is_active'
];
protected $casts = ['is_active'=>'bool'];
public function domain(): BelongsTo {
return $this->belongsTo(Domain::class);
}
}

24
app/Models/Domain.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Domain extends Model
{
protected $fillable = ['domain','is_active'];
protected $casts = ['is_active' => 'bool'];
public function mailboxes(): HasMany {
return $this->hasMany(MailUser::class);
}
public function aliases(): HasMany {
return $this->hasMany(MailAlias::class);
}
public function dkimKeys(): HasMany {
return $this->hasMany(DkimKey::class);
}
}

18
app/Models/MailAlias.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class MailAlias extends Model
{
protected $table = 'mail_aliases';
protected $fillable = ['domain_id','source','destination','is_active'];
protected $casts = ['is_active'=>'bool'];
public function domain(): BelongsTo {
return $this->belongsTo(Domain::class);
}
}

39
app/Models/MailUser.php Normal file
View File

@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class MailUser extends Model
{
protected $table = 'mail_users';
protected $fillable = [
'domain_id','localpart','email','password_hash',
'is_active','must_change_pw','quota_mb','last_login_at',
];
protected $hidden = ['password_hash'];
protected $casts = [
'is_active'=>'bool',
'must_change_pw'=>'bool',
'quota_mb'=>'int',
'last_login_at'=>'datetime',
];
public function domain(): BelongsTo {
return $this->belongsTo(Domain::class);
}
// Komfort: Passwort setzen → bcrypt (BLF-CRYPT)
public function setPasswordAttribute(string $plain): void {
// optional: allow 'password' virtual attribute
$this->attributes['password_hash'] = password_hash($plain, PASSWORD_BCRYPT);
}
// Scopes
public function scopeActive($q) { return $q->where('is_active', true); }
public function scopeByEmail($q, string $email) { return $q->where('email', $email); }
}

25
app/Models/Setting.php Normal file
View File

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Setting extends Model
{
protected $fillable = ['key','value'];
public $incrementing = false;
protected $keyType = 'string';
public static function get(string $key, $default=null) {
$row = static::query()->find($key);
if (!$row) return $default;
$val = $row->value;
$decoded = json_decode($val, true);
return (json_last_error() === JSON_ERROR_NONE) ? $decoded : $val;
}
public static function set(string $key, $value): void {
$val = is_array($value) ? json_encode($value, JSON_UNESCAPED_SLASHES) : (string)$value;
static::query()->updateOrCreate(['key'=>$key], ['value'=>$val]);
}
}

11
app/Models/SystemTask.php Normal file
View File

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SystemTask extends Model
{
protected $fillable = ['key','type','status','message','payload'];
protected $casts = ['payload' => 'array'];
}

41
app/Models/User.php Normal file
View File

@ -0,0 +1,41 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
protected $fillable = [
'name',
'username',
'email',
'password',
'is_active',
'must_change_pw',
'role',
];
protected $hidden = [
'password',
'remember_token',
];
protected $casts = [
'email_verified_at' => 'datetime',
'is_active' => 'boolean',
'must_change_pw' => 'boolean',
];
/** Quick helper: check if user is admin */
public function isAdmin(): bool
{
return $this->role === 'admin';
}
}

View File

@ -0,0 +1,43 @@
<?php
namespace App\Providers;
use App\Support\SettingsRepository;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app->singleton(SettingsRepository::class, fn() => new SettingsRepository());
}
/**
* Bootstrap any application services.
*/
public function boot(SettingsRepository $settings): void
{
try {
$S = app(\App\Support\SettingsRepository::class);
if ($tz = $S->get('app.timezone')) {
config(['app.timezone' => $tz]);
date_default_timezone_set($tz);
}
if ($domain = $S->get('app.domain')) {
// Falls du APP_URL dynamisch überschreiben willst:
$scheme = $S->get('app.force_https', true) ? 'https' : 'http';
config(['app.url' => $scheme.'://'.$domain]);
URL::forceRootUrl(config('app.url'));
if ($scheme === 'https') {
URL::forceScheme('https');
}
}
} catch (\Throwable $e) {
// Im Bootstrap/Wartungsmodus still sein
}
}
}

29
app/Support/EnvWriter.php Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Support;
class EnvWriter
{
/**
* Create a new class instance.
*/
public function __construct()
{
//
}
public static function set(array $pairs): void {
$path = base_path('.env');
$env = file_exists($path) ? file_get_contents($path) : '';
foreach ($pairs as $key => $value) {
$value = (string)$value;
if (preg_match("/^{$key}=.*/m", $env)) {
$env = preg_replace("/^{$key}=.*/m", "{$key}={$value}", $env);
} else {
$env .= PHP_EOL."{$key}={$value}";
}
}
file_put_contents($path, $env);
}
}

15
app/Support/Setting.php Normal file
View File

@ -0,0 +1,15 @@
<?php
namespace App\Support;
use Illuminate\Support\Facades\App;
class Setting
{
public static function get($key, $default=null) {
return App::make(SettingsRepository::class)->get($key, $default);
}
public static function set($key, $value): void {
App::make(SettingsRepository::class)->set($key, $value);
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace App\Support;
use App\Models\Setting;
use Illuminate\Support\Facades\Cache;
class SettingsRepository
{
const CACHE_KEY = 'settings.all';
protected function store()
{
// zieht z.B. 'redis' aus .env: CACHE_SETTINGS_STORE=redis
$store = env('CACHE_SETTINGS_STORE', 'redis');
return Cache::store($store);
}
protected function loadAll(): array
{
try {
/** @var array<string,string> $settings */
$settings = $this->store()->rememberForever(self::CACHE_KEY, function (): array {
return Setting::query()
->pluck('value', 'key')
->toArray();
});
return $settings;
} catch (\Throwable $e) {
return Setting::query()->pluck('value', 'key')->toArray();
}
}
public function get(string $key, $default = null)
{
$all = $this->loadAll();
return array_key_exists($key, $all) ? $all[$key] : $default;
}
public function set(string $key, $value): void
{
Setting::query()->updateOrCreate(['key' => $key], ['value' => $value]);
// Cache refreshen
try {
$all = Setting::query()->pluck('value', 'key')->toArray();
$this->store()->forever(self::CACHE_KEY, $all);
} catch (\Throwable $e) {
// Cache kaputt? Ignorieren, DB ist aktualisiert.
}
}
public function forgetCache(): void
{
try { $this->store()->forget(self::CACHE_KEY); } catch (\Throwable $e) {}
}
}

18
artisan Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env php
<?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput);
exit($status);

21
bootstrap/app.php Normal file
View File

@ -0,0 +1,21 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__ . '/../routes/web.php',
commands: __DIR__ . '/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->alias([
'ensure.setup' => \App\Http\Middleware\EnsureSetupCompleted::class,
]);
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();

2
bootstrap/cache/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*
!.gitignore

5
bootstrap/providers.php Normal file
View File

@ -0,0 +1,5 @@
<?php
return [
App\Providers\AppServiceProvider::class,
];

80
composer.json Normal file
View File

@ -0,0 +1,80 @@
{
"$schema": "https://getcomposer.org/schema.json",
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^12.0",
"laravel/reverb": "^1.6",
"laravel/tinker": "^2.10.1",
"livewire/livewire": "^3.6"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pail": "^1.2.2",
"laravel/pint": "^1.24",
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"phpunit/phpunit": "^11.5.3"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"app/Helpers/helpers.php"
]
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
],
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

9555
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

126
config/app.php Normal file
View File

@ -0,0 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];

115
config/auth.php Normal file
View File

@ -0,0 +1,115 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option defines the default authentication "guard" and password
| reset "broker" for your application. You may change these values
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| which utilizes session storage plus the Eloquent user provider.
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\User::class),
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the number of seconds before a password confirmation
| window expires and users are asked to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
];

96
config/broadcasting.php Normal file
View File

@ -0,0 +1,96 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "reverb", "pusher", "ably", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_CONNECTION', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over WebSockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
// 'reverb' => [
// 'driver' => 'reverb',
// 'key' => env('REVERB_APP_KEY'),
// 'secret' => env('REVERB_APP_SECRET'),
// 'app_id' => env('REVERB_APP_ID'),
// 'options' => [
// 'host' => env('REVERB_HOST'),
// 'port' => env('REVERB_PORT', 443),
// 'scheme' => env('REVERB_SCHEME', 'https'),
// 'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
// ],
// 'client_options' => [
// // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
// ],
// ],
'reverb' => [
'driver' => 'reverb',
'key' => env('REVERB_APP_KEY'),
'secret' => env('REVERB_APP_SECRET'),
'app_id' => env('REVERB_APP_ID'),
'options' => [
'host' => env('REVERB_HOST'), // öffentlich (gleicht VITE_REVERB_HOST)
'port' => (int) env('REVERB_PORT', 443),
'scheme' => env('REVERB_SCHEME', 'https'),
'path' => env('REVERB_PATH', '/ws'),
'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
],
],
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];

114
config/cache.php Normal file
View File

@ -0,0 +1,114 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/
'default' => env('CACHE_STORE', 'database'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'connection' => env('DB_CACHE_CONNECTION'),
'table' => env('DB_CACHE_TABLE', 'cache'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
// 'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
],
'settings' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
// 'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
];

183
config/database.php Normal file
View File

@ -0,0 +1,183 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
'busy_timeout' => null,
'journal_mode' => null,
'synchronous' => null,
'transaction_mode' => 'DEFERRED',
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', ''),
'persistent' => env('REDIS_PERSISTENT', false),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
],
];

80
config/filesystems.php Normal file
View File

@ -0,0 +1,80 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application for file storage.
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Below you may configure as many filesystem disks as necessary, and you
| may even configure multiple disks for the same driver. Examples for
| most supported storage drivers are configured here for reference.
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'serve' => true,
'throw' => false,
'report' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
'report' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'report' => false,
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];

160
config/livewire.php Normal file
View File

@ -0,0 +1,160 @@
<?php
return [
/*
|---------------------------------------------------------------------------
| Class Namespace
|---------------------------------------------------------------------------
|
| This value sets the root class namespace for Livewire component classes in
| your application. This value will change where component auto-discovery
| finds components. It's also referenced by the file creation commands.
|
*/
'class_namespace' => 'App\\Livewire',
/*
|---------------------------------------------------------------------------
| View Path
|---------------------------------------------------------------------------
|
| This value is used to specify where Livewire component Blade templates are
| stored when running file creation commands like `artisan make:livewire`.
| It is also used if you choose to omit a component's render() method.
|
*/
'view_path' => resource_path('views/livewire'),
/*
|---------------------------------------------------------------------------
| Layout
|---------------------------------------------------------------------------
| The view that will be used as the layout when rendering a single component
| as an entire page via `Route::get('/post/create', CreatePost::class);`.
| In this case, the view returned by CreatePost will render into $slot.
|
*/
'layout' => 'components.layouts.app',
/*
|---------------------------------------------------------------------------
| Lazy Loading Placeholder
|---------------------------------------------------------------------------
| Livewire allows you to lazy load components that would otherwise slow down
| the initial page load. Every component can have a custom placeholder or
| you can define the default placeholder view for all components below.
|
*/
'lazy_placeholder' => null,
/*
|---------------------------------------------------------------------------
| Temporary File Uploads
|---------------------------------------------------------------------------
|
| Livewire handles file uploads by storing uploads in a temporary directory
| before the file is stored permanently. All file uploads are directed to
| a global endpoint for temporary storage. You may configure this below:
|
*/
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
'cleanup' => true, // Should cleanup temporary uploads older than 24 hrs...
],
/*
|---------------------------------------------------------------------------
| Render On Redirect
|---------------------------------------------------------------------------
|
| This value determines if Livewire will run a component's `render()` method
| after a redirect has been triggered using something like `redirect(...)`
| Setting this to true will render the view once more before redirecting
|
*/
'render_on_redirect' => false,
/*
|---------------------------------------------------------------------------
| Eloquent Model Binding
|---------------------------------------------------------------------------
|
| Previous versions of Livewire supported binding directly to eloquent model
| properties using wire:model by default. However, this behavior has been
| deemed too "magical" and has therefore been put under a feature flag.
|
*/
'legacy_model_binding' => false,
/*
|---------------------------------------------------------------------------
| Auto-inject Frontend Assets
|---------------------------------------------------------------------------
|
| By default, Livewire automatically injects its JavaScript and CSS into the
| <head> and <body> of pages containing Livewire components. By disabling
| this behavior, you need to use @livewireStyles and @livewireScripts.
|
*/
'inject_assets' => false,
/*
|---------------------------------------------------------------------------
| Navigate (SPA mode)
|---------------------------------------------------------------------------
|
| By adding `wire:navigate` to links in your Livewire application, Livewire
| will prevent the default link handling and instead request those pages
| via AJAX, creating an SPA-like effect. Configure this behavior here.
|
*/
'navigate' => [
'show_progress_bar' => true,
'progress_bar_color' => '#2299dd',
],
/*
|---------------------------------------------------------------------------
| HTML Morph Markers
|---------------------------------------------------------------------------
|
| Livewire intelligently "morphs" existing HTML into the newly rendered HTML
| after each update. To make this process more reliable, Livewire injects
| "markers" into the rendered Blade surrounding @if, @class & @foreach.
|
*/
'inject_morph_markers' => true,
/*
|---------------------------------------------------------------------------
| Pagination Theme
|---------------------------------------------------------------------------
|
| When enabling Livewire's pagination feature by using the `WithPagination`
| trait, Livewire will use Tailwind templates to render pagination views
| on the page. If you want Bootstrap CSS, you can specify: "bootstrap"
|
*/
'pagination_theme' => 'tailwind',
];

132
config/logging.php Normal file
View File

@ -0,0 +1,132 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
|
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'handler_with' => [
'stream' => 'php://stderr',
],
'formatter' => env('LOG_STDERR_FORMATTER'),
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

118
config/mail.php Normal file
View File

@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send all email
| messages unless another mailer is explicitly specified when sending
| the message. All additional mailers can be configured within the
| "mailers" array. Examples of each type of mailer are provided.
|
*/
'default' => env('MAIL_MAILER', 'log'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers that can be used
| when delivering an email. You may specify which one you're using for
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'scheme' => env('MAIL_SCHEME'),
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
// 'client' => [
// 'timeout' => 5,
// ],
],
'resend' => [
'transport' => 'resend',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
'retry_after' => 60,
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
'retry_after' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all emails sent by your application to be sent from
| the same address. Here you may specify a name and address that is
| used globally for all emails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
];

112
config/queue.php Normal file
View File

@ -0,0 +1,112 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue supports a variety of backends via a single, unified
| API, giving you convenient access to each backend using identical
| syntax for each. The default queue connection is defined below.
|
*/
'default' => env('QUEUE_CONNECTION', 'database'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection options for every queue backend
| used by your application. An example configuration is provided for
| each backend supported by Laravel. You're also free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control how and where failed jobs are stored. Laravel ships with
| support for storing failed jobs in a simple file or in a database.
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'failed_jobs',
],
];

95
config/reverb.php Normal file
View File

@ -0,0 +1,95 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Reverb Server
|--------------------------------------------------------------------------
|
| This option controls the default server used by Reverb to handle
| incoming messages as well as broadcasting message to all your
| connected clients. At this time only "reverb" is supported.
|
*/
'default' => env('REVERB_SERVER', 'reverb'),
/*
|--------------------------------------------------------------------------
| Reverb Servers
|--------------------------------------------------------------------------
|
| Here you may define details for each of the supported Reverb servers.
| Each server has its own configuration options that are defined in
| the array below. You should ensure all the options are present.
|
*/
'servers' => [
'reverb' => [
'host' => env('REVERB_SERVER_HOST', '127.0.0.1'),
'port' => env('REVERB_SERVER_PORT', 8080),
'path' => env('REVERB_SERVER_PATH', '/ws'),
'hostname' => env('REVERB_HOST'),
'options' => [
'tls' => [],
],
'max_request_size' => env('REVERB_MAX_REQUEST_SIZE', 10_000),
'scaling' => [
'enabled' => env('REVERB_SCALING_ENABLED', false),
'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'),
'server' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'port' => env('REDIS_PORT', '6379'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'database' => env('REDIS_DB', '0'),
'timeout' => env('REDIS_TIMEOUT', 60),
],
],
'pulse_ingest_interval' => env('REVERB_PULSE_INGEST_INTERVAL', 15),
'telescope_ingest_interval' => env('REVERB_TELESCOPE_INGEST_INTERVAL', 15),
],
],
/*
|--------------------------------------------------------------------------
| Reverb Applications
|--------------------------------------------------------------------------
|
| Here you may define how Reverb applications are managed. If you choose
| to use the "config" provider, you may define an array of apps which
| your server will support, including their connection credentials.
|
*/
'apps' => [
'provider' => 'config',
'apps' => [
[
'key' => env('REVERB_APP_KEY'),
'secret' => env('REVERB_APP_SECRET'),
'app_id' => env('REVERB_APP_ID'),
'options' => [
'host' => env('REVERB_HOST'),
'port' => env('REVERB_PORT', 443),
'scheme' => env('REVERB_SCHEME', 'https'),
'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
],
'allowed_origins' => ['*'],
'ping_interval' => env('REVERB_APP_PING_INTERVAL', 60),
'activity_timeout' => env('REVERB_APP_ACTIVITY_TIMEOUT', 30),
'max_connections' => env('REVERB_APP_MAX_CONNECTIONS'),
'max_message_size' => env('REVERB_APP_MAX_MESSAGE_SIZE', 10_000),
],
],
],
];

38
config/services.php Normal file
View File

@ -0,0 +1,38 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'resend' => [
'key' => env('RESEND_KEY'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
],
];

217
config/session.php Normal file
View File

@ -0,0 +1,217 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option determines the default session driver that is utilized for
| incoming requests. Laravel supports a variety of storage options to
| persist session data. Database storage is a great default choice.
|
| Supported: "file", "cookie", "database", "memcached",
| "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'database'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
|
*/
'lifetime' => (int) env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it's stored. All encryption is performed
| automatically by Laravel and you may use the session like normal.
|
*/
'encrypt' => env('SESSION_ENCRYPT', false),
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When utilizing the "file" session driver, the session files are placed
| on disk. The default storage location is defined here; however, you
| are free to provide another location where they should be stored.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table to
| be used to store sessions. Of course, a sensible default is defined
| for you; however, you're welcome to change this to another table.
|
*/
'table' => env('SESSION_TABLE', 'sessions'),
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using one of the framework's cache driven session backends, you may
| define the cache store which should be used to store the session data
| between requests. This must match one of your defined cache stores.
|
| Affects: "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the session cookie that is created by
| the framework. Typically, you should not need to change this value
| since doing so does not grant a meaningful security improvement.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel')).'-session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application, but you're free to change this when necessary.
|
*/
'path' => env('SESSION_PATH', '/'),
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| This value determines the domain and subdomains the session cookie is
| available to. By default, the cookie will be available to the root
| domain and all subdomains. Typically, this shouldn't be changed.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. It's unlikely you should disable this option.
|
*/
'http_only' => env('SESSION_HTTP_ONLY', true),
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" to permit secure cross-site requests.
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| Setting this value to true will tie the cookie to the top-level site for
| a cross-site context. Partitioned cookies are accepted by the browser
| when flagged "secure" and the Same-Site attribute is set to "none".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
];

1
database/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.sqlite*

View File

@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View File

@ -0,0 +1,54 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('username')->unique();
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->boolean('is_active')->default(true)->index();
$table->boolean('must_change_pw')->default(true)->index();
$table->string('role', 32)->default('admin')->index(); // z.B. admin|user
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@ -0,0 +1,57 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('domains', function (Blueprint $table) {
$table->id();
$table->string('domain', 191)->unique();
$table->boolean('is_active')->default(true)->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('domains');
}
};

View File

@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('mail_users', function (Blueprint $table) {
$table->id();
$table->foreignId('domain_id')->constrained('domains')->cascadeOnDelete();
$table->string('localpart', 191);
$table->string('email', 191)->unique(); // z.B. user@example.com
$table->string('password_hash'); // für Dovecot: BLF-CRYPT (bcrypt)
$table->boolean('is_active')->default(true)->index();
$table->boolean('must_change_pw')->default(true)->index();
$table->unsignedInteger('quota_mb')->default(0); // 0 = unbegrenzt
$table->timestamp('last_login_at')->nullable();
$table->timestamps();
$table->index(['domain_id', 'localpart']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mail_users');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('mail_aliases', function (Blueprint $table) {
$table->id();
$table->foreignId('domain_id')->constrained('domains')->cascadeOnDelete();
$table->string('source', 191)->index(); // z.B. sales@example.com
$table->string('destination'); // kommasepariert: "u1@ex.com,u2@ex.com"
$table->boolean('is_active')->default(true)->index();
$table->timestamps();
$table->unique(['domain_id','source']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mail_aliases');
}
};

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('dkim_keys', function (Blueprint $table) {
$table->id();
$table->foreignId('domain_id')->constrained('domains')->cascadeOnDelete();
$table->string('selector', 64)->default('mail')->index();
$table->longText('private_key_pem'); // oder Pfad, wenn du lieber Dateien nutzt
$table->longText('public_key_txt'); // nur der Key-Body für DNS
$table->boolean('is_active')->default(true)->index();
$table->timestamps();
$table->unique(['domain_id','selector']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('dkim_keys');
}
};

View File

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('key')->unique();
$table->text('value')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('settings');
}
};

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('system_tasks', function (Blueprint $table) {
$table->id();
$table->string('key')->unique(); // z.B. issue-cert:mail.example.com
$table->string('type'); // issue-cert
$table->string('status')->default('queued'); // queued|running|done|failed
$table->text('message')->nullable(); // letzte Meldung/Fehler
$table->json('payload')->nullable(); // domain,email,...
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('system_tasks');
}
};

View File

@ -0,0 +1,46 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
class AdminUserSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$name = env('APP_ADMIN_USER', 'mailwolt');
$email = env('APP_ADMIN_EMAIL', 'admin@localhost');
$pass = env('APP_ADMIN_PASS', 'ChangeMe'); // Wird beim ersten Login geändert
$user = User::firstOrCreate(
['email' => $email],
[
'name' => $name,
'username' => $name,
'password' => Hash::make($pass),
'is_active' => true,
'must_change_pw' => true,
'role' => 'admin',
'email_verified_at' => now(),
'remember_token' => Str::random(10),
]
);
// falls es den User schon gab, Flags sicher setzen
if (!$user->wasRecentlyCreated) {
$user->forceFill([
'is_active' => true,
'must_change_pw' => true,
'role' => 'admin',
])->save();
}
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
}
}

2600
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
package.json Normal file
View File

@ -0,0 +1,22 @@
{
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite"
},
"devDependencies": {
"@tailwindcss/vite": "^4.0.0",
"axios": "^1.11.0",
"concurrently": "^9.0.1",
"laravel-echo": "^2.2.4",
"laravel-vite-plugin": "^2.0.0",
"pusher-js": "^8.4.0",
"tailwindcss": "^4.0.0",
"vite": "^7.0.4"
},
"dependencies": {
"@phosphor-icons/web": "^2.1.2"
}
}

34
phpunit.xml Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<env name="NIGHTWATCH_ENABLED" value="false"/>
</php>
</phpunit>

25
public/.htaccess Normal file
View File

@ -0,0 +1,25 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Handle X-XSRF-Token Header
RewriteCond %{HTTP:x-xsrf-token} .
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

0
public/favicon.ico Normal file
View File

20
public/index.php Normal file
View File

@ -0,0 +1,20 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';
// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture());

2
public/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow:

116
resources/css/app.css Normal file
View File

@ -0,0 +1,116 @@
@import 'tailwindcss';
/*@import "@plugins/Toastra/src/message.css";*/
@import '@plugins/GlassToastra/style.css';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@theme {
--font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
--color-glass-bg: rgba(17, 24, 39, 0.55);
--color-glass-border: rgba(255, 255, 255, 0.08);
--color-glass-light: rgba(31, 41, 55, 0.4);
--color-accent: #06b6d4; /* cyan-500 */
--color-accent-600: #0891b2; /* cyan-600 */
--color-accent-700: #0e7490; /* cyan-700 */
--color-ring: rgba(34, 197, 94, .35); /* ein Hauch Grün im Focus-Glow */
}
/* Reusable utilities */
.glass-card {
@apply bg-glass-bg/70 backdrop-blur-md border border-glass-border rounded-2xl shadow-[0_8px_30px_rgba(0,0,0,.25)];
}
.glass-input {
@apply bg-glass-light/50 border border-glass-border rounded-lg text-gray-100 placeholder-gray-400
focus:outline-none focus:ring-4 focus:ring-[var(--color-ring)] focus:border-cyan-500/60
transition-colors;
}
.btn-primary {
@apply inline-flex items-center justify-center px-4 py-2 rounded-lg text-white font-medium
bg-gradient-to-b from-cyan-500 to-cyan-600 hover:from-cyan-400 hover:to-cyan-600
focus:outline-none focus:ring-4 focus:ring-[var(--color-ring)]
shadow-[inset_0_1px_0_rgba(255,255,255,.08),0_8px_20px_rgba(0,0,0,.25)];
}
.badge {
@apply text-xs px-2 py-0.5 rounded-md border border-glass-border text-gray-300/80 bg-glass-light/40;
}
.card-title {
@apply text-gray-100/95 font-semibold tracking-wide;
}
.card-subtle {
@apply text-gray-300/70 text-sm leading-relaxed;
}
/* Zustände für Inputs */
.input-error {
@apply border-red-400/50 focus:border-red-400/70 focus:ring-red-400/30;
}
.input-success {
@apply border-emerald-400/50 focus:border-emerald-400/70 focus:ring-emerald-400/30;
}
.input-disabled {
@apply opacity-60 cursor-not-allowed;
}
/* Label & Fehlermeldung */
.field-label {
@apply block text-sm text-gray-300 mb-1;
}
.field-error {
@apply mt-1 text-xs text-red-300;
}
.field-help {
@apply mt-1 text-xs text-gray-400;
}
/* Select im gleichen Look wie .glass-input */
.glass-select {
@apply bg-glass-light/50 border border-glass-border rounded-lg text-gray-100
focus:outline-none focus:ring-4 focus:ring-[var(--color-ring)]
focus:border-cyan-500/60 transition-colors;
}
/* Input mit Icon links (Wrapper) */
.input-with-icon {
@apply relative;
}
.input-with-icon > .icon-left {
@apply absolute inset-y-0 left-3 flex items-center text-gray-400;
}
.input-with-icon > input {
@apply pl-10; /* Platz für Icon */
}
/* Karten-Interaktion (leichtes Hover-Lift) */
.glass-card:hover {
@apply shadow-[0_12px_38px_rgba(0,0,0,.3)];
}
/* Buttons zusätzliche Varianten */
.btn-ghost {
@apply inline-flex items-center justify-center px-4 py-2 rounded-lg text-gray-200
bg-white/5 border border-white/10 hover:bg-white/10
focus:outline-none focus:ring-4 focus:ring-[var(--color-ring)];
}
.btn-danger {
@apply inline-flex items-center justify-center px-4 py-2 rounded-lg text-white
bg-gradient-to-b from-rose-500 to-rose-600 hover:from-rose-400 hover:to-rose-600
focus:outline-none focus:ring-4 focus:ring-rose-400/40;
}
/* Checkbox/Switch im Glas-Look */
.glass-checkbox {
@apply h-4 w-4 rounded border border-glass-border bg-white/10
checked:bg-cyan-500 checked:border-cyan-500
focus:ring-2 focus:ring-[var(--color-ring)];
}
/* Trennlinie in Karten */
.divider {
@apply border-t border-glass-border/80 my-6;
}

10
resources/js/app.js Normal file
View File

@ -0,0 +1,10 @@
import './bootstrap';
import "@phosphor-icons/web/duotone";
import "@phosphor-icons/web/light";
import "@phosphor-icons/web/regular";
import "@phosphor-icons/web/bold";
// import '@plugins/Toastra';
import '@plugins/GlassToastra/toastra.glass.js'
import './utils/events.js';

View File

@ -0,0 +1,6 @@
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
import './webserver/websocket.js'

View File

@ -0,0 +1,115 @@
/* Root-Container Positionierung */
.tg-root{ position:fixed; inset:0; pointer-events:none; z-index:99999; padding:16px; }
.tg-top{ align-items:flex-start; }
.tg-bottom{ align-items:flex-end; }
.tg-center{ display:flex; justify-content:center; }
.tg-left{ display:flex; justify-content:flex-start; }
.tg-right{ display:flex; justify-content:flex-end; }
/* Toast-Karte */
.tg-toast{
pointer-events:auto;
width:min(520px, calc(100vw - 32px));
background: rgba(17,24,39,.55);
border:1px solid rgba(255,255,255,.08);
backdrop-filter: blur(10px);
border-radius:16px;
box-shadow: 0 10px 30px rgba(0,0,0,.28);
position:relative;
overflow:hidden;
margin:10px;
transform: translateY(10px);
opacity:.0;
}
.tg-in{ animation: tgIn .36s ease forwards; }
.tg-out{ animation: tgOut .28s ease forwards; }
@keyframes tgIn { to { opacity:1; transform: translateY(0);} }
@keyframes tgOut { to { opacity:0; transform: translateY(8px);} }
/* Akzent links */
.tg-stripe{
position:absolute; left:10px; top:10px; bottom:10px; width:3px; border-radius:2px; opacity:.95;
}
/* Grid-Layout */
.tg-grid{
display:grid;
grid-template-columns: 48px 1fr auto;
grid-template-rows: auto auto auto;
grid-template-areas:
"icon head close"
"icon domain close"
"icon msg close";
gap:12px 16px;
padding:16px 18px 18px 18px;
}
/* Icon */
.tg-icon{
grid-area: icon;
width:48px; height:48px;
display:grid; place-items:center;
border-radius:12px;
background: rgba(255,255,255,.05);
border:1px solid rgba(255,255,255,.06);
box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.tg-spin{ animation: tgSpin 1s linear infinite; }
@keyframes tgSpin{ to { transform: rotate(360deg);} }
/* Header */
.tg-head{ grid-area: head; display:flex; align-items:center; gap:10px; color:#e5e7eb; }
.tg-badge{
display:inline-flex; align-items:center; gap:.25rem;
font-size:11px; font-weight:700; letter-spacing:.6px;
padding:5px 8px; border-radius:999px;
background: rgba(31,41,55,.55);
border:1px solid rgba(255,255,255,.12);
color:#d1d5db;
box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 14px rgba(0,0,0,.25);
}
.tg-title{ font-size:18px; letter-spacing:.2px; font-weight:800; }
/* Domain + Message */
.tg-domain{ grid-area: domain; font-size:20px; font-weight:800; color:#e5e7eb; }
.tg-msg { grid-area: msg; font-size:14px; color:#cbd5e1; }
/* Close */
.tg-close{
grid-area: close;
align-self:start;
background: rgba(255,255,255,.06);
border:1px solid rgba(255,255,255,.12);
border-radius:10px;
padding:6px; display:grid; place-items:center;
box-shadow: 0 0 10px rgba(0,0,0,.25);
}
.tg-close:hover{ background: rgba(255,255,255,.12); }
.tg-close.tg-spacer{ opacity:0; pointer-events:none; }
/* Kleine Status-Akzent-Farbton-Anpassung im Iconrahmen */
.tg-toast.tg-update .tg-icon{ border-color: rgba(6,182,212,.25); }
.tg-toast.tg-success .tg-icon{ border-color: rgba(34,197,94,.25); }
.tg-toast.tg-warning .tg-icon{ border-color: rgba(245,158,11,.25); }
.tg-toast.tg-error .tg-icon{ border-color: rgba(239,68,68,.25); }
.tg-card{ transform: translateY(8px); opacity:0; }
.tg-card.tg-in{ animation: tgIn .28s ease forwards; }
.tg-out .tg-card{ animation: tgOut .25s ease forwards; }
@keyframes tgIn { to { opacity:1; transform: translateY(0); } }
@keyframes tgOut { to { opacity:0; transform: translateY(6px); } }
.notification-badge {
font-size: 11px;
font-weight: 600;
letter-spacing: .5px;
padding: 3px 7px;
border-radius: 6px;
background: rgba(255,255,255,.08);
color: #cbd5e1;
}
.notification-container .text-base {
margin-top: 1px; /* etwas optische Höhe ausgleichen */
}

View File

@ -0,0 +1,241 @@
;(() => {
// ---- Config --------------------------------------------------------------
const MAX_PER_POSITION = 3; // wie viele Toasts pro Ecke sichtbar
const ROOT_PREFIX = 'toastra-root-'; // pro Position eigener Container
const POS_STYLES = {
'top-left' : ['top:1.5rem','left:1.5rem'],
'top-center' : ['top:1.5rem','left:50%','transform:translateX(-50%)'],
'top-right' : ['top:1.5rem','right:1.5rem'],
'bottom-left' : ['bottom:1.5rem','left:1.5rem'],
'bottom-center': ['bottom:1.5rem','left:50%','transform:translateX(-50%)'],
'bottom-right' : ['bottom:1.5rem','right:1.5rem'],
};
// ---- One-time style injection -------------------------------------------
let styleInjected = false;
function injectStyleOnce() {
if (styleInjected) return;
styleInjected = true;
const css = `
/* Mount/Unmount Animations */
.tg-card { opacity: 0; transform: translateY(6px); will-change: transform, opacity; }
.tg-in { animation: tgIn .28s ease-out forwards; }
.tg-out { animation: tgOut .28s ease-in forwards; }
@keyframes tgIn { from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none} }
@keyframes tgOut { from{opacity:1; transform:none} to{opacity:0; transform:translateY(6px)} }
/* kleine Progress-Move-Anim */
@keyframes tgProgress {
0% { transform: translateX(-60%) }
50%{ transform: translateX(10%) }
100%{ transform: translateX(120%) }
}
/* Badge im Title (Fallback, falls du kein Tailwind-Badge willst) */
.tg-badge {
display:inline-flex; align-items:center; gap:.25rem;
padding:.25rem .5rem; border-radius:.5rem;
font-size:.7rem; font-weight:700; letter-spacing:.5px;
background: rgba(255,255,255,.08); color:#cbd5e1;
border:1px solid rgba(255,255,255,.12);
}
/* Close-Hitbox */
.tg-close {
display:inline-flex; align-items:center; justify-content:center;
width:32px; height:32px; border-radius:.6rem;
background: rgba(255,255,255,.08);
border: 1px solid rgba(255,255,255,.12);
box-shadow: 0 0 10px rgba(0,0,0,.25);
transition: background .15s ease;
}
.tg-close:hover { background: rgba(255,255,255,.12) }
.tg-close svg path { stroke: rgba(229,231,235,.9) }
/* Stack-Abstand */
[data-toastra-stack] > div { margin-bottom: .75rem }
`;
const el = document.createElement('style');
el.textContent = css;
document.head.appendChild(el);
}
// ---- Helpers -------------------------------------------------------------
function ensureRoot(position) {
injectStyleOnce();
const pos = POS_STYLES[position] ? position : 'bottom-right';
const id = ROOT_PREFIX + pos;
let root = document.getElementById(id);
if (!root) {
root = document.createElement('div');
root.id = id;
root.setAttribute('data-toastra-stack', pos);
root.style.position = 'fixed';
root.style.zIndex = '99999';
root.style.pointerEvents = 'none';
root.style.width = 'clamp(260px, 92vw, 480px)';
document.body.appendChild(root);
}
root.style.cssText = [
'position:fixed','z-index:99999','pointer-events:none','width:clamp(260px,92vw,480px)'
].concat(POS_STYLES[pos]).join(';');
return root;
}
function statusMap(state) {
switch (state) {
case 'done':
return { text: 'Erledigt', pill: 'bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30', icon: 'ph ph-check-circle' };
case 'failed':
return { text: 'Fehlgeschlagen', pill: 'bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/30', icon: 'ph ph-x-circle' };
case 'running':
return { text: 'Läuft…', pill: 'bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/30', icon: 'ph ph-arrow-clockwise animate-spin' };
default:
return { text: 'Wartet…', pill: 'bg-amber-500/15 text-amber-300 ring-1 ring-amber-500/30', icon: 'ph ph-pause-circle' };
}
}
function buildHTML(o){
const st = statusMap(o.state);
const progress = (o.state === 'running' || o.state === 'queued')
? `<div class="mt-3 h-1.5 w-full rounded-full bg-white/5 overflow-hidden">
<div class="h-full w-1/2 bg-cyan-400/50 tg-progress"></div>
</div>` : '';
const closeBtn = (o.close !== false)
? `<button class="rounded-lg bg-white/10 hover:bg-white/15 border border-white/15 p-1.5 ml-2 flex-shrink-0"
style="box-shadow:0 0 10px rgba(0,0,0,.25)" data-tg-close>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none">
<path d="M8 8l8 8M16 8l-8 8" stroke="rgba(229,231,235,.9)" stroke-linecap="round"/>
</svg>
</button>`
: '<div style="width:28px;height:28px"></div>';
return `
<div class="glass-card border border-glass-border/70 rounded-2xl p-4 shadow-[0_10px_30px_rgba(0,0,0,.35)] pointer-events-auto tg-card">
<div class="flex items-center justify-between gap-4">
<!-- Linke Seite -->
<div class="flex items-center gap-3 min-w-0">
${o.badge ? `<span class="badge !bg-glass-light/50 !border-glass-border whitespace-nowrap">${String(o.badge).toUpperCase()}</span>` : ''}
${o.domain ? `<div class="text-base font-semibold text-gray-100/95 tracking-tight truncate">${o.domain}</div>` : ''}
</div>
<!-- Rechte Seite -->
<div class="flex items-center gap-2 flex-shrink-0">
<span class="text-[13px] text-gray-300/80">Status</span>
<span class="px-2.5 py-1 rounded-lg text-[12px] leading-none whitespace-nowrap ${st.pill}">
<i class="${st.icon} text-[14px] align-[-1px]"></i>
<span class="ml-1">${st.text}</span>
</span>
${closeBtn}
</div>
</div>
${o.message ? `<p class="mt-3 text-[15px] text-gray-200/90 leading-relaxed">${o.message}</p>` : ''}
${progress}
${o.finalNote ? `<p class="mt-3 text-[12px] text-gray-400">${o.finalNote}</p>` : ''}
</div>`;
}
function remove(wrapper) {
if (!wrapper) return;
const card = wrapper.firstElementChild;
if (!card) return wrapper.remove();
card.classList.add('tg-out');
card.addEventListener('animationend', () => {
wrapper.remove();
}, { once: true });
}
// ---- Public API ----------------------------------------------------------
function show(options) {
const o = Object.assign({
id: 'toast-' + Date.now(), // gleicher id => ersetzt
state: 'queued', // queued|running|done|failed
badge: null,
domain: '',
message: '',
finalNote: '',
position: 'bottom-right',
duration: 0, // 0 => stehenlassen; bei done/failed wird (falls 0) 6000ms genommen
close: true,
}, options || {});
const root = ensureRoot(o.position);
// Stack-Limit pro Position
const current = Array.from(root.querySelectorAll('[data-tg-id]'));
if (!current.find(n => n.dataset.tgId === o.id) && current.length >= MAX_PER_POSITION) {
remove(current[ current.length - 1 ]); // ältesten unten entfernen
}
const wrapper = document.createElement('div');
wrapper.setAttribute('data-tg-id', o.id);
wrapper.innerHTML = buildHTML(o);
const prev = root.querySelector(`[data-tg-id="${o.id}"]`);
if (prev) {
prev.replaceWith(wrapper);
} else {
root.prepend(wrapper);
}
// Progress anim
const prog = wrapper.querySelector('.tg-progress');
if (prog) {
prog.style.animation = 'tgProgress 1.6s ease-in-out infinite';
}
// Close (Maus & Keyboard)
const btn = wrapper.querySelector('[data-tg-close]');
if (btn) {
btn.addEventListener('click', () => remove(wrapper));
btn.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault(); remove(wrapper);
}
});
btn.tabIndex = 0;
}
// Mount anim
requestAnimationFrame(() => wrapper.firstElementChild.classList.add('tg-in'));
// Auto-Close
const autoMs = (o.state === 'done' || o.state === 'failed')
? Number(o.duration || 6000)
: Number(o.duration || 0);
if (autoMs > 0) setTimeout(() => remove(wrapper), autoMs);
return o.id;
}
function update(id, options) {
// Einfach erneut show mit gleicher id => ersetzt in-place
if (!id) return;
const root = document.body.querySelector(`[id^="${ROOT_PREFIX}"]`); // irgendeine Ecke
const found = root && document.querySelector(`[data-tg-id="${id}"]`);
const currentPos = found ? found.parentElement.getAttribute('data-toastra-stack') : 'bottom-right';
show(Object.assign({ id, position: currentPos }, options || {}));
}
function dismiss(id) {
const el = id
? document.querySelector(`[data-tg-id="${id}"]`)
: null;
if (el) remove(el);
}
function clear(position) {
const root = position
? document.getElementById(ROOT_PREFIX + position)
: null;
(root ? Array.from(root.children) : Array.from(document.querySelectorAll(`[id^="${ROOT_PREFIX}"] > div`)))
.forEach(remove);
}
window.toastraGlass = { show, update, dismiss, clear };
})();

View File

@ -0,0 +1,145 @@
# 🧁 Toastra Notification Plugin
Ein universelles Notification-System für jede Art von Projekt (Vanilla JS, Laravel + Vite, usw.). Über eine globale `toastra.notify(...)`-API können Benachrichtigungen angezeigt werden, während eine globale `config.js` Standardwerte (Position, Dauer, Animation etc.) verwaltet.
Dieses Plugin ist **nicht** von Vue, React oder AlpineJS abhängig alles läuft in reinem JavaScript.
**Domain:** [toastra.com](https://toastra.com)
---
## 📁 Verzeichnisstruktur
```
src/
└── plugins/
└── Toastra/
├── index.js
├── src/
│ ├── config.js
│ ├── message.js
│ └── message.css
└── README.md
```
---
## ⚙️ Integration
### 1. HTML-Einbindung (ohne Build-Tool)
```html
<script src="path/to/Toastra/index.js"></script>
<link rel="stylesheet" href="path/to/Toastra/src/message.css">
```
Jetzt kannst du direkt `toastra.notify(...)` verwenden.
---
### 2. Laravel + Vite Setup
#### Vite-Konfiguration (`vite.config.js`)
```js
resolve: {
alias: {
'@': '/resources/js',
'@toastra': '/src/plugins/Toastra',
},
}
```
#### In `app.js` importieren:
```js
import '@toastra';
```
#### In `app.css` importieren:
```css
@import "@toastra/src/message.css";
```
---
## 🚀 Verwendung
### Standardwerte in `config.js`
```js
toastra.config({
mode: "dark-mode",
icon: true,
position: "bottom-center",
progressbar: true,
animation: "slide-up",
});
```
### Benachrichtigung anzeigen
```js
toastra.notify({ text: 'Hallo Welt!' });
toastra.notify({
title: 'Fehler',
text: 'Es ist etwas schiefgelaufen!',
type: 'error'
});
toastra.notify({
type: 'success',
text: 'Gespeichert!',
position: 'top-center',
duration: 8000
});
```
---
## ⚙️ Konfigurationsoptionen
| **Key** | **Standard** | **Beschreibung** | **Mögliche Werte** |
|--------------------|------------------------------------------------|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| `type` | `'default'` | Stil der Nachricht | `'default'`, `'success'`, `'info'`, `'warning'`, `'error'`, `'update'` |
| `mode` | `'default-mode'` | Farbmodus | `'default-mode'`, `'light-mode'`, `'dark-mode'` |
| `position` | `'top-right'` | Anzeigeort | `'top-left'`, `'top-center'`, `'top-right'`, `'bottom-left'`, `'bottom-center'`, `'bottom-right'` |
| `duration` | `3000` | Anzeigezeit in ms | Zahl |
| `selector` | `'body'` | Container für die Nachricht | CSS-Selektor |
| `icon` | `null` | Icon anzeigen | `true`, `null`, HTML-String |
| `progressbar` | `false` | Fortschrittsbalken | `true`/`false` |
| `close` | `false` | Manuelles Schließen | `true`/`false` |
| `title` | `''` | Titelzeile | String |
| `text` | `'Hi Guys, how are you?'` | Nachrichtentext | String |
| `onComplete` | `null` | Callback bei Ende | Funktion oder `null` |
| `onCompleteParams` | `{}` | Parameter für Callback | Objekt |
| `offset` | `{ top: '', left: '', right: '', bottom: '' }` | Abstand zum Bildschirmrand | CSS-Werte wie `'20px'` |
| `style` | `{ color: '', background: '' }` | Benutzerdefinierte Farben | CSS-Stilobjekt |
| `animation` | `'slide-right'` | Ein-/Ausblendanimation | `'slide-right'`, `'slide-left'`, `'slide-up'`, `'slide-down'` |
| `classname` | `''` | Zusätzliche CSS-Klassen | `'my-toast custom-class'` |
---
## 📝 Styling
Passe `message.css` an, um z.B. Farben, Abstände oder Animationen zu ändern. Auch mit Tailwind erweiterbar.
---
## 🧪 Demo & Vorschau
Live-Demo bald verfügbar unter **[toastra.com](https://toastra.com)**
Für lokale Tests einfach im Projekt:
```js
toastra.notify({ text: '🎉 Toastra funktioniert!' });
```
---
## ✅ Fazit
- Modular, Framework-unabhängig
- Elegante Toast-Benachrichtigungen
- Frei konfigurierbar über `toastra.config(...)` und `toastra.notify(...)`

View File

@ -0,0 +1,2 @@
import './src/config.js';
import './src/message.js';

View File

@ -0,0 +1,53 @@
/*
|--------------------------------------------------------------------------
| Notification Toast link
|--------------------------------------------------------------------------
|
| Import Notification Function.
|
*/
import "./message.js";
/*
|--------------------------------------------------------------------------
| Toastra Notification Toast config
|--------------------------------------------------------------------------
|
| Set your configuration for the Notification Toasts..
|
| type: 'default', // default, success, info, warning, error, update
| mode: 'default-mode', // default-mode, light-mode, dark-mode
| position: 'top-right', // top-left, top-center, top-right, bottom-left, bottom-center, bottom-right
| duration: 3000, // duration in milliseconds 3000 = 3s
| selector: 'body', // Select Tag, Class or id to display the Notification div
| icon: null, // Set true for default-icons or insert an SVG or image with <img src="..." ... >
| progressbar: false, // display Close Progressbar = true / false
| close: false, // display Close button = true / false
| title: 'Hi Guys', // set custom displayed Text
| text: 'Hi Guys', // set custom displayed Text
| onComplete: null, // Callback funktion
| onCompleteParams: {}, // Callback function Parameter
| offset: { // Set your own offset for the Notification div.
| top: '',
| left: '',
| right: '',
| bottom: '',
| },
| style: { // Set your own style for the Notification div.
| color: '',
| background: '',
| },
| animation: 'slide-right', // slide-right, slide-left, slide-up, slide-down
| classname: '' // Set custom classes
|
|
*/
toastra.config({
mode: "glass-mode",
icon: true,
position: "bottom-center",
progressbar: true,
animation: "slide-up",
});

View File

@ -0,0 +1,777 @@
* {
--toast-white: 255,255,255;
--toast-black: 0,0,0;
--toast-green: 102, 187, 106;
--toast-red: 239, 83, 80;
--toast-nutral: 189, 189, 189;
--toast-orange: 255, 165, 0;
--toast-yellow: 212 194 129;
--toast-gray: 238, 238, 238;
--toast-dark-gray: 140, 140, 140;
--white: 255, 255, 255;
--box-shaddow-inset: inset 10px -10px 15px -15px;
--box-shaddow-outset: 0px 10px 10px -4px rgb(0 0 0 / 0.4);
--toast-lightmode: #ffffff;
--toast-darkmode: #1b1b1e;
--toast-progressbar: #8f8f8f;
--glass-bg: rgba(17, 24, 39, 0.55); /* #111827 @ ~55% */
--glass-bg-light: rgba(31, 41, 55, 0.40); /* #1F2937 */
--glass-border: rgba(255, 255, 255, 0.08);
--glass-ring: rgba(34, 197, 94, 0.35); /* soft green glow */
}
.notification {
position: fixed;
z-index: 999999;
max-width: 350px;
width: 100%;
}
.top-right {
top: 20px;
right: 20px;
}
.top-center {
top: 20px;
left: 50%;
transform: translateX(-50%);
}
.bottom-left {
bottom: 20px;
left: 20px;
}
.bottom-right {
bottom: 20px;
right: 20px;
}
.bottom-center {
bottom: 20px;
left: 50%;
transform: translateX(-50%);
}
.top-left {
top: 20px;
left: 20px;
}
.notification-title {
padding-right: 30px;
}
.notification-icon {
min-width: 1.7rem;
background-repeat: no-repeat;
background-position: center;
padding: 2px;
border-radius: 5px;
}
.notification-dismiss-btn {
position: absolute;
top: 12px;
right: 12px;
backdrop-filter: blur(10px);
border-radius: 5px;
box-shadow: 0 0 6px -2px black;
transition: background 200ms;
}
.notification-dismiss-btn:hover {
background: rgba(255, 255, 255, 0.44);
}
.notification-dismiss-btn svg {
width: 1.5rem;
}
/*.default-mode {*/
.notification-toast-default {
background: var(--toast-white);
color: rgba(var(--toast-black));
/*box-shadow: var(--box-shaddow-inset) rgba(var(--black-300)), var(--box-shaddow-outset);*/
}
.notification-toast-update {
color: var(--toast-white);
svg :nth-child(1) {
stroke: rgba(var(--toast-white));
}
}
.notification-toast-success {
color: rgba(var(--toast-black));
svg path {
stroke: rgba(var(--toast-green));
}
.notification-icon {
background: rgba(var(--toast-green),.1);
box-shadow: var(--box-shaddow-inset) rgba(var(--toast-green),.5);
}
.notification-title {
color: rgba(var(--toast-green));
}
.notification-dismiss-btn {
background: rgba(var(--toast-green),.1);
}
}
.notification-toast-success:before {
background: rgba(var(--toast-green));
}
.notification-toast-warning {
color: rgba(var(--toast-black));
svg path {
stroke: rgba(var(--toast-orange));
}
.notification-icon {
background: rgba(var(--toast-orange),.1);
box-shadow: var(--box-shaddow-inset) rgba(var(--toast-orange),.5);
}
.notification-title {
color: rgba(var(--toast-orange));
}
.notification-dismiss-btn {
background: rgba(var(--toast-orange),.1);
}
}
.notification-toast-warning:before {
background: rgba(var(--toast-orange));
}
.notification-toast-info {
color: rgba(var(--toast-black));
svg path {
stroke: rgba(var(--toast-gray));
}
.notification-icon {
background: rgba(var(--toast-dark-gray),.1);
box-shadow: var(--box-shaddow-inset) rgba(var(--toast-dark-gray),.5);
}
.notification-title {
color: rgba(var(--toast-gray));
}
.notification-dismiss-btn {
background: rgba(var(--toast-gray),.1);
}
}
.notification-toast-info:before {
background: rgba(var(--toast-dark-gray));
}
.notification-toast-error {
color: rgba(var(--toast-black));
svg path {
stroke: rgba(var(--toast-red));
}
.notification-icon {
background: rgba(var(--toast-red),.1);
box-shadow: var(--box-shaddow-inset) rgba(var(--toast-red),.5);
}
.notification-title {
color: rgba(var(--toast-red));
}
.notification-dismiss-btn {
background: rgba(var(--toast-red),.1);
}
}
.notification-toast-error:before {
background: rgba(var(--toast-red));
}
/*}*/
.light-mode {
.notification-toast-default,
.notification-toast-success,
.notification-toast-update,
.notification-toast-warning,
.notification-toast-info,
.notification-toast-error {
background: var(--toast-lightmode);
color: rgba(var(--toast-black));
}
}
.dark-mode {
.notification-toast-default,
.notification-toast-success,
.notification-toast-update,
.notification-toast-warning,
.notification-toast-info,
.notification-toast-error {
background: var(--toast-darkmode);
color: var(--toast-white);
}
}
.notification-toast-default .notification-progressbar {
background: var(--toast-progressbar);
}
.notification-toast-success .notification-progressbar {
background: rgba(var(--toast-green));
}
.notification-toast-info .notification-progressbar {
background: var(--toast-progressbar);
}
.notification-toast-warning .notification-progressbar {
background: rgba(var(--toast-orange));
}
.notification-toast-error .notification-progressbar {
background: rgba(var(--toast-red));
}
.notification-toast-update .notification-progressbar {
background: var(--toast-progressbar);
}
.top-right .notification-container,
.bottom-right .notification-container {
margin-left: auto;
}
.top-left .notification-container,
.bottom-left .notification-container {
margin-right: auto;
}
.top-center .notification-container,
.bottom-center .notification-container {
margin-right: auto;
margin-left: auto;
}
.notification-progressbar {
position: absolute;
bottom: 0;
right: 0;
height: 3px;
width: 0;
transition: width attr(data-duration ms) linear;
border-radius: 2px;
}
.notification-container {
position: relative;
margin: 5px;
width: fit-content;
border-radius: 10px;
opacity: 0.95;
overflow: hidden;
transition: opacity 500ms ease-in-out,
transform 500ms;
}
.notification-container:before {
content: "";
position: absolute;
width: 30px;
height: 30px;
filter: blur(15px);
top: 50%;
transform: translateY(-50%);
left: -20px;
border-radius: 100%;
}
.notification-message {
font-size: 13px;
line-height: 1;
}
.notification-active {
right: 5px;
}
.notification-block {
position: relative;
display: flex;
align-items: center;
padding: 15px 15px;
gap: 10px;
}
.notification-block b {
line-height: 2;
}
.notification-animation {
padding: 0.125rem;
animation: update 1s linear infinite;
}
@keyframes update {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.slide-in.slide-down {
animation: slideInDown 600ms;
}
.slide-out.slide-down {
animation: slideOutDown 600ms;
}
@keyframes slideInDown {
from {
transform: translateY(-100vh);
}
to {
transform: unset;
}
}
@keyframes slideOutDown {
from {
transform: unset;
}
to {
transform: translateY(-100vh);
}
}
.slide-in.slide-up {
animation: slideInUp 600ms;
}
.slide-out.slide-up {
animation: slideOutUp 600ms;
}
@keyframes slideInUp {
from {
transform: translateY(100vh);
}
to {
transform: unset;
}
}
@keyframes slideOutUp {
from {
transform: unset;
}
to {
transform: translateY(100vh);
}
}
.slide-in.slide-right {
animation: slideInRight 600ms;
}
.slide-out.slide-right {
animation: slideOutRight 600ms;
}
@keyframes slideInRight {
from {
transform: translateX(100vh);
}
to {
transform: unset;
}
}
@keyframes slideOutRight {
from {
transform: unset;
}
to {
transform: translateX(100vh);
}
}
.slide-in.slide-left {
animation: slideInLeft 600ms;
}
.slide-out.slide-left {
animation: slideOutLeft 600ms;
}
@keyframes slideInLeft {
from {
transform: translateX(-100vh);
}
to {
transform: unset;
}
}
@keyframes slideOutLeft {
from {
transform: unset;
}
to {
transform: translateX(-100vh);
}
}
/*.notification.glass-mode .notification-container {*/
/* backdrop-filter: blur(10px);*/
/* background: rgba(31,41,55,.45);*/
/* border: 1px solid rgba(255,255,255,.08);*/
/* border-radius: 14px;*/
/* box-shadow: 0 8px 30px rgba(0,0,0,.25);*/
/*}*/
/*.notification-title { color: #e5e7eb; } !* text-gray-200 *!*/
/*.notification-text { color: #cbd5e1; } !* text-gray-300 *!*/
/*!* Root container gets .glass-mode in addition to .notification *!*/
/*.notification.glass-mode {*/
/* !* Positions bleiben wie gehabt *!*/
/*}*/
/*!* Ein einzelner Toast *!*/
/*.notification.glass-mode .notification-container {*/
/* background: var(--glass-bg);*/
/* backdrop-filter: blur(10px);*/
/* -webkit-backdrop-filter: blur(10px);*/
/* border: 1px solid var(--glass-border);*/
/* border-radius: 14px;*/
/* box-shadow: 0 8px 30px rgba(0,0,0,.25);*/
/* color: rgba(var(--toast-white), .95);*/
/*}*/
/*!* Innerer Block *!*/
/*.notification.glass-mode .notification-block {*/
/* background: linear-gradient(*/
/* 180deg,*/
/* rgba(255,255,255,0.02) 0%,*/
/* rgba(0,0,0,0.05) 100%*/
/* );*/
/* border-radius: 12px;*/
/*}*/
/*!* Titel/Copy *!*/
/*.notification.glass-mode .notification-title {*/
/* color: rgba(229,231,235,.95); !* gray-200 *!*/
/* font-weight: 600;*/
/*}*/
/*.notification.glass-mode .notification-message {*/
/* color: rgba(203,213,225,.95); !* gray-300 *!*/
/*}*/
/*!* Dismiss *!*/
/*.notification.glass-mode .notification-dismiss-btn {*/
/* background: rgba(255,255,255,0.06);*/
/* border: 1px solid var(--glass-border);*/
/* box-shadow: 0 4px 16px rgba(0,0,0,.2);*/
/*}*/
/*.notification.glass-mode .notification-dismiss-btn:hover {*/
/* background: rgba(255,255,255,0.12);*/
/*}*/
/*!* Icon-Kapsel *!*/
/*.notification.glass-mode .notification-icon {*/
/* background: var(--glass-bg-light);*/
/* border: 1px solid var(--glass-border);*/
/* box-shadow: inset 0 1px 0 rgba(255,255,255,.04);*/
/*}*/
/*!* Progressbar (fein, halbtransparent) *!*/
/*.notification.glass-mode .notification-progressbar {*/
/* height: 2px;*/
/* border-radius: 1px;*/
/* opacity: .9;*/
/*}*/
/*!* Variants dezente Akzentfarbe + linkes Accent-Bar *!*/
/*.notification.glass-mode .notification-container { position: relative; }*/
/*.notification.glass-mode .notification-container::before {*/
/* content: "";*/
/* position: absolute;*/
/* inset: 0 0 0 auto; !* deaktiviert — wir nutzen unten per Variant *!*/
/*}*/
/*!* SUCCESS *!*/
/*.notification.glass-mode .notification-toast-success {*/
/* --accent: rgba(var(--toast-green), 1);*/
/*}*/
/*.notification.glass-mode .notification-toast-success .notification-icon {*/
/* background: rgba(var(--toast-green), .12);*/
/* border-color: rgba(var(--toast-green), .25);*/
/*}*/
/*.notification.glass-mode .notification-toast-success .notification-title {*/
/* color: rgba(var(--toast-green), .95);*/
/*}*/
/*.notification.glass-mode .notification-toast-success .notification-progressbar {*/
/* background: var(--accent);*/
/*}*/
/*.notification.glass-mode .notification-toast-success::before {*/
/* content: "";*/
/* position: absolute;*/
/* left: 0; top: 0; bottom: 0; width: 3px;*/
/* background: linear-gradient(180deg, var(--accent), rgba(var(--toast-green), .6));*/
/* border-radius: 3px 0 0 3px;*/
/*}*/
/*!* INFO / UPDATE (neutral) *!*/
/*.notification.glass-mode .notification-toast-info,*/
/*.notification.glass-mode .notification-toast-update {*/
/* --accent: rgba(var(--toast-dark-gray), 1);*/
/*}*/
/*.notification.glass-mode .notification-toast-info .notification-icon,*/
/*.notification.glass-mode .notification-toast-update .notification-icon {*/
/* background: rgba(var(--toast-dark-gray), .12);*/
/* border-color: rgba(var(--toast-dark-gray), .25);*/
/*}*/
/*.notification.glass-mode .notification-toast-info .notification-title,*/
/*.notification.glass-mode .notification-toast-update .notification-title {*/
/* color: rgba(var(--toast-gray), .95);*/
/*}*/
/*.notification.glass-mode .notification-toast-info .notification-progressbar,*/
/*.notification.glass-mode .notification-toast-update .notification-progressbar {*/
/* background: var(--accent);*/
/*}*/
/*.notification.glass-mode .notification-toast-info::before,*/
/*.notification.glass-mode .notification-toast-update::before {*/
/* content: "";*/
/* position: absolute;*/
/* left: 0; top: 0; bottom: 0; width: 3px;*/
/* background: linear-gradient(180deg, var(--accent), rgba(var(--toast-dark-gray), .6));*/
/* border-radius: 3px 0 0 3px;*/
/*}*/
/*!* WARNING *!*/
/*.notification.glass-mode .notification-toast-warning {*/
/* --accent: rgba(var(--toast-orange), 1);*/
/*}*/
/*.notification.glass-mode .notification-toast-warning .notification-icon {*/
/* background: rgba(var(--toast-orange), .12);*/
/* border-color: rgba(var(--toast-orange), .25);*/
/*}*/
/*.notification.glass-mode .notification-toast-warning .notification-title {*/
/* color: rgba(var(--toast-orange), .95);*/
/*}*/
/*.notification.glass-mode .notification-toast-warning .notification-progressbar {*/
/* background: var(--accent);*/
/*}*/
/*.notification.glass-mode .notification-toast-warning::before {*/
/* content: "";*/
/* position: absolute;*/
/* left: 0; top: 0; bottom: 0; width: 3px;*/
/* background: linear-gradient(180deg, var(--accent), rgba(var(--toast-orange), .6));*/
/* border-radius: 3px 0 0 3px;*/
/*}*/
/*!* ERROR *!*/
/*.notification.glass-mode .notification-toast-error {*/
/* --accent: rgba(var(--toast-red), 1);*/
/*}*/
/*.notification.glass-mode .notification-toast-error .notification-icon {*/
/* background: rgba(var(--toast-red), .12);*/
/* border-color: rgba(var(--toast-red), .25);*/
/*}*/
/*.notification.glass-mode .notification-toast-error .notification-title {*/
/* color: rgba(var(--toast-red), .95);*/
/*}*/
/*.notification.glass-mode .notification-toast-error .notification-progressbar {*/
/* background: var(--accent);*/
/*}*/
/*.notification.glass-mode .notification-toast-error::before {*/
/* content: "";*/
/* position: absolute;*/
/* left: 0; top: 0; bottom: 0; width: 3px;*/
/* background: linear-gradient(180deg, var(--accent), rgba(var(--toast-red), .6));*/
/* border-radius: 3px 0 0 3px;*/
/*}*/
/* ===== Toast · Glass v2 (Badge) ===== */
.notification.glass-mode .notification-container {
backdrop-filter: blur(14px);
background: rgba(17, 24, 39, .52); /* dunkleres Glas */
border: 1px solid rgba(255,255,255,.09);
border-radius: 16px;
box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
.notification.glass-mode .notification-block {
padding: 14px 16px 16px 16px;
gap: 12px;
}
/* Icon als soft pill */
.notification.glass-mode .notification-icon {
width: 34px;
height: 34px;
display: grid;
place-items: center;
border-radius: 10px;
background: rgba(255,255,255,.06);
border: 1px solid rgba(255,255,255,.08);
box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
/* Headline-Zeile: Badge + Title */
.notification.glass-mode .notification-title {
display: flex;
align-items: center;
gap: 10px;
padding-right: 36px; /* Platz für Close */
font-weight: 700;
letter-spacing: .2px;
color: #e5e7eb; /* text-gray-200 */
}
/* Badge aus data-badge rendern */
.notification.glass-mode .notification-container[data-badge] .notification-title::before {
content: attr(data-badge);
font-size: 10px;
font-weight: 700;
letter-spacing: .6px;
padding: 4px 8px;
border-radius: 9px;
border: 1px solid rgba(255,255,255,.10);
background: rgba(31,41,55,.55); /* dunkles Glas */
color: #cbd5e1; /* text-gray-300 */
box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
/* Subtext */
.notification.glass-mode .notification-message {
margin-top: 6px;
line-height: 1.35;
color: #cbd5e1; /* text-gray-300 */
}
/* Close-Button dezenter */
.notification.glass-mode .notification-dismiss-btn {
top: 10px; right: 10px;
width: 30px; height: 30px;
display: grid; place-items: center;
background: rgba(255,255,255,.06);
border: 1px solid rgba(255,255,255,.10);
box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.notification.glass-mode .notification-dismiss-btn:hover {
background: rgba(255,255,255,.12);
}
/* Progressbar dünn & soft */
.notification.glass-mode .notification-progressbar {
height: 2px;
border-radius: 2px;
opacity: .9;
}
/* --- State-Akzente -------------------------------------------------- */
:root {
--toast-accent-cyan: 14,116,144; /* cyan-700 */
--toast-accent-green: 34,197, 94; /* green-500 */
--toast-accent-red: 239, 68, 68; /* red-500 */
--toast-accent-amber:245,158, 11; /* amber-500 */
--toast-accent-gray: 148,163,184; /* slate-400 */
}
/* Update / running */
.notification-toast-update .notification-icon {
background: rgba(var(--toast-accent-cyan), .12);
border-color: rgba(var(--toast-accent-cyan), .28);
}
.notification-toast-update .notification-title { color:#e6fbff; }
.notification-toast-update .notification-progressbar {
background: rgba(var(--toast-accent-cyan), .85);
}
/* Success */
.notification-toast-success .notification-icon {
background: rgba(var(--toast-accent-green), .10);
border-color: rgba(var(--toast-accent-green), .25);
}
.notification-toast-success .notification-title { color: #bbf7d0; } /* green-200 */
.notification-toast-success .notification-progressbar {
background: rgba(var(--toast-accent-green), .9);
}
/* Error */
.notification-toast-error .notification-icon {
background: rgba(var(--toast-accent-red), .10);
border-color: rgba(var(--toast-accent-red), .28);
}
.notification-toast-error .notification-title { color: #fecaca; } /* red-200 */
.notification-toast-error .notification-progressbar {
background: rgba(var(--toast-accent-red), .9);
}
/* Info */
.notification-toast-info .notification-icon {
background: rgba(var(--toast-accent-gray), .10);
border-color: rgba(var(--toast-accent-gray), .25);
}
.notification-toast-info .notification-title { color:#e5e7eb; }
.notification-toast-info .notification-progressbar {
background: rgba(var(--toast-accent-gray), .85);
}
/* Title row with inline badge */
.notification-title {
display: flex;
align-items: center;
gap: .5rem; /* space between badge and title */
line-height: 1.2;
margin-bottom: .15rem;
}
/* The badge itself (glass-styled) */
.notification-badge {
font-size: 10px;
font-weight: 700;
letter-spacing: .6px;
padding: 4px 8px;
border-radius: 9px;
border: 1px solid rgba(255,255,255,.10);
background: rgba(31,41,55,.55);
color: #cbd5e1; /* gray-300 */
box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
/* keep your bold style on the title text itself */
.notification-title-text b {
color: #e5e7eb; /* gray-200 */
font-weight: 800;
letter-spacing: .3px;
}
/* Subtitle (domain) on its own line, slightly larger and brighter */
.notification-subtitle {
margin-top: .25rem;
font-weight: 700;
color: #e5e7eb; /* gray-200 */
}
/* Glass container (you already had this, listing again for completeness) */
.notification.glass-mode .notification-container {
backdrop-filter: blur(10px);
background: rgba(31,41,55,.45);
border: 1px solid rgba(255,255,255,.08);
border-radius: 14px;
box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

View File

@ -0,0 +1,284 @@
function Toastra() {
let options = {};
let globals = {
type: "default",
mode: "default-mode",
position: "top-right",
duration: 3000,
selector: "body",
icon: null,
progressbar: false,
close: false,
title: "",
badge: null,
text: "Hi Guys, i'am Toastra!",
onComplete: null,
onCompleteParams: {},
offset: {
top: "",
left: "",
right: "",
bottom: "",
},
style: {
color: "",
background: "",
},
animation: "slide-right",
classname: "",
};
const icons = {
default:
'<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.7281 3.88396C17.1624 2.44407 19.2604 2.41383 20.4219 3.57981C21.5856 4.74798 21.5542 6.85922 20.1189 8.30009L17.6951 10.7333C17.4028 11.0268 17.4037 11.5017 17.6971 11.794C17.9906 12.0863 18.4655 12.0854 18.7578 11.7919L21.1816 9.35869C23.0929 7.43998 23.3329 4.37665 21.4846 2.5212C19.6342 0.663551 16.5776 0.905664 14.6653 2.82536L9.81768 7.69182C7.90639 9.61053 7.66643 12.6739 9.5147 14.5293C9.80702 14.8228 10.2819 14.8237 10.5754 14.5314C10.8688 14.2391 10.8697 13.7642 10.5774 13.4707C9.41376 12.3026 9.4451 10.1913 10.8804 8.75042L15.7281 3.88396Z" fill="rgb(0,191,255)"></path><path opacity="0.5" d="M14.4846 9.4707C14.1923 9.17724 13.7174 9.17632 13.4239 9.46864C13.1305 9.76097 13.1296 10.2358 13.4219 10.5293C14.5856 11.6975 14.5542 13.8087 13.1189 15.2496L8.27129 20.1161C6.83696 21.556 4.73889 21.5862 3.57742 20.4202C2.41376 19.2521 2.4451 17.1408 3.8804 15.6999L6.30424 13.2666C6.59657 12.9732 6.59565 12.4983 6.30219 12.206C6.00873 11.9137 5.53386 11.9146 5.24153 12.208L2.81769 14.6413C0.906387 16.56 0.666428 19.6234 2.5147 21.4788C4.36518 23.3365 7.42173 23.0944 9.334 21.1747L14.1816 16.3082C16.0929 14.3895 16.3329 11.3262 14.4846 9.4707Z" fill="#000000"></path></svg>',
success:
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="#20b2aa"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',
info: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="#8F8F8FFF"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>',
warning:
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="orange"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" /></svg>',
error: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="red"><path stroke-linecap="round" stroke-linejoin="round" d="M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>',
update: '<svg class="notification-animation" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M32 3C35.8083 3 39.5794 3.75011 43.0978 5.20749C46.6163 6.66488 49.8132 8.80101 52.5061 11.4939C55.199 14.1868 57.3351 17.3837 58.7925 20.9022C60.2499 24.4206 61 28.1917 61 32C61 35.8083 60.2499 39.5794 58.7925 43.0978C57.3351 46.6163 55.199 49.8132 52.5061 52.5061C49.8132 55.199 46.6163 57.3351 43.0978 58.7925C39.5794 60.2499 35.8083 61 32 61C28.1917 61 24.4206 60.2499 20.9022 58.7925C17.3837 57.3351 14.1868 55.199 11.4939 52.5061C8.801 49.8132 6.66487 46.6163 5.20749 43.0978C3.7501 39.5794 3 35.8083 3 32C3 28.1917 3.75011 24.4206 5.2075 20.9022C6.66489 17.3837 8.80101 14.1868 11.4939 11.4939C14.1868 8.80099 17.3838 6.66487 20.9022 5.20749C24.4206 3.7501 28.1917 3 32 3L32 3Z" stroke="#e0e0e0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><path d="M32 3C36.5778 3 41.0906 4.08374 45.1692 6.16256C49.2477 8.24138 52.7762 11.2562 55.466 14.9605C58.1558 18.6647 59.9304 22.9531 60.6448 27.4748C61.3591 31.9965 60.9928 36.6232 59.5759 40.9762" stroke="#42424a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path></svg>',
};
function config(default_option = {}) {
Object.assign(globals, default_option);
}
function notify(option) {
options = { ...globals, ...option };
let animationTime = 500;
let notification = document.createElement("div");
notification.className = `notification ${options.position} ${options.mode} ${options.classname}`;
notification.id = "notification";
Object.keys(options.offset).forEach((key) => {
notification.style[key] = options.offset[key];
});
let notificationContainer = document.createElement("div");
notificationContainer.className = `notification-container notification-toast-${options.type} ${options.animation} ${options.classname}`;
Object.keys(options.style).forEach((key) => {
notificationContainer.style[key] = options.style[key];
});
notificationContainer.classList.add("slide-in");
let notificationBlock = document.createElement("div");
notificationBlock.className = "notification-block";
notificationContainer.appendChild(notificationBlock);
if (options.icon !== null) {
let notificationIcon = document.createElement("div");
notificationIcon.className = "notification-icon";
notificationIcon.innerHTML = icons[options.type] ?? icons.default;
notificationBlock.appendChild(notificationIcon);
}
let notificationMessage = document.createElement("div");
notificationMessage.className = "notification-message";
notificationBlock.appendChild(notificationMessage);
if (options.title.length !== 0) {
let notificationTitle = document.createElement("div");
notificationTitle.className = "notification-title";
// notificationTitle.innerHTML = "<b>" + options.title + "</b>";
// notificationMessage.appendChild(notificationTitle);
// NEW: badge element (instead of data-attr + ::before)
if (options.badge) {
const badgeEl = document.createElement("span");
badgeEl.className = "notification-badge";
badgeEl.textContent = String(options.badge).toUpperCase();
notificationTitle.appendChild(badgeEl);
}
// Title text (keep your current behavior)
if (options.title && options.title.length) {
const titleText = document.createElement("span");
titleText.className = "notification-title";
titleText.innerHTML = "<b>" + options.title + "</b>";
notificationTitle.appendChild(titleText);
}
notificationMessage.appendChild(notificationTitle);
// NEW: optional subtitle (e.g. domain shown below)
if (options.subtitle && options.subtitle.length) {
const subtitleEl = document.createElement("div");
subtitleEl.className = "notification-subtitle";
subtitleEl.textContent = options.subtitle;
notificationMessage.appendChild(subtitleEl);
}
}
let notificationText = document.createElement("div");
notificationText.className = "notification-text";
notificationText.innerHTML = "<small>" + options.text + "</small>";
notificationMessage.appendChild(notificationText);
if (options.close) {
let notificationDismissButton = document.createElement("button");
notificationDismissButton.className = "notification-dismiss-btn";
notificationDismissButton.innerHTML =
'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 8L8 16M12 12L16 16M8 8L10 10" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>';
notificationBlock.appendChild(notificationDismissButton);
notificationDismissButton.addEventListener("click", () => {
notificationContainer.classList.remove("slide-in");
notificationContainer.classList.add("slide-out");
notificationContainer.addEventListener("animationend", () => {
notificationContainer.remove();
});
});
}
if (options.progressbar && options.duration !== -1) {
notificationContainer.addEventListener("animationend", () => {
let currentProgress = 0;
let notificationProgressbar = document.createElement("div");
notificationProgressbar.className = "notification-progressbar";
notificationBlock.appendChild(notificationProgressbar);
let count = setInterval(() => {
if (currentProgress < 100) {
currentProgress += 1;
notificationProgressbar.dataset.duration = (options.duration ?? globals.duration);
notificationProgressbar.style.width = "100%";
// currentProgress + "%";
} else {
clearInterval(count);
}
}, (options.duration ?? globals.duration) / 100);
});
}
if (document.getElementById(notification.id) === null) {
document.querySelector(options.selector).appendChild(notification);
}
document
.getElementById(notification.id)
.insertBefore(
notificationContainer,
document.getElementById(notification.id).children[0],
);
function removeToast() {
notificationContainer.classList.remove("slide-in");
notificationContainer.classList.add("slide-out");
notificationContainer.addEventListener("animationend", () => {
notificationContainer.remove();
});
}
const totalDelay = (options.duration ?? globals.duration) + animationTime;
setTimeout(() => {
const funcName = options.onComplete;
if (typeof funcName === "string") {
if (typeof window[funcName] === "function") {
window[funcName](options.onCompleteParams);
}
else if (typeof window.Callbacks?.[funcName] === "function") {
window.Callbacks[funcName](options.onCompleteParams);
}
else {
console.warn(`[Toastra] Callback '${funcName}' nicht gefunden.`);
}
} else if (typeof options.onComplete === "function") {
options.onComplete(options.onCompleteParams);
}
if (options.duration !== -1) {
removeToast();
}
}, totalDelay + 500);
// if (
// typeof options.onComplete === "string" &&
// typeof window.Callbacks[options.onComplete] === "function"
// ) {
// window.Callbacks[options.onComplete](options.onCompleteParams);
// } else {
// for (const [key, value] of Object.entries(options)) {
// setTimeout(() => {
// if (key === "duration" && value !== -1)
// {
// removeToast();
// }
// }, (options.duration ?? globals.duration) + animationTime);
// }
// }
}
function createQueue() {
const queue = [];
let isRunning = false;
function runQueue() {
if (queue.length === 0) {
isRunning = false;
return;
}
isRunning = true;
const next = queue.shift();
// Wrappe onComplete, damit nach dem Toast automatisch der nächste kommt
const userOnComplete = next.onComplete;
next.onComplete = (params) => {
// Benutzerdefinierte Funktion aufrufen (optional)
if (typeof userOnComplete === 'function') {
userOnComplete(params);
} else if (typeof userOnComplete === 'string') {
if (typeof window[userOnComplete] === 'function') {
window[userOnComplete](params);
} else if (typeof window.Callbacks?.[userOnComplete] === 'function') {
window.Callbacks[userOnComplete](params);
}
}
runQueue(); // Weiter mit dem nächsten Toast
};
// Toast anzeigen
toastra.notify(next);
}
return {
add(toast) {
queue.push(toast);
if (!isRunning) runQueue();
}
};
}
let globalQueue = null;
function getGlobalQueue() {
if (!globalQueue) {
globalQueue = createQueue();
}
return globalQueue;
}
return {
notify,
queue: getGlobalQueue,
config,
};
}
window.toastra = Toastra();

View File

@ -0,0 +1,174 @@
document.addEventListener('livewire:init', () => {
Livewire.on('toastra:show', (payload) => {
// optionaler "mute" pro Nutzer lokal:
if (localStorage.getItem('toast:hide:' + payload.id)) return;
const id = window.toastraGlass.show({
id: payload.id,
state: payload.state, // queued|running|done|failed
badge: payload.badge,
domain: payload.domain,
message: payload.message,
position: payload.position || 'bottom-center',
duration: payload.duration ?? 0,
close: payload.close !== false,
});
// Wenn der User X klickt, markiere lokal als verborgen:
window.addEventListener('toastra:closed:' + id, () => {
localStorage.setItem('toast:hide:' + id, '1');
}, { once: true });
});
});
// document.addEventListener('livewire:init', () => {
// Livewire.on('notify', (payload) => {
// const o = Array.isArray(payload) ? payload[0] : payload;
// window.toastraGlass?.show({
// id: o.id, state: o.state, badge: o.badge, domain: o.domain,
// message: o.message, position: o.position || 'bottom-right',
// duration: Number(o.duration ?? 0), close: o.close !== false,
// finalNote: (o.state === 'done' || o.state === 'failed')
// ? 'Diese Meldung verschwindet automatisch.' : ''
// });
// });
// });
// document.addEventListener('livewire:init', () => {
// Livewire.on('notify', (payload) => {
// // Livewire liefert das Event als Array mit einem Objekt
// const o = Array.isArray(payload) ? payload[0] : payload;
//
// // Ein Aufruf reicht: gleiche id => ersetzt bestehenden Toast
// window.toastraGlass?.show({
// id: o.id,
// state: o.state, // queued|running|done|failed
// badge: o.badge, // z.B. CERTBOT
// domain: o.domain, // z.B. mail.example.com
// message: o.message,
// position: o.position || 'bottom-right',
// duration: Number(o.duration ?? 0),
// close: o.close !== false,
// // optional kannst du finalNote je nach state setzen:
// finalNote: (o.state === 'done' || o.state === 'failed')
// ? 'Diese Meldung verschwindet automatisch.'
// : ''
// });
// });
// });
// document.addEventListener('livewire:init', () => {
// Livewire.on('notify', (payload) => {
// const e = Array.isArray(payload) ? payload[0] : payload;
//
// // e.state: 'queued'|'running'|'done'|'failed'
// window.toastraGlass.show({
// id: e.id || ('toast-'+Date.now()),
// state: e.state || 'queued',
// badge: e.badge || (e.type ? String(e.type).toUpperCase() : null),
// domain: e.domain || '',
// message: e.message ?? e.text ?? '',
// position: e.position || 'bottom-right',
// duration: typeof e.duration === 'number' ? e.duration : (['done','failed'].includes(e.state) ? 6000 : 0),
// close: e.close ?? true,
// finalNote: (['done','failed'].includes(e.state) ? 'Diese Meldung verschwindet nach Aktualisierung automatisch.' : '')
// });
// });
// });
// document.addEventListener('livewire:init', () => {
// Livewire.on('notify', (event) => {
// const p = Array.isArray(event) ? event[0] : event;
//
// window.toastraGlass.show({
// id: p.id || ('toast-'+Date.now()),
// state: (p.type || 'info'), // info|update|success|warning|error
// title: p.title || '',
// domain: p.domain || '',
// message: p.message ?? p.text ?? '',
// badge: p.badge || null,
// duration: (typeof p.duration === 'number' ? p.duration : 0), // 0 = bleibt
// position: p.position || 'bottom-center', // top-left|top-center|top-right|bottom-*
// close: (p.close ?? true),
// });
// });
// });
// document.addEventListener('livewire:init', () => {
// // 1) Events aus PHP/Livewire-Komponenten
// Livewire.on('notify', (payload) => {
// const e = payload[0] || payload;
// toastra.notify({
// id: e.id,
// badge: e.badge || null,
// replace: true,
// title: e.title,
// text: e.text,
// subtitle: e.subtitle || null,
// type: e.type,
// // classname: e.classname,
// duration: e.duration ?? 0,
// close: e.close ?? true,
// icon: e.icon || null,
// });
// });
//
// document.addEventListener('notify', (e) => {
// console.log(e.detail);
// });
// // 2) Reine Browser-Events (für Konsole/JS)
// // window.addEventListener('notify', (ev) => {
// // const e = ev.detail || {};
// // toastra.notify({
// // id: e.id, replace: true,
// // title: e.title, text: e.message,
// // type: e.type, duration: e.duration ?? 0,
// // close: e.close ?? true, icon: e.icon || null,
// // });
// // });
// });
//
// // document.addEventListener('notify', (e) => {
// // const d = e.detail;
// // toastra.notify({
// // id: d.id,
// // title: d.title,
// // text: d.text || d.message || '', // fallback
// // type: d.type,
// // duration: d.duration ?? 0,
// // close: d.close ?? true,
// // });
// // });
//
// // document.addEventListener('livewire:init', () => {
// // // Livewire.on('notify', (event) => {
// // // toastra.notify({
// // // title: event[0].title,
// // // text: event[0].message,
// // // type: event[0].type,
// // // duration: event[0].duration,
// // // close: event[0].close
// // // });
// // // });
// //
// // Livewire.on('notify', (payload) => {
// // const e = payload[0] || payload;
// // toastra.notify({
// // id: e.id,
// // replace: true,
// // title: e.title,
// // text: e.message,
// // type: e.type,
// // duration: e.duration ?? 0,
// // close: e.close ?? true,
// // icon: e.icon || null
// // });
// // });
// //
// // Livewire.on('notify-replace', (event) => {
// // const opts = event[0] || {};
// // const wrap = document.getElementById('notification');
// // if (wrap) wrap.innerHTML = '';
// // toastra.notify(opts);
// // });
// //
// // });

View File

@ -0,0 +1,19 @@
import Echo from 'laravel-echo'
import Pusher from 'pusher-js'
window.Pusher = Pusher
const host = import.meta.env.VITE_REVERB_HOST || window.location.hostname
const port = Number(import.meta.env.VITE_REVERB_PORT) || 443
const scheme = (import.meta.env.VITE_REVERB_SCHEME || 'https').toLowerCase()
const tls = scheme === 'https'
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: host,
wsPort: port,
wssPort: port,
forceTLS: tls,
enabledTransports: ['ws','wss'],
wsPath: import.meta.env.VITE_REVERB_PATH || '/ws',
})

View File

@ -0,0 +1,10 @@
{{-- resources/views/auth/login.blade.php --}}
@extends('layouts.app')
@section('title', 'Login')
@section('content')
<div class="flex items-center justify-center p-6">
<livewire:auth.login-form />
</div>
@endsection

View File

@ -0,0 +1,85 @@
{{--
<!doctype html>
<html lang="de" class="h-full">
<head>
<meta charset="utf-8">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', env('APP_NAME'))</title>
@vite(['resources/css/app.css','resources/js/app.js'])
@livewireStyles
</head>
<body class="h-full text-gray-100 antialiased selection:bg-indigo-500/30 selection:text-white">
<div class="fixed inset-0 -z-10 pointer-events-none
[background:radial-gradient(1200px_800px_at_85%_-10%,rgba(139,215,255,.16),transparent_60%),radial-gradient(900px_700px_at_10%_110%,rgba(121,255,163,.10),transparent_60%),linear-gradient(180deg,#0b0f14,#111827_55%,#172130)]">
</div>
<main class="min-h-screen">
<header class="max-w-6xl mx-auto px-6 pt-8 pb-6 flex items-center justify-between">
<div class="flex items-center gap-3">
<div
class="h-9 w-9 rounded-xl bg-indigo-600/80 backdrop-blur-xs flex items-center justify-center border border-glass-border font-semibold">
FM
</div>
<div class="font-semibold tracking-wide opacity-90">{{ env('APP_NAME') }}</div>
<div class="text-xs text-gray-400 border border-glass-border rounded-md px-2 py-0.5 ml-2">
{{ config('app.version','dev') }}
</div>
</div>
<div class="text-xs text-gray-400">
Setup-Phase: {{ config('app.setup_phase', env('SETUP_PHASE','bootstrap')) }}</div>
</header>
<div class="max-w-6xl mx-auto px-6 pb-16">
@yield('content')
</div>
</main>
@livewireScripts
</body>
</html>
--}}<!DOCTYPE html>
<html lang="{{ str_replace('_','-',app()->getLocale()) }}" class="h-dvh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title', config('app.name'))</title>
@vite(['resources/css/app.css','resources/js/app.js'])
@livewireStyles
</head>
<body class="min-h-dvh overflow-hidden #bg-gradient-to-b #from-[#0B1320] #to-[#0A0F1A] text-slate-100">
<div class="fixed inset-0 -z-10 pointer-events-none
[background:radial-gradient(1200px_800px_at_85%_-10%,rgba(139,215,255,.16),transparent_60%),radial-gradient(900px_700px_at_10%_110%,rgba(121,255,163,.10),transparent_60%),linear-gradient(180deg,#0b0f14,#111827_55%,#172130)]">
</div>
{{-- Optional: Header/Branding oben --}}
<header class="px-6 py-4 flex items-center justify-between opacity-80">
<div class="flex items-center gap-3">
<div class="h-8 w-8 rounded-xl bg-indigo-500/90 grid place-items-center font-semibold">FM</div>
<span class="font-semibold tracking-wide">MailWolt</span>
@env('local')
<span class="ml-2 text-[11px] px-2 py-0.5 rounded bg-slate-200/10 border border-white/10">dev</span>
@endenv
</div>
@isset($setupPhase)
<div class="text-xs text-slate-300/70">Setup-Phase: {{ $setupPhase }}</div>
@endisset
</header>
{{-- Seite: immer auf volle Höhe und zentriert --}}
<main class="min-h-[calc(100dvh-64px)] grid place-items-center px-4">
<livewire:system.toast-hub />
{{-- <livewire:system.task-toast :taskKey="'issue-cert:mail.example.com'" />--}}
{{-- @dd(request('task'))--}}
{{-- @if (request('task'))--}}
{{-- <livewire:system.task-toast :taskKey="request('task')" />--}}
{{-- @endif--}}
<div id="toastra-root" class="absolute pointer-events-none"></div>
{{-- <livewire:system.task-toast :taskKey="'issue-cert:mail.example.com'" />--}}
{{-- @include('livewire.system.task-toast')--}}
{{--@if (request('task'))--}}
{{-- <livewire:system.task-toast :taskKey="request('task')" />--}}
{{-- @endif--}}
@yield('content')
</main>
@livewireScripts
</body>
</html>

View File

@ -0,0 +1,59 @@
<div class="grid place-items-start">
<div class="glass-card w-full max-w-xl mx-auto #mt-12 p-8">
<h1 class="card-title text-xl mb-2">Erster Login</h1>
<p class="card-subtle mb-8">
Melde dich mit dem einmaligen Bootstrap-Konto an, um den Setup-Wizard zu starten.
</p>
@if ($error)
<div class="mb-6">
<div
role="alert"
class="rounded-2xl border border-red-500/30 bg-red-500/10 text-red-200
backdrop-blur-md shadow-[inset_0_1px_0_0_rgba(255,255,255,.05)]
px-4 py-3 flex items-start gap-3"
>
{{-- Icon --}}
<i class="ph ph-warning-circle text-red-400 text-xl"></i>
<div>
<p class="font-semibold leading-5">Anmeldung fehlgeschlagen</p>
<p class="text-sm text-red-300/90">{{ $error }}</p>
</div>
</div>
</div>
@endif
{{-- Inner Card (leicht dunkler) --}}
<div class="rounded-2xl border border-glass-border bg-glass-light/40 p-6">
<form wire:submit.prevent="login" class="space-y-5">
<div>
<label class="block text-sm text-gray-300 mb-1" for="name">E-Mail</label>
<input id="name" type="text" wire:model.defer="name" class="w-full glass-input py-2.5 px-3" autofocus>
@error('name')
<div class="mt-2 inline-flex items-center gap-2 rounded-lg border border-red-400/20 bg-red-400/10 px-2.5 py-1.5 text-xs text-red-200">
<i class="ph ph-warning-circle text-red-300"></i>
<span>{{ $message }}</span>
</div>
@enderror
</div>
<div>
<label class="block text-sm text-gray-300 mb-1" for="password">Passwort</label>
<input id="password" type="password" wire:model.defer="password" class="w-full glass-input py-2.5 px-3">
@error('password')
<div class="mt-2 inline-flex items-center gap-2 rounded-lg border border-red-400/20 bg-red-400/10 px-2.5 py-1.5 text-xs text-red-200">
<i class="ph ph-warning-circle text-red-300"></i>
<span>{{ $message }}</span>
</div>
@enderror
</div>
<div class="pt-2">
<button type="submit" class="btn-primary w-full py-3">
Anmelden
</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,27 @@
{{-- resources/views/livewire/setup-wizard.blade.php --}}
<div class="max-w-xl mx-auto py-10 space-y-6">
<h1 class="text-2xl font-semibold">Ersteinrichtung</h1>
@if (session('ok'))
<div class="p-3 bg-green-100 border border-green-300 rounded">{{ session('ok') }}</div>
@endif
<div>
<label class="block text-sm">Domain (FQDN)</label>
<input type="text" wire:model.defer="domain" class="w-full border rounded px-3 py-2" placeholder="mail.example.com">
@error('domain')<p class="text-red-600 text-sm">{{ $message }}</p>@enderror
</div>
<div>
<label class="block text-sm">Zeitzone</label>
<input type="text" wire:model.defer="timezone" class="w-full border rounded px-3 py-2" placeholder="Europe/Berlin">
@error('timezone')<p class="text-red-600 text-sm">{{ $message }}</p>@enderror
</div>
<label class="inline-flex items-center gap-2">
<input type="checkbox" wire:model="agree_cert">
<span>Zertifikatserstellung anstoßen</span>
</label>
<button wire:click="save" class="bg-blue-600 text-white px-4 py-2 rounded">Speichern</button>
</div>

View File

@ -0,0 +1,32 @@
<h1 class="card-title text-xl mb-2">Admin anlegen</h1>
<p class="card-subtle mb-6">Standard-Administrator für den ersten Login.</p>
<div class="space-y-5 w-full">
<div>
<label class="block text-sm text-gray-300 mb-1" for="admname">Admin-Name</label>
<input id="admname" type="text" wire:model.defer="form_admin_name"
class="glass-input w-full py-3 px-4">
@error('form_admin_name') <p class="text-red-400 text-xs mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-sm text-gray-300 mb-1" for="admemail">E-Mail</label>
<input id="admemail" type="email" wire:model.defer="form_admin_email"
class="glass-input w-full py-3 px-4">
@error('form_admin_email') <p class="text-red-400 text-xs mt-1">{{ $message }}</p> @enderror
</div>
<div class="grid md:grid-cols-2 gap-4">
<div>
<label class="block text-sm text-gray-300 mb-1" for="admpw">Passwort</label>
<input id="admpw" type="password" wire:model.defer="form_admin_password"
class="glass-input w-full py-3 px-4">
@error('form_admin_password') <p class="text-red-400 text-xs mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-sm text-gray-300 mb-1" for="admpw2">Passwort bestätigen</label>
<input id="admpw2" type="password" wire:model.defer="form_admin_password_confirmation"
class="glass-input w-full py-3 px-4">
</div>
</div>
</div>

View File

@ -0,0 +1,52 @@
{{-- resources/views/livewire/setup/step-certificate.blade.php --}}
<h1 class="card-title text-xl mb-2">TLS-Zertifikat</h1>
<p class="card-subtle mb-6">
Optional kannst du jetzt gleich ein HTTPS-Zertifikat erstellen lassen.
</p>
<div class="space-y-6 w-full">
<div class="rounded-2xl border border-glass-border bg-glass-light/40 p-5 space-y-4">
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" wire:model.live="form_cert_create_now" class="peer hidden">
<span class="w-5 h-5 flex items-center justify-center rounded border border-white/30 bg-white/5 peer-checked:bg-emerald-500/20 peer-checked:border-emerald-400 transition">
<i class="ph ph-check text-emerald-400 text-xs hidden peer-checked:inline"></i>
</span>
<span class="text-gray-300/90">
Zertifikat jetzt mit Lets Encrypt erstellen
<span class="block text-xs text-gray-400 mt-0.5">
(erfordert öffentliche Erreichbarkeit der Domain)
</span>
</span>
</label>
<div class="grid md:grid-cols-2 gap-4" x-data>
<div>
<label class="block text-sm text-gray-300 mb-1">Kontakt-E-Mail</label>
<input
type="email"
placeholder="admin@example.com"
class="glass-input w-full py-2.5 px-3"
wire:model.defer="form_cert_email"
@disabled(!$form_cert_create_now) {{-- <-- hier der Fix --}}
>
@error('form_cert_email')
<p class="text-red-400 text-xs mt-1">{{ $message }}</p>
@enderror
</div>
<div>
<label class="block text-sm text-gray-300 mb-1">HTTPS erzwingen</label>
<select class="glass-input w-full py-2.5 px-3"
wire:model="form_cert_force_https">
<option value="1">Ja</option>
<option value="0">Nein</option>
</select>
</div>
</div>
</div>
<div class="text-xs text-gray-400">
Hinweis: Wenn du die Erstellung überspringst, bleibt vorerst das self-signed Zertifikat aktiv.
Du kannst Lets Encrypt später im Setup-Bereich starten.
</div>
</div>

View File

@ -0,0 +1,20 @@
<h1 class="card-title text-xl mb-2">Ersteinrichtung</h1>
<p class="card-subtle mb-6">Bitte gib die Basisinformationen an.</p>
<div class="space-y-5 w-full">
<div>
<label class="block text-sm text-gray-300 mb-1" for="domain">Domain (FQDN)</label>
<input id="domain" type="text" wire:model.defer="form_domain"
placeholder="mail.example.com"
class="glass-input w-full py-3 px-4">
@error('form_domain') <p class="text-red-400 text-xs mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-sm text-gray-300 mb-1" for="tz">Zeitzone</label>
<input id="tz" type="text" wire:model.defer="form_timezone"
placeholder="Europe/Berlin"
class="glass-input w-full py-3 px-4">
@error('form_timezone') <p class="text-red-400 text-xs mt-1">{{ $message }}</p> @enderror
</div>
</div>

View File

@ -0,0 +1,33 @@
<div class="grid items-center">
<div class="glass-card w-full max-w-2xl mx-auto p-8 space-y-8">
<div wire:key="wizard-step-{{ $step }}">
@if ($step === 1)
@include('livewire.setup.step-domain')
@elseif ($step === 2)
@include('livewire.setup.step-admin')
@elseif ($step === 3)
@include('livewire.setup.step-certificate')
@endif
</div>
<div class="flex items-center justify-between pt-2">
@if ($step > 1)
<button type="button" wire:click="prevStep" class="btn-primary/ghost px-4 py-2">
Zurück
</button>
@else
<span></span>
@endif
@if ($step < 3)
<button type="button" wire:click="nextStep" class="btn-primary px-6 py-2">
Weiter
</button>
@else
<button type="button" wire:click="finish" class="btn-primary px-6 py-2">
Fertig
</button>
@endif
</div>
</div>
</div>

View File

@ -0,0 +1,160 @@
{{--@php--}}
{{-- $pos = [--}}
{{-- 'top-right' => 'top-4 right-4',--}}
{{-- 'top-left' => 'top-4 left-4',--}}
{{-- 'bottom-right' => 'bottom-4 right-4',--}}
{{-- 'bottom-left' => 'bottom-4 left-4',--}}
{{-- ][$position] ?? 'top-4 right-4';--}}
{{-- $base = 'glass-card border border-glass-border/60 rounded-xl shadow-xl--}}
{{-- backdrop-blur-md px-4 py-3 max-w-sm w-[22rem] text-sm';--}}
{{-- $ring = match($task['status'] ?? null) {--}}
{{-- 'queued' => 'ring-1 ring-yellow-500/25',--}}
{{-- 'running' => 'ring-1 ring-cyan-500/25',--}}
{{-- 'done' => 'ring-1 ring-green-500/25',--}}
{{-- 'failed' => 'ring-1 ring-red-500/25',--}}
{{-- default => '',--}}
{{-- };--}}
{{--@endphp--}}
{{--<div class="fixed z-50 {{ $pos }}" wire:poll.4s="loadTask">--}}
{{-- @if($task)--}}
{{-- <div class="{{ $base }} {{ $ring }}">--}}
{{-- <div class="flex items-start gap-3">--}}
{{-- --}}{{-- Status-Icon / Spinner --}}
{{-- <div class="mt-0.5">--}}
{{-- @switch($task['status'] ?? '')--}}
{{-- @case('running')--}}
{{-- <i class="ph ph-circle-notch animate-spin text-cyan-400 text-lg"></i>--}}
{{-- @break--}}
{{-- @case('done')--}}
{{-- <i class="ph ph-check-circle text-green-400 text-lg"></i>--}}
{{-- @break--}}
{{-- @case('failed')--}}
{{-- <i class="ph ph-x-circle text-red-400 text-lg"></i>--}}
{{-- @break--}}
{{-- @default--}}
{{-- <i class="ph ph-hourglass text-yellow-400 text-lg"></i>--}}
{{-- @endswitch--}}
{{-- </div>--}}
{{-- <div class="flex-1 min-w-0">--}}
{{-- <div class="flex items-center gap-2">--}}
{{-- <span class="badge uppercase">{{ $task['type'] ?? 'TASK' }}</span>--}}
{{-- <span class="text-gray-300/90 truncate">{{ $task['payload']['domain'] ?? '' }}</span>--}}
{{-- </div>--}}
{{-- @if(!empty($task['message']))--}}
{{-- <p class="mt-1.5 text-gray-200/90">{{ $task['message'] }}</p>--}}
{{-- @endif--}}
{{-- @if(($task['status'] ?? '') === 'running')--}}
{{-- <div class="mt-2 h-1 w-full rounded bg-white/10 overflow-hidden">--}}
{{-- <div class="h-full w-1/3 bg-cyan-400/60 animate-[progress_1.2s_linear_infinite]"></div>--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- @if($finished)--}}
{{-- <p class="mt-1 text-xs text-gray-400">Schließt automatisch; du kannst auch schließen.</p>--}}
{{-- @endif--}}
{{-- </div>--}}
{{-- --}}{{-- Close --}}
{{-- <button class="ml-2 text-gray-400 hover:text-gray-200 transition"--}}
{{-- title="Ausblenden" wire:click="dismiss">--}}
{{-- <i class="ph ph-x"></i>--}}
{{-- </button>--}}
{{-- </div>--}}
{{-- </div>--}}
{{-- @endif--}}
{{--<style>--}}
{{-- @keyframes progress {--}}
{{-- 0% { transform: translateX(-100%); }--}}
{{-- 100% { transform: translateX(300%); }--}}
{{-- }--}}
{{--</style>--}}
{{--</div>--}}
{{--@php--}}
{{-- $isDone = $task && ($task['status'] === 'done');--}}
{{-- $isFail = $task && ($task['status'] === 'failed');--}}
{{-- $isRun = $task && ($task['status'] === 'running');--}}
{{-- $isQueued = $task && ($task['status'] === 'queued');--}}
{{-- $statusPill = match(true) {--}}
{{-- $isDone => 'bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30',--}}
{{-- $isFail => 'bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/30',--}}
{{-- $isRun => 'bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/30',--}}
{{-- default => 'bg-amber-500/15 text-amber-300 ring-1 ring-amber-500/30',--}}
{{-- };--}}
{{--@endphp--}}
{{--<div--}}
{{-- @class([--}}
{{-- 'fixed z-50 w-[420px] max-w-[92vw]',--}}
{{-- $position === 'bottom-left' ? 'bottom-6 left-6' : 'top-6 right-6',--}}
{{-- ])--}}
{{-- @if(!$finished) wire:poll.3s="loadTask" @endif--}}
{{-->--}}
{{-- @if($task)--}}
{{-- <div class="glass-card border border-glass-border/70 rounded-2xl p-4 shadow-[0_10px_30px_rgba(0,0,0,.35)]">--}}
{{-- --}}{{-- Kopfzeile --}}
{{-- <div class="flex items-center justify-between gap-3">--}}
{{-- <div class="flex items-center gap-2">--}}
{{-- <span class="badge !bg-glass-light/50 !border-glass-border">--}}
{{-- {{ strtoupper($task['type']) }}--}}
{{-- </span>--}}
{{-- @if(!empty($task['payload']['domain']))--}}
{{-- <div class="text-base font-semibold text-gray-100/95 tracking-tight">--}}
{{-- {{ $task['payload']['domain'] }}--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- </div>--}}
{{-- <div class="flex items-center gap-2">--}}
{{-- <span class="text-[13px] text-gray-300/80">Status</span>--}}
{{-- <span class="px-2.5 py-1 rounded-lg text-[12px] leading-none {{ $statusPill }}">--}}
{{-- @if($isDone)--}}
{{-- <i class="ph ph-check-circle text-[14px] align-[-1px]"></i>--}}
{{-- <span class="ml-1">Erledigt</span>--}}
{{-- @elseif($isFail)--}}
{{-- <i class="ph ph-x-circle text-[14px] align-[-1px]"></i>--}}
{{-- <span class="ml-1">Fehler</span>--}}
{{-- @elseif($isRun)--}}
{{-- <i class="ph ph-arrow-clockwise text-[14px] animate-spin align-[-1px]"></i>--}}
{{-- <span class="ml-1">Läuft…</span>--}}
{{-- @else--}}
{{-- <i class="ph ph-pause-circle text-[14px] align-[-1px]"></i>--}}
{{-- <span class="ml-1">Wartet…</span>--}}
{{-- @endif--}}
{{-- </span>--}}
{{-- </div>--}}
{{-- </div>--}}
{{-- --}}{{-- Nachricht / Progress --}}
{{-- @if(!empty($task['message']))--}}
{{-- <p class="mt-3 text-[15px] text-gray-200/90 leading-relaxed">--}}
{{-- {{ $task['message'] }}--}}
{{-- </p>--}}
{{-- @endif--}}
{{-- @if($isRun || $isQueued)--}}
{{-- <div class="mt-3 h-1.5 w-full rounded-full bg-white/5 overflow-hidden">--}}
{{-- <div class="h-full w-1/2 bg-cyan-400/50 animate-[progress_1.6s_ease-in-out_infinite]"></div>--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- @if($finished)--}}
{{-- <p class="mt-3 text-[12px] text-gray-400">Diese Meldung verschwindet nach Aktualisierung automatisch.</p>--}}
{{-- @endif--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- kleine Keyframe-Anim für die “Fortschritt”-Leiste --}}
{{--<style>--}}
{{-- @keyframes progress {--}}
{{-- 0% { transform: translateX(-60%); }--}}
{{-- 50% { transform: translateX(10%); }--}}
{{-- 100% { transform: translateX(120%); }--}}
{{-- }--}}
{{--</style>--}}
{{--</div>--}}

View File

@ -0,0 +1,78 @@
<div>
@if($taskKey)
<div wire:poll.3s="load"></div>
@endif
</div>
{{--<div wire:poll.3s="load"></div>--}}
{{--@if($taskKey)--}}
{{--@endif--}}
{{--<div--}}
{{-- @class([--}}
{{-- 'fixed z-50 w-[420px] max-w-[92vw]',--}}
{{-- $position === 'bottom-left' ? 'bottom-6 left-6' : 'top-6 right-6',--}}
{{-- ])--}}
{{-- @if(!$finished) wire:poll.3s="loadTask" @endif--}}
{{-->--}}
{{-- @if($task)--}}
{{-- <div class="glass-card border border-glass-border/70 rounded-2xl p-4 shadow-[0_10px_30px_rgba(0,0,0,.35)]">--}}
{{-- --}}{{-- Kopfzeile --}}
{{-- <div class="flex items-center justify-between gap-3">--}}
{{-- <div class="flex items-center gap-2">--}}
{{-- <span class="badge !bg-glass-light/50 !border-glass-border">--}}
{{-- {{ strtoupper($task['type']) }}--}}
{{-- </span>--}}
{{-- @if(!empty($task['payload']['domain']))--}}
{{-- <div class="text-base font-semibold text-gray-100/95 tracking-tight">--}}
{{-- {{ $task['payload']['domain'] }}--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- </div>--}}
{{-- <div class="flex items-center gap-2">--}}
{{-- <span class="text-[13px] text-gray-300/80">Status</span>--}}
{{-- <span class="px-2.5 py-1 rounded-lg text-[12px] leading-none {{ $statusPill }}">--}}
{{-- @if($isDone)--}}
{{-- <i class="ph ph-check-circle text-[14px] align-[-1px]"></i>--}}
{{-- <span class="ml-1">Erledigt</span>--}}
{{-- @elseif($isFail)--}}
{{-- <i class="ph ph-x-circle text-[14px] align-[-1px]"></i>--}}
{{-- <span class="ml-1">Fehler</span>--}}
{{-- @elseif($isRun)--}}
{{-- <i class="ph ph-arrow-clockwise text-[14px] animate-spin align-[-1px]"></i>--}}
{{-- <span class="ml-1">Läuft…</span>--}}
{{-- @else--}}
{{-- <i class="ph ph-pause-circle text-[14px] align-[-1px]"></i>--}}
{{-- <span class="ml-1">Wartet…</span>--}}
{{-- @endif--}}
{{-- </span>--}}
{{-- </div>--}}
{{-- </div>--}}
{{-- --}}{{-- Nachricht / Progress --}}
{{-- @if(!empty($task['message']))--}}
{{-- <p class="mt-3 text-[15px] text-gray-200/90 leading-relaxed">--}}
{{-- {{ $task['message'] }}--}}
{{-- </p>--}}
{{-- @endif--}}
{{-- @if($isRun || $isQueued)--}}
{{-- <div class="mt-3 h-1.5 w-full rounded-full bg-white/5 overflow-hidden">--}}
{{-- <div class="h-full w-1/2 bg-cyan-400/50 animate-[progress_1.6s_ease-in-out_infinite]"></div>--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- @if($finished)--}}
{{-- <p class="mt-3 text-[12px] text-gray-400">Diese Meldung verschwindet nach Aktualisierung automatisch.</p>--}}
{{-- @endif--}}
{{-- </div>--}}
{{-- @endif--}}
{{-- kleine Keyframe-Anim für die “Fortschritt”-Leiste --}}
{{--<style>--}}
{{-- @keyframes progress {--}}
{{-- 0% { transform: translateX(-60%); }--}}
{{-- 50% { transform: translateX(10%); }--}}
{{-- 100% { transform: translateX(120%); }--}}
{{-- }--}}
{{--</style>--}}
{{--</div>--}}

View File

@ -0,0 +1,5 @@
<div>
@if($active)
<div wire:poll.3s="loadAll"></div>
@endif
</div>

View File

@ -0,0 +1,9 @@
@extends('layouts.app')
@section('title', 'Wizard')
@section('content')
<div class="w-full">
<livewire:setup.wizard />
</div>
@endsection

File diff suppressed because one or more lines are too long

7
routes/channels.php Normal file
View File

@ -0,0 +1,7 @@
<?php
use Illuminate\Support\Facades\Broadcast;
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});

8
routes/console.php Normal file
View File

@ -0,0 +1,8 @@
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

20
routes/web.php Normal file
View File

@ -0,0 +1,20 @@
<?php
use App\Http\Controllers\Auth\LoginPageController;
use App\Http\Controllers\Setup\SetupWizard;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/login', [LoginPageController::class, 'show'])->name('login');
Route::middleware(['auth', 'ensure.setup'])->group(function () {
// Route::get('/dashboard', Dashboard::class)->name('dashboard');
Route::get('/setup', [SetupWizard::class, 'show'])->name('setup.wizard');
});
//Route::middleware(['auth', 'ensure.setup'])->group(function () {
// Route::get('/dashboard', fn() => view('dashboard'))->name('dashboard');
//});

4
storage/app/.gitignore vendored Executable file
View File

@ -0,0 +1,4 @@
*
!private/
!public/
!.gitignore

2
storage/app/private/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/app/public/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*
!.gitignore

9
storage/framework/.gitignore vendored Executable file
View File

@ -0,0 +1,9 @@
compiled.php
config.php
down
events.scanned.php
maintenance.php
routes.php
routes.scanned.php
schedule-*
services.json

3
storage/framework/cache/.gitignore vendored Executable file
View File

@ -0,0 +1,3 @@
*
!data/
!.gitignore

2
storage/framework/cache/data/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/framework/sessions/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/framework/testing/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*
!.gitignore

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