commit 9e2d79936c7c6ef6de120f72b855d4417304cd6a Author: isaacclad Date: Sat Jun 27 20:37:15 2026 +0000 Initial Ladill Frontdesk release with deploy pipeline. Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a186cd2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[compose.yaml] +indent_size = 4 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..263d131 --- /dev/null +++ b/.env.example @@ -0,0 +1,46 @@ +APP_NAME="Ladill Frontdesk" +APP_ENV=production +APP_KEY= +APP_DEBUG=false +APP_URL=https://frontdesk.ladill.com + +PLATFORM_URL=https://ladill.com +PLATFORM_DOMAIN=ladill.com + +LOG_CHANNEL=stack +LOG_LEVEL=error + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=ladill_frontdesk +DB_USERNAME=ladill_frontdesk +DB_PASSWORD= + +SESSION_DRIVER=database +CACHE_STORE=database +QUEUE_CONNECTION=database + +# --- Ladill SSO (Sign in with Ladill — auth.ladill.com OIDC client) --- +LADILL_SSO_CLIENT_ID= +LADILL_SSO_CLIENT_SECRET= + +# --- Platform APIs this app consumes (per-consumer service keys) --- +BILLING_API_URL=https://ladill.com/api/billing +BILLING_API_KEY_FRONTDESK= +IDENTITY_API_URL=https://ladill.com/api +IDENTITY_API_KEY_FRONTDESK= + +# Platform events webhook (user/org lifecycle from the monolith) +SERVICE_EVENTS_INBOUND_SECRET= + +# --- Inbound service API keys (sibling Ladill apps calling Frontdesk) --- +FRONTDESK_API_KEY_POS= +FRONTDESK_API_KEY_CRM= +FRONTDESK_API_KEY_CARE= +FRONTDESK_API_KEY_LAB= + +# Optional: platform DB read for SSO user resolution (same host as monolith) +# PLATFORM_DB_DATABASE=ladilldb +# PLATFORM_DB_USERNAME= +# PLATFORM_DB_PASSWORD= diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fcb21d3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +* text=auto eol=lf + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore +CHANGELOG.md export-ignore +.styleci.yml export-ignore diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..82c8158 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,110 @@ +name: Deploy Ladill Frontdesk + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: deploy-frontdesk + cancel-in-progress: true + +jobs: + deploy: + runs-on: deploy + env: + NODE_ROOT: /tmp/ladill-node-22-r1 + NODE_VERSION: "22.14.0" + RELEASE_ARCHIVE: /tmp/ladill-frontdesk-release-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tgz + WORKSPACE: /tmp/${{ gitea.repository_owner }}-frontdesk-${{ gitea.run_id }}-${{ gitea.run_attempt }} + LADILL_APP_ROOT: /var/www/ladill-frontdesk + steps: + - name: Checkout + shell: bash {0} + run: | + set -Eeuo pipefail + DEPLOY_GITEA_TOKEN="$(cat /home/deploy/.ladill-deploy-gitea-token)" + REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + export GIT_TERMINAL_PROMPT=0 + git \ + -c credential.helper= \ + -c http.extraHeader="Authorization: token ${DEPLOY_GITEA_TOKEN}" \ + clone --depth 1 --single-branch --no-tags --branch "${{ gitea.ref_name }}" \ + "$REPO_URL" "$WORKSPACE" + + - name: Setup Node.js + shell: bash {0} + run: | + set -Eeuo pipefail + if [ ! -x "$NODE_ROOT/bin/node" ]; then + rm -rf "$NODE_ROOT" + mkdir -p "$NODE_ROOT" + case "$(uname -m)" in + x86_64|amd64) NODE_ARCH="x64" ;; + aarch64|arm64) NODE_ARCH="arm64" ;; + *) echo "Unsupported architecture: $(uname -m)" >&2; exit 1 ;; + esac + curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \ + | tar -xJ --strip-components=1 -C "$NODE_ROOT" + fi + "$NODE_ROOT/bin/node" -v + + - name: Build frontend assets + shell: bash {0} + run: | + set -Eeuo pipefail + cd "$WORKSPACE" + export PATH="$NODE_ROOT/bin:$PATH" + npm ci --no-audit --no-fund + npm run build + + - name: Build release archive + shell: bash {0} + run: | + set -Eeuo pipefail + cd "$WORKSPACE" + printf '%s\n' "${{ gitea.sha }}" > REVISION + rm -f "$RELEASE_ARCHIVE" + tar -czf "$RELEASE_ARCHIVE" \ + --exclude=.git --exclude=.gitea --exclude=.github --exclude=.env \ + --exclude=node_modules --exclude=vendor --exclude=storage --exclude=tests . + + - name: Deploy release + shell: bash {0} + env: + LADILL_RELEASE_ARCHIVE: /tmp/ladill-frontdesk-release-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tgz + run: | + set -Eeuo pipefail + : "${LADILL_APP_ROOT:?Set LADILL_APP_ROOT}" + bash "$WORKSPACE/deploy/deploy.sh" + + - name: Ensure nginx vhost + shell: bash {0} + run: | + set -Eeuo pipefail + NGINX_SCRIPT="$WORKSPACE/deployment/setup-service-subdomain-nginx.sh" + if [ ! -f "$NGINX_SCRIPT" ]; then + NGINX_SCRIPT="/var/www/ladill.com/current/deployment/setup-service-subdomain-nginx.sh" + fi + if [ ! -f "$NGINX_SCRIPT" ]; then + echo "WARN: setup-service-subdomain-nginx.sh not found — configure frontdesk.ladill.com vhost manually" + exit 0 + fi + if sudo -n bash "$NGINX_SCRIPT" frontdesk --app /var/www/ladill-frontdesk/current; then + echo "nginx vhost updated for frontdesk.ladill.com" + else + echo "WARN: nginx vhost step skipped (deploy user cannot sudo) — vhost must already be provisioned" + fi + + - name: Cleanup + if: always() + shell: bash {0} + run: | + rm -rf "$WORKSPACE" + rm -f "$RELEASE_ARCHIVE" diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..8d80899 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test + +on: + push: + branches: [main, master, develop] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + coverage: none + - name: Install dependencies + run: composer install --no-interaction --prefer-dist + - name: Run tests + run: php artisan test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd47ce8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +*.log +.DS_Store +.env +.env.backup +.env.production +.phpactor.json +.phpunit.result.cache +/.fleet +/.idea +/.nova +/.phpunit.cache +/.vscode +/.zed +/auth.json +/node_modules +/public/build +/public/hot +/public/storage +/storage/*.key +/storage/pail +/storage/framework/views/* +!/storage/framework/views/.gitignore +/vendor +Homestead.json +Homestead.yaml +Thumbs.db + +# Native mobile apps — kept locally, not tracked in this repo +/apps + +/database/database.sqlite diff --git a/DEPLOY.md b/DEPLOY.md new file mode 100644 index 0000000..30c3662 --- /dev/null +++ b/DEPLOY.md @@ -0,0 +1,65 @@ +# Ladill Frontdesk — deploy runbook + +Visitor management at **frontdesk.ladill.com** (check-in, badges, kiosk, reports). + +## 1. Gitea repo + CI + +- Repo: **ladill-frontdesk** (`isaacclad/ladill-frontdesk`). +- Push to `main` triggers `.gitea/workflows/deploy.yml` (on-host `deploy` runner). +- App root: `/var/www/ladill-frontdesk`. + +## 2. Server app-slot + database + +```bash +sudo install -d -o deploy -g www-data /var/www/ladill-frontdesk +sudo install -d -o deploy -g www-data /var/www/ladill-frontdesk/{releases,shared} +sudo mysql -e "CREATE DATABASE ladill_frontdesk CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" +sudo mysql -e "CREATE USER 'ladill_frontdesk'@'127.0.0.1' IDENTIFIED BY '';" +sudo mysql -e "GRANT ALL ON ladill_frontdesk.* TO 'ladill_frontdesk'@'127.0.0.1'; FLUSH PRIVILEGES;" +``` + +## 3. Platform wiring (monolith) + +On the Ladill platform host: + +```bash +cd /var/www/ladill.com/current +php artisan ladill:onboard-app frontdesk --run-dns +php artisan passport:client --name="Ladill Frontdesk" --redirect_uri=https://frontdesk.ladill.com/sso/callback +``` + +Apply the generated `IDENTITY_API_KEY_FRONTDESK`, `BILLING_API_KEY_FRONTDESK`, and +`SERVICE_EVENTS_FRONTDESK_*` values to the monolith `.env`, then: + +```bash +php artisan config:cache +``` + +## 4. Shared `.env` (`/var/www/ladill-frontdesk/shared/.env`) + +Copy `.env.example`, set `APP_KEY` (`php artisan key:generate --show`), DB creds, SSO +client id/secret, billing + identity keys, and `SERVICE_EVENTS_INBOUND_SECRET`. + +## 5. nginx + TLS + +```bash +sudo bash deployment/setup-service-subdomain-nginx.sh frontdesk --app /var/www/ladill-frontdesk/current +``` + +DNS: `frontdesk.ladill.com` → app server (via `dns:sync-subdomains` on the monolith). + +## 6. First deploy + +Push to `main` or run the Gitea deploy workflow manually. Then verify: + +```bash +curl -sI https://frontdesk.ladill.com | head -1 +curl -s -o /dev/null -w '%{http_code}\n' https://frontdesk.ladill.com/login +``` + +## 7. Optional queue worker + +```bash +sudo cp deployment/supervisor/ladill-frontdesk-worker.conf /etc/supervisor/conf.d/ +sudo supervisorctl reread && sudo supervisorctl update +``` diff --git a/README.md b/README.md new file mode 100644 index 0000000..f7a8b59 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# Ladill CRM + +The Ladill **sales CRM** at `crm.ladill.com` — a full SSO web app for managing +**contacts, leads, deals, activities and products** — *and* the shared +Customers/Leads/Products service consumed over HTTP by Ladill Invoice, Merchant, +Mini and future apps, so contact + catalog data is owned in one place and reused +everywhere. + +Every record is scoped to one platform account via `owner_ref` (the user's +`public_id` / OIDC `sub`). + +## App (web UI — Sign in with Ladill) + +Authenticates against `auth.ladill.com` (OIDC Authorization Code + PKCE; see +`Auth\SsoLoginController`). Local session is subordinate to the platform session +(`platform.session` middleware) and joins Single Logout via +`/sso/logout-frontchannel`. + +- **Dashboard** — KPIs (contacts, open leads, open deals, pipeline value), + tasks due, recent activity. +- **Contacts** — the contact book, with a per-contact **timeline** (notes, + tasks, logged calls/meetings, sent email + SMS) and cross-product events + (invoices, payments, orders) pushed from sibling apps. +- **Leads** — list + **kanban board** (`new → contacted → qualified`), convert + to a contact. +- **Deals** — drag-free **pipeline** kanban across configurable stages + (`config/crm.pipeline_stages`), won/lost tracking. +- **Activities** — notes, tasks (with due dates / completion), calls, meetings. +- **Products & services** — reusable catalog items. +- **Comms** — email contacts (via the app mailer / Ladill Bird SMTP) and SMS + (Termii); each send is logged on the timeline. +- **Reports** — pipeline by stage, win rate, won value over time, leads by + status, activity mix. + +## Service API (first-party, service-key auth) + +Authenticate with a per-consumer service key: +`Authorization: Bearer ` (see `config/crm.php`, +`App\Http\Middleware\AuthenticateService`, alias `auth.service:crm`). Every +request must pass `owner` (query or body) to scope data to the end user. + +``` +GET /api/customers?owner=&search= +POST /api/customers {owner,name,email,phone,company,...} +... (show/update/destroy) + +GET /api/leads?owner=&status= +POST /api/leads {owner,name,status,estimated_value_minor,...} +POST /api/leads/{id}/convert {owner} -> creates/links a customer + +GET /api/products?owner=&type=&active= +POST /api/products {owner,name,type,unit_price_minor,currency,tax_rate} + +POST /api/timeline {owner,event,title,external_id,amount_minor, + currency,url,customer_id|customer_email,...} +``` + +`POST /api/timeline` is how sibling products push "what happened" events onto a +contact's timeline (`invoice.sent`, `payment.received`, `order.paid`). The +`source` is derived from the service key (never client-supplied) and the write +is idempotent per `(owner, source, external_id, event)`. Reference consumer: +`ladill-invoice` `App\Services\Crm\CrmClient::pushTimeline()`. + +No key → 401; missing `owner` → 422; cross-owner access → 404. + +## Local dev + +```bash +composer install +cp .env.example .env && php artisan key:generate +# sqlite for local: set DB_CONNECTION=sqlite and `touch database/database.sqlite` +php artisan migrate +npm install && npm run build # or `npm run dev` +php artisan serve +php artisan test +``` + +See `DEPLOY.md` for production cutover. diff --git a/app/Console/Commands/MarkDevicesOfflineCommand.php b/app/Console/Commands/MarkDevicesOfflineCommand.php new file mode 100644 index 0000000..9351227 --- /dev/null +++ b/app/Console/Commands/MarkDevicesOfflineCommand.php @@ -0,0 +1,22 @@ +markStaleDevicesOffline((int) $this->option('minutes')); + + $this->info("Marked {$count} device(s) as offline."); + + return self::SUCCESS; + } +} diff --git a/app/Console/Commands/MarkExpiredBadgesCommand.php b/app/Console/Commands/MarkExpiredBadgesCommand.php new file mode 100644 index 0000000..bd3eefd --- /dev/null +++ b/app/Console/Commands/MarkExpiredBadgesCommand.php @@ -0,0 +1,61 @@ +where('status', Visit::STATUS_CHECKED_IN) + ->whereNotNull('badge_expires_at') + ->where('badge_expires_at', '<', now()) + ->with(['visitor', 'organization']) + ->get(); + + $count = 0; + + foreach ($visits as $visit) { + $alreadyLogged = AuditLog::query() + ->where('subject_type', Visit::class) + ->where('subject_id', $visit->id) + ->where('action', 'badge.expired') + ->where('created_at', '>=', now()->subDay()) + ->exists(); + + if ($alreadyLogged) { + continue; + } + + AuditLog::record( + $visit->owner_ref, + 'badge.expired', + $visit->organization_id, + null, + Visit::class, + $visit->id, + [ + 'visitor' => $visit->visitor->full_name, + 'badge_code' => $visit->badge_code, + 'expired_at' => $visit->badge_expires_at?->toIso8601String(), + ], + ); + + $notifications->badgeExpired($visit); + $count++; + } + + $this->info("Recorded {$count} expired badge alert(s)."); + + return self::SUCCESS; + } +} diff --git a/app/Console/Commands/MarkOverdueVisitsCommand.php b/app/Console/Commands/MarkOverdueVisitsCommand.php new file mode 100644 index 0000000..9b244ea --- /dev/null +++ b/app/Console/Commands/MarkOverdueVisitsCommand.php @@ -0,0 +1,22 @@ +markOverdueVisits(); + + $this->info("Marked {$count} visit(s) as overdue."); + + return self::SUCCESS; + } +} diff --git a/app/Console/Commands/SendDailyReportCommand.php b/app/Console/Commands/SendDailyReportCommand.php new file mode 100644 index 0000000..1a9bdfa --- /dev/null +++ b/app/Console/Commands/SendDailyReportCommand.php @@ -0,0 +1,52 @@ +subDay()->startOfDay(); + $to = now()->subDay()->endOfDay(); + $sent = 0; + + Organization::query()->each(function (Organization $organization) use ($reports, $email, $from, $to, &$sent) { + $recipients = data_get($organization->settings, 'report_daily_recipients', []); + if ($recipients === []) { + return; + } + + $summary = $reports->summary($organization->owner_ref, $organization, $from, $to); + $subject = "Frontdesk daily summary — {$organization->name} ({$from->toDateString()})"; + $body = implode("\n", [ + "Visitors checked in: {$summary['checked_in']}", + "Currently unique visitors: {$summary['unique_visitors']}", + "Contractors: {$summary['contractors']}", + "Deliveries: {$summary['deliveries']}", + "Average visit duration (min): {$summary['avg_duration_minutes']}", + ]); + + foreach ($recipients as $address) { + if (is_string($address) && filter_var($address, FILTER_VALIDATE_EMAIL)) { + $email->send($address, $subject, $body); + $sent++; + } + } + }); + + $this->info("Sent {$sent} daily report email(s)."); + + return self::SUCCESS; + } +} diff --git a/app/Contracts/Printers/PrinterDriverInterface.php b/app/Contracts/Printers/PrinterDriverInterface.php new file mode 100644 index 0000000..4463082 --- /dev/null +++ b/app/Contracts/Printers/PrinterDriverInterface.php @@ -0,0 +1,13 @@ +input('owner') ?? $request->query('owner', ''))); + abort_if($owner === '', 422, 'The owner parameter is required.'); + + return $owner; + } + + protected function authorizeOwner(Request $request, Model $model): void + { + abort_unless($model->getAttribute('owner_ref') === $this->ownerRef($request), 404); + } +} diff --git a/app/Http/Controllers/Api/DeviceHeartbeatController.php b/app/Http/Controllers/Api/DeviceHeartbeatController.php new file mode 100644 index 0000000..0d97e75 --- /dev/null +++ b/app/Http/Controllers/Api/DeviceHeartbeatController.php @@ -0,0 +1,27 @@ +header('X-Device-Token') ?? $request->input('token'); + abort_unless(is_string($token) && $token !== '', 422, 'Device token required.'); + + $device = $devices->findByToken($token); + abort_unless($device, 404); + + $devices->recordHeartbeat($device); + + return response()->json([ + 'status' => 'online', + 'last_online_at' => $device->fresh()->last_online_at?->toIso8601String(), + ]); + } +} diff --git a/app/Http/Controllers/Api/OfflineSyncController.php b/app/Http/Controllers/Api/OfflineSyncController.php new file mode 100644 index 0000000..cb90185 --- /dev/null +++ b/app/Http/Controllers/Api/OfflineSyncController.php @@ -0,0 +1,65 @@ +header('X-Device-Token') ?? $request->input('device_token'); + abort_unless(is_string($token) && $token !== '', 422); + + $device = $devices->findByToken($token); + abort_unless($device, 404); + + $validated = $request->validate([ + 'client_id' => ['required', 'uuid'], + 'payload' => ['required', 'array'], + 'payload.full_name' => ['required', 'string', 'max:255'], + 'payload.visitor_type' => ['required', 'string'], + 'payload.policies_accepted' => ['required', 'boolean'], + ]); + + $existing = OfflineCheckIn::where('client_id', $validated['client_id'])->first(); + if ($existing?->visit_id) { + return response()->json([ + 'visit_id' => $existing->visit_id, + 'status' => 'already_synced', + ]); + } + + $organization = Organization::findOrFail($device->organization_id); + $payload = array_merge($validated['payload'], [ + 'branch_id' => $device->branch_id, + 'reception_desk_id' => $device->reception_desk_id, + ]); + + $visit = $checkIn->checkIn($device->owner_ref, $organization, $payload); + + OfflineCheckIn::updateOrCreate( + ['client_id' => $validated['client_id']], + [ + 'device_id' => $device->id, + 'payload' => $validated['payload'], + 'synced_at' => now(), + 'visit_id' => $visit->id, + ], + ); + + return response()->json([ + 'visit_id' => $visit->id, + 'public_id' => $visit->public_id, + 'status' => 'synced', + ], 201); + } +} diff --git a/app/Http/Controllers/Api/VisitController.php b/app/Http/Controllers/Api/VisitController.php new file mode 100644 index 0000000..88eb6ca --- /dev/null +++ b/app/Http/Controllers/Api/VisitController.php @@ -0,0 +1,145 @@ +ownerRef($request); + + $visits = Visit::owned($owner) + ->with(['visitor', 'host']) + ->when($request->status, fn ($q, $s) => $q->where('status', $s)) + ->latest() + ->paginate(min((int) $request->query('per_page', 25), 100)); + + return response()->json($visits); + } + + public function store(Request $request, VisitCheckInService $checkIn, VisitScheduleService $scheduler): JsonResponse + { + $owner = $this->ownerRef($request); + $organization = Organization::owned($owner)->findOrFail($request->integer('organization_id')); + $source = (string) $request->attributes->get('service_caller', 'api'); + + if ($request->filled('external_ref')) { + $existing = Visit::owned($owner) + ->where('organization_id', $organization->id) + ->where('external_ref', $request->string('external_ref')) + ->where('source', $source) + ->with(['visitor', 'host']) + ->first(); + + if ($existing) { + return response()->json($existing); + } + } + + if ($request->boolean('schedule')) { + $validated = $request->validate([ + 'organization_id' => ['required', 'integer'], + 'external_ref' => ['nullable', 'string', 'max:128'], + 'visitor_id' => ['nullable', 'integer'], + 'full_name' => ['required_without:visitor_id', 'string', 'max:255'], + 'company' => ['nullable', 'string'], + 'phone' => ['nullable', 'string'], + 'email' => ['nullable', 'email'], + 'host_id' => ['nullable', 'integer'], + 'branch_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string'], + 'purpose' => ['nullable', 'string'], + 'scheduled_at' => ['required', 'date'], + 'notes' => ['nullable', 'string'], + 'integration_metadata' => ['nullable', 'array'], + ]); + + $visit = $scheduler->schedule($owner, $organization, [ + ...$validated, + 'source' => $source, + ]); + + return response()->json($visit->load(['visitor', 'host']), 201); + } + + $validated = $request->validate([ + 'organization_id' => ['required', 'integer'], + 'external_ref' => ['nullable', 'string', 'max:128'], + 'full_name' => ['required', 'string', 'max:255'], + 'company' => ['nullable', 'string'], + 'phone' => ['nullable', 'string'], + 'email' => ['nullable', 'email'], + 'host_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string'], + 'purpose' => ['nullable', 'string'], + 'integration_metadata' => ['nullable', 'array'], + 'policies_accepted' => ['nullable', 'boolean'], + ]); + + $visit = $checkIn->checkIn($owner, $organization, [ + ...$validated, + 'source' => $source, + 'policies_accepted' => $validated['policies_accepted'] ?? true, + ]); + + return response()->json($visit->load(['visitor', 'host']), 201); + } + + public function show(Request $request, Visit $visit): JsonResponse + { + $this->authorizeOwner($request, $visit); + + return response()->json($visit->load(['visitor', 'host'])); + } + + public function checkOut(Request $request, Visit $visit, VisitCheckOutService $checkOut): JsonResponse + { + $this->authorizeOwner($request, $visit); + + return response()->json($checkOut->checkOut($visit)); + } + + public function activate(Request $request, Visit $visit, VisitLifecycleService $lifecycle): JsonResponse + { + $this->authorizeOwner($request, $visit); + + $visit = $lifecycle->checkInFromSchedule($visit); + + return response()->json($visit->load(['visitor', 'host'])); + } + + public function approve(Request $request, Visit $visit, VisitLifecycleService $lifecycle): JsonResponse + { + $this->authorizeOwner($request, $visit); + + $visit = $lifecycle->approve($visit); + + return response()->json($visit->load(['visitor', 'host'])); + } + + public function cancel(Request $request, Visit $visit, VisitLifecycleService $lifecycle): JsonResponse + { + $this->authorizeOwner($request, $visit); + + $validated = $request->validate([ + 'reason' => ['nullable', 'string', 'max:500'], + ]); + + return response()->json( + $lifecycle->cancel($visit, null, $validated['reason'] ?? null)->load(['visitor', 'host']), + ); + } +} diff --git a/app/Http/Controllers/Api/VisitorController.php b/app/Http/Controllers/Api/VisitorController.php new file mode 100644 index 0000000..8a11813 --- /dev/null +++ b/app/Http/Controllers/Api/VisitorController.php @@ -0,0 +1,41 @@ +ownerRef($request); + $organizationId = (int) $request->query('organization_id'); + + if ($request->filled('q')) { + return response()->json( + $search->search($owner, $organizationId, $request->string('q')->toString()) + ); + } + + $visitors = Visitor::owned($owner) + ->when($organizationId, fn ($q) => $q->where('organization_id', $organizationId)) + ->orderBy('full_name') + ->paginate(min((int) $request->query('per_page', 25), 100)); + + return response()->json($visitors); + } + + public function show(Request $request, Visitor $visitor): JsonResponse + { + $this->authorizeOwner($request, $visitor); + + return response()->json($visitor->load(['visits' => fn ($q) => $q->latest()->limit(10)])); + } +} diff --git a/app/Http/Controllers/Auth/SsoLoginController.php b/app/Http/Controllers/Auth/SsoLoginController.php new file mode 100644 index 0000000..1ebb282 --- /dev/null +++ b/app/Http/Controllers/Auth/SsoLoginController.php @@ -0,0 +1,293 @@ +query('redirect', route('frontdesk.dashboard')); + + if (Auth::check()) { + return $this->safeRedirect($intended, route('frontdesk.dashboard')); + } + + if (! $request->boolean('fallback')) { + $request->session()->forget('sso.attempts'); + } + + if ($this->attemptSilentRefresh($request, $intended)) { + return $this->safeRedirect($intended, route('frontdesk.dashboard')); + } + + $verifier = Str::random(64); + $state = Str::random(40); + $request->session()->put('sso.verifier', $verifier); + $request->session()->put('sso.state', $state); + $request->session()->put('sso.intended', $intended); + + $challenge = rtrim(strtr(base64_encode(hash('sha256', $verifier, true)), '+/', '-_'), '='); + + $query = [ + 'response_type' => 'code', + 'client_id' => (string) config('services.ladill_sso.client_id'), + 'redirect_uri' => (string) config('services.ladill_sso.redirect'), + 'scope' => 'openid profile email', + 'state' => $state, + 'code_challenge' => $challenge, + 'code_challenge_method' => 'S256', + ]; + + $loginHint = (string) $request->session()->get('sso.login_hint', ''); + if ($loginHint !== '') { + $query['login_hint'] = $loginHint; + } + + if (! $request->boolean('interactive')) { + $query['prompt'] = 'none'; + } + + $authorizeUrl = rtrim((string) config('services.ladill_sso.issuer'), '/').'/oauth/authorize?'.http_build_query($query); + + return redirect()->away($authorizeUrl); + } + + public function callback(Request $request): RedirectResponse + { + $intended = (string) $request->session()->get('sso.intended', route('frontdesk.dashboard')); + + if ($request->filled('error')) { + if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true) + && ! $request->boolean('interactive')) { + return redirect()->away((string) config('ladill.marketing_url')); + } + + return $this->finishCallback($request, $intended, (string) $request->query('error_description', $request->query('error'))); + } + + if (! $request->filled('code') + || $request->query('state') !== $request->session()->pull('sso.state')) { + return $this->finishCallback($request, $intended, 'invalid_state'); + } + + $issuer = rtrim((string) config('services.ladill_sso.issuer'), '/'); + + $tokenRes = Http::asForm()->post($issuer.'/oauth/token', [ + 'grant_type' => 'authorization_code', + 'client_id' => (string) config('services.ladill_sso.client_id'), + 'client_secret' => (string) config('services.ladill_sso.client_secret'), + 'redirect_uri' => (string) config('services.ladill_sso.redirect'), + 'code' => (string) $request->query('code'), + 'code_verifier' => (string) $request->session()->pull('sso.verifier'), + ]); + if ($tokenRes->failed()) { + return $this->finishCallback($request, $intended, 'token_exchange_failed'); + } + + $user = $this->loginFromTokenResponse($request, $tokenRes); + if (! $user) { + return $this->finishCallback($request, $intended, 'userinfo_failed'); + } + + Auth::login($user, remember: true); + $request->session()->regenerate(); + $request->session()->forget('sso.attempts'); + + return $this->finishCallback($request, $intended, null); + } + + public function failed(Request $request): View + { + return view('auth.sso-error', [ + 'reason' => (string) $request->session()->get('sso.error', ''), + ]); + } + + public function logout(Request $request): RedirectResponse + { + Auth::logout(); + $request->session()->invalidate(); + $request->session()->regenerateToken(); + + // Per-app sign-out: end only this app's session and keep the platform + // (auth.ladill.com) SSO session alive so "Sign in again" re-auths silently. + return redirect()->route('frontdesk.signed-out'); + } + + /** Platform session ended — clear this app and offer silent sign-in again. */ + public function platformSignedOut(Request $request): RedirectResponse + { + Auth::logout(); + $request->session()->invalidate(); + $request->session()->regenerateToken(); + + return redirect()->route('sso.connect', [ + 'redirect' => (string) $request->query('redirect', ''), + ]); + } + + public function logoutBridge(Request $request): View + { + $return = $this->safeReturnUrl((string) $request->query('return', '')); + $hubUrl = 'https://'.config('app.auth_domain').'/logout/sso/hub?'.http_build_query([ + 'embedded' => 1, + 'return' => $return, + ]); + + return view('auth.sso-logout-bridge', [ + 'hubUrl' => $hubUrl, + 'return' => $return, + 'authOrigin' => 'https://'.config('app.auth_domain'), + ]); + } + + public function frontchannelLogout(Request $request): Response|RedirectResponse + { + Auth::logout(); + $request->session()->invalidate(); + $request->session()->regenerateToken(); + + $return = (string) $request->query('return', ''); + $root = (string) config('app.platform_domain', 'ladill.com'); + $host = parse_url($return, PHP_URL_HOST); + if (str_starts_with($return, 'https://') && is_string($host) && ($host === $root || str_ends_with($host, '.'.$root))) { + return redirect()->away($return); + } + + return response('', 204); + } + + private function attemptSilentRefresh(Request $request, string $intended): bool + { + $refreshToken = (string) $request->session()->get('sso.refresh_token', ''); + if ($refreshToken === '') { + return false; + } + + $issuer = rtrim((string) config('services.ladill_sso.issuer'), '/'); + $tokenRes = Http::asForm()->post($issuer.'/oauth/token', [ + 'grant_type' => 'refresh_token', + 'refresh_token' => $refreshToken, + 'client_id' => (string) config('services.ladill_sso.client_id'), + 'client_secret' => (string) config('services.ladill_sso.client_secret'), + 'scope' => 'openid profile email', + ]); + + if ($tokenRes->failed()) { + $request->session()->forget('sso.refresh_token'); + + return false; + } + + $user = $this->loginFromTokenResponse($request, $tokenRes); + + if (! $user) { + return false; + } + + Auth::login($user, remember: true); + $request->session()->put('sso.intended', $intended); + + return true; + } + + private function loginFromTokenResponse(Request $request, HttpResponse $tokenRes): ?User + { + $refreshToken = (string) $tokenRes->json('refresh_token', ''); + if ($refreshToken !== '') { + $request->session()->put('sso.refresh_token', $refreshToken); + } + + $issuer = rtrim((string) config('services.ladill_sso.issuer'), '/'); + $claims = Http::withToken((string) $tokenRes->json('access_token'))->acceptJson()->get($issuer.'/oauth/userinfo'); + if ($claims->failed() || ! $claims->json('sub')) { + return null; + } + + $email = (string) ($claims->json('email') ?: ''); + if ($email !== '') { + $request->session()->put('sso.login_hint', $email); + } + + return User::updateOrCreate( + ['public_id' => (string) $claims->json('sub')], + [ + 'name' => $claims->json('name'), + 'email' => $email !== '' ? $email : (string) $claims->json('sub').'@users.ladill.com', + 'avatar_url' => $claims->json('picture'), + ], + ); + } + + private function finishCallback(Request $request, string $intended, ?string $error = null): RedirectResponse + { + if ($error) { + $attempts = (int) $request->session()->get('sso.attempts', 0) + 1; + + if ($attempts >= self::MAX_SSO_ATTEMPTS) { + $request->session()->forget(['sso.attempts', 'sso.state', 'sso.verifier', 'sso.intended']); + $request->session()->flash('sso.error', $error); + + return redirect()->route('sso.failed'); + } + + $request->session()->put('sso.attempts', $attempts); + + return redirect()->route('sso.connect', [ + 'redirect' => $intended, + 'interactive' => 1, + 'fallback' => 1, + ]); + } + + return $this->safeRedirect($intended, route('frontdesk.dashboard')); + } + + private function safeReturnUrl(string $url): string + { + $host = parse_url($url, PHP_URL_HOST); + $root = (string) config('app.platform_domain', 'ladill.com'); + + if (is_string($host) && str_starts_with($url, 'https://') + && ($host === $root || str_ends_with($host, '.'.$root))) { + return $url; + } + + return route('frontdesk.signed-out'); + } + + private function safeRedirect(string $url, string $fallback): RedirectResponse + { + $host = parse_url($url, PHP_URL_HOST); + $root = (string) config('app.platform_domain', 'ladill.com'); + + if (is_string($host) && str_starts_with($url, 'https://') + && ($host === $root || str_ends_with($host, '.'.$root))) { + return redirect()->away($url); + } + + return redirect()->away($fallback); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..e7f7c94 --- /dev/null +++ b/app/Http/Controllers/Controller.php @@ -0,0 +1,10 @@ +authorizeAbility($request, 'audit.view'); + $organization = $this->organization($request); + + $logs = $this->query($request, $organization)->paginate(50)->withQueryString(); + + return view('frontdesk.audit.index', [ + 'logs' => $logs, + 'organization' => $organization, + 'actions' => config('frontdesk.audit_actions'), + 'canExport' => app(\App\Services\Frontdesk\FrontdeskPermissions::class) + ->can($this->member($request), 'audit.export'), + ]); + } + + public function export(Request $request): StreamedResponse + { + $this->authorizeAbility($request, 'audit.export'); + $organization = $this->organization($request); + + $filename = 'frontdesk-audit-'.now()->format('Y-m-d-His').'.csv'; + + return response()->streamDownload(function () use ($request, $organization) { + $handle = fopen('php://output', 'w'); + fputcsv($handle, ['Time', 'Action', 'Actor', 'Subject', 'Metadata', 'IP']); + + $this->query($request, $organization)->chunk(200, function ($logs) use ($handle) { + foreach ($logs as $log) { + fputcsv($handle, [ + $log->created_at?->toDateTimeString(), + $log->action, + $log->actor_ref ?? '—', + $log->subject_type ? class_basename($log->subject_type).' #'.$log->subject_id : '—', + json_encode($log->metadata ?? []), + $log->ip_address ?? '—', + ]); + } + }); + + fclose($handle); + }, $filename, ['Content-Type' => 'text/csv']); + } + + protected function query(Request $request, $organization) + { + return AuditLog::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->when($request->action, fn ($q, $action) => $q->where('action', $action)) + ->when($request->from, fn ($q, $from) => $q->where('created_at', '>=', Carbon::parse($from)->startOfDay())) + ->when($request->to, fn ($q, $to) => $q->where('created_at', '<=', Carbon::parse($to)->endOfDay())) + ->when($request->q, function ($q, $search) { + $q->where(function ($inner) use ($search) { + $inner->where('action', 'like', "%{$search}%") + ->orWhere('metadata', 'like', "%{$search}%"); + }); + }) + ->orderByDesc('created_at'); + } +} diff --git a/app/Http/Controllers/Frontdesk/BadgeController.php b/app/Http/Controllers/Frontdesk/BadgeController.php new file mode 100644 index 0000000..5df5633 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/BadgeController.php @@ -0,0 +1,100 @@ +authorizeAbility($request, 'settings.view'); + $organization = $this->organization($request); + $canManage = app(FrontdeskPermissions::class)->isAdmin($this->member($request)); + + return view('frontdesk.badges.template', [ + 'organization' => $organization, + 'canManage' => $canManage, + 'template' => array_merge( + config('frontdesk.default_badge_template', []), + $organization->settings['badge_template'] ?? [], + ), + 'sampleVisit' => Visit::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('status', Visit::STATUS_CHECKED_IN) + ->with(['visitor', 'host']) + ->latest('checked_in_at') + ->first(), + ]); + } + + public function updateTemplate(Request $request): RedirectResponse + { + $this->authorizeAbility($request, 'settings.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'show_photo' => ['boolean'], + 'show_qr' => ['boolean'], + 'show_host' => ['boolean'], + 'show_company' => ['boolean'], + 'show_type' => ['boolean'], + 'primary_color' => ['nullable', 'string', 'max:7'], + 'footer_text' => ['nullable', 'string', 'max:255'], + ]); + + $settings = $organization->settings ?? []; + $settings['badge_template'] = [ + 'show_photo' => $request->boolean('show_photo'), + 'show_qr' => $request->boolean('show_qr'), + 'show_host' => $request->boolean('show_host'), + 'show_company' => $request->boolean('show_company'), + 'show_type' => $request->boolean('show_type'), + 'primary_color' => $validated['primary_color'] ?? '#0d9488', + 'footer_text' => $validated['footer_text'] ?? '', + ]; + + $organization->update(['settings' => $settings]); + + return back()->with('success', 'Badge template saved.'); + } + + public function preview(Request $request, Visit $visit, BadgeRenderService $badges): View + { + $this->authorizeAbility($request, 'visits.view'); + $this->authorizeOwner($request, $visit); + + $visit->load(['visitor', 'host', 'organization']); + + return view('frontdesk.badges.render', [ + 'visit' => $visit, + 'template' => $badges->templateFor($visit->organization), + 'photoUrl' => $badges->photoUrl($visit), + 'qrSvg' => $visit->qr_token ? app(\App\Services\Frontdesk\QrCodeService::class)->svg($visit, 120) : null, + 'autoPrint' => false, + 'preview' => true, + ]); + } + + public function print(Request $request, Visit $visit, PrinterManager $printers) + { + $this->authorizeAbility($request, 'visits.view'); + $this->authorizeOwner($request, $visit); + + $rendered = $printers->renderBadge($visit, $request->query('driver')); + + return response($rendered['content'], 200, [ + 'Content-Type' => 'text/html; charset=UTF-8', + ]); + } +} diff --git a/app/Http/Controllers/Frontdesk/BranchController.php b/app/Http/Controllers/Frontdesk/BranchController.php new file mode 100644 index 0000000..4f1a35d --- /dev/null +++ b/app/Http/Controllers/Frontdesk/BranchController.php @@ -0,0 +1,86 @@ +authorizeAbility($request, 'admin.branches.view'); + $organization = $this->organization($request); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->withCount(['buildings']) + ->orderBy('name') + ->get(); + + return view('frontdesk.admin.branches.index', compact('branches', 'organization')); + } + + public function create(Request $request): View + { + $this->authorizeAbility($request, 'admin.branches.manage'); + return view('frontdesk.admin.branches.create', ['organization' => $this->organization($request)]); + } + + public function store(Request $request): RedirectResponse + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'code' => ['nullable', 'string', 'max:50'], + 'address' => ['nullable', 'string', 'max:500'], + 'phone' => ['nullable', 'string', 'max:50'], + ]); + + Branch::create([ + 'owner_ref' => $this->ownerRef($request), + 'organization_id' => $organization->id, + ...$validated, + 'is_active' => true, + ]); + + return redirect()->route('frontdesk.branches.index')->with('success', 'Branch created.'); + } + + public function edit(Request $request, Branch $branch): View + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $this->authorizeOwner($request, $branch); + + return view('frontdesk.admin.branches.edit', compact('branch')); + } + + public function update(Request $request, Branch $branch): RedirectResponse + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $this->authorizeOwner($request, $branch); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'code' => ['nullable', 'string', 'max:50'], + 'address' => ['nullable', 'string', 'max:500'], + 'phone' => ['nullable', 'string', 'max:50'], + 'is_active' => ['boolean'], + ]); + + $branch->update([ + ...$validated, + 'is_active' => $request->boolean('is_active'), + ]); + + return redirect()->route('frontdesk.branches.index')->with('success', 'Branch updated.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/BuildingController.php b/app/Http/Controllers/Frontdesk/BuildingController.php new file mode 100644 index 0000000..7e483c1 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/BuildingController.php @@ -0,0 +1,56 @@ +authorizeAbility($request, 'admin.branches.view'); + $this->authorizeOwner($request, $branch); + + $buildings = $branch->buildings()->withCount('receptionDesks')->orderBy('name')->get(); + + return view('frontdesk.admin.buildings.index', compact('branch', 'buildings')); + } + + public function store(Request $request, Branch $branch): RedirectResponse + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $this->authorizeOwner($request, $branch); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'floor_count' => ['nullable', 'string', 'max:20'], + ]); + + Building::create([ + 'owner_ref' => $this->ownerRef($request), + 'branch_id' => $branch->id, + ...$validated, + ]); + + return back()->with('success', 'Building added.'); + } + + public function destroy(Request $request, Branch $branch, Building $building): RedirectResponse + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $this->authorizeOwner($request, $building); + abort_unless($building->branch_id === $branch->id, 404); + + $building->delete(); + + return back()->with('success', 'Building removed.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/ComplianceController.php b/app/Http/Controllers/Frontdesk/ComplianceController.php new file mode 100644 index 0000000..d69bbbe --- /dev/null +++ b/app/Http/Controllers/Frontdesk/ComplianceController.php @@ -0,0 +1,139 @@ +authorizeAbility($request, 'compliance.restore'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + $deletedVisitors = Visitor::owned($owner) + ->onlyTrashed() + ->where('organization_id', $organization->id) + ->latest('deleted_at') + ->limit(25) + ->get(); + + $deletedVisits = Visit::owned($owner) + ->onlyTrashed() + ->where('organization_id', $organization->id) + ->with('visitor') + ->latest('deleted_at') + ->limit(25) + ->get(); + + return view('frontdesk.compliance.recovery', compact('deletedVisitors', 'deletedVisits', 'organization')); + } + + public function restoreVisitor(Request $request, int $visitorId): RedirectResponse + { + $this->authorizeAbility($request, 'compliance.restore'); + $organization = $this->organization($request); + + $visitor = Visitor::owned($this->ownerRef($request)) + ->onlyTrashed() + ->where('organization_id', $organization->id) + ->findOrFail($visitorId); + + $visitor->restore(); + + AuditLog::record( + $this->ownerRef($request), + 'visitor.restored', + $organization->id, + $this->ownerRef($request), + Visitor::class, + $visitor->id, + ['full_name' => $visitor->full_name], + ); + + return back()->with('success', 'Visitor restored.'); + } + + public function restoreVisit(Request $request, int $visitId): RedirectResponse + { + $this->authorizeAbility($request, 'compliance.restore'); + $organization = $this->organization($request); + + $visit = Visit::owned($this->ownerRef($request)) + ->onlyTrashed() + ->where('organization_id', $organization->id) + ->findOrFail($visitId); + + $visit->restore(); + + AuditLog::record( + $this->ownerRef($request), + 'visit.restored', + $organization->id, + $this->ownerRef($request), + Visit::class, + $visit->id, + ['visitor_id' => $visit->visitor_id], + ); + + return back()->with('success', 'Visit restored.'); + } + + public function destroyVisitor(Request $request, Visitor $visitor): RedirectResponse + { + $this->authorizeAbility($request, 'visitors.manage'); + $this->authorizeOwner($request, $visitor); + $organization = $this->organization($request); + + $visitor->delete(); + + AuditLog::record( + $this->ownerRef($request), + 'visitor.deleted', + $organization->id, + $this->ownerRef($request), + Visitor::class, + $visitor->id, + ['full_name' => $visitor->full_name], + ); + + return redirect() + ->route('frontdesk.visitors.index') + ->with('success', 'Visitor archived.'); + } + + public function destroyVisit(Request $request, Visit $visit): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visit); + $organization = $this->organization($request); + + abort_if($visit->isInside(), 422, 'Check out the visitor before archiving the visit.'); + + $visit->delete(); + + AuditLog::record( + $this->ownerRef($request), + 'visit.deleted', + $organization->id, + $this->ownerRef($request), + Visit::class, + $visit->id, + ['visitor_id' => $visit->visitor_id], + ); + + return redirect() + ->route('frontdesk.visits.index') + ->with('success', 'Visit archived.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/Concerns/ScopesToAccount.php b/app/Http/Controllers/Frontdesk/Concerns/ScopesToAccount.php new file mode 100644 index 0000000..8447a3c --- /dev/null +++ b/app/Http/Controllers/Frontdesk/Concerns/ScopesToAccount.php @@ -0,0 +1,59 @@ +user()->public_id; + } + + protected function organization(Request $request): Organization + { + $organization = $request->attributes->get('frontdesk.organization') + ?? app(OrganizationResolver::class)->resolveForUser($request->user()); + + abort_unless($organization, 404); + + return $organization; + } + + protected function member(Request $request): ?Member + { + return $request->attributes->get('frontdesk.member') + ?? app(OrganizationResolver::class)->memberFor($request->user(), $this->organization($request)); + } + + protected function authorizeAbility(Request $request, string $ability): void + { + abort_unless( + app(FrontdeskPermissions::class)->can($this->member($request), $ability), + 403, + ); + } + + protected function authorizeOwner(Request $request, Model $model): void + { + abort_unless($model->getAttribute('owner_ref') === $this->ownerRef($request), 404); + } + + protected function scopeToBranch(Request $request, Builder $query, string $column = 'branch_id'): Builder + { + $branchId = app(OrganizationResolver::class)->branchScope($this->member($request)); + + if ($branchId !== null) { + $query->where($column, $branchId); + } + + return $query; + } +} diff --git a/app/Http/Controllers/Frontdesk/DashboardController.php b/app/Http/Controllers/Frontdesk/DashboardController.php new file mode 100644 index 0000000..aa56b80 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/DashboardController.php @@ -0,0 +1,88 @@ +authorizeAbility($request, 'dashboard.view'); + $owner = $this->ownerRef($request); + $organization = $this->organization($request); + + $visitQuery = Visit::owned($owner)->where('organization_id', $organization->id); + $this->scopeToBranch($request, $visitQuery); + + $branchScope = app(OrganizationResolver::class)->branchScope($this->member($request)); + $cacheKey = "fd:dashboard:{$owner}:{$organization->id}:".($branchScope ?? 'all'); + + $stats = Cache::remember($cacheKey, 60, function () use ($visitQuery) { + $today = (clone $visitQuery)->where(function ($q) { + $q->whereDate('checked_in_at', today()) + ->orWhereDate('scheduled_at', today()); + }); + + return [ + 'visitors_today' => (clone $today)->count(), + 'currently_inside' => (clone $visitQuery)->currentlyInside()->count(), + 'expected_arrivals' => (clone $visitQuery)->whereIn('status', [ + Visit::STATUS_EXPECTED, + Visit::STATUS_SCHEDULED, + Visit::STATUS_OVERDUE, + ])->whereDate('scheduled_at', today())->count(), + 'waiting' => (clone $visitQuery)->where('status', Visit::STATUS_WAITING)->count(), + 'overdue' => (clone $visitQuery)->where('status', Visit::STATUS_OVERDUE)->count(), + 'checked_out_today' => (clone $visitQuery)->where('status', Visit::STATUS_CHECKED_OUT) + ->whereDate('checked_out_at', today())->count(), + 'deliveries_today' => (clone $visitQuery)->where('visitor_type', 'delivery') + ->whereDate('checked_in_at', today())->count(), + 'contractors_today' => (clone $visitQuery)->where('visitor_type', 'contractor') + ->whereDate('checked_in_at', today())->count(), + 'pending_approvals' => (clone $visitQuery)->where('status', Visit::STATUS_WAITING) + ->whereNull('checked_in_at') + ->where(function ($q) { + $q->whereJsonContains('contractor_details', ['_awaiting_approval' => true]) + ->orWhereJsonContains('delivery_details', ['_awaiting_approval' => true]); + })->count(), + ]; + }); + + $currentVisitors = (clone $visitQuery)->currentlyInside() + ->with(['visitor', 'host']) + ->latest('checked_in_at') + ->limit(10) + ->get(); + + $expectedVisitors = (clone $visitQuery) + ->whereIn('status', [Visit::STATUS_EXPECTED, Visit::STATUS_SCHEDULED, Visit::STATUS_WAITING, Visit::STATUS_OVERDUE]) + ->whereDate('scheduled_at', today()) + ->with(['visitor', 'host']) + ->orderBy('scheduled_at') + ->limit(10) + ->get(); + + $pendingApprovals = (clone $visitQuery) + ->where('status', Visit::STATUS_WAITING) + ->whereNull('checked_in_at') + ->where(function ($q) { + $q->whereJsonContains('contractor_details', ['_awaiting_approval' => true]) + ->orWhereJsonContains('delivery_details', ['_awaiting_approval' => true]); + }) + ->with(['visitor', 'host']) + ->latest() + ->limit(10) + ->get(); + + return view('frontdesk.dashboard', compact('stats', 'currentVisitors', 'expectedVisitors', 'pendingApprovals', 'organization')); + } +} diff --git a/app/Http/Controllers/Frontdesk/DeviceController.php b/app/Http/Controllers/Frontdesk/DeviceController.php new file mode 100644 index 0000000..7e77c26 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/DeviceController.php @@ -0,0 +1,152 @@ +authorizeAbility($request, 'devices.view'); + $organization = $this->organization($request); + + $devices = Device::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->with(['branch', 'receptionDesk']) + ->orderBy('name') + ->paginate(25); + + return view('frontdesk.devices.index', [ + 'organization' => $organization, + 'devices' => $devices, + 'deviceTypes' => config('frontdesk.device_types'), + 'canManage' => app(\App\Services\Frontdesk\FrontdeskPermissions::class) + ->can($this->member($request), 'devices.manage'), + ]); + } + + public function create(Request $request): View + { + $this->authorizeAbility($request, 'devices.manage'); + $organization = $this->organization($request); + + return view('frontdesk.devices.create', [ + 'organization' => $organization, + 'deviceTypes' => config('frontdesk.device_types'), + 'branches' => $this->branches($request, $organization->id), + 'desks' => $this->desks($request, $organization->id), + ]); + } + + public function store(Request $request, DeviceService $devices): RedirectResponse + { + $this->authorizeAbility($request, 'devices.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.device_types')))], + 'branch_id' => ['nullable', 'integer'], + 'reception_desk_id' => ['nullable', 'integer'], + ]); + + $token = in_array($validated['type'], ['kiosk', 'badge_printer', 'qr_scanner'], true) + ? $devices->generateToken() + : null; + + Device::create([ + 'owner_ref' => $this->ownerRef($request), + 'organization_id' => $organization->id, + 'name' => $validated['name'], + 'type' => $validated['type'], + 'branch_id' => $validated['branch_id'] ?? null, + 'reception_desk_id' => $validated['reception_desk_id'] ?? null, + 'device_token' => $token, + 'status' => 'offline', + 'config' => $devices->defaultConfigForType($validated['type']), + ]); + + return redirect()->route('frontdesk.devices.index')->with('success', 'Device registered.'); + } + + public function edit(Request $request, Device $device): View + { + $this->authorizeAbility($request, 'devices.manage'); + $this->authorizeOwner($request, $device); + + return view('frontdesk.devices.edit', [ + 'device' => $device, + 'deviceTypes' => config('frontdesk.device_types'), + 'branches' => $this->branches($request, $device->organization_id), + 'desks' => $this->desks($request, $device->organization_id), + ]); + } + + public function update(Request $request, Device $device): RedirectResponse + { + $this->authorizeAbility($request, 'devices.manage'); + $this->authorizeOwner($request, $device); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.device_types')))], + 'branch_id' => ['nullable', 'integer'], + 'reception_desk_id' => ['nullable', 'integer'], + 'status' => ['nullable', 'string', 'in:online,offline,maintenance'], + ]); + + $device->update($validated); + + return redirect()->route('frontdesk.devices.index')->with('success', 'Device updated.'); + } + + public function destroy(Request $request, Device $device): RedirectResponse + { + $this->authorizeAbility($request, 'devices.manage'); + $this->authorizeOwner($request, $device); + $device->delete(); + + return redirect()->route('frontdesk.devices.index')->with('success', 'Device removed.'); + } + + public function regenerateToken(Request $request, Device $device, DeviceService $devices): RedirectResponse + { + $this->authorizeAbility($request, 'devices.manage'); + $this->authorizeOwner($request, $device); + + $device->update(['device_token' => $devices->generateToken()]); + + return back()->with('success', 'Device token regenerated.'); + } + + /** @return \Illuminate\Database\Eloquent\Collection */ + protected function branches(Request $request, int $organizationId) + { + return Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organizationId) + ->where('is_active', true) + ->orderBy('name') + ->get(); + } + + /** @return \Illuminate\Database\Eloquent\Collection */ + protected function desks(Request $request, int $organizationId) + { + return ReceptionDesk::owned($this->ownerRef($request)) + ->whereHas('building.branch', fn ($q) => $q->where('organization_id', $organizationId)) + ->where('is_active', true) + ->orderBy('name') + ->get(); + } +} diff --git a/app/Http/Controllers/Frontdesk/HostController.php b/app/Http/Controllers/Frontdesk/HostController.php new file mode 100644 index 0000000..67366a8 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/HostController.php @@ -0,0 +1,117 @@ +authorizeAbility($request, 'hosts.view'); + $organization = $this->organization($request); + + $hosts = Host::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id); + $this->scopeToBranch($request, $hosts); + $hosts = $hosts->orderBy('name')->paginate(25); + + return view('frontdesk.hosts.index', compact('hosts', 'organization')); + } + + public function create(Request $request): View + { + $this->authorizeAbility($request, 'hosts.manage'); + $organization = $this->organization($request); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('is_active', true) + ->orderBy('name') + ->get(); + + return view('frontdesk.hosts.create', compact('organization', 'branches')); + } + + public function store(Request $request): RedirectResponse + { + $this->authorizeAbility($request, 'hosts.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'department' => ['nullable', 'string', 'max:255'], + 'office' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'extension' => ['nullable', 'string', 'max:20'], + 'user_ref' => ['nullable', 'string', 'max:64'], + 'branch_id' => ['nullable', 'integer'], + ]); + + Host::create([ + 'owner_ref' => $this->ownerRef($request), + 'organization_id' => $organization->id, + ...$validated, + ]); + + return redirect()->route('frontdesk.hosts.index')->with('success', 'Host added.'); + } + + public function edit(Request $request, Host $host): View + { + $this->authorizeAbility($request, 'hosts.manage'); + $this->authorizeOwner($request, $host); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $host->organization_id) + ->where('is_active', true) + ->orderBy('name') + ->get(); + + return view('frontdesk.hosts.edit', compact('host', 'branches')); + } + + public function update(Request $request, Host $host): RedirectResponse + { + $this->authorizeAbility($request, 'hosts.manage'); + $this->authorizeOwner($request, $host); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'department' => ['nullable', 'string', 'max:255'], + 'office' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'extension' => ['nullable', 'string', 'max:20'], + 'user_ref' => ['nullable', 'string', 'max:64'], + 'branch_id' => ['nullable', 'integer'], + 'is_available' => ['boolean'], + ]); + + $host->update([ + ...$validated, + 'is_available' => $request->boolean('is_available', true), + ]); + + return redirect()->route('frontdesk.hosts.index')->with('success', 'Host updated.'); + } + + public function destroy(Request $request, Host $host): RedirectResponse + { + $this->authorizeAbility($request, 'hosts.manage'); + $this->authorizeOwner($request, $host); + $host->delete(); + + return redirect()->route('frontdesk.hosts.index')->with('success', 'Host removed.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/HostPortalController.php b/app/Http/Controllers/Frontdesk/HostPortalController.php new file mode 100644 index 0000000..1d3f59a --- /dev/null +++ b/app/Http/Controllers/Frontdesk/HostPortalController.php @@ -0,0 +1,133 @@ +resolveLinkedHost($request); + $organization = $this->organization($request); + + $pending = Visit::owned($host->owner_ref) + ->where('organization_id', $organization->id) + ->where('host_id', $host->id) + ->where('status', Visit::STATUS_WAITING) + ->with('visitor') + ->orderByDesc('updated_at') + ->get() + ->filter(fn (Visit $v) => $v->awaitingApproval()); + + $upcoming = Visit::owned($host->owner_ref) + ->where('organization_id', $organization->id) + ->where('host_id', $host->id) + ->whereIn('status', [Visit::STATUS_SCHEDULED, Visit::STATUS_EXPECTED, Visit::STATUS_OVERDUE]) + ->with('visitor') + ->orderBy('scheduled_at') + ->limit(10) + ->get(); + + $recent = Visit::owned($host->owner_ref) + ->where('organization_id', $organization->id) + ->where('host_id', $host->id) + ->whereIn('status', [Visit::STATUS_CHECKED_IN, Visit::STATUS_CHECKED_OUT, Visit::STATUS_CANCELLED]) + ->with('visitor') + ->orderByDesc('updated_at') + ->limit(15) + ->get(); + + return view('frontdesk.host-portal.index', compact('host', 'organization', 'pending', 'upcoming', 'recent')); + } + + public function scheduleForm(Request $request): View + { + $host = $this->resolveLinkedHost($request); + $organization = $this->organization($request); + + return view('frontdesk.host-portal.schedule', compact('host', 'organization')); + } + + public function scheduleStore(Request $request, VisitScheduleService $scheduler): RedirectResponse + { + $host = $this->resolveLinkedHost($request); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'full_name' => ['required', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'visitor_type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.visitor_types')))], + 'purpose' => ['nullable', 'string', 'max:500'], + 'expected_duration_minutes' => ['nullable', 'integer', 'min:5', 'max:480'], + 'scheduled_at' => ['required', 'date'], + 'notes' => ['nullable', 'string', 'max:2000'], + ]); + + $scheduler->schedule( + $host->owner_ref, + $organization, + [ + ...$validated, + 'host_id' => $host->id, + 'branch_id' => $host->branch_id, + ], + $this->ownerRef($request), + ); + + return redirect()->route('frontdesk.host.index')->with('success', 'Visit scheduled.'); + } + + public function approve(Request $request, Visit $visit, VisitLifecycleService $lifecycle): RedirectResponse + { + $host = $this->resolveLinkedHost($request); + $this->authorizeOwner($request, $visit); + abort_unless($visit->host_id === $host->id, 403); + abort_unless($visit->awaitingApproval(), 422); + + $lifecycle->approve($visit, $this->ownerRef($request)); + + return redirect()->route('frontdesk.host.index')->with('success', 'Visit approved.'); + } + + public function toggleAvailability(Request $request): RedirectResponse + { + $host = $this->resolveLinkedHost($request); + $host->update(['is_available' => ! $host->is_available]); + + return back()->with('success', $host->is_available ? 'You are now available.' : 'You are marked unavailable.'); + } + + protected function resolveLinkedHost(Request $request): Host + { + $permissions = app(FrontdeskPermissions::class); + $member = $this->member($request); + + abort_unless( + $permissions->can($member, 'host.portal') || app(OrganizationResolver::class)->hostFor($request->user()) !== null, + 403, + ); + + $host = app(OrganizationResolver::class)->hostFor($request->user()); + + abort_unless($host, 403, 'No host profile linked to your account.'); + + $this->authorizeOwner($request, $host); + + return $host; + } +} diff --git a/app/Http/Controllers/Frontdesk/IntegrationController.php b/app/Http/Controllers/Frontdesk/IntegrationController.php new file mode 100644 index 0000000..25fab2b --- /dev/null +++ b/app/Http/Controllers/Frontdesk/IntegrationController.php @@ -0,0 +1,84 @@ +authorizeAbility($request, 'settings.view'); + $organization = $this->organization($request); + $canManage = app(\App\Services\Frontdesk\FrontdeskPermissions::class) + ->isAdmin($this->member($request)); + + $webhook = WebhookEndpoint::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->first(); + + return view('frontdesk.integrations.edit', [ + 'organization' => $organization, + 'canManage' => $canManage, + 'webhook' => $webhook, + 'webhookEvents' => config('frontdesk.webhook_events', []), + 'integrations' => config('frontdesk.integrations', []), + 'icalUrl' => $this->signedIcalUrl($organization->id, $this->ownerRef($request)), + ]); + } + + public function update(Request $request): RedirectResponse + { + $this->authorizeAbility($request, 'settings.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'webhook_url' => ['nullable', 'url', 'max:500'], + 'webhook_secret' => ['nullable', 'string', 'max:128'], + 'webhook_events' => ['nullable', 'array'], + 'webhook_events.*' => ['string'], + 'webhook_active' => ['boolean'], + ]); + + if (empty($validated['webhook_url'])) { + WebhookEndpoint::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->delete(); + + return back()->with('success', 'Integration settings saved.'); + } + + WebhookEndpoint::updateOrCreate( + [ + 'owner_ref' => $this->ownerRef($request), + 'organization_id' => $organization->id, + ], + [ + 'url' => $validated['webhook_url'], + 'secret' => $validated['webhook_secret'] ?? null, + 'events' => array_values($validated['webhook_events'] ?? config('frontdesk.webhook_events')), + 'is_active' => $request->boolean('webhook_active', true), + ], + ); + + return back()->with('success', 'Integration settings saved.'); + } + + protected function signedIcalUrl(int $organizationId, string $ownerRef): string + { + $token = hash_hmac('sha256', "{$organizationId}:{$ownerRef}", (string) config('app.key')); + + return route('frontdesk.integrations.ical', [ + 'organization' => $organizationId, + 'owner' => $ownerRef, + 'token' => $token, + ]); + } +} diff --git a/app/Http/Controllers/Frontdesk/KioskController.php b/app/Http/Controllers/Frontdesk/KioskController.php new file mode 100644 index 0000000..891b175 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/KioskController.php @@ -0,0 +1,83 @@ +authorizeAbility($request, 'kiosk.use'); + $organization = $this->organization($request); + $settings = $organization->settings ?? []; + + $hosts = Host::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('is_available', true); + $this->scopeToBranch($request, $hosts); + $hosts = $hosts->orderBy('name')->get(); + + return view('frontdesk.kiosk.index', [ + 'organization' => $organization, + 'hosts' => $hosts, + 'visitorTypes' => config('frontdesk.visitor_types'), + 'typeConfigs' => $visitorTypes->configsForFrontend(), + 'resetSeconds' => (int) ($settings['kiosk_reset_seconds'] ?? config('frontdesk.kiosk.inactivity_reset_seconds', 120)), + 'visitorPolicy' => $settings['visitor_policy'] ?? null, + ]); + } + + public function checkIn(Request $request, VisitCheckInService $checkIn, VisitorTypeService $visitorTypes): JsonResponse + { + $this->authorizeAbility($request, 'kiosk.use'); + $organization = $this->organization($request); + $visitorType = $request->input('visitor_type', 'visitor'); + + $validated = $request->validate(array_merge([ + 'full_name' => ['required', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'host_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.visitor_types')))], + 'purpose' => ['nullable', 'string', 'max:500'], + 'expected_duration_minutes' => ['nullable', 'integer'], + 'policies_accepted' => ['accepted'], + 'photo_data' => ['nullable', 'string'], + 'signature_path' => ['nullable', 'string'], + ], $visitorTypes->validationRules($visitorType))); + + $payload = $visitorTypes->enrichCheckInData($visitorType, $validated, $organization); + if (! empty($validated['photo_data'])) { + $payload['photo_data'] = $validated['photo_data']; + } + + $visit = $checkIn->checkIn($this->ownerRef($request), $organization, $payload); + + return response()->json([ + 'visit' => [ + 'id' => $visit->id, + 'public_id' => $visit->public_id, + 'badge_code' => $visit->badge_code, + 'visitor_name' => $visit->visitor->full_name, + 'host_name' => $visit->host?->name, + 'status' => $visit->status, + 'awaiting_approval' => $visit->awaitingApproval(), + 'checked_in_at' => $visit->checked_in_at?->toIso8601String(), + 'badge_url' => $visit->isInside() ? route('frontdesk.visits.badge', $visit) : null, + ], + ]); + } +} diff --git a/app/Http/Controllers/Frontdesk/KioskDeviceController.php b/app/Http/Controllers/Frontdesk/KioskDeviceController.php new file mode 100644 index 0000000..422a0b0 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/KioskDeviceController.php @@ -0,0 +1,96 @@ +device($request); + $organization = Organization::findOrFail($device->organization_id); + $settings = $organization->settings ?? []; + + $hosts = Host::owned($device->owner_ref) + ->where('organization_id', $organization->id) + ->where('is_available', true); + + if ($device->branch_id) { + $hosts->where(function ($q) use ($device) { + $q->whereNull('branch_id')->orWhere('branch_id', $device->branch_id); + }); + } + + $hosts = $hosts->orderBy('name')->get(); + + return view('frontdesk.kiosk.index', [ + 'organization' => $organization, + 'hosts' => $hosts, + 'visitorTypes' => config('frontdesk.visitor_types'), + 'typeConfigs' => $visitorTypes->configsForFrontend(), + 'resetSeconds' => (int) ($settings['kiosk_reset_seconds'] ?? config('frontdesk.kiosk.inactivity_reset_seconds', 120)), + 'visitorPolicy' => $settings['visitor_policy'] ?? null, + 'checkInUrl' => route('frontdesk.kiosk.device.check-in', $device->device_token), + ]); + } + + public function checkIn(Request $request, VisitCheckInService $checkIn, VisitorTypeService $visitorTypes): JsonResponse + { + $device = $this->device($request); + $organization = Organization::findOrFail($device->organization_id); + $visitorType = $request->input('visitor_type', 'visitor'); + + $validated = $request->validate(array_merge([ + 'full_name' => ['required', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'host_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.visitor_types')))], + 'purpose' => ['nullable', 'string', 'max:500'], + 'expected_duration_minutes' => ['nullable', 'integer'], + 'policies_accepted' => ['accepted'], + 'photo_data' => ['nullable', 'string'], + 'vehicle_info' => ['nullable', 'array'], + 'signature_path' => ['nullable', 'string'], + ], $visitorTypes->validationRules($visitorType))); + + $payload = $visitorTypes->enrichCheckInData($visitorType, $validated, $organization); + if (! empty($validated['photo_data'])) { + $payload['photo_data'] = $validated['photo_data']; + } + $payload['branch_id'] = $device->branch_id; + $payload['reception_desk_id'] = $device->reception_desk_id; + + $visit = $checkIn->checkIn($device->owner_ref, $organization, $payload); + + return response()->json([ + 'visit' => [ + 'id' => $visit->id, + 'public_id' => $visit->public_id, + 'badge_code' => $visit->badge_code, + 'visitor_name' => $visit->visitor->full_name, + 'host_name' => $visit->host?->name, + 'status' => $visit->status, + 'awaiting_approval' => $visit->awaitingApproval(), + 'checked_in_at' => $visit->checked_in_at?->toIso8601String(), + 'badge_url' => $visit->isInside() ? route('frontdesk.visits.badge', $visit) : null, + ], + ]); + } + + protected function device(Request $request): Device + { + return $request->attributes->get('frontdesk.device') + ?? abort(404); + } +} diff --git a/app/Http/Controllers/Frontdesk/MemberController.php b/app/Http/Controllers/Frontdesk/MemberController.php new file mode 100644 index 0000000..b837862 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/MemberController.php @@ -0,0 +1,90 @@ +authorizeAbility($request, 'admin.members.view'); + $organization = $this->organization($request); + + $members = Member::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->with('branch') + ->orderBy('created_at') + ->get(); + + return view('frontdesk.admin.members.index', [ + 'members' => $members, + 'organization' => $organization, + 'roles' => config('frontdesk.roles'), + ]); + } + + public function create(Request $request): View + { + $this->authorizeAbility($request, 'admin.members.manage'); + $organization = $this->organization($request); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('is_active', true) + ->orderBy('name') + ->get(); + + return view('frontdesk.admin.members.create', [ + 'organization' => $organization, + 'branches' => $branches, + 'roles' => config('frontdesk.roles'), + ]); + } + + public function store(Request $request): RedirectResponse + { + $this->authorizeAbility($request, 'admin.members.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'user_ref' => ['required', 'string', 'max:255'], + 'role' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.roles')))], + 'branch_id' => ['nullable', 'integer', 'exists:frontdesk_branches,id'], + ]); + + Member::updateOrCreate( + [ + 'organization_id' => $organization->id, + 'user_ref' => $validated['user_ref'], + ], + [ + 'owner_ref' => $this->ownerRef($request), + 'role' => $validated['role'], + 'branch_id' => $validated['branch_id'] ?? null, + ], + ); + + return redirect()->route('frontdesk.members.index')->with('success', 'Member saved.'); + } + + public function destroy(Request $request, Member $member): RedirectResponse + { + $this->authorizeAbility($request, 'admin.members.manage'); + $this->authorizeOwner($request, $member); + + abort_if($member->user_ref === $this->ownerRef($request), 422, 'You cannot remove yourself.'); + + $member->delete(); + + return redirect()->route('frontdesk.members.index')->with('success', 'Member removed.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/OnboardingController.php b/app/Http/Controllers/Frontdesk/OnboardingController.php new file mode 100644 index 0000000..e29fac1 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/OnboardingController.php @@ -0,0 +1,52 @@ +organizations->isOnboarded($request->user())) { + return redirect()->route('frontdesk.dashboard'); + } + + return view('frontdesk.onboarding.show', [ + 'user' => $request->user(), + 'timezones' => timezone_identifiers_list(), + ]); + } + + public function store(Request $request): RedirectResponse + { + if ($this->organizations->isOnboarded($request->user())) { + return redirect()->route('frontdesk.dashboard'); + } + + $validated = $request->validate([ + 'organization_name' => ['required', 'string', 'max:255'], + 'branch_name' => ['required', 'string', 'max:255'], + 'branch_address' => ['nullable', 'string', 'max:500'], + 'timezone' => ['required', 'timezone'], + 'visitor_policy' => ['nullable', 'string', 'max:5000'], + 'badge_expiry_hours' => ['nullable', 'integer', 'min:1', 'max:24'], + 'kiosk_reset_seconds' => ['nullable', 'integer', 'min:30', 'max:600'], + ]); + + $this->organizations->completeOnboarding($request->user(), $validated); + + return redirect()->route('frontdesk.dashboard')->with('success', 'Welcome to Ladill Frontdesk!'); + } +} diff --git a/app/Http/Controllers/Frontdesk/QrScanController.php b/app/Http/Controllers/Frontdesk/QrScanController.php new file mode 100644 index 0000000..75f5518 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/QrScanController.php @@ -0,0 +1,31 @@ +with(['visitor', 'host', 'organization'])->firstOrFail(); + + return view('frontdesk.qr.show', [ + 'visit' => $visit, + 'qrSvg' => $qr->svg($visit), + ]); + } + + public function checkOut(string $token, VisitCheckOutService $checkOut): View + { + $visit = Visit::where('qr_token', $token)->firstOrFail(); + $checkOut->checkOut($visit); + + return view('frontdesk.qr.checked-out', ['visit' => $visit->load('visitor')]); + } +} diff --git a/app/Http/Controllers/Frontdesk/ReceptionDeskController.php b/app/Http/Controllers/Frontdesk/ReceptionDeskController.php new file mode 100644 index 0000000..071093e --- /dev/null +++ b/app/Http/Controllers/Frontdesk/ReceptionDeskController.php @@ -0,0 +1,57 @@ +authorizeAbility($request, 'admin.desks.view'); + $this->authorizeOwner($request, $building); + + $desks = $building->receptionDesks()->orderBy('name')->get(); + + return view('frontdesk.admin.desks.index', compact('building', 'desks')); + } + + public function store(Request $request, Building $building): RedirectResponse + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $this->authorizeOwner($request, $building); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'location' => ['nullable', 'string', 'max:255'], + ]); + + ReceptionDesk::create([ + 'owner_ref' => $this->ownerRef($request), + 'building_id' => $building->id, + ...$validated, + 'is_active' => true, + ]); + + return back()->with('success', 'Reception desk added.'); + } + + public function destroy(Request $request, Building $building, ReceptionDesk $desk): RedirectResponse + { + $this->authorizeAbility($request, 'admin.branches.manage'); + $this->authorizeOwner($request, $desk); + abort_unless($desk->building_id === $building->id, 404); + + $desk->delete(); + + return back()->with('success', 'Reception desk removed.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/ReportController.php b/app/Http/Controllers/Frontdesk/ReportController.php new file mode 100644 index 0000000..c2fb62a --- /dev/null +++ b/app/Http/Controllers/Frontdesk/ReportController.php @@ -0,0 +1,86 @@ +authorizeAbility($request, 'reports.view'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + [$from, $to] = $this->dateRange($request); + $branchId = app(OrganizationResolver::class)->branchScope($this->member($request)); + + return view('frontdesk.reports.index', [ + 'organization' => $organization, + 'from' => $from->toDateString(), + 'to' => $to->toDateString(), + 'summary' => $reports->summary($owner, $organization, $from, $to, $branchId), + 'peakHours' => $reports->peakHours($owner, $organization, $from, $to, $branchId), + 'departments' => $reports->visitsByDepartment($owner, $organization, $from, $to, $branchId), + 'frequentVisitors' => $reports->frequentVisitors($owner, $organization), + 'security' => $reports->securityIncidents($owner, $organization, $from, $to), + 'dailyCounts' => $reports->dailyCounts($owner, $organization, $from, $to, $branchId), + 'canExport' => app(FrontdeskPermissions::class)->can($this->member($request), 'reports.export'), + ]); + } + + public function export(Request $request, ReportService $reports): StreamedResponse + { + $this->authorizeAbility($request, 'reports.export'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + [$from, $to] = $this->dateRange($request); + $branchId = app(OrganizationResolver::class)->branchScope($this->member($request)); + $summary = $reports->summary($owner, $organization, $from, $to, $branchId); + $departments = $reports->visitsByDepartment($owner, $organization, $from, $to, $branchId); + + $filename = 'frontdesk-report-'.$from->format('Y-m-d').'-'.$to->format('Y-m-d').'.csv'; + + return response()->streamDownload(function () use ($summary, $departments, $from, $to) { + $handle = fopen('php://output', 'w'); + fputcsv($handle, ['Frontdesk report', $from->toDateString(), 'to', $to->toDateString()]); + fputcsv($handle, []); + fputcsv($handle, ['Metric', 'Value']); + foreach ($summary as $key => $value) { + fputcsv($handle, [str_replace('_', ' ', $key), $value]); + } + fputcsv($handle, []); + fputcsv($handle, ['Department', 'Visits']); + foreach ($departments as $row) { + fputcsv($handle, [$row->department, $row->count]); + } + fclose($handle); + }, $filename, ['Content-Type' => 'text/csv']); + } + + /** @return array{0: Carbon, 1: Carbon} */ + protected function dateRange(Request $request): array + { + $from = $request->filled('from') + ? Carbon::parse($request->string('from'))->startOfDay() + : now()->subDays(30)->startOfDay(); + $to = $request->filled('to') + ? Carbon::parse($request->string('to'))->endOfDay() + : now()->endOfDay(); + + return [$from, $to]; + } +} diff --git a/app/Http/Controllers/Frontdesk/SecurityController.php b/app/Http/Controllers/Frontdesk/SecurityController.php new file mode 100644 index 0000000..43807f3 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/SecurityController.php @@ -0,0 +1,121 @@ +authorizeAbility($request, 'security.view'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + $occupancy = Visit::owned($owner) + ->where('organization_id', $organization->id) + ->currentlyInside() + ->with(['visitor', 'host']); + $this->scopeToBranch($request, $occupancy); + $occupancy = $occupancy->orderBy('checked_in_at')->get(); + + $expiredBadges = $occupancy->filter(fn (Visit $v) => $v->isBadgeExpired()); + + return view('frontdesk.security.index', [ + 'occupancy' => $occupancy, + 'expiredBadges' => $expiredBadges, + 'organization' => $organization, + 'canCheckout' => app(\App\Services\Frontdesk\FrontdeskPermissions::class) + ->can($this->member($request), 'security.checkout'), + ]); + } + + public function evacuation(Request $request): View + { + $this->authorizeAbility($request, 'security.view'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + $occupancy = Visit::owned($owner) + ->where('organization_id', $organization->id) + ->currentlyInside() + ->with(['visitor', 'host', 'branch']); + $this->scopeToBranch($request, $occupancy); + $occupancy = $occupancy->orderBy('checked_in_at')->get(); + + return view('frontdesk.security.evacuation', compact('occupancy', 'organization')); + } + + public function evacuationBadges(Request $request, \App\Services\Frontdesk\BadgeRenderService $badges): View + { + $this->authorizeAbility($request, 'security.view'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + $visits = Visit::owned($owner) + ->where('organization_id', $organization->id) + ->currentlyInside() + ->with(['visitor', 'host', 'organization']); + $this->scopeToBranch($request, $visits); + $visits = $visits->orderBy('checked_in_at')->get(); + + $rendered = $visits->map(fn (Visit $visit) => $badges->renderHtml($visit)); + + return view('frontdesk.security.evacuation-badges', compact('visits', 'rendered', 'organization')); + } + + public function checkOut(Request $request, Visit $visit, VisitCheckOutService $checkOut): RedirectResponse + { + $this->authorizeAbility($request, 'security.checkout'); + $this->authorizeOwner($request, $visit); + $checkOut->checkOut($visit, $this->ownerRef($request)); + + return back()->with('success', 'Visitor checked out.'); + } + + public function verifyForm(Request $request): View + { + $this->authorizeAbility($request, 'security.verify'); + + return view('frontdesk.security.verify', [ + 'organization' => $this->organization($request), + ]); + } + + public function verify(Request $request): View + { + $this->authorizeAbility($request, 'security.verify'); + $organization = $this->organization($request); + $owner = $this->ownerRef($request); + + $validated = $request->validate([ + 'lookup' => ['required', 'string', 'max:64'], + ]); + + $lookup = trim($validated['lookup']); + + $visit = Visit::owned($owner) + ->where('organization_id', $organization->id) + ->where(function ($q) use ($lookup) { + $q->where('badge_code', strtoupper($lookup)) + ->orWhere('qr_token', $lookup); + }) + ->with(['visitor', 'host', 'branch']) + ->latest('checked_in_at') + ->first(); + + return view('frontdesk.security.verify', [ + 'organization' => $organization, + 'lookup' => $lookup, + 'visit' => $visit, + ]); + } +} diff --git a/app/Http/Controllers/Frontdesk/SettingsController.php b/app/Http/Controllers/Frontdesk/SettingsController.php new file mode 100644 index 0000000..745f3f4 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/SettingsController.php @@ -0,0 +1,92 @@ +authorizeAbility($request, 'settings.view'); + $organization = $this->organization($request); + $canManage = app(FrontdeskPermissions::class)->isAdmin($this->member($request)); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->count(); + + return view('frontdesk.settings.edit', [ + 'organization' => $organization, + 'canManage' => $canManage, + 'branchCount' => $branches, + 'roles' => config('frontdesk.roles'), + 'deviceTypes' => config('frontdesk.device_types'), + 'notificationChannels' => config('frontdesk.notification_channels'), + 'notificationEvents' => config('frontdesk.notification_events'), + ]); + } + + public function update(Request $request): RedirectResponse + { + $this->authorizeAbility($request, 'settings.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'timezone' => ['required', 'timezone'], + 'badge_expiry_hours' => ['required', 'integer', 'min:1', 'max:24'], + 'kiosk_reset_seconds' => ['required', 'integer', 'min:30', 'max:600'], + 'contractor_badge_expiry_hours' => ['nullable', 'integer', 'min:1', 'max:24'], + 'visitor_policy' => ['nullable', 'string', 'max:5000'], + 'notification_channels' => ['nullable', 'array'], + 'notification_channels.*' => ['string', 'in:'.implode(',', array_keys(config('frontdesk.notification_channels')))], + 'notification_events' => ['nullable', 'array'], + 'report_daily_recipients' => ['nullable', 'string', 'max:2000'], + ]); + + $settings = $organization->settings ?? []; + $settings['onboarded'] = true; + $settings['badge_expiry_hours'] = $validated['badge_expiry_hours']; + $settings['kiosk_reset_seconds'] = $validated['kiosk_reset_seconds']; + $settings['visitor_policy'] = $validated['visitor_policy'] ?? null; + $settings['notification_channels'] = $validated['notification_channels'] ?? ['email']; + + $eventKeys = array_keys(config('frontdesk.notification_events', [])); + $submittedEvents = $validated['notification_events'] ?? []; + $settings['notification_events'] = []; + foreach ($eventKeys as $key) { + $settings['notification_events'][$key] = (bool) ($submittedEvents[$key] ?? false); + } + + if (array_key_exists('report_daily_recipients', $validated)) { + $settings['report_daily_recipients'] = array_values(array_filter(array_map( + 'trim', + explode(',', (string) ($validated['report_daily_recipients'] ?? '')), + ))); + } + + if (! empty($validated['contractor_badge_expiry_hours'])) { + $settings['type_badge_expiry_hours'] = array_merge( + $settings['type_badge_expiry_hours'] ?? [], + ['contractor' => (int) $validated['contractor_badge_expiry_hours']], + ); + } + + $organization->update([ + 'name' => $validated['name'], + 'timezone' => $validated['timezone'], + 'settings' => $settings, + ]); + + return back()->with('success', 'Settings saved.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/VisitController.php b/app/Http/Controllers/Frontdesk/VisitController.php new file mode 100644 index 0000000..808e6e1 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/VisitController.php @@ -0,0 +1,300 @@ +authorizeAbility($request, 'visits.view'); + $organization = $this->organization($request); + + $visits = Visit::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->with(['visitor', 'host']); + $this->scopeToBranch($request, $visits); + $visits = $visits + ->when($request->status, fn ($q, $status) => $q->where('status', $status)) + ->when($request->q, function ($q, $search) { + $q->whereHas('visitor', fn ($v) => $v->where('full_name', 'like', "%{$search}%")); + }) + ->latest() + ->paginate(25) + ->withQueryString(); + + return view('frontdesk.visits.index', compact('visits', 'organization')); + } + + public function calendar(Request $request): View + { + $this->authorizeAbility($request, 'visits.view'); + $organization = $this->organization($request); + + $start = $request->filled('start') + ? Carbon::parse($request->string('start')->toString())->startOfWeek() + : now()->startOfWeek(); + $end = $start->copy()->endOfWeek(); + + $visits = Visit::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->whereNotNull('scheduled_at') + ->whereBetween('scheduled_at', [$start, $end]) + ->whereNotIn('status', [Visit::STATUS_CANCELLED]) + ->with(['visitor', 'host']); + $this->scopeToBranch($request, $visits); + $visits = $visits->orderBy('scheduled_at')->get()->groupBy( + fn (Visit $visit) => $visit->scheduled_at->toDateString(), + ); + + return view('frontdesk.visits.calendar', compact('visits', 'organization', 'start', 'end')); + } + + public function create(Request $request, VisitorSearchService $search): View + { + $this->authorizeAbility($request, 'visits.manage'); + $organization = $this->organization($request); + + $hosts = Host::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id); + $this->scopeToBranch($request, $hosts); + $hosts = $hosts->orderBy('name')->get(); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('is_active', true) + ->orderBy('name') + ->get(); + + $returningVisitors = $request->filled('q') + ? $search->search($this->ownerRef($request), $organization->id, $request->string('q')->toString()) + : collect(); + + return view('frontdesk.visits.create', [ + 'organization' => $organization, + 'hosts' => $hosts, + 'branches' => $branches, + 'returningVisitors' => $returningVisitors, + 'typeConfigs' => app(VisitorTypeService::class)->configsForFrontend(), + ]); + } + + public function scheduleForm(Request $request, VisitorSearchService $search): View + { + $this->authorizeAbility($request, 'visits.manage'); + $organization = $this->organization($request); + + $hosts = Host::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id); + $this->scopeToBranch($request, $hosts); + $hosts = $hosts->orderBy('name')->get(); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('is_active', true) + ->orderBy('name') + ->get(); + + $returningVisitors = $request->filled('q') + ? $search->search($this->ownerRef($request), $organization->id, $request->string('q')->toString()) + : collect(); + + return view('frontdesk.visits.schedule', compact('organization', 'hosts', 'branches', 'returningVisitors')); + } + + public function store(Request $request, VisitCheckInService $checkIn, VisitorTypeService $visitorTypes): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $organization = $this->organization($request); + $visitorType = $request->input('visitor_type', 'visitor'); + + $validated = $request->validate(array_merge([ + 'visitor_id' => ['nullable', 'integer'], + 'full_name' => ['required_without:visitor_id', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'host_id' => ['nullable', 'integer'], + 'branch_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.visitor_types')))], + 'purpose' => ['nullable', 'string', 'max:500'], + 'expected_duration_minutes' => ['nullable', 'integer', 'min:5', 'max:480'], + 'policies_accepted' => ['accepted'], + 'photo_data' => ['nullable', 'string'], + ], $visitorTypes->validationRules($visitorType))); + + $branchScope = app(\App\Services\Frontdesk\OrganizationResolver::class) + ->branchScope($this->member($request)); + if ($branchScope !== null) { + $validated['branch_id'] = $branchScope; + } + + $payload = $visitorTypes->enrichCheckInData($visitorType, $validated, $organization, $request); + + $visit = $checkIn->checkIn( + $this->ownerRef($request), + $organization, + $payload, + $this->ownerRef($request), + ); + + $message = $visit->awaitingApproval() + ? 'Visit submitted for approval.' + : 'Visitor checked in successfully.'; + + return redirect() + ->route('frontdesk.visits.show', $visit) + ->with('success', $message); + } + + public function scheduleStore(Request $request, VisitScheduleService $scheduler): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'visitor_id' => ['nullable', 'integer'], + 'full_name' => ['required_without:visitor_id', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'host_id' => ['nullable', 'integer'], + 'branch_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.visitor_types')))], + 'purpose' => ['nullable', 'string', 'max:500'], + 'expected_duration_minutes' => ['nullable', 'integer', 'min:5', 'max:480'], + 'scheduled_at' => ['required', 'date'], + 'notes' => ['nullable', 'string', 'max:2000'], + ]); + + $branchScope = app(\App\Services\Frontdesk\OrganizationResolver::class) + ->branchScope($this->member($request)); + if ($branchScope !== null) { + $validated['branch_id'] = $branchScope; + } + + $visit = $scheduler->schedule( + $this->ownerRef($request), + $organization, + $validated, + $this->ownerRef($request), + ); + + return redirect() + ->route('frontdesk.visits.show', $visit) + ->with('success', 'Visit scheduled successfully.'); + } + + public function show(Request $request, Visit $visit): View + { + $this->authorizeAbility($request, 'visits.view'); + $this->authorizeOwner($request, $visit); + $visit->load(['visitor', 'host', 'organization', 'branch']); + + $canManage = app(FrontdeskPermissions::class)->can( + $this->member($request), + 'visits.manage', + ); + + return view('frontdesk.visits.show', compact('visit', 'canManage')); + } + + public function activate(Request $request, Visit $visit, VisitLifecycleService $lifecycle): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visit); + + $request->validate(['policies_accepted' => ['accepted']]); + + $lifecycle->checkInFromSchedule( + $visit, + $this->ownerRef($request), + true, + ); + + return redirect() + ->route('frontdesk.visits.show', $visit) + ->with('success', 'Visitor checked in successfully.'); + } + + public function markWaiting(Request $request, Visit $visit, VisitLifecycleService $lifecycle): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visit); + + $lifecycle->markWaiting($visit, $this->ownerRef($request)); + + return back()->with('success', 'Visitor marked as waiting.'); + } + + public function cancel(Request $request, Visit $visit, VisitLifecycleService $lifecycle): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visit); + + $validated = $request->validate([ + 'reason' => ['nullable', 'string', 'max:500'], + ]); + + $lifecycle->cancel($visit, $this->ownerRef($request), $validated['reason'] ?? null); + + return redirect() + ->route('frontdesk.visits.index', ['status' => 'cancelled']) + ->with('success', 'Visit cancelled.'); + } + + public function approve(Request $request, Visit $visit, VisitLifecycleService $lifecycle): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visit); + + $lifecycle->approve($visit, $this->ownerRef($request)); + + return redirect() + ->route('frontdesk.visits.show', $visit) + ->with('success', 'Visit approved and visitor checked in.'); + } + + public function checkOut(Request $request, Visit $visit, VisitCheckOutService $checkOut): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visit); + $checkOut->checkOut($visit, $this->ownerRef($request)); + + return back()->with('success', 'Visitor checked out.'); + } + + public function badge(Request $request, Visit $visit, PrinterManager $printers) + { + $this->authorizeAbility($request, 'visits.view'); + $this->authorizeOwner($request, $visit); + $rendered = $printers->renderBadge($visit, $request->query('driver')); + + if ($rendered['format'] === 'html') { + return response($rendered['content'])->header('Content-Type', 'text/html'); + } + + return response($rendered['content']) + ->header('Content-Type', 'text/plain') + ->header('Content-Disposition', 'attachment; filename="'.$rendered['filename'].'"'); + } +} diff --git a/app/Http/Controllers/Frontdesk/VisitorController.php b/app/Http/Controllers/Frontdesk/VisitorController.php new file mode 100644 index 0000000..23a7c36 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/VisitorController.php @@ -0,0 +1,200 @@ +authorizeAbility($request, 'visitors.view'); + $organization = $this->organization($request); + + $visitors = Visitor::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->when($request->q, fn ($q, $search) => $q->where('full_name', 'like', "%{$search}%")) + ->orderByDesc('is_frequent') + ->orderBy('full_name') + ->paginate(25) + ->withQueryString(); + + return view('frontdesk.visitors.index', compact('visitors', 'organization')); + } + + public function show(Request $request, Visitor $visitor): View + { + $this->authorizeAbility($request, 'visitors.view'); + $this->authorizeOwner($request, $visitor); + $visitor->load(['visits' => fn ($q) => $q->latest()->limit(20), 'visits.host']); + + $visitIds = $visitor->visits()->pluck('id'); + + $activity = AuditLog::owned($this->ownerRef($request)) + ->where('organization_id', $visitor->organization_id) + ->where(function ($q) use ($visitor, $visitIds) { + $q->where(function ($inner) use ($visitor) { + $inner->where('subject_type', Visitor::class) + ->where('subject_id', $visitor->id); + }); + + if ($visitIds->isNotEmpty()) { + $q->orWhere(function ($inner) use ($visitIds) { + $inner->where('subject_type', Visit::class) + ->whereIn('subject_id', $visitIds); + }); + } + }) + ->orderByDesc('created_at') + ->limit(30) + ->get(); + + return view('frontdesk.visitors.show', [ + 'visitor' => $visitor, + 'activity' => $activity, + 'auditActions' => config('frontdesk.audit_actions'), + 'watchlistStatuses' => config('frontdesk.watchlist_statuses'), + 'canManage' => app(FrontdeskPermissions::class)->can( + $this->member($request), + 'visitors.manage' + ), + ]); + } + + public function checkInForm(Request $request, Visitor $visitor): View + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visitor); + $organization = $this->organization($request); + + $hosts = Host::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id); + $this->scopeToBranch($request, $hosts); + $hosts = $hosts->orderBy('name')->get(); + + $branches = Branch::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->where('is_active', true) + ->orderBy('name') + ->get(); + + return view('frontdesk.visitors.check-in', compact('visitor', 'organization', 'hosts', 'branches')); + } + + public function checkIn(Request $request, Visitor $visitor, VisitCheckInService $checkIn): RedirectResponse + { + $this->authorizeAbility($request, 'visits.manage'); + $this->authorizeOwner($request, $visitor); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'host_id' => ['nullable', 'integer'], + 'branch_id' => ['nullable', 'integer'], + 'visitor_type' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.visitor_types')))], + 'purpose' => ['nullable', 'string', 'max:500'], + 'policies_accepted' => ['accepted'], + ]); + + $branchScope = app(\App\Services\Frontdesk\OrganizationResolver::class) + ->branchScope($this->member($request)); + if ($branchScope !== null) { + $validated['branch_id'] = $branchScope; + } + + $validated['visitor_id'] = $visitor->id; + + $visit = $checkIn->checkIn( + $this->ownerRef($request), + $organization, + $validated, + $this->ownerRef($request), + ); + + return redirect() + ->route('frontdesk.visits.show', $visit) + ->with('success', 'Returning visitor checked in.'); + } + + public function update(Request $request, Visitor $visitor): RedirectResponse + { + $this->authorizeAbility($request, 'visitors.manage'); + $this->authorizeOwner($request, $visitor); + + $validated = $request->validate([ + 'full_name' => ['required', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'email' => ['nullable', 'email', 'max:255'], + 'notes' => ['nullable', 'string', 'max:2000'], + 'photo' => ['nullable', 'image', 'max:5120'], + 'id_document' => ['nullable', 'file', 'mimes:pdf,jpg,jpeg,png', 'max:10240'], + ]); + + if ($request->hasFile('photo')) { + if ($visitor->photo_path) { + Storage::disk('public')->delete($visitor->photo_path); + } + $validated['photo_path'] = $request->file('photo')->store('frontdesk/visitors/photos', 'public'); + } + + if ($request->hasFile('id_document')) { + if ($visitor->id_document_path) { + Storage::disk('public')->delete($visitor->id_document_path); + } + $validated['id_document_path'] = $request->file('id_document')->store('frontdesk/visitors/documents', 'public'); + } + + unset($validated['photo'], $validated['id_document']); + + $visitor->update($validated); + + return back()->with('success', 'Visitor profile updated.'); + } + + public function updateWatchlist(Request $request, Visitor $visitor, WatchlistService $watchlist): RedirectResponse + { + $this->authorizeAbility($request, 'visitors.manage'); + $this->authorizeOwner($request, $visitor); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'watchlist_status' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.watchlist_statuses')))], + 'notes' => ['nullable', 'string', 'max:2000'], + ]); + + $visitor->update($validated); + + $watchlist->syncEntryForVisitor( + $visitor, + $validated['watchlist_status'], + $validated['notes'] ?? null, + $this->ownerRef($request), + ); + + AuditLog::record( + $this->ownerRef($request), + 'watchlist.entry_created', + $organization->id, + $this->ownerRef($request), + Visitor::class, + $visitor->id, + ['watchlist_status' => $validated['watchlist_status']], + ); + + return back()->with('success', 'Visitor watchlist status updated.'); + } +} diff --git a/app/Http/Controllers/Frontdesk/WatchlistController.php b/app/Http/Controllers/Frontdesk/WatchlistController.php new file mode 100644 index 0000000..ac46de8 --- /dev/null +++ b/app/Http/Controllers/Frontdesk/WatchlistController.php @@ -0,0 +1,144 @@ +authorizeAbility($request, 'watchlist.view'); + $organization = $this->organization($request); + + $entries = WatchlistEntry::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->with('visitor') + ->when($request->status, fn ($q, $status) => $q->where('status', $status)) + ->when($request->q, function ($q, $search) { + $q->where(function ($inner) use ($search) { + $inner->where('full_name', 'like', "%{$search}%") + ->orWhere('company', 'like', "%{$search}%"); + }); + }) + ->latest() + ->paginate(25) + ->withQueryString(); + + return view('frontdesk.watchlist.index', [ + 'entries' => $entries, + 'organization' => $organization, + 'statuses' => config('frontdesk.watchlist_statuses'), + 'canManage' => app(\App\Services\Frontdesk\FrontdeskPermissions::class) + ->can($this->member($request), 'watchlist.manage'), + ]); + } + + public function create(Request $request): View + { + $this->authorizeAbility($request, 'watchlist.manage'); + $organization = $this->organization($request); + + $visitors = Visitor::owned($this->ownerRef($request)) + ->where('organization_id', $organization->id) + ->orderBy('full_name') + ->limit(100) + ->get(); + + return view('frontdesk.watchlist.create', [ + 'organization' => $organization, + 'visitors' => $visitors, + 'statuses' => config('frontdesk.watchlist_statuses'), + ]); + } + + public function store(Request $request, WatchlistService $watchlist): RedirectResponse + { + $this->authorizeAbility($request, 'watchlist.manage'); + $organization = $this->organization($request); + + $validated = $request->validate([ + 'visitor_id' => ['nullable', 'integer'], + 'full_name' => ['required_without:visitor_id', 'string', 'max:255'], + 'company' => ['nullable', 'string', 'max:255'], + 'status' => ['required', 'string', 'in:'.implode(',', array_keys(config('frontdesk.watchlist_statuses')))], + 'reason' => ['nullable', 'string', 'max:2000'], + ]); + + if ($validated['status'] === Visitor::WATCHLIST_ALLOWED) { + return back()->withErrors(['status' => 'Choose requires approval or blacklisted for watchlist entries.']); + } + + $visitor = null; + if (! empty($validated['visitor_id'])) { + $visitor = Visitor::owned($this->ownerRef($request))->findOrFail($validated['visitor_id']); + $validated['full_name'] = $visitor->full_name; + $validated['company'] = $visitor->company; + } + + $entry = WatchlistEntry::create([ + 'owner_ref' => $this->ownerRef($request), + 'organization_id' => $organization->id, + 'visitor_id' => $visitor?->id, + 'full_name' => $validated['full_name'], + 'company' => $validated['company'] ?? null, + 'status' => $validated['status'], + 'reason' => $validated['reason'] ?? null, + 'created_by' => $this->ownerRef($request), + ]); + + if ($visitor) { + $visitor->update(['watchlist_status' => $validated['status'], 'notes' => $validated['reason'] ?? $visitor->notes]); + } + + AuditLog::record( + $this->ownerRef($request), + 'watchlist.entry_created', + $organization->id, + $this->ownerRef($request), + WatchlistEntry::class, + $entry->id, + ['full_name' => $entry->full_name, 'status' => $entry->status], + ); + + return redirect() + ->route('frontdesk.watchlist.index') + ->with('success', 'Watchlist entry added.'); + } + + public function destroy(Request $request, WatchlistEntry $entry, WatchlistService $watchlist): RedirectResponse + { + $this->authorizeAbility($request, 'watchlist.manage'); + $this->authorizeOwner($request, $entry); + $organization = $this->organization($request); + + if ($entry->visitor_id) { + $visitor = Visitor::owned($this->ownerRef($request))->find($entry->visitor_id); + $visitor?->update(['watchlist_status' => Visitor::WATCHLIST_ALLOWED]); + } + + AuditLog::record( + $this->ownerRef($request), + 'watchlist.entry_removed', + $organization->id, + $this->ownerRef($request), + WatchlistEntry::class, + $entry->id, + ['full_name' => $entry->full_name], + ); + + $entry->delete(); + + return back()->with('success', 'Watchlist entry removed.'); + } +} diff --git a/app/Http/Controllers/IcalFeedController.php b/app/Http/Controllers/IcalFeedController.php new file mode 100644 index 0000000..0f02f55 --- /dev/null +++ b/app/Http/Controllers/IcalFeedController.php @@ -0,0 +1,77 @@ +query('owner'); + $token = (string) $request->query('token'); + + abort_unless($owner !== '' && $token !== '', 403); + abort_unless( + hash_equals( + hash_hmac('sha256', "{$organization->id}:{$owner}", (string) config('app.key')), + $token, + ), + 403, + ); + + abort_unless($organization->owner_ref === $owner, 404); + + $visits = Visit::owned($owner) + ->where('organization_id', $organization->id) + ->whereIn('status', [ + Visit::STATUS_SCHEDULED, + Visit::STATUS_EXPECTED, + Visit::STATUS_WAITING, + ]) + ->whereNotNull('scheduled_at') + ->where('scheduled_at', '>=', now()->subDay()) + ->with(['visitor', 'host']) + ->orderBy('scheduled_at') + ->limit(500) + ->get(); + + $lines = [ + 'BEGIN:VCALENDAR', + 'VERSION:2.0', + 'PRODID:-//Ladill Frontdesk//EN', + 'CALSCALE:GREGORIAN', + ]; + + foreach ($visits as $visit) { + $start = $visit->scheduled_at->utc()->format('Ymd\THis\Z'); + $end = $visit->scheduled_at->copy()->addHour()->utc()->format('Ymd\THis\Z'); + $summary = $this->escape('Visit: '.$visit->visitor->full_name); + $description = $this->escape(trim(($visit->purpose ?? '').' Host: '.($visit->host?->name ?? '—'))); + + $lines[] = 'BEGIN:VEVENT'; + $lines[] = 'UID:frontdesk-visit-'.$visit->id.'@ladill.com'; + $lines[] = 'DTSTAMP:'.now()->utc()->format('Ymd\THis\Z'); + $lines[] = 'DTSTART:'.$start; + $lines[] = 'DTEND:'.$end; + $lines[] = 'SUMMARY:'.$summary; + $lines[] = 'DESCRIPTION:'.$description; + $lines[] = 'END:VEVENT'; + } + + $lines[] = 'END:VCALENDAR'; + + return response(implode("\r\n", $lines), 200, [ + 'Content-Type' => 'text/calendar; charset=utf-8', + 'Content-Disposition' => 'attachment; filename="frontdesk-visits.ics"', + ]); + } + + protected function escape(string $value): string + { + return str_replace(["\n", ',', ';'], ['\\n', '\\,', '\\;'], $value); + } +} diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php new file mode 100644 index 0000000..d438a3a --- /dev/null +++ b/app/Http/Controllers/NotificationController.php @@ -0,0 +1,64 @@ +user() + ->notifications() + ->latest() + ->paginate(20); + + return view('notifications.index', compact('notifications')); + } + + public function unread(Request $request): JsonResponse + { + $notifications = $request->user() + ->unreadNotifications() + ->latest() + ->take(10) + ->get() + ->map(fn ($n) => [ + 'id' => $n->id, + 'type' => class_basename($n->type), + 'title' => $n->data['title'] ?? 'Notification', + 'message' => $n->data['message'] ?? '', + 'icon' => $n->data['icon'] ?? 'bell', + 'url' => $n->data['url'] ?? null, + 'created_at' => $n->created_at->diffForHumans(), + ]); + + return response()->json([ + 'notifications' => $notifications, + 'unread_count' => $request->user()->unreadNotifications()->count(), + ]); + } + + public function markAsRead(Request $request, string $id): JsonResponse + { + $notification = $request->user() + ->notifications() + ->where('id', $id) + ->first(); + + if ($notification) { + $notification->markAsRead(); + } + + return response()->json(['success' => true]); + } + + public function markAllAsRead(Request $request): JsonResponse + { + $request->user()->unreadNotifications->markAsRead(); + + return response()->json(['success' => true]); + } +} diff --git a/app/Http/Middleware/AuthenticateFrontdeskDevice.php b/app/Http/Middleware/AuthenticateFrontdeskDevice.php new file mode 100644 index 0000000..e01e773 --- /dev/null +++ b/app/Http/Middleware/AuthenticateFrontdeskDevice.php @@ -0,0 +1,32 @@ +route('token') ?? $request->header('X-Device-Token'); + + abort_unless(is_string($token) && $token !== '', 404); + + $device = $this->devices->findByToken($token); + + abort_unless($device && $device->type === $type, 404); + + $this->devices->recordHeartbeat($device); + + $request->attributes->set('frontdesk.device', $device->fresh()); + + return $next($request); + } +} diff --git a/app/Http/Middleware/AuthenticateService.php b/app/Http/Middleware/AuthenticateService.php new file mode 100644 index 0000000..b9f5781 --- /dev/null +++ b/app/Http/Middleware/AuthenticateService.php @@ -0,0 +1,38 @@ +bearerToken(); + $caller = null; + + if ($token !== '') { + foreach ((array) config("{$namespace}.service_api_keys", []) as $name => $key) { + if (is_string($key) && $key !== '' && hash_equals($key, $token)) { + $caller = $name; + break; + } + } + } + + if ($caller === null) { + return response()->json(['error' => 'Unauthorized.'], 401); + } + + $request->attributes->set('service_caller', $caller); + + return $next($request); + } +} diff --git a/app/Http/Middleware/EnsureFrontdeskAbility.php b/app/Http/Middleware/EnsureFrontdeskAbility.php new file mode 100644 index 0000000..bd709f8 --- /dev/null +++ b/app/Http/Middleware/EnsureFrontdeskAbility.php @@ -0,0 +1,34 @@ +user(); + abort_unless($user, 403); + + $organization = $this->organizations->resolveForUser($user); + abort_unless($organization, 403); + + $member = $this->organizations->memberFor($user, $organization); + abort_unless($this->permissions->can($member, $ability), 403); + + $request->attributes->set('frontdesk.organization', $organization); + $request->attributes->set('frontdesk.member', $member); + + return $next($request); + } +} diff --git a/app/Http/Middleware/EnsureOrganizationSetup.php b/app/Http/Middleware/EnsureOrganizationSetup.php new file mode 100644 index 0000000..9a23bbd --- /dev/null +++ b/app/Http/Middleware/EnsureOrganizationSetup.php @@ -0,0 +1,33 @@ +user(); + if (! $user) { + return $next($request); + } + + if ($request->routeIs('frontdesk.onboarding*')) { + return $next($request); + } + + if (! $this->organizations->isOnboarded($user)) { + return redirect()->route('frontdesk.onboarding.show'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/EnsurePlatformSession.php b/app/Http/Middleware/EnsurePlatformSession.php new file mode 100644 index 0000000..db642f5 --- /dev/null +++ b/app/Http/Middleware/EnsurePlatformSession.php @@ -0,0 +1,58 @@ +headers->get('Cookie', ''); + if ($cookieHeader === '') { + return $this->clearAppSession($request); + } + + try { + $response = Http::withHeaders(['Cookie' => $cookieHeader]) + ->timeout(3) + ->get('https://'.$authDomain.'/sso/ping'); + } catch (\Throwable) { + return $next($request); + } + + if ($response->status() === 401) { + return $this->clearAppSession($request); + } + + return $next($request); + } + + private function clearAppSession(Request $request): Response + { + Auth::logout(); + $request->session()->invalidate(); + $request->session()->regenerateToken(); + + return redirect()->route('sso.connect', [ + 'redirect' => $request->fullUrl(), + ]); + } +} diff --git a/app/Http/Middleware/InjectBootSplash.php b/app/Http/Middleware/InjectBootSplash.php new file mode 100644 index 0000000..af112ad --- /dev/null +++ b/app/Http/Middleware/InjectBootSplash.php @@ -0,0 +1,46 @@ +isMethod('GET') || ! Auth::check()) { + return $response; + } + + if (! str_contains((string) $response->headers->get('Content-Type', ''), 'text/html')) { + return $response; + } + + $content = $response->getContent(); + if (! is_string($content) + || stripos($content, 'render(); + $content = preg_replace_callback('/]*>/i', fn ($m) => $m[0].$splash, $content, 1); + + if (is_string($content)) { + $response->setContent($content); + } + + return $response; + } +} diff --git a/app/Http/Middleware/SetActingAccount.php b/app/Http/Middleware/SetActingAccount.php new file mode 100644 index 0000000..7e1d5c0 --- /dev/null +++ b/app/Http/Middleware/SetActingAccount.php @@ -0,0 +1,29 @@ +user()) { + $request->attributes->set('actingAccount', $user); + + if (! $request->is('api/*')) { + View::share('actingAccount', $user); + } + } + + return $next($request); + } +} diff --git a/app/Jobs/DispatchCampaignJob.php b/app/Jobs/DispatchCampaignJob.php new file mode 100644 index 0000000..8728351 --- /dev/null +++ b/app/Jobs/DispatchCampaignJob.php @@ -0,0 +1,43 @@ +find($this->campaignId); + + if (! $campaign || ! in_array($campaign->status, [Campaign::STATUS_QUEUED, Campaign::STATUS_SENDING], true)) { + return; + } + + if ($campaign->recipient_count === 0) { + $campaign->forceFill([ + 'status' => Campaign::STATUS_FAILED, + 'completed_at' => now(), + ])->save(); + + return; + } + + $campaign->forceFill(['status' => Campaign::STATUS_SENDING])->save(); + + $campaign->recipients() + ->where('status', CampaignRecipient::STATUS_PENDING) + ->orderBy('id') + ->pluck('id') + ->each(fn (int $recipientId) => SendCampaignMessageJob::dispatch($recipientId)); + } +} diff --git a/app/Jobs/SendCampaignMessageJob.php b/app/Jobs/SendCampaignMessageJob.php new file mode 100644 index 0000000..61c480b --- /dev/null +++ b/app/Jobs/SendCampaignMessageJob.php @@ -0,0 +1,195 @@ +with('campaign')->find($this->recipientId); + + if (! $recipient || ! $recipient->campaign || $recipient->status !== CampaignRecipient::STATUS_PENDING) { + return; + } + + $campaign = $recipient->campaign; + + if (! in_array($campaign->status, [Campaign::STATUS_QUEUED, Campaign::STATUS_SENDING], true)) { + return; + } + + $body = $messages->personalize($campaign->body, $recipient->recipient_name); + $subject = $messages->personalize((string) ($campaign->subject ?? ''), $recipient->recipient_name); + $costMinor = $pricing->recipientCostMinor($campaign, $campaign->body); + + if (! $billing->canAfford($campaign->owner_ref, $costMinor)) { + $this->markRecipient($recipient, CampaignRecipient::STATUS_SKIPPED, 0, 'Insufficient wallet balance.'); + + return; + } + + $sent = $campaign->channel === Campaign::CHANNEL_SMS + ? $sms->send((string) $recipient->recipient_phone, $body) + : $email->send( + (string) $recipient->recipient_email, + $subject !== '' ? $subject : 'Message from '.config('app.name'), + $body, + $this->senderName($campaign), + $this->senderEmail($campaign), + ); + + if (! $sent) { + $this->markRecipient($recipient, CampaignRecipient::STATUS_FAILED, 0, 'Delivery could not be confirmed.'); + + return; + } + + $charged = $billing->charge( + $campaign->owner_ref, + $costMinor, + $campaign->channel, + $campaign->id, + $recipient->id, + 'CRM campaign "'.$campaign->name.'" to '.$recipient->recipient_name, + ); + + $this->markRecipient( + $recipient, + CampaignRecipient::STATUS_SENT, + $charged ? $costMinor : 0, + null, + now(), + ); + + $this->logActivity($campaign, $recipient, $subject, $body); + } + + private function markRecipient( + CampaignRecipient $recipient, + string $status, + int $costMinor, + ?string $error, + ?\DateTimeInterface $sentAt = null, + ): void { + $recipient->forceFill([ + 'status' => $status, + 'cost_minor' => $costMinor, + 'error_message' => $error, + 'sent_at' => $sentAt, + ])->save(); + + $this->refreshCampaignCounters($recipient->campaign()->first()); + } + + private function refreshCampaignCounters(?Campaign $campaign): void + { + if (! $campaign) { + return; + } + + DB::transaction(function () use ($campaign) { + $campaign = Campaign::query()->lockForUpdate()->find($campaign->id); + + if (! $campaign) { + return; + } + + $counts = $campaign->recipients() + ->selectRaw(" + SUM(CASE WHEN status = ? THEN 1 ELSE 0 END) as sent_count, + SUM(CASE WHEN status = ? THEN 1 ELSE 0 END) as failed_count, + SUM(CASE WHEN status = ? THEN 1 ELSE 0 END) as skipped_count, + SUM(cost_minor) as actual_cost_minor + ", [ + CampaignRecipient::STATUS_SENT, + CampaignRecipient::STATUS_FAILED, + CampaignRecipient::STATUS_SKIPPED, + ]) + ->first(); + + $pending = $campaign->recipients()->where('status', CampaignRecipient::STATUS_PENDING)->count(); + + $campaign->forceFill([ + 'sent_count' => (int) ($counts->sent_count ?? 0), + 'failed_count' => (int) ($counts->failed_count ?? 0), + 'skipped_count' => (int) ($counts->skipped_count ?? 0), + 'actual_cost_minor' => (int) ($counts->actual_cost_minor ?? 0), + ]); + + if ($pending === 0 && in_array($campaign->status, [Campaign::STATUS_QUEUED, Campaign::STATUS_SENDING], true)) { + $campaign->status = Campaign::STATUS_COMPLETED; + $campaign->completed_at = now(); + } elseif ($campaign->status === Campaign::STATUS_QUEUED) { + $campaign->status = Campaign::STATUS_SENDING; + } + + $campaign->save(); + }); + } + + private function logActivity(Campaign $campaign, CampaignRecipient $recipient, string $subject, string $body): void + { + $title = $campaign->channel === Campaign::CHANNEL_SMS + ? 'Campaign SMS: '.$campaign->name + : 'Campaign email: '.($subject !== '' ? $subject : $campaign->name); + + $payload = [ + 'owner_ref' => $campaign->owner_ref, + 'type' => $campaign->channel, + 'direction' => 'out', + 'title' => $title, + 'body' => $body, + 'completed_at' => now(), + ]; + + if ($recipient->customer_id) { + Activity::create([ + ...$payload, + 'subject_type' => 'contact', + 'subject_id' => $recipient->customer_id, + ]); + } + + if ($recipient->lead_id) { + Activity::create([ + ...$payload, + 'subject_type' => 'lead', + 'subject_id' => $recipient->lead_id, + ]); + } + } + + private function senderName(Campaign $campaign): ?string + { + return User::query()->where('public_id', $campaign->owner_ref)->value('name'); + } + + private function senderEmail(Campaign $campaign): ?string + { + return User::query()->where('public_id', $campaign->owner_ref)->value('email'); + } +} diff --git a/app/Mail/ContactMessageMail.php b/app/Mail/ContactMessageMail.php new file mode 100644 index 0000000..8081ad8 --- /dev/null +++ b/app/Mail/ContactMessageMail.php @@ -0,0 +1,40 @@ +subjectLine, + replyTo: $this->replyToAddress ? [$this->replyToAddress] : [], + ); + } + + public function content(): Content + { + return new Content( + view: 'email.contact-message', + with: [ + 'bodyText' => $this->bodyText, + 'fromName' => $this->fromName, + ], + ); + } +} diff --git a/app/Models/AuditLog.php b/app/Models/AuditLog.php new file mode 100644 index 0000000..a533b31 --- /dev/null +++ b/app/Models/AuditLog.php @@ -0,0 +1,56 @@ + 'array', + 'created_at' => 'datetime', + ]; + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public static function record( + string $ownerRef, + string $action, + ?int $organizationId = null, + ?string $actorRef = null, + ?string $subjectType = null, + ?int $subjectId = null, + ?array $metadata = null, + ): self { + return static::create([ + 'owner_ref' => $ownerRef, + 'organization_id' => $organizationId, + 'actor_ref' => $actorRef, + 'action' => $action, + 'subject_type' => $subjectType, + 'subject_id' => $subjectId, + 'metadata' => $metadata, + 'ip_address' => request()?->ip(), + 'created_at' => now(), + ]); + } +} diff --git a/app/Models/Branch.php b/app/Models/Branch.php new file mode 100644 index 0000000..bde7361 --- /dev/null +++ b/app/Models/Branch.php @@ -0,0 +1,40 @@ + 'boolean']; + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public function buildings(): HasMany + { + return $this->hasMany(Building::class, 'branch_id'); + } + + public function hosts(): HasMany + { + return $this->hasMany(Host::class, 'branch_id'); + } +} diff --git a/app/Models/Building.php b/app/Models/Building.php new file mode 100644 index 0000000..8f1300d --- /dev/null +++ b/app/Models/Building.php @@ -0,0 +1,28 @@ +belongsTo(Branch::class, 'branch_id'); + } + + public function receptionDesks(): HasMany + { + return $this->hasMany(ReceptionDesk::class, 'building_id'); + } +} diff --git a/app/Models/Concerns/BelongsToOwner.php b/app/Models/Concerns/BelongsToOwner.php new file mode 100644 index 0000000..4d95386 --- /dev/null +++ b/app/Models/Concerns/BelongsToOwner.php @@ -0,0 +1,13 @@ +where($this->getTable().'.owner_ref', $ownerRef); + } +} diff --git a/app/Models/Device.php b/app/Models/Device.php new file mode 100644 index 0000000..51b5a5d --- /dev/null +++ b/app/Models/Device.php @@ -0,0 +1,50 @@ + 'array', + 'last_online_at' => 'datetime', + ]; + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public function branch(): BelongsTo + { + return $this->belongsTo(Branch::class, 'branch_id'); + } + + public function receptionDesk(): BelongsTo + { + return $this->belongsTo(ReceptionDesk::class, 'reception_desk_id'); + } + + public function isOnline(int $staleMinutes = 10): bool + { + return $this->status === 'online' + && $this->last_online_at + && $this->last_online_at->gte(now()->subMinutes($staleMinutes)); + } +} diff --git a/app/Models/Host.php b/app/Models/Host.php new file mode 100644 index 0000000..f69e4b6 --- /dev/null +++ b/app/Models/Host.php @@ -0,0 +1,41 @@ + 'boolean']; + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public function branch(): BelongsTo + { + return $this->belongsTo(Branch::class, 'branch_id'); + } + + public function visits(): HasMany + { + return $this->hasMany(Visit::class, 'host_id'); + } +} diff --git a/app/Models/Member.php b/app/Models/Member.php new file mode 100644 index 0000000..ba83690 --- /dev/null +++ b/app/Models/Member.php @@ -0,0 +1,31 @@ +belongsTo(Organization::class, 'organization_id'); + } + + public function branch(): BelongsTo + { + return $this->belongsTo(Branch::class, 'branch_id'); + } + + public function hasRole(string ...$roles): bool + { + return in_array($this->role, $roles, true); + } +} diff --git a/app/Models/OfflineCheckIn.php b/app/Models/OfflineCheckIn.php new file mode 100644 index 0000000..ba36ed0 --- /dev/null +++ b/app/Models/OfflineCheckIn.php @@ -0,0 +1,31 @@ + 'array', + 'synced_at' => 'datetime', + ]; + } + + public function device(): BelongsTo + { + return $this->belongsTo(Device::class, 'device_id'); + } + + public function visit(): BelongsTo + { + return $this->belongsTo(Visit::class, 'visit_id'); + } +} diff --git a/app/Models/Organization.php b/app/Models/Organization.php new file mode 100644 index 0000000..ec7de34 --- /dev/null +++ b/app/Models/Organization.php @@ -0,0 +1,44 @@ + 'array']; + } + + public function branches(): HasMany + { + return $this->hasMany(Branch::class, 'organization_id'); + } + + public function hosts(): HasMany + { + return $this->hasMany(Host::class, 'organization_id'); + } + + public function visitors(): HasMany + { + return $this->hasMany(Visitor::class, 'organization_id'); + } + + public function members(): HasMany + { + return $this->hasMany(Member::class, 'organization_id'); + } +} diff --git a/app/Models/ReceptionDesk.php b/app/Models/ReceptionDesk.php new file mode 100644 index 0000000..c80afa9 --- /dev/null +++ b/app/Models/ReceptionDesk.php @@ -0,0 +1,27 @@ + 'boolean']; + } + + public function building(): BelongsTo + { + return $this->belongsTo(Building::class, 'building_id'); + } +} diff --git a/app/Models/User.php b/app/Models/User.php new file mode 100644 index 0000000..6d2ce63 --- /dev/null +++ b/app/Models/User.php @@ -0,0 +1,53 @@ + 'datetime', + 'last_app_active_at' => 'datetime', + 'password' => 'hashed', + ]; + } + + /** The owner reference used to scope every CRM record to this account. */ + public function ownerRef(): string + { + return (string) $this->public_id; + } + + public function customers(): HasMany + { + return $this->hasMany(Customer::class, 'owner_ref', 'public_id'); + } + + public function leads(): HasMany + { + return $this->hasMany(Lead::class, 'owner_ref', 'public_id'); + } + + public function avatarUrl(): ?string + { + $url = trim((string) $this->avatar_url); + + return $url !== '' ? $url : null; + } +} diff --git a/app/Models/Visit.php b/app/Models/Visit.php new file mode 100644 index 0000000..75b7cc9 --- /dev/null +++ b/app/Models/Visit.php @@ -0,0 +1,179 @@ + 'datetime', + 'checked_in_at' => 'datetime', + 'checked_out_at' => 'datetime', + 'badge_expires_at' => 'datetime', + 'policies_accepted' => 'boolean', + 'vehicle_info' => 'array', + 'contractor_details' => 'array', + 'delivery_details' => 'array', + 'allowed_areas' => 'array', + 'integration_metadata' => 'array', + ]; + } + + protected static function booted(): void + { + static::creating(function (Visit $visit) { + if (! $visit->public_id) { + $visit->public_id = (string) Str::uuid(); + } + if (! $visit->qr_token) { + $visit->qr_token = Str::random(32); + } + if (! $visit->badge_code) { + $visit->badge_code = strtoupper(Str::random(8)); + } + }); + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public function branch(): BelongsTo + { + return $this->belongsTo(Branch::class, 'branch_id'); + } + + public function receptionDesk(): BelongsTo + { + return $this->belongsTo(ReceptionDesk::class, 'reception_desk_id'); + } + + public function visitor(): BelongsTo + { + return $this->belongsTo(Visitor::class, 'visitor_id'); + } + + public function host(): BelongsTo + { + return $this->belongsTo(Host::class, 'host_id'); + } + + public function isInside(): bool + { + return $this->status === self::STATUS_CHECKED_IN; + } + + public function isPending(): bool + { + return in_array($this->status, [ + self::STATUS_EXPECTED, + self::STATUS_SCHEDULED, + self::STATUS_WAITING, + self::STATUS_OVERDUE, + ], true); + } + + public function awaitingApproval(): bool + { + if ($this->status !== self::STATUS_WAITING || $this->checked_in_at !== null) { + return false; + } + + return (bool) ( + data_get($this->contractor_details, '_awaiting_approval') + || data_get($this->delivery_details, '_awaiting_approval') + ); + } + + /** @return array */ + public function typeDetailEntries(): array + { + $entries = []; + $labels = collect(config('frontdesk.visitor_type_config', [])) + ->flatMap(fn (array $config) => collect($config['fields'] ?? []) + ->mapWithKeys(fn (array $field) => [$field['name'] => $field['label']])); + + foreach (array_filter([$this->contractor_details, $this->delivery_details]) as $details) { + foreach ($details as $key => $value) { + if (str_starts_with((string) $key, '_') || $value === null || $value === '') { + continue; + } + + $label = $labels->get($key, str_replace('_', ' ', (string) $key)); + + if (str_contains((string) $key, 'photo') || str_contains((string) $key, 'signature')) { + $entries[$label] = 'On file'; + } elseif ($key === 'received_at') { + $entries[$label] = \Illuminate\Support\Carbon::parse($value)->format('M j, Y g:i A'); + } else { + $entries[$label] = is_bool($value) ? ($value ? 'Yes' : 'No') : (string) $value; + } + } + } + + return $entries; + } + + public function canActivateCheckIn(): bool + { + return $this->isPending(); + } + + public function isBadgeExpired(): bool + { + return $this->badge_expires_at && $this->badge_expires_at->isPast(); + } + + public function scopeToday($query) + { + return $query->whereDate('checked_in_at', today()) + ->orWhereDate('scheduled_at', today()); + } + + public function scopeCurrentlyInside($query) + { + return $query->where('status', self::STATUS_CHECKED_IN); + } +} diff --git a/app/Models/Visitor.php b/app/Models/Visitor.php new file mode 100644 index 0000000..4158316 --- /dev/null +++ b/app/Models/Visitor.php @@ -0,0 +1,53 @@ + 'boolean']; + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public function visits(): HasMany + { + return $this->hasMany(Visit::class, 'visitor_id'); + } + + public function isBlacklisted(): bool + { + return $this->watchlist_status === self::WATCHLIST_BLACKLISTED; + } + + public function requiresApproval(): bool + { + return $this->watchlist_status === self::WATCHLIST_REQUIRES_APPROVAL; + } +} diff --git a/app/Models/WatchlistEntry.php b/app/Models/WatchlistEntry.php new file mode 100644 index 0000000..8d0138e --- /dev/null +++ b/app/Models/WatchlistEntry.php @@ -0,0 +1,30 @@ +belongsTo(Organization::class, 'organization_id'); + } + + public function visitor(): BelongsTo + { + return $this->belongsTo(Visitor::class, 'visitor_id'); + } +} diff --git a/app/Models/WebhookEndpoint.php b/app/Models/WebhookEndpoint.php new file mode 100644 index 0000000..c46eb5c --- /dev/null +++ b/app/Models/WebhookEndpoint.php @@ -0,0 +1,38 @@ + 'array', + 'is_active' => 'boolean', + ]; + } + + public function organization(): BelongsTo + { + return $this->belongsTo(Organization::class, 'organization_id'); + } + + public function subscribesTo(string $event): bool + { + $events = $this->events ?? config('frontdesk.webhook_events', []); + + return in_array($event, $events, true) || in_array('*', $events, true); + } +} diff --git a/app/Notifications/FrontdeskAlertNotification.php b/app/Notifications/FrontdeskAlertNotification.php new file mode 100644 index 0000000..dceaaeb --- /dev/null +++ b/app/Notifications/FrontdeskAlertNotification.php @@ -0,0 +1,40 @@ + $payload + */ + public function __construct( + public string $title, + public string $message, + public array $payload = [], + ) {} + + /** @return list */ + public function via(object $notifiable): array + { + return ['database']; + } + + /** @return array */ + public function toDatabase(object $notifiable): array + { + return [ + 'title' => $this->title, + 'message' => $this->message, + 'icon' => $this->payload['icon'] ?? 'bell', + 'url' => $this->payload['url'] ?? null, + 'event' => $this->payload['event'] ?? null, + 'visit_id' => $this->payload['visit_id'] ?? null, + ]; + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php new file mode 100644 index 0000000..383e659 --- /dev/null +++ b/app/Providers/AppServiceProvider.php @@ -0,0 +1,33 @@ +route('token') + ?? $request->header('X-Device-Token') + ?? $request->ip(); + + return Limit::perMinute(30)->by((string) $key); + }); + + RateLimiter::for('qr-scan', fn (Request $request) => Limit::perMinute(20)->by($request->ip())); + + RateLimiter::for('device-heartbeat', function (Request $request) { + return Limit::perMinute(60)->by((string) ($request->header('X-Device-Token') ?? $request->ip())); + }); + } +} diff --git a/app/Services/Billing/BillingClient.php b/app/Services/Billing/BillingClient.php new file mode 100644 index 0000000..4b97295 --- /dev/null +++ b/app/Services/Billing/BillingClient.php @@ -0,0 +1,64 @@ +token())->acceptJson()->timeout(8) + ->get($this->base().'/balance', ['user' => $publicId]); + $res->throw(); + + return (int) ($res->json('balance_minor') ?? 0); + } + + public function canAfford(string $publicId, int $amountMinor): bool + { + $res = Http::withToken($this->token())->acceptJson()->timeout(8) + ->get($this->base().'/can-afford', ['user' => $publicId, 'amount_minor' => $amountMinor]); + $res->throw(); + + return (bool) ($res->json('affordable') ?? false); + } + + /** + * Debit the wallet. Returns true on success, false on insufficient balance + * (HTTP 402). Idempotent by $reference. + */ + public function debit(string $publicId, int $amountMinor, string $source, string $reference, ?string $description = null): bool + { + $res = Http::withToken($this->token())->acceptJson()->timeout(10)->post($this->base().'/debit', array_filter([ + 'user' => $publicId, + 'amount_minor' => $amountMinor, + 'service' => (string) config('billing.service', 'crm'), + 'source' => $source, + 'reference' => $reference, + 'description' => $description, + ], static fn ($v) => $v !== null)); + + if ($res->status() === 402) { + return false; + } + $res->throw(); + + return true; + } +} diff --git a/app/Services/Billing/OneTimePurchaseService.php b/app/Services/Billing/OneTimePurchaseService.php new file mode 100644 index 0000000..6fd9aa7 --- /dev/null +++ b/app/Services/Billing/OneTimePurchaseService.php @@ -0,0 +1,76 @@ +|null */ + public function product(string $productKey): ?array + { + $product = config('crm_products.'.$productKey); + + return is_array($product) ? $product : null; + } + + public function hasPurchased(string $ownerRef, string $productKey): bool + { + return CrmPurchase::has($ownerRef, $productKey); + } + + public function priceMinor(string $productKey): int + { + return (int) ($this->product($productKey)['price_minor'] ?? 0); + } + + public function purchase(string $ownerRef, string $productKey): bool + { + if ($this->hasPurchased($ownerRef, $productKey)) { + return true; + } + + $product = $this->product($productKey); + if (! $product) { + return false; + } + + $costMinor = (int) ($product['price_minor'] ?? 0); + + if ($costMinor > 0) { + try { + if (! $this->billing->canAfford($ownerRef, $costMinor)) { + return false; + } + + $charged = $this->billing->debit( + $ownerRef, + $costMinor, + 'purchase', + 'crm-purchase-'.$productKey.'-'.$ownerRef, + 'CRM: '.($product['name'] ?? $productKey), + ); + + if (! $charged) { + return false; + } + } catch (\Throwable) { + return false; + } + } + + CrmPurchase::create([ + 'owner_ref' => $ownerRef, + 'product_key' => $productKey, + 'cost_minor' => $costMinor, + 'purchased_at' => now(), + ]); + + return true; + } +} diff --git a/app/Services/Comms/EmailService.php b/app/Services/Comms/EmailService.php new file mode 100644 index 0000000..bf33e0b --- /dev/null +++ b/app/Services/Comms/EmailService.php @@ -0,0 +1,32 @@ +send(new ContactMessageMail($subject, $body, $fromName, $replyTo)); + + return true; + } catch (\Throwable $e) { + Log::warning('CRM email send failed', ['to' => $to, 'error' => $e->getMessage()]); + + return false; + } + } +} diff --git a/app/Services/Comms/SmsService.php b/app/Services/Comms/SmsService.php new file mode 100644 index 0000000..4bea672 --- /dev/null +++ b/app/Services/Comms/SmsService.php @@ -0,0 +1,67 @@ +normalise($to); + if ($apiKey === '' || $msisdn === null) { + return false; + } + + try { + $res = Http::timeout(20) + ->withHeaders(['api-key' => $apiKey]) + ->acceptJson() + ->post(rtrim((string) config('arkesel.base_url', 'https://sms.arkesel.com'), '/').'/api/v2/sms/send', [ + 'sender' => $sender, + 'message' => $message, + 'recipients' => [$msisdn], + ]); + + return $res->successful() && ($res->json('status') === 'success'); + } catch (\Throwable $e) { + Log::warning('CRM SMS send failed', ['to' => $msisdn, 'error' => $e->getMessage()]); + + return false; + } + } + + /** Normalise to E.164-without-plus (e.g. 233XXXXXXXXX). */ + private function normalise(string $to): ?string + { + $digits = preg_replace('/\D+/', '', $to) ?? ''; + $country = (string) config('arkesel.default_country_code', '233'); + + if (strlen($digits) < 9) { + return null; + } + + if (str_starts_with($digits, $country)) { + return $digits; + } + + if (str_starts_with($digits, '0')) { + return $country.substr($digits, 1); + } + + if (strlen($digits) === 9) { + return $country.$digits; + } + + return $digits; + } +} diff --git a/app/Services/CrossApp/CrossAppLinkService.php b/app/Services/CrossApp/CrossAppLinkService.php new file mode 100644 index 0000000..02ff916 --- /dev/null +++ b/app/Services/CrossApp/CrossAppLinkService.php @@ -0,0 +1,112 @@ +loadMissing(['customer', 'lines']); + + $customer = $deal->customer; + $lines = $deal->lines->map(fn ($line) => [ + 'description' => $line->description, + 'quantity' => (float) $line->quantity, + 'unit_price' => number_format($line->unit_price_minor / 100, 2, '.', ''), + ])->values()->all(); + + if ($lines === [] && (int) $deal->value_minor > 0) { + $lines = [[ + 'description' => $deal->title, + 'quantity' => 1, + 'unit_price' => number_format($deal->value_minor / 100, 2, '.', ''), + ]]; + } + + $prefill = CrmPrefillCodec::encode([ + 'kind' => 'invoice', + 'crm_customer_id' => $customer?->id, + 'client_name' => $customer?->name ?: $deal->title, + 'client_email' => $customer?->email, + 'client_address' => $customer ? $this->formatAddress($customer) : null, + 'notes' => 'Invoice for CRM deal: '.$deal->title, + 'payment_enabled' => true, + 'lines' => $lines, + ]); + + return LadillAppUrl::connect('invoice', '/invoices/create?prefill='.urlencode($prefill)); + } + + public function merchantStorefrontFromDeal(Deal $deal): string + { + $deal->loadMissing('customer'); + + $amount = number_format(((int) $deal->value_minor) / 100, 2, '.', ''); + $itemName = $deal->title; + + $prefill = CrmPrefillCodec::encode([ + 'kind' => 'merchant_storefront', + 'type' => 'shop', + 'label' => 'Payment — '.$deal->title, + 'shop_title' => $deal->customer?->company ?: $deal->title, + 'sections' => [[ + 'name' => 'Payment', + 'items' => [[ + 'name' => $itemName, + 'description' => $deal->notes ?: 'Payment for '.$deal->title, + 'price' => $amount, + 'image_path' => '', + ]], + ]], + 'accepts_payment' => true, + ]); + + return LadillAppUrl::connect('merchant', '/storefronts/create?prefill='.urlencode($prefill)); + } + + public function businessQrFromContact(Customer $contact): string + { + $prefill = CrmPrefillCodec::encode([ + 'kind' => 'qr_business', + 'type' => 'business', + 'label' => 'Card — '.$contact->name, + 'name' => $contact->company ?: $contact->name, + 'phone' => $contact->phone, + 'email' => $contact->email, + 'address' => $this->formatAddress($contact, singleLine: true), + ]); + + return LadillAppUrl::connect('qrplus', '/qr-codes/create?prefill='.urlencode($prefill)); + } + + public function eventsHubForContact(Customer $contact): string + { + $query = http_build_query(array_filter([ + 'search' => $contact->company ?: $contact->name, + ])); + + return LadillAppUrl::connect('events', '/attendees'.($query !== '' ? '?'.$query : '')); + } + + private function formatAddress(Customer $contact, bool $singleLine = false): ?string + { + $parts = array_filter([ + $contact->address_line1, + $contact->address_line2, + trim(implode(', ', array_filter([$contact->city, $contact->region, $contact->country]))), + ]); + + if ($parts === []) { + return null; + } + + return $singleLine + ? implode(', ', $parts) + : implode("\n", $parts); + } +} diff --git a/app/Services/Frontdesk/BadgeRenderService.php b/app/Services/Frontdesk/BadgeRenderService.php new file mode 100644 index 0000000..b15869f --- /dev/null +++ b/app/Services/Frontdesk/BadgeRenderService.php @@ -0,0 +1,43 @@ + */ + public function templateFor(Organization $organization): array + { + return array_merge(config('frontdesk.default_badge_template', []), $organization->settings['badge_template'] ?? []); + } + + public function renderHtml(Visit $visit, bool $autoPrint = false): string + { + $visit->load(['visitor', 'host', 'organization']); + + return view('frontdesk.badges.render', [ + 'visit' => $visit, + 'template' => $this->templateFor($visit->organization), + 'photoUrl' => $this->photoUrl($visit), + 'qrSvg' => $visit->qr_token ? $this->qrCodes->svg($visit, 120) : null, + 'autoPrint' => $autoPrint, + 'preview' => false, + ])->render(); + } + + public function photoUrl(Visit $visit): ?string + { + $path = $visit->photo_path ?? $visit->visitor?->photo_path; + + return $path && Storage::disk('public')->exists($path) + ? Storage::disk('public')->url($path) + : null; + } +} diff --git a/app/Services/Frontdesk/DeviceService.php b/app/Services/Frontdesk/DeviceService.php new file mode 100644 index 0000000..c71dc50 --- /dev/null +++ b/app/Services/Frontdesk/DeviceService.php @@ -0,0 +1,52 @@ +where('device_token', $token) + ->first(); + } + + public function recordHeartbeat(Device $device): Device + { + $device->update([ + 'status' => 'online', + 'last_online_at' => now(), + ]); + + return $device->fresh(); + } + + public function markStaleDevicesOffline(int $minutes = 10): int + { + return Device::query() + ->where('status', 'online') + ->where(function ($q) use ($minutes) { + $q->whereNull('last_online_at') + ->orWhere('last_online_at', '<', now()->subMinutes($minutes)); + }) + ->update(['status' => 'offline']); + } + + /** @param array $config */ + public function defaultConfigForType(string $type): array + { + return match ($type) { + 'badge_printer' => ['driver' => config('frontdesk.printers.default_driver', 'pdf')], + 'kiosk' => ['mode' => 'self_service', 'allow_checkout' => false], + default => [], + }; + } +} diff --git a/app/Services/Frontdesk/FrontdeskPermissions.php b/app/Services/Frontdesk/FrontdeskPermissions.php new file mode 100644 index 0000000..96b1f0a --- /dev/null +++ b/app/Services/Frontdesk/FrontdeskPermissions.php @@ -0,0 +1,62 @@ +> */ + protected array $roleAbilities = [ + 'super_admin' => ['*'], + 'org_admin' => ['*'], + 'branch_admin' => [ + 'dashboard.view', 'visits.view', 'visits.manage', 'visitors.view', 'visitors.manage', + 'hosts.view', 'hosts.manage', 'kiosk.use', 'security.view', 'security.checkout', 'security.verify', + 'settings.view', 'admin.branches.view', 'admin.desks.view', 'admin.desks.manage', + 'watchlist.view', 'watchlist.manage', 'audit.view', 'audit.export', + 'devices.view', 'devices.manage', 'reports.view', 'reports.export', + ], + 'receptionist' => [ + 'dashboard.view', 'visits.view', 'visits.manage', 'visitors.view', 'visitors.manage', + 'hosts.view', 'kiosk.use', 'watchlist.view', 'devices.view', + ], + 'security_officer' => [ + 'dashboard.view', 'visits.view', 'visitors.view', 'security.view', 'security.checkout', 'security.verify', + 'watchlist.view', 'audit.view', + ], + 'host' => [ + 'dashboard.view', 'visits.view', 'visitors.view', 'host.portal', + ], + 'auditor' => [ + 'dashboard.view', 'visits.view', 'visitors.view', 'security.view', 'settings.view', + 'audit.view', 'audit.export', 'watchlist.view', 'compliance.restore', + 'reports.view', 'reports.export', + ], + ]; + + public function can(?Member $member, string $ability): bool + { + if ($member === null) { + return false; + } + + $abilities = $this->roleAbilities[$member->role] ?? []; + + if (in_array('*', $abilities, true)) { + return true; + } + + return in_array($ability, $abilities, true); + } + + public function isAdmin(?Member $member): bool + { + return $member !== null && in_array($member->role, ['super_admin', 'org_admin'], true); + } + + public function managesBranches(?Member $member): bool + { + return $this->can($member, 'admin.branches.manage'); + } +} diff --git a/app/Services/Frontdesk/NotificationDispatcher.php b/app/Services/Frontdesk/NotificationDispatcher.php new file mode 100644 index 0000000..615dab5 --- /dev/null +++ b/app/Services/Frontdesk/NotificationDispatcher.php @@ -0,0 +1,231 @@ +dispatchVisitEvent( + $visit, + 'visitor_arrived', + 'Visitor has arrived', + "{$visit->visitor->full_name} has checked in.", + ['icon' => 'user-check'], + ); + } + + public function visitorCheckedOut(Visit $visit): void + { + $this->dispatchVisitEvent( + $visit, + 'visitor_checked_out', + 'Visitor checked out', + "{$visit->visitor->full_name} has checked out.", + ['icon' => 'logout'], + ); + } + + public function visitorExpected(Visit $visit): void + { + $when = $visit->scheduled_at?->format('M j, g:i A') ?? 'today'; + $this->dispatchVisitEvent( + $visit, + 'visitor_expected', + 'Visitor expected', + "{$visit->visitor->full_name} is expected on {$when}.", + ['icon' => 'calendar'], + ); + } + + public function visitorWaiting(Visit $visit): void + { + $this->dispatchVisitEvent( + $visit, + 'visitor_waiting', + 'Visitor waiting', + "{$visit->visitor->full_name} is waiting in reception.", + ['icon' => 'clock'], + ); + } + + public function visitCancelled(Visit $visit): void + { + $this->dispatchVisitEvent( + $visit, + 'visit_cancelled', + 'Visit cancelled', + "The visit for {$visit->visitor->full_name} has been cancelled.", + ['icon' => 'x-circle'], + ); + } + + public function approvalNeeded(Visit $visit): void + { + $visit->load(['visitor', 'host', 'organization']); + + $this->dispatchVisitEvent( + $visit, + 'approval_needed', + 'Visitor awaiting approval', + "{$visit->visitor->full_name} ({$visit->visitor_type}) is waiting for approval.", + ['icon' => 'shield-alert'], + ); + + $this->notifyStaffUsers( + $visit->organization, + 'approval_needed', + 'Approval required', + "{$visit->visitor->full_name} needs reception approval.", + $visit, + ); + } + + public function watchlistBlockedAttempt(Visitor $visitor, Organization $organization): void + { + Log::alert('Watchlist blocked check-in attempt', [ + 'visitor_id' => $visitor->id, + 'visitor' => $visitor->full_name, + 'organization_id' => $organization->id, + ]); + + $this->notifyStaffUsers( + $organization, + 'watchlist_alert', + 'Blocked check-in attempt', + "{$visitor->full_name} (blacklisted) attempted to check in.", + ); + } + + public function watchlistFlaggedCheckIn(Visitor $visitor, Organization $organization): void + { + Log::warning('Watchlist flagged visitor submitted for approval', [ + 'visitor_id' => $visitor->id, + 'visitor' => $visitor->full_name, + ]); + + $this->notifyStaffUsers( + $organization, + 'watchlist_alert', + 'Flagged visitor check-in', + "{$visitor->full_name} requires approval before badge issue.", + ); + } + + public function badgeExpired(Visit $visit): void + { + $visit->load(['visitor', 'organization']); + + $this->notifyStaffUsers( + $visit->organization, + 'badge_expired', + 'Expired badge', + "{$visit->visitor->full_name}'s badge expired while still checked in.", + $visit, + ); + } + + /** @param array $meta */ + protected function dispatchVisitEvent( + Visit $visit, + string $event, + string $title, + string $message, + array $meta = [], + ): void { + $visit->load(['visitor', 'host', 'organization']); + $channels = $this->preferences->channelsForEvent($visit->organization, $event); + + if ($channels === [] || ! $visit->host) { + return; + } + + $this->notifyHost($visit->host, $visit->organization, $channels, $title, $message, $visit, $event, $meta); + } + + /** @param list $channels */ + protected function notifyHost( + Host $host, + Organization $organization, + array $channels, + string $title, + string $message, + ?Visit $visit = null, + ?string $event = null, + array $meta = [], + ): void { + if (in_array('email', $channels, true) && $host->email) { + try { + $this->email->send($host->email, $title, $message); + } catch (\Throwable $e) { + Log::warning('Frontdesk host email failed', ['host_id' => $host->id, 'error' => $e->getMessage()]); + } + } + + if (in_array('sms', $channels, true) && $host->phone) { + $this->sms->send($host->phone, "{$title}: {$message}"); + } + + if ($host->user_ref) { + $user = User::where('public_id', $host->user_ref)->first(); + if ($user) { + $user->notify(new FrontdeskAlertNotification($title, $message, array_merge($meta, [ + 'event' => $event, + 'visit_id' => $visit?->id, + 'url' => $visit ? route('frontdesk.visits.show', $visit) : null, + ]))); + } + } + } + + protected function notifyStaffUsers( + Organization $organization, + string $event, + string $title, + string $message, + ?Visit $visit = null, + ): void { + if (! $this->preferences->isEventEnabled($organization, $event)) { + return; + } + + $roles = ['org_admin', 'branch_admin', 'receptionist', 'security_officer']; + + $userRefs = Member::query() + ->where('organization_id', $organization->id) + ->whereIn('role', $roles) + ->pluck('user_ref') + ->unique(); + + foreach ($userRefs as $userRef) { + $user = User::where('public_id', $userRef)->first(); + if (! $user) { + continue; + } + + $user->notify(new FrontdeskAlertNotification($title, $message, [ + 'event' => $event, + 'visit_id' => $visit?->id, + 'url' => $visit ? route('frontdesk.visits.show', $visit) : route('frontdesk.dashboard'), + 'icon' => 'bell', + ])); + } + } +} diff --git a/app/Services/Frontdesk/NotificationPreferenceService.php b/app/Services/Frontdesk/NotificationPreferenceService.php new file mode 100644 index 0000000..a158b08 --- /dev/null +++ b/app/Services/Frontdesk/NotificationPreferenceService.php @@ -0,0 +1,29 @@ + */ + public function channelsForEvent(Organization $organization, string $event): array + { + if (! $this->isEventEnabled($organization, $event)) { + return []; + } + + return array_values(array_filter( + $organization->settings['notification_channels'] ?? ['email'], + fn (string $channel) => in_array($channel, array_keys(config('frontdesk.notification_channels', [])), true), + )); + } + + public function isEventEnabled(Organization $organization, string $event): bool + { + $events = $organization->settings['notification_events'] + ?? config('frontdesk.default_notification_events', []); + + return (bool) ($events[$event] ?? true); + } +} diff --git a/app/Services/Frontdesk/OrganizationResolver.php b/app/Services/Frontdesk/OrganizationResolver.php new file mode 100644 index 0000000..8fcd405 --- /dev/null +++ b/app/Services/Frontdesk/OrganizationResolver.php @@ -0,0 +1,125 @@ +ownerRef(); + + $member = Member::where('user_ref', $ref)->first(); + if ($member) { + return Organization::find($member->organization_id); + } + + return Organization::owned($ref)->first(); + } + + public function forUser(User $user): Organization + { + return $this->resolveForUser($user) + ?? throw new \RuntimeException('No organization for user.'); + } + + public function isOnboarded(User $user): bool + { + $organization = $this->resolveForUser($user); + + return $organization !== null + && (bool) data_get($organization->settings, 'onboarded', false); + } + + public function memberFor(User $user, ?Organization $organization = null): ?Member + { + $organization ??= $this->resolveForUser($user); + if (! $organization) { + return null; + } + + return Member::where('organization_id', $organization->id) + ->where('user_ref', $user->ownerRef()) + ->first(); + } + + public function ensureOwnerMember(User $user, Organization $organization): Member + { + return Member::firstOrCreate( + [ + 'organization_id' => $organization->id, + 'user_ref' => $user->ownerRef(), + ], + [ + 'owner_ref' => $user->ownerRef(), + 'role' => 'org_admin', + ], + ); + } + + /** + * @param array $data + */ + public function completeOnboarding(User $user, array $data): Organization + { + $ref = $user->ownerRef(); + + $organization = Organization::create([ + 'owner_ref' => $ref, + 'name' => $data['organization_name'], + 'slug' => Str::slug($data['organization_name']).'-'.substr($ref, 0, 6), + 'timezone' => $data['timezone'] ?? config('app.timezone', 'UTC'), + 'settings' => [ + 'onboarded' => true, + 'badge_expiry_hours' => (int) ($data['badge_expiry_hours'] ?? config('frontdesk.badge.default_expiry_hours', 8)), + 'kiosk_reset_seconds' => (int) ($data['kiosk_reset_seconds'] ?? config('frontdesk.kiosk.inactivity_reset_seconds', 120)), + 'notification_channels' => ['email'], + 'visitor_policy' => $data['visitor_policy'] ?? null, + ], + ]); + + $this->ensureOwnerMember($user, $organization); + + Branch::create([ + 'owner_ref' => $ref, + 'organization_id' => $organization->id, + 'name' => $data['branch_name'], + 'address' => $data['branch_address'] ?? null, + 'is_active' => true, + ]); + + return $organization; + } + + public function hostFor(User $user): ?Host + { + $organization = $this->resolveForUser($user); + if (! $organization) { + return null; + } + + return Host::where('organization_id', $organization->id) + ->where('user_ref', $user->ownerRef()) + ->first(); + } + + /** Branch ID the member may access; null = all branches. */ + public function branchScope(?Member $member): ?int + { + if ($member === null) { + return null; + } + + if (in_array($member->role, ['super_admin', 'org_admin', 'auditor'], true)) { + return null; + } + + return $member->branch_id; + } +} diff --git a/app/Services/Frontdesk/QrCodeService.php b/app/Services/Frontdesk/QrCodeService.php new file mode 100644 index 0000000..8e68250 --- /dev/null +++ b/app/Services/Frontdesk/QrCodeService.php @@ -0,0 +1,28 @@ +qr_token); + } + + public function svg(Visit $visit, int $size = 200): string + { + $options = new QROptions([ + 'outputType' => QRCode::OUTPUT_MARKUP_SVG, + 'scale' => 5, + 'imageBase64' => false, + ]); + + return (new QRCode($options))->render($this->visitUrl($visit)); + } +} diff --git a/app/Services/Frontdesk/ReportService.php b/app/Services/Frontdesk/ReportService.php new file mode 100644 index 0000000..091838c --- /dev/null +++ b/app/Services/Frontdesk/ReportService.php @@ -0,0 +1,138 @@ + + */ + public function summary(string $ownerRef, Organization $organization, Carbon $from, Carbon $to, ?int $branchId = null): array + { + $visits = $this->visitQuery($ownerRef, $organization->id, $from, $to, $branchId); + + $checkedIn = (clone $visits)->whereNotNull('checked_in_at'); + $durations = (clone $checkedIn) + ->whereNotNull('checked_out_at') + ->get(['checked_in_at', 'checked_out_at']) + ->map(fn (Visit $v) => $v->checked_in_at->diffInMinutes($v->checked_out_at)); + + return [ + 'total_visits' => (clone $visits)->count(), + 'checked_in' => (clone $checkedIn)->count(), + 'checked_out' => (clone $visits)->where('status', Visit::STATUS_CHECKED_OUT)->count(), + 'cancelled' => (clone $visits)->where('status', Visit::STATUS_CANCELLED)->count(), + 'contractors' => (clone $checkedIn)->where('visitor_type', 'contractor')->count(), + 'deliveries' => (clone $checkedIn)->where('visitor_type', 'delivery')->count(), + 'avg_duration_minutes' => $durations->isEmpty() ? 0 : (int) round($durations->avg()), + 'unique_visitors' => (clone $checkedIn)->distinct('visitor_id')->count('visitor_id'), + ]; + } + + /** @return array */ + public function peakHours(string $ownerRef, Organization $organization, Carbon $from, Carbon $to, ?int $branchId = null): array + { + $counts = array_fill(0, 24, 0); + + $this->visitQuery($ownerRef, $organization->id, $from, $to, $branchId) + ->whereNotNull('checked_in_at') + ->pluck('checked_in_at') + ->each(function ($checkedInAt) use (&$counts) { + $counts[(int) Carbon::parse($checkedInAt)->format('G')]++; + }); + + $hours = []; + for ($h = 0; $h < 24; $h++) { + $hours[] = ['hour' => $h, 'count' => $counts[$h]]; + } + + return $hours; + } + + /** @return Collection */ + public function visitsByDepartment(string $ownerRef, Organization $organization, Carbon $from, Carbon $to, ?int $branchId = null): Collection + { + return $this->visitQuery($ownerRef, $organization->id, $from, $to, $branchId) + ->whereNotNull('frontdesk_visits.checked_in_at') + ->join('frontdesk_hosts', 'frontdesk_visits.host_id', '=', 'frontdesk_hosts.id') + ->selectRaw("coalesce(frontdesk_hosts.department, 'Unassigned') as department, count(*) as total") + ->groupBy('department') + ->orderByDesc('total') + ->get() + ->map(fn ($row) => (object) ['department' => $row->department, 'count' => (int) $row->total]); + } + + /** @return Collection */ + public function frequentVisitors(string $ownerRef, Organization $organization, int $limit = 10): Collection + { + return Visitor::owned($ownerRef) + ->where('organization_id', $organization->id) + ->where('is_frequent', true) + ->orderByDesc('visit_count') + ->limit($limit) + ->get(); + } + + /** @return array */ + public function securityIncidents(string $ownerRef, Organization $organization, Carbon $from, Carbon $to): array + { + $query = AuditLog::owned($ownerRef) + ->where('organization_id', $organization->id) + ->whereBetween('created_at', [$from, $to]) + ->whereIn('action', [ + 'watchlist.blocked_attempt', + 'watchlist.flagged_checkin', + 'badge.expired', + ]); + + return [ + 'blocked_attempts' => (clone $query)->where('action', 'watchlist.blocked_attempt')->count(), + 'flagged_checkins' => (clone $query)->where('action', 'watchlist.flagged_checkin')->count(), + 'expired_badges' => (clone $query)->where('action', 'badge.expired')->count(), + ]; + } + + /** @return array */ + public function dailyCounts(string $ownerRef, Organization $organization, Carbon $from, Carbon $to, ?int $branchId = null): array + { + $rows = []; + + $this->visitQuery($ownerRef, $organization->id, $from, $to, $branchId) + ->whereNotNull('checked_in_at') + ->pluck('checked_in_at') + ->each(function ($checkedInAt) use (&$rows) { + $key = Carbon::parse($checkedInAt)->toDateString(); + $rows[$key] = ($rows[$key] ?? 0) + 1; + }); + + $days = []; + for ($date = $from->copy()->startOfDay(); $date->lte($to); $date->addDay()) { + $key = $date->toDateString(); + $days[] = ['date' => $key, 'count' => (int) ($rows[$key] ?? 0)]; + } + + return $days; + } + + protected function visitQuery(string $ownerRef, int $organizationId, Carbon $from, Carbon $to, ?int $branchId): Builder + { + return Visit::query() + ->from('frontdesk_visits') + ->where('frontdesk_visits.owner_ref', $ownerRef) + ->where('frontdesk_visits.organization_id', $organizationId) + ->when($branchId, fn ($q) => $q->where('frontdesk_visits.branch_id', $branchId)) + ->where(function ($q) use ($from, $to) { + $q->whereBetween('frontdesk_visits.checked_in_at', [$from, $to]) + ->orWhereBetween('frontdesk_visits.scheduled_at', [$from, $to]); + }); + } +} diff --git a/app/Services/Frontdesk/VisitCheckInService.php b/app/Services/Frontdesk/VisitCheckInService.php new file mode 100644 index 0000000..b68c679 --- /dev/null +++ b/app/Services/Frontdesk/VisitCheckInService.php @@ -0,0 +1,221 @@ + $data + */ + public function checkIn(string $ownerRef, Organization $organization, array $data, ?string $actorRef = null): Visit + { + $data = $this->processMediaFields($data); + $visitorType = $data['visitor_type'] ?? 'visitor'; + + if (! empty($data['type_fields'])) { + $data = $this->visitorTypes->mergeTypeDetailsFromArray($visitorType, $data, $organization); + } + + $visitor = $this->resolveVisitor($ownerRef, $organization, $data); + + $this->watchlist->assertCanCheckIn($visitor, $organization, $actorRef); + + $needsApproval = $this->visitorTypes->requiresApproval($visitorType, $organization) + || $this->watchlist->visitorNeedsApprovalQueue($visitor); + + if ($needsApproval) { + $data = $this->watchlist->applyApprovalMetadata($data, $visitor); + } + + return DB::transaction(function () use ($ownerRef, $organization, $data, $actorRef, $visitor, $visitorType, $needsApproval) { + $duration = (int) ($data['expected_duration_minutes'] + ?? config('frontdesk.kiosk.default_visit_duration_minutes', 60)); + $expiryHours = $this->visitorTypes->badgeExpiryHours($visitorType, $organization); + + $visit = Visit::create([ + 'owner_ref' => $ownerRef, + 'organization_id' => $organization->id, + 'branch_id' => $data['branch_id'] ?? null, + 'reception_desk_id' => $data['reception_desk_id'] ?? null, + 'visitor_id' => $visitor->id, + 'host_id' => $data['host_id'] ?? null, + 'visitor_type' => $visitorType, + 'status' => $needsApproval ? Visit::STATUS_WAITING : Visit::STATUS_CHECKED_IN, + 'purpose' => $data['purpose'] ?? null, + 'expected_duration_minutes' => $duration, + 'scheduled_at' => $data['scheduled_at'] ?? null, + 'checked_in_at' => $needsApproval ? null : now(), + 'badge_expires_at' => $needsApproval ? null : now()->addHours($expiryHours), + 'photo_path' => $data['photo_path'] ?? null, + 'signature_path' => $data['signature_path'] ?? null, + 'policies_accepted' => (bool) ($data['policies_accepted'] ?? false), + 'vehicle_info' => $data['vehicle_info'] ?? null, + 'contractor_details' => $data['contractor_details'] ?? null, + 'delivery_details' => $data['delivery_details'] ?? null, + 'allowed_areas' => $data['allowed_areas'] ?? null, + 'notes' => $data['notes'] ?? null, + 'checked_in_by' => $needsApproval ? null : $actorRef, + 'external_ref' => $data['external_ref'] ?? null, + 'source' => $data['source'] ?? null, + 'integration_metadata' => $data['integration_metadata'] ?? null, + ]); + + if (! $needsApproval) { + $this->finalizeCheckIn($visit, $actorRef); + } else { + AuditLog::record( + $ownerRef, + 'visit.awaiting_approval', + $organization->id, + $actorRef, + Visit::class, + $visit->id, + ['visitor' => $visitor->full_name, 'visitor_type' => $visitorType], + ); + + $this->notifications->approvalNeeded($visit); + + if ($this->watchlist->visitorNeedsApprovalQueue($visitor)) { + $this->watchlist->recordFlaggedCheckIn($visitor, $organization, $actorRef, [ + 'visit_id' => $visit->id, + ]); + } + } + + return $visit->load(['visitor', 'host', 'organization']); + }); + } + + public function activateCheckIn(Visit $visit, ?string $actorRef = null, bool $policiesAccepted = true): Visit + { + return DB::transaction(function () use ($visit, $actorRef, $policiesAccepted) { + $visit->load(['visitor', 'organization']); + $expiryHours = $this->visitorTypes->badgeExpiryHours($visit->visitor_type, $visit->organization); + + $contractorDetails = $visit->contractor_details ?? []; + $deliveryDetails = $visit->delivery_details ?? []; + unset($contractorDetails['_awaiting_approval'], $deliveryDetails['_awaiting_approval']); + + $visit->update([ + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + 'badge_expires_at' => now()->addHours($expiryHours), + 'policies_accepted' => $policiesAccepted, + 'checked_in_by' => $actorRef, + 'contractor_details' => $contractorDetails ?: null, + 'delivery_details' => $deliveryDetails ?: null, + ]); + + $this->finalizeCheckIn($visit, $actorRef); + + return $visit->fresh(['visitor', 'host', 'organization']); + }); + } + + protected function finalizeCheckIn(Visit $visit, ?string $actorRef): void + { + $visitor = $visit->visitor; + $visitor->increment('visit_count'); + if ($visitor->visit_count >= 5) { + $visitor->update(['is_frequent' => true]); + } + + AuditLog::record( + $visit->owner_ref, + 'visit.checked_in', + $visit->organization_id, + $actorRef, + Visit::class, + $visit->id, + ['visitor' => $visitor->full_name, 'badge_code' => $visit->badge_code], + ); + + $this->notifications->visitorArrived($visit); + $this->webhooks->dispatch('visit.checked_in', $visit); + } + + /** @param array $data */ + protected function processMediaFields(array $data): array + { + foreach (['photo_data' => 'photo_path', 'signature_data' => 'signature_path'] as $input => $target) { + if (! empty($data[$input])) { + $data[$target] = $this->visitorTypes->storeBase64Image($data[$input], $input === 'photo_data' ? 'photos' : 'signatures'); + unset($data[$input]); + } elseif (! empty($data[$target]) && is_string($data[$target]) && str_starts_with($data[$target], 'data:image')) { + $data[$target] = $this->visitorTypes->storeBase64Image( + $data[$target], + $target === 'photo_path' ? 'photos' : 'signatures', + ); + } + } + + return $data; + } + + /** + * @param array $data + */ + public function resolveVisitorForSchedule(string $ownerRef, Organization $organization, array $data): Visitor + { + return $this->resolveVisitor($ownerRef, $organization, $data); + } + + /** + * @param array $data + */ + protected function resolveVisitor(string $ownerRef, Organization $organization, array $data): Visitor + { + if (! empty($data['visitor_id'])) { + return Visitor::owned($ownerRef)->findOrFail($data['visitor_id']); + } + + $existing = Visitor::owned($ownerRef) + ->where('organization_id', $organization->id) + ->where(function ($q) use ($data) { + if (! empty($data['email'])) { + $q->where('email', $data['email']); + } + if (! empty($data['phone'])) { + $q->orWhere('phone', $data['phone']); + } + }) + ->when(empty($data['email']) && empty($data['phone']), fn ($q) => $q->whereRaw('0 = 1')) + ->first(); + + if ($existing) { + $existing->update(array_filter([ + 'full_name' => $data['full_name'] ?? $existing->full_name, + 'company' => $data['company'] ?? $existing->company, + 'phone' => $data['phone'] ?? $existing->phone, + 'email' => $data['email'] ?? $existing->email, + 'photo_path' => $data['photo_path'] ?? $existing->photo_path, + ])); + + return $existing->fresh(); + } + + return Visitor::create([ + 'owner_ref' => $ownerRef, + 'organization_id' => $organization->id, + 'full_name' => $data['full_name'], + 'company' => $data['company'] ?? null, + 'phone' => $data['phone'] ?? null, + 'email' => $data['email'] ?? null, + 'photo_path' => $data['photo_path'] ?? null, + ]); + } +} diff --git a/app/Services/Frontdesk/VisitCheckOutService.php b/app/Services/Frontdesk/VisitCheckOutService.php new file mode 100644 index 0000000..c42f9c7 --- /dev/null +++ b/app/Services/Frontdesk/VisitCheckOutService.php @@ -0,0 +1,50 @@ +isInside(), 422, 'Visitor is not currently checked in.'); + + $visit->update([ + 'status' => Visit::STATUS_CHECKED_OUT, + 'checked_out_at' => now(), + 'checked_out_by' => $actorRef, + ]); + + AuditLog::record( + $visit->owner_ref, + 'visit.checked_out', + $visit->organization_id, + $actorRef, + Visit::class, + $visit->id, + ['visitor' => $visit->visitor->full_name], + ); + + $this->notifications->visitorCheckedOut($visit); + $this->webhooks->dispatch('visit.checked_out', $visit->fresh(['visitor', 'host'])); + + return $visit->fresh(['visitor', 'host']); + } + + public function checkOutByQrToken(string $ownerRef, string $qrToken, ?string $actorRef = null): Visit + { + $visit = Visit::owned($ownerRef) + ->where('qr_token', $qrToken) + ->currentlyInside() + ->firstOrFail(); + + return $this->checkOut($visit, $actorRef); + } +} diff --git a/app/Services/Frontdesk/VisitLifecycleService.php b/app/Services/Frontdesk/VisitLifecycleService.php new file mode 100644 index 0000000..e26c408 --- /dev/null +++ b/app/Services/Frontdesk/VisitLifecycleService.php @@ -0,0 +1,100 @@ +canActivateCheckIn(), 422, 'This visit cannot be checked in.'); + + $visit->load('visitor'); + app(WatchlistService::class)->assertCanCheckIn($visit->visitor); + + return $this->checkIns->activateCheckIn($visit, $actorRef, $policiesAccepted); + } + + public function markWaiting(Visit $visit, ?string $actorRef = null): Visit + { + abort_unless(in_array($visit->status, [ + Visit::STATUS_EXPECTED, + Visit::STATUS_SCHEDULED, + Visit::STATUS_OVERDUE, + ], true), 422, 'Visit is not awaiting arrival.'); + + $visit->update(['status' => Visit::STATUS_WAITING]); + + AuditLog::record( + $visit->owner_ref, + 'visit.waiting', + $visit->organization_id, + $actorRef, + Visit::class, + $visit->id, + ['visitor' => $visit->visitor->full_name], + ); + + $this->notifications->visitorWaiting($visit); + + return $visit->fresh(['visitor', 'host']); + } + + public function cancel(Visit $visit, ?string $actorRef = null, ?string $reason = null): Visit + { + abort_if($visit->isInside(), 422, 'Checked-in visits must be checked out, not cancelled.'); + abort_if($visit->status === Visit::STATUS_CANCELLED, 422, 'Visit is already cancelled.'); + + $visit->update([ + 'status' => Visit::STATUS_CANCELLED, + 'notes' => trim(($visit->notes ?? '').($reason ? "\nCancelled: {$reason}" : '')), + ]); + + AuditLog::record( + $visit->owner_ref, + 'visit.cancelled', + $visit->organization_id, + $actorRef, + Visit::class, + $visit->id, + ['visitor' => $visit->visitor->full_name, 'reason' => $reason], + ); + + $this->notifications->visitCancelled($visit); + + return $visit->fresh(['visitor', 'host']); + } + + /** Mark expected/scheduled visits past their scheduled time as overdue. */ + public function markOverdueVisits(?Organization $organization = null): int + { + $query = Visit::query() + ->whereIn('status', [Visit::STATUS_EXPECTED, Visit::STATUS_SCHEDULED]) + ->whereNotNull('scheduled_at') + ->where('scheduled_at', '<', now()); + + if ($organization) { + $query->where('organization_id', $organization->id); + } + + return $query->update(['status' => Visit::STATUS_OVERDUE]); + } + + public function approve(Visit $visit, ?string $actorRef = null): Visit + { + abort_unless($visit->awaitingApproval(), 422, 'This visit is not awaiting approval.'); + + $visit->load('visitor'); + app(WatchlistService::class)->assertCanCheckIn($visit->visitor); + + return $this->checkIns->activateCheckIn($visit, $actorRef, (bool) $visit->policies_accepted); + } +} diff --git a/app/Services/Frontdesk/VisitScheduleService.php b/app/Services/Frontdesk/VisitScheduleService.php new file mode 100644 index 0000000..bdca87e --- /dev/null +++ b/app/Services/Frontdesk/VisitScheduleService.php @@ -0,0 +1,74 @@ + $data + */ + public function schedule(string $ownerRef, Organization $organization, array $data, ?string $actorRef = null): Visit + { + return DB::transaction(function () use ($ownerRef, $organization, $data, $actorRef) { + $visitor = $this->checkIns->resolveVisitorForSchedule($ownerRef, $organization, $data); + + $this->watchlist->assertCanCheckIn($visitor); + + $scheduledAt = isset($data['scheduled_at']) + ? Carbon::parse($data['scheduled_at']) + : now(); + + $status = $scheduledAt->startOfDay()->isAfter(now()->startOfDay()) + ? Visit::STATUS_SCHEDULED + : Visit::STATUS_EXPECTED; + + $visit = Visit::create([ + 'owner_ref' => $ownerRef, + 'organization_id' => $organization->id, + 'branch_id' => $data['branch_id'] ?? null, + 'visitor_id' => $visitor->id, + 'host_id' => $data['host_id'] ?? null, + 'visitor_type' => $data['visitor_type'] ?? 'visitor', + 'status' => $status, + 'purpose' => $data['purpose'] ?? null, + 'expected_duration_minutes' => (int) ($data['expected_duration_minutes'] + ?? config('frontdesk.kiosk.default_visit_duration_minutes', 60)), + 'scheduled_at' => $scheduledAt, + 'notes' => $data['notes'] ?? null, + 'external_ref' => $data['external_ref'] ?? null, + 'source' => $data['source'] ?? null, + 'integration_metadata' => $data['integration_metadata'] ?? null, + ]); + + AuditLog::record( + $ownerRef, + 'visit.scheduled', + $organization->id, + $actorRef, + Visit::class, + $visit->id, + ['visitor' => $visitor->full_name, 'scheduled_at' => $scheduledAt->toIso8601String()], + ); + + if ($status === Visit::STATUS_EXPECTED) { + $this->notifications->visitorExpected($visit); + } + + return $visit->load(['visitor', 'host']); + }); + } +} diff --git a/app/Services/Frontdesk/VisitorSearchService.php b/app/Services/Frontdesk/VisitorSearchService.php new file mode 100644 index 0000000..a4c286d --- /dev/null +++ b/app/Services/Frontdesk/VisitorSearchService.php @@ -0,0 +1,31 @@ + */ + public function search(string $ownerRef, int $organizationId, string $query, int $limit = 20): Collection + { + $query = trim($query); + if ($query === '') { + return new Collection; + } + + return Visitor::owned($ownerRef) + ->where('organization_id', $organizationId) + ->where(function ($q) use ($query) { + $q->where('full_name', 'like', "%{$query}%") + ->orWhere('company', 'like', "%{$query}%") + ->orWhere('phone', 'like', "%{$query}%") + ->orWhere('email', 'like', "%{$query}%"); + }) + ->orderByDesc('is_frequent') + ->orderBy('full_name') + ->limit($limit) + ->get(); + } +} diff --git a/app/Services/Frontdesk/VisitorTypeService.php b/app/Services/Frontdesk/VisitorTypeService.php new file mode 100644 index 0000000..e1422a6 --- /dev/null +++ b/app/Services/Frontdesk/VisitorTypeService.php @@ -0,0 +1,197 @@ + */ + public function configFor(string $type): array + { + return config("frontdesk.visitor_type_config.{$type}", config('frontdesk.visitor_type_config.visitor', [])); + } + + /** @return list> */ + public function fieldsFor(string $type): array + { + return $this->configFor($type)['fields'] ?? []; + } + + public function requiresApproval(string $type, Organization $organization): bool + { + $settings = $organization->settings ?? []; + $overrides = $settings['type_requires_approval'] ?? []; + + if (array_key_exists($type, $overrides)) { + return (bool) $overrides[$type]; + } + + return (bool) ($this->configFor($type)['requires_approval'] ?? false); + } + + public function badgeExpiryHours(string $type, Organization $organization): int + { + $settings = $organization->settings ?? []; + $overrides = $settings['type_badge_expiry_hours'] ?? []; + + if (isset($overrides[$type])) { + return (int) $overrides[$type]; + } + + $typeHours = $this->configFor($type)['badge_expiry_hours'] ?? null; + + if ($typeHours !== null) { + return (int) $typeHours; + } + + return (int) data_get($settings, 'badge_expiry_hours', config('frontdesk.badge.default_expiry_hours', 8)); + } + + /** @return array */ + public function validationRules(string $type): array + { + $rules = ['type_fields' => ['nullable', 'array']]; + + foreach ($this->fieldsFor($type) as $field) { + $key = 'type_fields.'.$field['name']; + + if ($field['type'] === 'checkbox') { + $rules[$key] = [($field['required'] ?? false) ? 'accepted' : 'nullable']; + continue; + } + + $fieldRules = [($field['required'] ?? false) ? 'required' : 'nullable']; + + $fieldRules[] = match ($field['type']) { + 'photo' => 'file', + 'signature' => 'string', + 'date' => 'date', + 'datetime-local' => 'date', + 'textarea' => 'string', + default => 'string', + }; + + if ($field['type'] === 'photo') { + $fieldRules[] = 'image'; + $fieldRules[] = 'max:5120'; + } + + if (in_array($field['type'], ['text', 'textarea'], true)) { + $fieldRules[] = 'max:500'; + } + + $rules[$key] = $fieldRules; + } + + return $rules; + } + + /** + * @param array $data + * @return array + */ + public function enrichCheckInData(string $type, array $data, Organization $organization, ?Request $request = null): array + { + if ($request) { + $typeFields = $data['type_fields'] ?? []; + + foreach ($this->fieldsFor($type) as $field) { + if ($field['type'] === 'photo' && $request->hasFile("type_fields.{$field['name']}")) { + $typeFields[$field['name']] = $this->storeUpload( + $request->file("type_fields.{$field['name']}"), + 'photos', + ); + } + } + + $data['type_fields'] = $typeFields; + } + + return $this->mergeTypeDetailsFromArray($type, $data, $organization); + } + + /** + * @param array $data + * @return array + */ + public function mergeTypeDetailsFromArray(string $type, array $data, Organization $organization): array + { + $detailsKey = $this->configFor($type)['details_key'] ?? null; + + if ($detailsKey === null) { + return $data; + } + + $details = []; + $typeFields = $data['type_fields'] ?? []; + + foreach ($this->fieldsFor($type) as $field) { + $name = $field['name']; + $value = $typeFields[$name] ?? null; + + if ($field['type'] === 'signature' && is_string($value) && str_starts_with($value, 'data:image')) { + $value = $this->storeBase64Image($value, 'signatures'); + } + + if ($field['type'] === 'checkbox') { + $value = filter_var($value, FILTER_VALIDATE_BOOLEAN) || in_array($value, ['1', 'on', 1], true); + } + + if ($value !== null && $value !== '' && $value !== false) { + $details[$name] = $value; + } + } + + if ($type === 'delivery') { + $details['received_at'] = now()->toIso8601String(); + } + + if ($this->requiresApproval($type, $organization)) { + $details['_awaiting_approval'] = true; + } + + $data[$detailsKey] = $details; + unset($data['type_fields']); + + return $data; + } + + /** @return array> */ + public function configsForFrontend(): array + { + $types = array_keys(config('frontdesk.visitor_types', [])); + + return collect($types) + ->mapWithKeys(fn (string $type) => [$type => [ + 'label' => config("frontdesk.visitor_types.{$type}"), + 'fields' => $this->fieldsFor($type), + 'requires_approval' => (bool) ($this->configFor($type)['requires_approval'] ?? false), + ]]) + ->all(); + } + + public function storeUpload(UploadedFile $file, string $folder): string + { + return $file->store("frontdesk/{$folder}", 'public'); + } + + public function storeBase64Image(string $dataUrl, string $folder): string + { + if (! preg_match('/^data:image\/(\w+);base64,/', $dataUrl, $matches)) { + throw new \InvalidArgumentException('Invalid image data.'); + } + + $extension = $matches[1] === 'jpeg' ? 'jpg' : $matches[1]; + $contents = base64_decode(substr($dataUrl, strpos($dataUrl, ',') + 1)); + + $path = "frontdesk/{$folder}/".Str::uuid().".{$extension}"; + Storage::disk('public')->put($path, $contents); + + return $path; + } +} diff --git a/app/Services/Frontdesk/WatchlistService.php b/app/Services/Frontdesk/WatchlistService.php new file mode 100644 index 0000000..bed02a0 --- /dev/null +++ b/app/Services/Frontdesk/WatchlistService.php @@ -0,0 +1,123 @@ +isBlacklisted()) { + if ($organization) { + $this->recordBlockedAttempt($visitor, $organization, $actorRef); + } + + throw new HttpException(403, 'This visitor is blacklisted and cannot check in.'); + } + } + + public function visitorNeedsApprovalQueue(Visitor $visitor): bool + { + return $visitor->requiresApproval(); + } + + /** @param array $context */ + public function recordBlockedAttempt( + Visitor $visitor, + Organization $organization, + ?string $actorRef = null, + array $context = [], + ): void { + AuditLog::record( + $organization->owner_ref, + 'watchlist.blocked_attempt', + $organization->id, + $actorRef, + Visitor::class, + $visitor->id, + array_merge([ + 'visitor' => $visitor->full_name, + 'watchlist_status' => $visitor->watchlist_status, + ], $context), + ); + + $this->notifications->watchlistBlockedAttempt($visitor, $organization); + } + + /** @param array $context */ + public function recordFlaggedCheckIn( + Visitor $visitor, + Organization $organization, + ?string $actorRef = null, + array $context = [], + ): void { + AuditLog::record( + $organization->owner_ref, + 'watchlist.flagged_checkin', + $organization->id, + $actorRef, + Visitor::class, + $visitor->id, + array_merge([ + 'visitor' => $visitor->full_name, + 'watchlist_status' => $visitor->watchlist_status, + ], $context), + ); + + $this->notifications->watchlistFlaggedCheckIn($visitor, $organization); + } + + public function syncEntryForVisitor(Visitor $visitor, string $status, ?string $reason, ?string $actorRef): WatchlistEntry + { + $entry = WatchlistEntry::query() + ->where('owner_ref', $visitor->owner_ref) + ->where('organization_id', $visitor->organization_id) + ->where('visitor_id', $visitor->id) + ->first(); + + if ($status === Visitor::WATCHLIST_ALLOWED) { + $entry?->delete(); + + return $entry ?? new WatchlistEntry; + } + + return WatchlistEntry::updateOrCreate( + [ + 'owner_ref' => $visitor->owner_ref, + 'organization_id' => $visitor->organization_id, + 'visitor_id' => $visitor->id, + ], + [ + 'full_name' => $visitor->full_name, + 'company' => $visitor->company, + 'status' => $status, + 'reason' => $reason, + 'created_by' => $actorRef, + ], + ); + } + + public function applyApprovalMetadata(array $data, Visitor $visitor): array + { + if (! $this->visitorNeedsApprovalQueue($visitor)) { + return $data; + } + + $key = isset($data['delivery_details']) ? 'delivery_details' : 'contractor_details'; + $details = $data[$key] ?? []; + $details['_awaiting_approval'] = true; + $details['_watchlist_flagged'] = true; + $data[$key] = $details; + + return $data; + } +} diff --git a/app/Services/Integrations/WebhookDispatcher.php b/app/Services/Integrations/WebhookDispatcher.php new file mode 100644 index 0000000..c9024d7 --- /dev/null +++ b/app/Services/Integrations/WebhookDispatcher.php @@ -0,0 +1,69 @@ +loadMissing('organization'); + + $endpoints = WebhookEndpoint::query() + ->where('organization_id', $visit->organization_id) + ->where('is_active', true) + ->get() + ->filter(fn (WebhookEndpoint $endpoint) => $endpoint->subscribesTo($event)); + + if ($endpoints->isEmpty()) { + return; + } + + $payload = [ + 'event' => $event, + 'visit' => [ + 'id' => $visit->id, + 'public_id' => $visit->public_id, + 'external_ref' => $visit->external_ref, + 'source' => $visit->source, + 'status' => $visit->status, + 'visitor_type' => $visit->visitor_type, + 'badge_code' => $visit->badge_code, + 'checked_in_at' => $visit->checked_in_at?->toIso8601String(), + 'checked_out_at' => $visit->checked_out_at?->toIso8601String(), + 'visitor_name' => $visit->visitor?->full_name, + 'host_name' => $visit->host?->name, + ], + 'timestamp' => now()->toIso8601String(), + ]; + + foreach ($endpoints as $endpoint) { + $this->send($endpoint, $payload); + } + } + + /** @param array $payload */ + protected function send(WebhookEndpoint $endpoint, array $payload): void + { + $body = json_encode($payload); + $headers = ['Content-Type' => 'application/json']; + + if ($endpoint->secret) { + $headers['X-Frontdesk-Signature'] = hash_hmac('sha256', $body, $endpoint->secret); + } + + try { + Http::timeout(10)->withHeaders($headers)->withBody($body, 'application/json')->post($endpoint->url); + } catch (\Throwable $e) { + Log::warning('Frontdesk webhook delivery failed', [ + 'endpoint_id' => $endpoint->id, + 'url' => $endpoint->url, + 'error' => $e->getMessage(), + ]); + } + } +} diff --git a/app/Services/Printers/BrotherPrinterDriver.php b/app/Services/Printers/BrotherPrinterDriver.php new file mode 100644 index 0000000..1e8fd9e --- /dev/null +++ b/app/Services/Printers/BrotherPrinterDriver.php @@ -0,0 +1,19 @@ +renderBadge($visit); + } +} diff --git a/app/Services/Printers/DymoPrinterDriver.php b/app/Services/Printers/DymoPrinterDriver.php new file mode 100644 index 0000000..88c019f --- /dev/null +++ b/app/Services/Printers/DymoPrinterDriver.php @@ -0,0 +1,19 @@ +renderBadge($visit); + } +} diff --git a/app/Services/Printers/PdfPrinterDriver.php b/app/Services/Printers/PdfPrinterDriver.php new file mode 100644 index 0000000..9c2fb23 --- /dev/null +++ b/app/Services/Printers/PdfPrinterDriver.php @@ -0,0 +1,28 @@ +load(['visitor', 'host', 'organization']); + + $html = app(BadgeRenderService::class)->renderHtml($visit, true); + + return [ + 'format' => 'html', + 'content' => $html, + 'filename' => 'badge-'.$visit->badge_code.'.html', + ]; + } +} diff --git a/app/Services/Printers/PrinterManager.php b/app/Services/Printers/PrinterManager.php new file mode 100644 index 0000000..94d87fe --- /dev/null +++ b/app/Services/Printers/PrinterManager.php @@ -0,0 +1,42 @@ + */ + protected array $drivers = []; + + public function __construct() + { + $this->register(new PdfPrinterDriver); + $this->register(new ZebraPrinterDriver); + $this->register(new BrotherPrinterDriver); + $this->register(new DymoPrinterDriver); + } + + public function register(PrinterDriverInterface $driver): void + { + $this->drivers[$driver->name()] = $driver; + } + + public function driver(?string $name = null): PrinterDriverInterface + { + $name = $name ?? config('frontdesk.printers.default_driver', 'pdf'); + + if (! isset($this->drivers[$name])) { + throw new InvalidArgumentException("Unknown printer driver: {$name}"); + } + + return $this->drivers[$name]; + } + + public function renderBadge(Visit $visit, ?string $driver = null): array + { + return $this->driver($driver)->renderBadge($visit); + } +} diff --git a/app/Services/Printers/ZebraPrinterDriver.php b/app/Services/Printers/ZebraPrinterDriver.php new file mode 100644 index 0000000..e240d51 --- /dev/null +++ b/app/Services/Printers/ZebraPrinterDriver.php @@ -0,0 +1,35 @@ +load(['visitor', 'host']); + $name = strtoupper(substr($visit->visitor->full_name, 0, 24)); + $company = strtoupper(substr($visit->visitor->company ?? '', 0, 20)); + $host = strtoupper(substr($visit->host?->name ?? '', 0, 20)); + $code = $visit->badge_code; + + $zpl = "^XA^FO50,50^A0N,40,40^FD{$name}^FS"; + $zpl .= "^FO50,100^A0N,25,25^FD{$company}^FS"; + $zpl .= "^FO50,140^A0N,25,25^FDHost: {$host}^FS"; + $zpl .= "^FO50,180^BQN,2,5^FDQA,{$code}^FS"; + $zpl .= "^XZ"; + + return [ + 'format' => 'zpl', + 'content' => $zpl, + 'filename' => 'badge-'.$visit->badge_code.'.zpl', + ]; + } +} diff --git a/app/Support/LadillAppUrl.php b/app/Support/LadillAppUrl.php new file mode 100644 index 0000000..c894f57 --- /dev/null +++ b/app/Support/LadillAppUrl.php @@ -0,0 +1,15 @@ +> + */ +class UserProfileMenu +{ + public static function items(?Authenticatable $user = null): array + { + $user ??= auth()->user(); + + if (! $user) { + return []; + } + + $items = []; + + foreach ([ + ['label' => 'Home', 'path' => '', 'host' => 'home'], + ['label' => 'Profile', 'path' => 'profile'], + ['label' => 'Account Settings', 'path' => 'account-settings'], + ['label' => 'Dashboard', 'path' => 'dashboard'], + ['label' => 'Billing', 'path' => 'billing'], + ] as $link) { + $href = self::platformUrl($link['host'] ?? 'account', $link['path']); + + if (self::isCurrentMenuLink($link, $href)) { + continue; + } + + $items[] = [ + 'type' => 'link', + 'label' => $link['label'], + 'href' => $href, + ]; + } + + // Wallet balance peek — sits directly after Billing (only when this + // app exposes a balance endpoint). + if (Route::has((string) config('billing.wallet_balance_route', 'wallet.balance'))) { + $items[] = ['type' => 'wallet']; + } + + if (self::userIsAdmin($user)) { + $adminHref = self::platformUrl('account', 'admin'); + + if (! self::isCurrentMenuLink(['path' => 'admin', 'host' => 'account'], $adminHref)) { + $items[] = [ + 'type' => 'link', + 'label' => 'Admin', + 'href' => $adminHref, + ]; + } + } + + if (Route::has('logout')) { + $items[] = [ + 'type' => 'logout', + 'label' => 'Logout', + 'action' => route('logout'), + ]; + } + + return $items; + } + + private static function platformUrl(string $host, string $path = ''): string + { + if ($host === 'home') { + if (function_exists('ladill_home_url')) { + return ladill_home_url($path); + } + + $platform = (string) config('app.platform_domain', parse_url((string) config('app.url', ''), PHP_URL_HOST) ?: ''); + $domain = $platform !== '' ? 'home.'.$platform : (string) config('app.account_domain'); + + return self::absoluteUrl($domain, $path); + } + + if (function_exists('ladill_account_url')) { + return ladill_account_url($path); + } + + return self::absoluteUrl((string) config('app.account_domain'), $path); + } + + /** @param array{label?: string, path?: string, host?: string} $link */ + private static function isCurrentMenuLink(array $link, string $href): bool + { + if (app()->runningInConsole() && ! app()->runningUnitTests()) { + return false; + } + + $request = request(); + if (! $request) { + return false; + } + + $linkHost = strtolower((string) parse_url($href, PHP_URL_HOST)); + $currentHost = strtolower($request->getHost()); + + if ($linkHost === '' || $linkHost !== $currentHost) { + return false; + } + + $currentPath = trim($request->getPathInfo(), '/'); + $targetPath = trim((string) parse_url($href, PHP_URL_PATH), '/'); + + if (($link['host'] ?? 'account') === 'home') { + return $currentPath === ''; + } + + if (($link['path'] ?? '') === 'dashboard') { + return in_array($currentPath, ['dashboard', 'account'], true) + || ($targetPath !== '' && self::pathMatchesSection($currentPath, $targetPath)); + } + + return self::pathMatchesSection($currentPath, $targetPath); + } + + private static function pathMatchesSection(string $currentPath, string $targetPath): bool + { + if ($targetPath === '') { + return $currentPath === ''; + } + + return $currentPath === $targetPath + || str_starts_with($currentPath, $targetPath.'/'); + } + + private static function absoluteUrl(string $domain, string $path = ''): string + { + $base = 'https://'.trim($domain, '/'); + + return $path === '' ? $base : $base.'/'.ltrim($path, '/'); + } + + private static function userIsAdmin(Authenticatable $user): bool + { + if (method_exists($user, 'isAdmin')) { + return $user->isAdmin(); + } + + return (bool) ($user->is_admin ?? false); + } +} diff --git a/app/Support/helpers.php b/app/Support/helpers.php new file mode 100644 index 0000000..3637066 --- /dev/null +++ b/app/Support/helpers.php @@ -0,0 +1,47 @@ +handleCommand(new ArgvInput); + +exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php new file mode 100644 index 0000000..5784c73 --- /dev/null +++ b/bootstrap/app.php @@ -0,0 +1,37 @@ +withRouting( + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware): void { + // Guests on the web UI bounce into "Sign in with Ladill" (auth.ladill.com). + $middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [ + 'redirect' => $request->fullUrl(), + ])); + $middleware->web(append: [ + \App\Http\Middleware\InjectBootSplash::class, + SetActingAccount::class, + ]); + $middleware->alias([ + 'auth.service' => AuthenticateService::class, + 'platform.session' => EnsurePlatformSession::class, + 'frontdesk.setup' => \App\Http\Middleware\EnsureOrganizationSetup::class, + 'frontdesk.ability' => \App\Http\Middleware\EnsureFrontdeskAbility::class, + 'frontdesk.device' => \App\Http\Middleware\AuthenticateFrontdeskDevice::class, + ]); + }) + ->withExceptions(function (Exceptions $exceptions): void { + // + })->create(); diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 0000000..fc94ae6 --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,7 @@ +=5.0.0" + }, + "require-dev": { + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2024-02-09T16:56:22+00:00" + }, + { + "name": "chillerlan/php-qrcode", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-qrcode.git", + "reference": "7b66282572fc14075c0507d74d9837dab25b38d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/7b66282572fc14075c0507d74d9837dab25b38d6", + "reference": "7b66282572fc14075c0507d74d9837dab25b38d6", + "shasum": "" + }, + "require": { + "chillerlan/php-settings-container": "^2.1.6 || ^3.2.1", + "ext-mbstring": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "chillerlan/php-authenticator": "^4.3.1 || ^5.2.1", + "ext-fileinfo": "*", + "phan/phan": "^5.5.2", + "phpcompatibility/php-compatibility": "10.x-dev", + "phpmd/phpmd": "^2.15", + "phpunit/phpunit": "^9.6", + "setasign/fpdf": "^1.8.2", + "slevomat/coding-standard": "^8.23.0", + "squizlabs/php_codesniffer": "^4.0.0" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output.", + "simple-icons/simple-icons": "SVG icons that you can use to embed as logos in the QR Code" + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase/qrcode-generator" + }, + { + "name": "ZXing Authors", + "homepage": "https://github.com/zxing/zxing" + }, + { + "name": "Ashot Khanamiryan", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder" + }, + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "description": "A QR Code generator and reader with a user-friendly API. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "keywords": [ + "phpqrcode", + "qr", + "qr code", + "qr-reader", + "qrcode", + "qrcode-generator", + "qrcode-reader" + ], + "support": { + "docs": "https://php-qrcode.readthedocs.io", + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode" + }, + "funding": [ + { + "url": "https://ko-fi.com/codemasher", + "type": "Ko-Fi" + } + ], + "time": "2025-11-23T23:51:44+00:00" + }, + { + "name": "chillerlan/php-settings-container", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-settings-container.git", + "reference": "a0a487cbf5344f721eb504bf0f59bada40c381b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/a0a487cbf5344f721eb504bf0f59bada40c381b7", + "reference": "a0a487cbf5344f721eb504bf0f59bada40c381b7", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^8.1" + }, + "require-dev": { + "phan/phan": "^5.5.2", + "phpmd/phpmd": "^2.15", + "phpstan/phpstan": "^2.1.31", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^10.5", + "slevomat/coding-standard": "^8.22", + "squizlabs/php_codesniffer": "^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + } + ], + "description": "A container class for immutable settings objects. Not a DI container.", + "homepage": "https://github.com/chillerlan/php-settings-container", + "keywords": [ + "Settings", + "configuration", + "container", + "helper", + "property hook" + ], + "support": { + "issues": "https://github.com/chillerlan/php-settings-container/issues", + "source": "https://github.com/chillerlan/php-settings-container" + }, + "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2026-03-20T21:10:52+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" + }, + "time": "2024-07-08T12:26:09+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "reference": "6d6c96277ea252fc1304627204c3d5e6e15faa3b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0 || ^13.0", + "phpstan/phpstan": "^1.12 || ^2.0", + "phpstan/phpstan-phpunit": "^1.4 || ^2.0", + "phpstan/phpstan-strict-rules": "^1.6 || ^2.0", + "phpunit/phpunit": "^8.5 || ^12.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2025-08-10T19:31:58+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2024-02-05T11:56:58+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "shasum": "" + }, + "require": { + "php": "^8.2|^8.3|^8.4|^8.5" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.32|^2.1.31", + "phpunit/phpunit": "^8.5.48|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2025-10-31T18:51:33+00:00" + }, + { + "name": "egulias/email-validator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2.0 || ^3.0", + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.26" + }, + "require-dev": { + "phpunit/phpunit": "^10.2", + "vimeo/psalm": "^5.12" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2025-03-06T22:45:56+00:00" + }, + { + "name": "fruitcake/php-cors", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379", + "reference": "38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379", + "shasum": "" + }, + "require": { + "php": "^8.1", + "symfony/http-foundation": "^5.4|^6.4|^7.3|^8" + }, + "require-dev": { + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^9", + "squizlabs/php_codesniffer": "^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Fruitcake\\Cors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fruitcake", + "homepage": "https://fruitcake.nl" + }, + { + "name": "Barryvdh", + "email": "barryvdh@gmail.com" + } + ], + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", + "keywords": [ + "cors", + "laravel", + "symfony" + ], + "support": { + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2025-12-03T09:33:47+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.4", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.5" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:43:20+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.11.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "c987f8ce84b8434fa430795eca0f3430663da72b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/c987f8ce84b8434fa430795eca0f3430663da72b", + "reference": "c987f8ce84b8434fa430795eca0f3430663da72b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^2.5", + "guzzlehttp/psr7": "^2.11", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", + "symfony/polyfill-php80": "^1.24" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "guzzlehttp/test-server": "^0.4", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.52 || ^9.6.34", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.11.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2026-06-02T12:40:51+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "4360e982f87f5f258bf872d094647791db2f4c8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/4360e982f87f5f258bf872d094647791db2f4c8e", + "reference": "4360e982f87f5f258bf872d094647791db2f4c8e", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.52 || ^9.6.34" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2026-06-02T12:23:43+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.11.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "bbb5e61349fa5cb822b3e87842b951088b76b81f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/bbb5e61349fa5cb822b3e87842b951088b76b81f", + "reference": "bbb5e61349fa5cb822b3e87842b951088b76b81f", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", + "symfony/polyfill-php80": "^1.24" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "1.1.0", + "jshttp/mime-db": "1.54.0.1", + "phpunit/phpunit": "^8.5.52 || ^9.6.34" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.11.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2026-06-02T12:30:48+00:00" + }, + { + "name": "guzzlehttp/uri-template", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/guzzle/uri-template.git", + "reference": "eef7f87bab6f204eba3c39224d8075c70c637946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/eef7f87bab6f204eba3c39224d8075c70c637946", + "reference": "eef7f87bab6f204eba3c39224d8075c70c637946", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.52 || ^9.6.34", + "uri-template/tests": "1.0.0" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\UriTemplate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + } + ], + "description": "A polyfill class for uri_template of PHP", + "keywords": [ + "guzzlehttp", + "uri-template" + ], + "support": { + "issues": "https://github.com/guzzle/uri-template/issues", + "source": "https://github.com/guzzle/uri-template/tree/v1.0.6" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "type": "tidelift" + } + ], + "time": "2026-05-23T22:00:21+00:00" + }, + { + "name": "laravel/framework", + "version": "v12.61.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "e8472ca9774452fe50841d9bdced060679f4d58d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/e8472ca9774452fe50841d9bdced060679f4d58d", + "reference": "e8472ca9774452fe50841d9bdced060679f4d58d", + "shasum": "" + }, + "require": { + "brick/math": "^0.11|^0.12|^0.13|^0.14", + "composer-runtime-api": "^2.2", + "doctrine/inflector": "^2.0.5", + "dragonmantank/cron-expression": "^3.4", + "egulias/email-validator": "^3.2.1|^4.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-session": "*", + "ext-tokenizer": "*", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8.2", + "guzzlehttp/uri-template": "^1.0", + "laravel/prompts": "^0.3.0", + "laravel/serializable-closure": "^1.3|^2.0", + "league/commonmark": "^2.8.1", + "league/flysystem": "^3.25.1", + "league/flysystem-local": "^3.25.1", + "league/uri": "^7.5.1", + "monolog/monolog": "^3.0", + "nesbot/carbon": "^3.8.4", + "nunomaduro/termwind": "^2.0", + "php": "^8.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.7", + "symfony/console": "^7.2.0", + "symfony/error-handler": "^7.2.0", + "symfony/finder": "^7.2.0", + "symfony/http-foundation": "^7.2.0", + "symfony/http-kernel": "^7.2.0", + "symfony/mailer": "^7.2.0", + "symfony/mime": "^7.2.0", + "symfony/polyfill-php83": "^1.33", + "symfony/polyfill-php84": "^1.34", + "symfony/polyfill-php85": "^1.34", + "symfony/process": "^7.2.0", + "symfony/routing": "^7.2.0", + "symfony/uid": "^7.2.0", + "symfony/var-dumper": "^7.2.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", + "vlucas/phpdotenv": "^5.6.1", + "voku/portable-ascii": "^2.0.2" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/concurrency": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/json-schema": "self.version", + "illuminate/log": "self.version", + "illuminate/macroable": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/process": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/reflection": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/testing": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "spatie/once": "*" + }, + "require-dev": { + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.322.9", + "ext-gmp": "*", + "fakerphp/faker": "^1.24", + "guzzlehttp/promises": "^2.0.3", + "guzzlehttp/psr7": "^2.4", + "laravel/pint": "^1.18", + "league/flysystem-aws-s3-v3": "^3.25.1", + "league/flysystem-ftp": "^3.25.1", + "league/flysystem-path-prefixing": "^3.25.1", + "league/flysystem-read-only": "^3.25.1", + "league/flysystem-sftp-v3": "^3.25.1", + "mockery/mockery": "^1.6.10", + "opis/json-schema": "^2.4.1", + "orchestra/testbench-core": "^10.9.0", + "pda/pheanstalk": "^5.0.6|^7.0.0", + "php-http/discovery": "^1.15", + "phpstan/phpstan": "^2.1.41", + "phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1", + "predis/predis": "^2.3|^3.0", + "resend/resend-php": "^0.10.0|^1.0", + "symfony/cache": "^7.2.0", + "symfony/http-client": "^7.2.0", + "symfony/psr-http-message-bridge": "^7.2.0", + "symfony/translation": "^7.2.0" + }, + "suggest": { + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", + "ext-apcu": "Required to use the APC cache driver.", + "ext-fileinfo": "Required to use the Filesystem class.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", + "ext-pdo": "Required to use all database features.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", + "fakerphp/faker": "Required to generate fake data using the fake() helper (^1.23).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.25.1).", + "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", + "mockery/mockery": "Required to use mocking (^1.6).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).", + "predis/predis": "Required to use the predis connector (^2.3|^3.0).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0|^1.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.2).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.2).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.2).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.2).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "12.x-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Collections/functions.php", + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Filesystem/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Log/functions.php", + "src/Illuminate/Reflection/helpers.php", + "src/Illuminate/Support/functions.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/", + "src/Illuminate/Reflection/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2026-06-04T14:22:52+00:00" + }, + { + "name": "laravel/prompts", + "version": "v0.3.18", + "source": { + "type": "git", + "url": "https://github.com/laravel/prompts.git", + "reference": "a19af51bb144bf87f08397921fa619f85c7d4e72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/prompts/zipball/a19af51bb144bf87f08397921fa619f85c7d4e72", + "reference": "a19af51bb144bf87f08397921fa619f85c7d4e72", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "ext-mbstring": "*", + "php": "^8.1", + "symfony/console": "^6.2|^7.0|^8.0" + }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, + "require-dev": { + "illuminate/collections": "^10.0|^11.0|^12.0|^13.0", + "mockery/mockery": "^1.5", + "pestphp/pest": "^2.3|^3.4|^4.0", + "phpstan/phpstan": "^1.12.28", + "phpstan/phpstan-mockery": "^1.1.3" + }, + "suggest": { + "ext-pcntl": "Required for the spinner to be animated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.3.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Prompts\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Add beautiful and user-friendly forms to your command-line applications.", + "support": { + "issues": "https://github.com/laravel/prompts/issues", + "source": "https://github.com/laravel/prompts/tree/v0.3.18" + }, + "time": "2026-05-19T00:47:18+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v4.3.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "2a9bccc18e9907808e0018dd15fa643937886b1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/2a9bccc18e9907808e0018dd15fa643937886b1e", + "reference": "2a9bccc18e9907808e0018dd15fa643937886b1e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^11.0|^12.0|^13.0", + "illuminate/contracts": "^11.0|^12.0|^13.0", + "illuminate/database": "^11.0|^12.0|^13.0", + "illuminate/support": "^11.0|^12.0|^13.0", + "php": "^8.2", + "symfony/console": "^7.0|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.6", + "orchestra/testbench": "^9.15|^10.8|^11.0", + "phpstan/phpstan": "^1.10" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2026-04-30T11:46:25+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v2.0.13", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "illuminate/support": "^10.0|^11.0|^12.0|^13.0", + "nesbot/carbon": "^2.67|^3.0", + "pestphp/pest": "^2.36|^3.0|^4.0", + "phpstan/phpstan": "^2.0", + "symfony/var-dumper": "^6.2.0|^7.0.0|^8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2026-04-16T14:03:50+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.11.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "c9f80cc835649b5c1842898fb043f8cc098dd741" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/c9f80cc835649b5c1842898fb043f8cc098dd741", + "reference": "c9f80cc835649b5c1842898fb043f8cc098dd741", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0|^8.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.8|^9.3.3|^10.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0)." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.11.1" + }, + "time": "2026-02-06T14:12:35+00:00" + }, + { + "name": "league/commonmark", + "version": "2.8.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "59fb075d2101740c337c7216e3f32b36c204218b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/59fb075d2101740c337c7216e3f32b36c204218b", + "reference": "59fb075d2101740c337c7216e3f32b36c204218b", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0 | ^7.0 || ^8.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0 || ^8.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0 || ^8.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0 || ^6.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.9-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2026-03-19T13:16:38+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" + }, + { + "name": "league/flysystem", + "version": "3.34.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e", + "reference": "2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e", + "shasum": "" + }, + "require": { + "league/flysystem-local": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "async-aws/core": "<1.19.0", + "async-aws/s3": "<1.14.0", + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", + "aws/aws-sdk-php": "^3.295.10", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-mongodb": "^1.3|^2", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", + "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2|^2", + "phpseclib/phpseclib": "^3.0.36", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.11|^10.0", + "sabre/dav": "^4.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.34.0" + }, + "time": "2026-05-14T10:28:08+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.31.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079", + "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.31.0" + }, + "time": "2026-01-23T15:30:45+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2024-09-21T08:32:55+00:00" + }, + { + "name": "league/uri", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/08cf38e3924d4f56238125547b5720496fac8fd4", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.8.1", + "php": "^8.1", + "psr/http-factory": "^1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-dom": "to convert the URI into an HTML anchor tag", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "ext-uri": "to use the PHP native URI class", + "jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain", + "league/uri-components": "to provide additional tools to manipulate URI objects components", + "league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP", + "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "URN", + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc2141", + "rfc3986", + "rfc3987", + "rfc6570", + "rfc8141", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2026-03-15T20:22:25+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/85d5c77c5d6d3af6c54db4a78246364908f3c928", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common tools for parsing and resolving RFC3987/RFC3986 URI", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2026-03-08T20:05:35+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0", + "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8 || ^2.0", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", + "predis/predis": "^1.1 || ^2", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.10.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2026-01-02T08:56:05+00:00" + }, + { + "name": "nesbot/carbon", + "version": "3.11.4", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon.git", + "reference": "e890471a3494740f7d9326d72ce6a8c559ffee60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/e890471a3494740f7d9326d72ce6a8c559ffee60", + "reference": "e890471a3494740f7d9326d72ce6a8c559ffee60", + "shasum": "" + }, + "require": { + "carbonphp/carbon-doctrine-types": "<100.0", + "ext-json": "*", + "php": "^8.1", + "psr/clock": "^1.0", + "symfony/clock": "^6.3.12 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0 || ^8.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^v3.87.1", + "kylekatarnls/multi-tester": "^2.5.3", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.22", + "phpunit/phpunit": "^10.5.53", + "squizlabs/php_codesniffer": "^3.13.4 || ^4.0.0" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbonphp.github.io/carbon/", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbonphp.github.io/carbon/guide/getting-started/introduction.html", + "issues": "https://github.com/CarbonPHP/carbon/issues", + "source": "https://github.com/CarbonPHP/carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2026-04-07T09:57:54+00:00" + }, + { + "name": "nette/schema", + "version": "v1.3.5", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/f0ab1a3cda782dbc5da270d28545236aa80c4002", + "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002", + "shasum": "" + }, + "require": { + "nette/utils": "^4.0", + "php": "8.1 - 8.5" + }, + "require-dev": { + "nette/phpstan-rules": "^1.0", + "nette/tester": "^2.6", + "phpstan/extension-installer": "^1.4@stable", + "phpstan/phpstan": "^2.1.39@stable", + "tracy/tracy": "^2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Nette\\": "src" + }, + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.3.5" + }, + "time": "2026-02-23T03:47:12+00:00" + }, + { + "name": "nette/utils", + "version": "v4.1.4", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/7da6c396d7ebe142bc857c20479d5e70a5e1aac7", + "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7", + "shasum": "" + }, + "require": { + "php": "8.2 - 8.5" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.2", + "nette/phpstan-rules": "^1.0", + "nette/tester": "^2.5", + "phpstan/extension-installer": "^1.4@stable", + "phpstan/phpstan": "^2.1@stable", + "tracy/tracy": "^2.9" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Nette\\": "src" + }, + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.1.4" + }, + "time": "2026-05-11T20:49:54+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.7.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + }, + "time": "2025-12-06T11:56:16+00:00" + }, + { + "name": "nunomaduro/termwind", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "712a31b768f5daea284c2169a7d227031001b9a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/712a31b768f5daea284c2169a7d227031001b9a8", + "reference": "712a31b768f5daea284c2169a7d227031001b9a8", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^8.2", + "symfony/console": "^7.4.4 || ^8.0.4" + }, + "require-dev": { + "illuminate/console": "^11.47.0", + "laravel/pint": "^1.27.1", + "mockery/mockery": "^1.6.12", + "pestphp/pest": "^2.36.0 || ^3.8.4 || ^4.3.2", + "phpstan/phpstan": "^1.12.32", + "phpstan/phpstan-strict-rules": "^1.6.2", + "symfony/var-dumper": "^7.3.5 || ^8.0.4", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Termwind\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "It's like Tailwind CSS, but for the console.", + "keywords": [ + "cli", + "console", + "css", + "package", + "php", + "style" + ], + "support": { + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2026-02-16T23:10:27+00:00" + }, + { + "name": "paragonie/constant_time_encoding", + "version": "v3.1.3", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", + "shasum": "" + }, + "require": { + "php": "^8" + }, + "require-dev": { + "infection/infection": "^0", + "nikic/php-fuzzer": "^0", + "phpunit/phpunit": "^9|^10|^11", + "vimeo/psalm": "^4|^5|^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2025-09-24T15:06:41+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.5", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.44 || ^9.6.25 || ^10.5.53 || ^11.5.34" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.5" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:41:33+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.52", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "2adaefc83df2ec548558307690f376dd7d4f4fce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2adaefc83df2ec548558307690f376dd7d4f4fce", + "reference": "2adaefc83df2ec548558307690f376dd7d4f4fce", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2|^3", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.52" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2026-04-27T07:02:15+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.12.23", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "4dcc0f08047d52bbde475eda481146fd8e27e1a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4dcc0f08047d52bbde475eda481146fd8e27e1a4", + "reference": "4dcc0f08047d52bbde475eda481146fd8e27e1a4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^8.0 || ^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^8.0 || ^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "composer/class-map-generator": "^1.6" + }, + "suggest": { + "composer/class-map-generator": "Improved tab completion performance with better class discovery.", + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": false + }, + "branch-alias": { + "dev-main": "0.12.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "https://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.12.23" + }, + "time": "2026-05-23T13:41:31+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "ramsey/collection", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.45", + "fakerphp/faker": "^1.24", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^2.1", + "mockery/mockery": "^1.6", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpspec/prophecy-phpunit": "^2.3", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5", + "ramsey/coding-standard": "^2.3", + "ramsey/conventional-commits": "^1.6", + "roave/security-advisories": "dev-latest" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.1.1" + }, + "time": "2025-03-22T05:38:12+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.9.2", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "8429c78ca35a09f27565311b98101e2826affde0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/8429c78ca35a09f27565311b98101e2826affde0", + "reference": "8429c78ca35a09f27565311b98101e2826affde0", + "shasum": "" + }, + "require": { + "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.25", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "ergebnis/composer-normalize": "^2.47", + "mockery/mockery": "^1.6", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.6", + "php-mock/php-mock-mockery": "^1.5", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpbench/phpbench": "^1.2.14", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6", + "slevomat/coding-standard": "^8.18", + "squizlabs/php_codesniffer": "^3.13" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.9.2" + }, + "time": "2025-12-14T04:43:48+00:00" + }, + { + "name": "symfony/clock", + "version": "v8.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "701ef4de9705d6c32292ebee5e8044094a09fbf6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/701ef4de9705d6c32292ebee5e8044094a09fbf6", + "reference": "701ef4de9705d6c32292ebee5e8044094a09fbf6", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v8.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-29T05:06:50+00:00" + }, + { + "name": "symfony/console", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "85095d2573eaefaf35e40b9513a9bf09f72cd217" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/85095d2573eaefaf35e40b9513a9bf09f72cd217", + "reference": "85095d2573eaefaf35e40b9513a9bf09f72cd217", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2|^8.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-24T08:56:14+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v8.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "dc0e2be45c9b5588c82414f02ac574b4b986abcd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/dc0e2be45c9b5588c82414f02ac574b4b986abcd", + "reference": "dc0e2be45c9b5588c82414f02ac574b4b986abcd", + "shasum": "" + }, + "require": { + "php": ">=8.4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v8.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-29T05:06:50+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-13T15:52:40+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v7.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa", + "reference": "8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/polyfill-php85": "^1.32", + "symfony/var-dumper": "^6.4|^7.0|^8.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/webpack-encore-bundle": "^1.0|^2.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v7.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-24T13:12:05+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v8.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "f249ae3f680958b6f1f9dd76e5747cf0695b4102" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f249ae3f680958b6f1f9dd76e5747cf0695b4102", + "reference": "f249ae3f680958b6f1f9dd76e5747cf0695b4102", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/security-http": "<7.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/framework-bundle": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v8.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-29T05:06:50+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-05T13:30:16+00:00" + }, + { + "name": "symfony/finder", + "version": "v7.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "e0be088d22278583a82da281886e8c3592fbf149" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/e0be088d22278583a82da281886e8c3592fbf149", + "reference": "e0be088d22278583a82da281886e8c3592fbf149", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-24T13:12:05+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "bc354f47c62301e990b7874fa662326368508e2c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/bc354f47c62301e990b7874fa662326368508e2c", + "reference": "bc354f47c62301e990b7874fa662326368508e2c", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "^1.1" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" + }, + "require-dev": { + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.4.12|^7.1.5|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/mime": "^6.4|^7.0|^8.0", + "symfony/rate-limiter": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-24T11:20:33+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "9df847980c436451f4f51d1284491bb4356dd989" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9df847980c436451f4f51d1284491bb4356dd989", + "reference": "9df847980c436451f4f51d1284491bb4356dd989", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^7.3|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/flex": "<2.10", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<6.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.12" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^6.4|^7.0|^8.0", + "symfony/clock": "^6.4|^7.0|^8.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/css-selector": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4.1|^7.0.1|^8.0", + "symfony/dom-crawler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^7.1|^8.0", + "symfony/routing": "^6.4|^7.0|^8.0", + "symfony/serializer": "^7.1|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^6.4|^7.0|^8.0", + "symfony/validator": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0", + "symfony/var-exporter": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-27T08:31:43+00:00" + }, + { + "name": "symfony/mailer", + "version": "v7.4.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailer.git", + "reference": "5cefb712a25f320579615ba9e1942abaeade7dff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailer/zipball/5cefb712a25f320579615ba9e1942abaeade7dff", + "reference": "5cefb712a25f320579615ba9e1942abaeade7dff", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.1.10|^3|^4", + "php": ">=8.2", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/mime": "^7.2|^8.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<6.4", + "symfony/messenger": "<6.4", + "symfony/mime": "<6.4", + "symfony/twig-bridge": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/twig-bridge": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v7.4.12" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-20T07:20:23+00:00" + }, + { + "name": "symfony/mime", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "a845722765c4f6b2ce88beaf4f4479975b186770" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/a845722765c4f6b2ce88beaf4f4479975b186770", + "reference": "a845722765c4f6b2ce88beaf4f4479975b186770", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/mailer": "<6.4", + "symfony/serializer": "<6.4.3|>7.0,<7.0.3" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1|^4", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-info": "^6.4|^7.0|^8.0", + "symfony/serializer": "^6.4.3|^7.0.3|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows manipulating MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "support": { + "source": "https://github.com/symfony/mime/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-23T16:22:37+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:19:22+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e9247d281d694a5120554d9afaf54e070e88a603", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T05:58:03+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "dc21118016c039a66235cf93d96b435ffb282412" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/dc21118016c039a66235cf93d96b435ffb282412", + "reference": "dc21118016c039a66235cf93d96b435ffb282412", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-25T15:22:23+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.38.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-25T13:48:31+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/14c5439eec4ccff081ac14eca2dc57feb2a66d92", + "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T12:51:13+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:19:22+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "8339098cae28673c15cce00d80734af0453054e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/8339098cae28673c15cce00d80734af0453054e2", + "reference": "8339098cae28673c15cce00d80734af0453054e2", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T12:51:13+00:00" + }, + { + "name": "symfony/polyfill-php84", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T12:51:13+00:00" + }, + { + "name": "symfony/polyfill-php85", + "version": "v1.38.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php85.git", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php85\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php85/tree/v1.38.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-26T02:25:22+00:00" + }, + { + "name": "symfony/polyfill-uuid", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "26dfec253c4cf3e51b541b52ddf7e42cb0908e94" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/26dfec253c4cf3e51b541b52ddf7e42cb0908e94", + "reference": "26dfec253c4cf3e51b541b52ddf7e42cb0908e94", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-uuid": "*" + }, + "suggest": { + "ext-uuid": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Uuid\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for uuid functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:19:22+00:00" + }, + { + "name": "symfony/process", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "f5804be144caceb570f6747519999636b664f24c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/f5804be144caceb570f6747519999636b664f24c", + "reference": "f5804be144caceb570f6747519999636b664f24c", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-23T16:05:06+00:00" + }, + { + "name": "symfony/routing", + "version": "v7.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "3a162171bb008e5e0f15dce6581373a4c0e8390d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/3a162171bb008e5e0f15dce6581373a4c0e8390d", + "reference": "3a162171bb008e5e0f15dce6581373a4c0e8390d", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v7.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-24T11:20:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-28T09:44:51+00:00" + }, + { + "name": "symfony/string", + "version": "v8.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "afd5944f4005862d961efb85c8bbd5c523c4e3c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/afd5944f4005862d961efb85c8bbd5c523c4e3c9", + "reference": "afd5944f4005862d961efb85c8bbd5c523c4e3c9", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-intl-grapheme": "^1.33", + "symfony/polyfill-intl-normalizer": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/intl": "^7.4|^8.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v8.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-29T05:06:50+00:00" + }, + { + "name": "symfony/translation", + "version": "v8.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "b2bd012ca28c4acae830ee1206a5b6e35dd99693" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/b2bd012ca28c4acae830ee1206a5b6e35dd99693", + "reference": "b2bd012ca28c4acae830ee1206a5b6e35dd99693", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation-contracts": "^3.6.1" + }, + "conflict": { + "nikic/php-parser": "<5.0", + "symfony/http-client-contracts": "<2.5", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "nikic/php-parser": "^5.0", + "psr/log": "^1|^2|^3", + "symfony/config": "^7.4|^8.0", + "symfony/console": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/finder": "^7.4|^8.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/intl": "^7.4|^8.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^7.4|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v8.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-29T05:06:50+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "0ab302977a952b42fd51475c4ebac81f8da0a95d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/0ab302977a952b42fd51475c4ebac81f8da0a95d", + "reference": "0ab302977a952b42fd51475c4ebac81f8da0a95d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-05T13:30:16+00:00" + }, + { + "name": "symfony/uid", + "version": "v7.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/uid.git", + "reference": "2676b524340abcfe4d6151ec698463cebafee439" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/uid/zipball/2676b524340abcfe4d6151ec698463cebafee439", + "reference": "2676b524340abcfe4d6151ec698463cebafee439", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-uuid": "^1.15" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Uid\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to generate and represent UIDs", + "homepage": "https://symfony.com", + "keywords": [ + "UID", + "ulid", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/uid/tree/v7.4.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-30T15:19:22+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v7.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "9510c3966f749a1d1ff0059e1eabef6cc621e7fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9510c3966f749a1d1ff0059e1eabef6cc621e7fd", + "reference": "9510c3966f749a1d1ff0059e1eabef6cc621e7fd", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", + "twig/twig": "^3.12" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-30T13:44:50+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "f0292ccf0ec75843d65027214426b6b163b48b41" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/f0292ccf0ec75843d65027214426b6b163b48b41", + "reference": "f0292ccf0ec75843d65027214426b6b163b48b41", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.4.0" + }, + "time": "2025-12-02T11:56:42+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.3", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "955e7815d677a3eaa7075231212f2110983adecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc", + "reference": "955e7815d677a3eaa7075231212f2110983adecc", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.4", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.5", + "symfony/polyfill-ctype": "^1.26", + "symfony/polyfill-mbstring": "^1.26", + "symfony/polyfill-php80": "^1.26" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:49:13+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "8e1051fe39379367aecf014f41744ce7539a856f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/8e1051fe39379367aecf014f41744ce7539a856f", + "reference": "8e1051fe39379367aecf014f41744ce7539a856f", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": "~8.5 || ~9.6 || ~10.5 || ~11.5" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "https://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2026-04-26T05:33:54+00:00" + } + ], + "packages-dev": [ + { + "name": "fakerphp/faker", + "version": "v1.24.1", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.24.1" + }, + "time": "2024-11-21T13:46:39+00:00" + }, + { + "name": "filp/whoops", + "version": "2.18.4", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/d2102955e48b9fd9ab24280a7ad12ed552752c4d", + "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.18.4" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2025-08-08T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" + }, + "time": "2025-04-30T06:54:44+00:00" + }, + { + "name": "laravel/pail", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/laravel/pail.git", + "reference": "2f7d27dada8effc48b8c424445a69cca7007daaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pail/zipball/2f7d27dada8effc48b8c424445a69cca7007daaa", + "reference": "2f7d27dada8effc48b8c424445a69cca7007daaa", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "illuminate/console": "^10.24|^11.0|^12.0|^13.0", + "illuminate/contracts": "^10.24|^11.0|^12.0|^13.0", + "illuminate/log": "^10.24|^11.0|^12.0|^13.0", + "illuminate/process": "^10.24|^11.0|^12.0|^13.0", + "illuminate/support": "^10.24|^11.0|^12.0|^13.0", + "nunomaduro/termwind": "^1.15|^2.0", + "php": "^8.2", + "symfony/console": "^6.0|^7.0|^8.0" + }, + "require-dev": { + "laravel/framework": "^10.24|^11.0|^12.0|^13.0", + "laravel/pint": "^1.13", + "orchestra/testbench-core": "^8.13|^9.17|^10.8|^11.0", + "pestphp/pest": "^2.20|^3.0|^4.0", + "pestphp/pest-plugin-type-coverage": "^2.3|^3.0|^4.0", + "phpstan/phpstan": "^1.12.27", + "symfony/var-dumper": "^6.3|^7.0|^8.0", + "symfony/yaml": "^6.3|^7.0|^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Pail\\PailServiceProvider" + ] + }, + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Pail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Easily delve into your Laravel application's log files directly from the command line.", + "homepage": "https://github.com/laravel/pail", + "keywords": [ + "dev", + "laravel", + "logs", + "php", + "tail" + ], + "support": { + "issues": "https://github.com/laravel/pail/issues", + "source": "https://github.com/laravel/pail" + }, + "time": "2026-05-20T22:24:57+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.29.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "0770e9b7fafd50d4586881d456d6eb41c9247a80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/0770e9b7fafd50d4586881d456d6eb41c9247a80", + "reference": "0770e9b7fafd50d4586881d456d6eb41c9247a80", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.95.1", + "illuminate/view": "^12.56.0", + "larastan/larastan": "^3.9.6", + "laravel-zero/framework": "^12.1.0", + "mockery/mockery": "^1.6.12", + "nunomaduro/termwind": "^2.4.0", + "pestphp/pest": "^3.8.6", + "shipfastlabs/agent-detector": "^1.1.3" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "dev", + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2026-04-20T15:26:14+00:00" + }, + { + "name": "laravel/sail", + "version": "v1.62.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e", + "reference": "3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e", + "shasum": "" + }, + "require": { + "illuminate/console": "^9.52.16|^10.0|^11.0|^12.0|^13.0", + "illuminate/contracts": "^9.52.16|^10.0|^11.0|^12.0|^13.0", + "illuminate/support": "^9.52.16|^10.0|^11.0|^12.0|^13.0", + "php": "^8.0", + "symfony/console": "^6.0|^7.0|^8.0", + "symfony/yaml": "^6.0|^7.0|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0|^11.0", + "phpstan/phpstan": "^2.0" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2026-05-27T04:02:01+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.6.12", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" + }, + "type": "library", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "time": "2024-05-16T03:13:13+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v8.9.4", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "716af8f95a470e9094cfca09ed897b023be191a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/716af8f95a470e9094cfca09ed897b023be191a5", + "reference": "716af8f95a470e9094cfca09ed897b023be191a5", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.18.4", + "nunomaduro/termwind": "^2.4.0", + "php": "^8.2.0", + "symfony/console": "^7.4.8 || ^8.0.8" + }, + "conflict": { + "laravel/framework": "<11.48.0 || >=14.0.0", + "phpunit/phpunit": "<11.5.50 || >=14.0.0" + }, + "require-dev": { + "brianium/paratest": "^7.8.5", + "larastan/larastan": "^3.9.6", + "laravel/framework": "^11.48.0 || ^12.56.0 || ^13.5.0", + "laravel/pint": "^1.29.1", + "orchestra/testbench-core": "^9.12.0 || ^10.12.1 || ^11.2.1", + "pestphp/pest": "^3.8.5 || ^4.4.3 || ^5.0.0", + "sebastian/environment": "^7.2.1 || ^8.0.4 || ^9.3.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" + } + }, + "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "dev", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2026-04-21T14:04:20+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2c1ed04922802c15e1de5d7447b4856de949cf56", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.7.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.1", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.3.1" + }, + "require-dev": { + "phpunit/phpunit": "^11.5.46" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.12" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" + } + ], + "time": "2025-12-24T07:01:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2f3a64888c814fc235386b7387dd5b5ed92ad903", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" + } + ], + "time": "2026-02-02T13:52:54+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.5.55", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/adc7262fccc12de2b30f12a8aa0b33775d814f00", + "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.12", + "phpunit/php-file-iterator": "^5.1.1", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.3", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.1", + "sebastian/exporter": "^6.3.2", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/recursion-context": "^6.0.3", + "sebastian/type": "^5.1.3", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.55" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2026-02-18T12:37:06+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-03-19T07:56:08+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2026-01-24T09:26:40+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" + } + ], + "time": "2025-05-21T11:55:47+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/70a298763b40b213ec087c51c739efcaa90bcd74", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:12:51+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-13T04:42:22+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" + } + ], + "time": "2025-08-09T06:55:48+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/yaml", + "version": "v8.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "efb42bd2c6f4f3ccfd4683583449938b5fc146b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/efb42bd2c6f4f3ccfd4683583449938b5fc146b0", + "reference": "efb42bd2c6f4f3ccfd4683583449938b5fc146b0", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<7.4" + }, + "require-dev": { + "symfony/console": "^7.4|^8.0", + "yaml/yaml-test-suite": "*" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v8.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-29T05:06:50+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-11-17T20:03:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.2" + }, + "platform-dev": {}, + "plugin-api-version": "2.9.0" +} diff --git a/config/app.php b/config/app.php new file mode 100644 index 0000000..0514046 --- /dev/null +++ b/config/app.php @@ -0,0 +1,132 @@ + env('APP_NAME', 'Ladill Frontdesk'), + + /* + |-------------------------------------------------------------------------- + | 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'), + ], + + // Platform identity surfaces (Zoho One model). Ladill Frontdesk (frontdesk.ladill.com). + 'platform_domain' => env('PLATFORM_DOMAIN', parse_url((string) env('PLATFORM_URL', 'https://ladill.com'), PHP_URL_HOST) ?: 'ladill.com'), + 'auth_domain' => env('AUTH_DOMAIN', 'auth.'.(parse_url((string) env('PLATFORM_URL', 'https://ladill.com'), PHP_URL_HOST) ?: 'ladill.com')), + 'account_domain' => env('ACCOUNT_DOMAIN', 'account.'.(parse_url((string) env('PLATFORM_URL', 'https://ladill.com'), PHP_URL_HOST) ?: 'ladill.com')), + 'frontdesk_domain' => env('FRONTDESK_DOMAIN', parse_url((string) env('APP_URL', 'https://frontdesk.ladill.com'), PHP_URL_HOST) ?: 'frontdesk.ladill.com'), + +]; diff --git a/config/arkesel.php b/config/arkesel.php new file mode 100644 index 0000000..b2dca9c --- /dev/null +++ b/config/arkesel.php @@ -0,0 +1,13 @@ + env('ARKESEL_API_KEY', ''), + 'sender_id' => env('ARKESEL_SENDER_ID', 'Ladill'), + 'base_url' => env('ARKESEL_BASE_URL', 'https://sms.arkesel.com'), + + // Default country code for normalising local numbers to E.164-without-plus. + 'default_country_code' => env('SMS_DEFAULT_COUNTRY_CODE', '233'), +]; diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 0000000..d7568ff --- /dev/null +++ b/config/auth.php @@ -0,0 +1,117 @@ + [ + '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', 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), + +]; diff --git a/config/billing.php b/config/billing.php new file mode 100644 index 0000000..6040264 --- /dev/null +++ b/config/billing.php @@ -0,0 +1,11 @@ + env('BILLING_API_URL', 'https://ladill.com/api/billing'), + 'api_key' => env('BILLING_API_KEY_FRONTDESK'), + 'service' => 'frontdesk', + 'wallet_balance_route' => 'frontdesk.wallet.balance', + 'currency' => 'GHS', +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 0000000..b32aead --- /dev/null +++ b/config/cache.php @@ -0,0 +1,117 @@ + 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", + | "failover", "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', + ], + + 'failover' => [ + 'driver' => 'failover', + 'stores' => [ + 'database', + 'array', + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | 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-'), + +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..7b97fd2 --- /dev/null +++ b/config/database.php @@ -0,0 +1,204 @@ + 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([ + (PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + // Read-only access to platform admin settings (Paystack keys, etc.). + 'platform' => [ + 'driver' => 'mysql', + 'host' => env('PLATFORM_DB_HOST', env('DB_HOST', '127.0.0.1')), + 'port' => env('PLATFORM_DB_PORT', env('DB_PORT', '3306')), + 'database' => env('PLATFORM_DB_DATABASE', 'ladilldb'), + 'username' => env('PLATFORM_DB_USERNAME', env('DB_USERNAME', 'root')), + 'password' => env('PLATFORM_DB_PASSWORD', env('DB_PASSWORD', '')), + 'unix_socket' => env('PLATFORM_DB_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([ + (PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : 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([ + (PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : 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' => env('DB_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', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'), + '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), + ], + + ], + +]; diff --git a/config/filesystems.php b/config/filesystems.php new file mode 100644 index 0000000..4ebaa0b --- /dev/null +++ b/config/filesystems.php @@ -0,0 +1,87 @@ + 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' => rtrim(env('APP_URL', 'http://localhost'), '/').'/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, + ], + + 'qr' => [ + 'driver' => 'local', + 'root' => storage_path('app/private/qr'), + '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'), + ], + +]; diff --git a/config/frontdesk.php b/config/frontdesk.php new file mode 100644 index 0000000..1653215 --- /dev/null +++ b/config/frontdesk.php @@ -0,0 +1,210 @@ + array_filter([ + 'pos' => env('FRONTDESK_API_KEY_POS'), + 'crm' => env('FRONTDESK_API_KEY_CRM'), + 'care' => env('FRONTDESK_API_KEY_CARE'), + 'lab' => env('FRONTDESK_API_KEY_LAB'), + ]), + + 'visitor_types' => [ + 'visitor' => 'Visitor', + 'contractor' => 'Contractor', + 'vendor' => 'Vendor', + 'interview_candidate' => 'Interview Candidate', + 'delivery' => 'Delivery Personnel', + ], + + 'visit_statuses' => [ + 'scheduled' => 'Scheduled', + 'expected' => 'Expected', + 'waiting' => 'Waiting', + 'checked_in' => 'Checked In', + 'checked_out' => 'Checked Out', + 'cancelled' => 'Cancelled', + 'overdue' => 'Overdue', + ], + + 'watchlist_statuses' => [ + 'allowed' => 'Allowed', + 'requires_approval' => 'Requires Approval', + 'blacklisted' => 'Blacklisted', + ], + + 'audit_actions' => [ + 'visit.checked_in' => 'Visit checked in', + 'visit.checked_out' => 'Visit checked out', + 'visit.awaiting_approval' => 'Visit awaiting approval', + 'visit.scheduled' => 'Visit scheduled', + 'visit.waiting' => 'Visitor waiting', + 'visit.cancelled' => 'Visit cancelled', + 'visit.deleted' => 'Visit archived', + 'visit.restored' => 'Visit restored', + 'visitor.deleted' => 'Visitor archived', + 'visitor.restored' => 'Visitor restored', + 'watchlist.blocked_attempt' => 'Blocked check-in attempt', + 'watchlist.flagged_checkin' => 'Flagged visitor check-in', + 'watchlist.entry_created' => 'Watchlist entry added', + 'watchlist.entry_removed' => 'Watchlist entry removed', + 'badge.expired' => 'Badge expired', + ], + + 'roles' => [ + 'super_admin' => 'Super Administrator', + 'org_admin' => 'Organization Administrator', + 'branch_admin' => 'Branch Administrator', + 'receptionist' => 'Receptionist', + 'security_officer' => 'Security Officer', + 'host' => 'Host', + 'auditor' => 'Auditor', + ], + + 'device_types' => [ + 'reception_computer' => 'Reception Computer', + 'kiosk' => 'Visitor Kiosk', + 'tablet' => 'Tablet', + 'badge_printer' => 'Badge Printer', + 'qr_scanner' => 'QR Scanner', + 'camera' => 'Camera', + 'signature_pad' => 'Signature Pad', + ], + + 'notification_channels' => [ + 'email' => 'Email', + 'sms' => 'SMS', + 'push' => 'Push Notification', + 'teams' => 'Microsoft Teams', + 'slack' => 'Slack', + ], + + 'notification_events' => [ + 'visitor_arrived' => 'Visitor arrived (checked in)', + 'visitor_checked_out' => 'Visitor checked out', + 'visitor_expected' => 'Visitor expected today', + 'visitor_waiting' => 'Visitor waiting in reception', + 'visit_cancelled' => 'Visit cancelled', + 'approval_needed' => 'Approval required', + 'watchlist_alert' => 'Watchlist / security alerts', + 'badge_expired' => 'Expired badge while checked in', + ], + + 'default_notification_events' => [ + 'visitor_arrived' => true, + 'visitor_checked_out' => true, + 'visitor_expected' => true, + 'visitor_waiting' => true, + 'visit_cancelled' => true, + 'approval_needed' => true, + 'watchlist_alert' => true, + 'badge_expired' => true, + ], + + 'kiosk' => [ + 'inactivity_reset_seconds' => (int) env('FRONTDESK_KIOSK_RESET_SECONDS', 120), + 'default_visit_duration_minutes' => 60, + ], + + 'badge' => [ + 'default_expiry_hours' => 8, + 'qr_url_path' => '/q', + ], + + 'default_badge_template' => [ + 'show_photo' => true, + 'show_qr' => true, + 'show_host' => true, + 'show_company' => true, + 'show_type' => true, + 'primary_color' => '#0d9488', + 'footer_text' => '', + ], + + 'webhook_events' => [ + 'visit.checked_in', + 'visit.checked_out', + 'visit.awaiting_approval', + ], + + 'integrations' => [ + 'care' => 'Ladill Care', + 'lab' => 'Ladill Lab', + 'pos' => 'Ladill POS', + 'crm' => 'Ladill CRM', + ], + + 'printers' => [ + 'default_driver' => env('FRONTDESK_PRINTER_DRIVER', 'pdf'), + 'drivers' => ['pdf', 'zebra', 'brother', 'dymo'], + ], + + /* + |-------------------------------------------------------------------------- + | Visitor type workflows (Phase 4) + |-------------------------------------------------------------------------- + | Config-driven fields, badge expiry overrides, and approval requirements. + */ + 'visitor_type_config' => [ + 'visitor' => [ + 'requires_approval' => false, + 'badge_expiry_hours' => null, + 'details_key' => null, + 'fields' => [], + ], + 'contractor' => [ + 'requires_approval' => false, + 'badge_expiry_hours' => 12, + 'details_key' => 'contractor_details', + 'fields' => [ + ['name' => 'contract_company', 'label' => 'Contract company', 'type' => 'text', 'required' => true], + ['name' => 'supervisor', 'label' => 'Site supervisor', 'type' => 'text', 'required' => true], + ['name' => 'contract_start', 'label' => 'Contract start', 'type' => 'date', 'required' => false], + ['name' => 'contract_end', 'label' => 'Contract end', 'type' => 'date', 'required' => false], + ['name' => 'safety_induction_completed', 'label' => 'Safety induction completed', 'type' => 'checkbox', 'required' => true], + ['name' => 'insurance_reference', 'label' => 'Insurance reference', 'type' => 'text', 'required' => false], + ['name' => 'permit_number', 'label' => 'Permit number', 'type' => 'text', 'required' => false], + ['name' => 'equipment_carried', 'label' => 'Equipment carried', 'type' => 'textarea', 'required' => false], + ], + ], + 'delivery' => [ + 'requires_approval' => false, + 'badge_expiry_hours' => 2, + 'details_key' => 'delivery_details', + 'fields' => [ + ['name' => 'courier_company', 'label' => 'Courier company', 'type' => 'text', 'required' => true], + ['name' => 'recipient', 'label' => 'Recipient', 'type' => 'text', 'required' => true], + ['name' => 'tracking_number', 'label' => 'Tracking number', 'type' => 'text', 'required' => false], + ['name' => 'package_description', 'label' => 'Package description', 'type' => 'text', 'required' => false], + ['name' => 'delivery_photo', 'label' => 'Delivery photo', 'type' => 'photo', 'required' => false], + ['name' => 'delivery_signature', 'label' => 'Signature', 'type' => 'signature', 'required' => false], + ], + ], + 'vendor' => [ + 'requires_approval' => true, + 'badge_expiry_hours' => null, + 'details_key' => 'contractor_details', + 'fields' => [ + ['name' => 'vendor_company', 'label' => 'Vendor company', 'type' => 'text', 'required' => true], + ['name' => 'service_type', 'label' => 'Service / product', 'type' => 'text', 'required' => true], + ['name' => 'purchase_order', 'label' => 'PO number', 'type' => 'text', 'required' => false], + ], + ], + 'interview_candidate' => [ + 'requires_approval' => true, + 'badge_expiry_hours' => null, + 'details_key' => 'contractor_details', + 'fields' => [ + ['name' => 'position_applied', 'label' => 'Position applied for', 'type' => 'text', 'required' => true], + ['name' => 'interviewer', 'label' => 'Interviewer', 'type' => 'text', 'required' => false], + ['name' => 'scheduled_interview_at', 'label' => 'Interview time', 'type' => 'datetime-local', 'required' => false], + ], + ], + ], + +]; diff --git a/config/identity.php b/config/identity.php new file mode 100644 index 0000000..2ed1345 --- /dev/null +++ b/config/identity.php @@ -0,0 +1,7 @@ + env('IDENTITY_API_URL', 'https://ladill.com/api'), + 'api_key' => env('IDENTITY_API_KEY_FRONTDESK'), +]; diff --git a/config/ladill.php b/config/ladill.php new file mode 100644 index 0000000..4a9a4fd --- /dev/null +++ b/config/ladill.php @@ -0,0 +1,6 @@ + 'frontdesk', + 'marketing_url' => env('LADILL_MARKETING_URL', 'https://ladill.com/products/frontdesk'), +]; diff --git a/config/ladill_launcher.php b/config/ladill_launcher.php new file mode 100644 index 0000000..db8daed --- /dev/null +++ b/config/ladill_launcher.php @@ -0,0 +1,40 @@ +. +*/ + +$root = config('app.platform_domain', 'ladill.com'); + +return [ + 'apps' => [ + ['name' => 'Merchant', 'url' => 'https://merchant.'.$root.'/sso/connect?redirect='.urlencode('https://merchant.'.$root.'/dashboard'), 'icon' => 'merchant.svg'], + ['name' => 'POS', 'url' => 'https://pos.'.$root.'/sso/connect?redirect='.urlencode('https://pos.'.$root.'/dashboard'), 'icon' => 'pos.svg'], + ['name' => 'Mini', 'url' => 'https://mini.'.$root.'/sso/connect?redirect='.urlencode('https://mini.'.$root.'/dashboard'), 'icon' => 'mini.svg'], + ['name' => 'Give', 'url' => 'https://give.'.$root.'/sso/connect?redirect='.urlencode('https://give.'.$root.'/dashboard'), 'icon' => 'give.svg'], + ['name' => 'Transfer', 'url' => 'https://transfer.'.$root.'/sso/connect?redirect='.urlencode('https://transfer.'.$root.'/dashboard'), 'icon' => 'transfer.svg'], + ['name' => 'Accounting', 'url' => 'https://accounting.'.$root.'/sso/connect?redirect='.urlencode('https://accounting.'.$root.'/dashboard'), 'icon' => 'accounting.svg'], + ['name' => 'Invoice', 'url' => 'https://invoice.'.$root.'/sso/connect?redirect='.urlencode('https://invoice.'.$root.'/dashboard'), 'icon' => 'invoice.svg'], + ['name' => 'CRM', 'url' => 'https://crm.'.$root.'/sso/connect?redirect='.urlencode('https://crm.'.$root.'/dashboard'), 'icon' => 'crm.svg'], + ['name' => 'Events', 'url' => 'https://events.'.$root.'/sso/connect?redirect='.urlencode('https://events.'.$root.'/dashboard'), 'icon' => 'events.svg'], + ['name' => 'QR Plus', 'url' => 'https://qrplus.'.$root.'/sso/connect?redirect='.urlencode('https://qrplus.'.$root.'/dashboard'), 'icon' => 'qrplus.svg'], + ['name' => 'Link', 'url' => 'https://link.'.$root.'/sso/connect?redirect='.urlencode('https://link.'.$root.'/dashboard'), 'icon' => 'link.svg'], + ['name' => 'SMS', 'url' => 'https://sms.'.$root, 'icon' => 'sms.svg'], + ['name' => 'Bird', 'url' => 'https://bird.'.$root, 'icon' => 'bird.svg'], + ['name' => 'Mail', 'url' => 'https://mail.'.$root, 'icon' => 'mail.svg'], + ['name' => 'Email', 'url' => 'https://email.'.$root, 'icon' => 'email.svg'], + ['name' => 'Domains', 'url' => 'https://domains.'.$root, 'icon' => 'domains.svg'], + ['name' => 'Servers', 'url' => 'https://servers.'.$root, 'icon' => 'servers.svg'], + ['name' => 'Hosting', 'url' => 'https://hosting.'.$root, 'icon' => 'hosting.svg'], + ], +]; diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 0000000..b09cb25 --- /dev/null +++ b/config/logging.php @@ -0,0 +1,132 @@ + 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', env('APP_NAME', 'Laravel')), + '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'), + ], + + ], + +]; diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 0000000..4df3820 --- /dev/null +++ b/config/mail.php @@ -0,0 +1,132 @@ + $mailScheme, + $mailScheme !== '' => null, + in_array($mailEncryption, ['ssl', 'smtps'], true) => 'smtps', + in_array($mailEncryption, ['tls', 'starttls', 'smtp'], true) => 'smtp', + default => null, +}; + +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' => $smtpScheme, + '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', env('APP_NAME', 'Laravel')), + ], + +]; diff --git a/config/queue.php b/config/queue.php new file mode 100644 index 0000000..79c2c0a --- /dev/null +++ b/config/queue.php @@ -0,0 +1,129 @@ + 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", + | "deferred", "background", "failover", "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, + ], + + 'deferred' => [ + 'driver' => 'deferred', + ], + + 'background' => [ + 'driver' => 'background', + ], + + 'failover' => [ + 'driver' => 'failover', + 'connections' => [ + 'database', + 'deferred', + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | 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', + ], + +]; diff --git a/config/services.php b/config/services.php new file mode 100644 index 0000000..d05610e --- /dev/null +++ b/config/services.php @@ -0,0 +1,44 @@ + [ + 'issuer' => 'https://'.config('app.auth_domain'), + 'client_id' => env('LADILL_SSO_CLIENT_ID'), + 'client_secret' => env('LADILL_SSO_CLIENT_SECRET'), + 'redirect' => rtrim((string) env('APP_URL', 'https://frontdesk.ladill.com'), '/').'/sso/callback', + ], + + // Central Ladill identity API (auth.ladill.com /api/identity/auth/*), + // gated by the shared first-party service key. + 'ladill_identity' => [ + 'url' => 'https://'.config('app.auth_domain'), + 'key' => env('IDENTITY_API_KEY_FRONTDESK'), + ], + + // Outbound SMS to contacts uses Arkesel (the platform provider) — see + // config/arkesel.php and App\Services\Comms\SmsService. + + 'slack' => [ + 'notifications' => [ + 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), + 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), + ], + ], + +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..5b541b7 --- /dev/null +++ b/config/session.php @@ -0,0 +1,217 @@ + 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((string) 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 without 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), + +]; diff --git a/config/signed_out.php b/config/signed_out.php new file mode 100644 index 0000000..60926c5 --- /dev/null +++ b/config/signed_out.php @@ -0,0 +1,7 @@ + 'Ladill Frontdesk', + 'logo' => 'images/logo/ladillfrontdesk-logo.svg', + 'description' => 'Your Ladill Frontdesk session has ended. Sign in again to manage visitors and reception.', +]; diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 0000000..9b19b93 --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +*.sqlite* diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php new file mode 100644 index 0000000..a138076 --- /dev/null +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -0,0 +1,52 @@ +id(); + $table->uuid('public_id')->unique(); + $table->string('name')->nullable(); + $table->string('email')->unique(); + $table->string('avatar_url')->nullable(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password')->nullable(); + $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'); + } +}; diff --git a/database/migrations/0001_01_01_000001_create_cache_table.php b/database/migrations/0001_01_01_000001_create_cache_table.php new file mode 100644 index 0000000..ed758bd --- /dev/null +++ b/database/migrations/0001_01_01_000001_create_cache_table.php @@ -0,0 +1,35 @@ +string('key')->primary(); + $table->mediumText('value'); + $table->integer('expiration')->index(); + }); + + Schema::create('cache_locks', function (Blueprint $table) { + $table->string('key')->primary(); + $table->string('owner'); + $table->integer('expiration')->index(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cache'); + Schema::dropIfExists('cache_locks'); + } +}; diff --git a/database/migrations/0001_01_01_000002_create_jobs_table.php b/database/migrations/0001_01_01_000002_create_jobs_table.php new file mode 100644 index 0000000..425e705 --- /dev/null +++ b/database/migrations/0001_01_01_000002_create_jobs_table.php @@ -0,0 +1,57 @@ +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'); + } +}; diff --git a/database/migrations/2026_06_27_100000_create_frontdesk_core_tables.php b/database/migrations/2026_06_27_100000_create_frontdesk_core_tables.php new file mode 100644 index 0000000..8aae97a --- /dev/null +++ b/database/migrations/2026_06_27_100000_create_frontdesk_core_tables.php @@ -0,0 +1,207 @@ +id(); + $table->string('owner_ref')->index(); + $table->string('name'); + $table->string('slug')->index(); + $table->string('logo_path')->nullable(); + $table->string('timezone')->default('UTC'); + $table->json('settings')->nullable(); + $table->timestamps(); + $table->softDeletes(); + $table->unique(['owner_ref', 'slug']); + }); + + Schema::create('frontdesk_branches', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->string('name'); + $table->string('code')->nullable(); + $table->string('address')->nullable(); + $table->string('phone')->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('frontdesk_buildings', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('branch_id')->constrained('frontdesk_branches')->cascadeOnDelete(); + $table->string('name'); + $table->string('floor_count')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('frontdesk_reception_desks', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('building_id')->constrained('frontdesk_buildings')->cascadeOnDelete(); + $table->string('name'); + $table->string('location')->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('frontdesk_members', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->string('user_ref')->index(); // Ladill public_id + $table->string('role'); // super_admin, org_admin, branch_admin, receptionist, security_officer, host, auditor + $table->foreignId('branch_id')->nullable()->constrained('frontdesk_branches')->nullOnDelete(); + $table->timestamps(); + $table->unique(['organization_id', 'user_ref']); + }); + + Schema::create('frontdesk_hosts', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->foreignId('branch_id')->nullable()->constrained('frontdesk_branches')->nullOnDelete(); + $table->string('name'); + $table->string('department')->nullable(); + $table->string('office')->nullable(); + $table->string('phone')->nullable(); + $table->string('email')->nullable(); + $table->string('extension')->nullable(); + $table->boolean('is_available')->default(true); + $table->string('user_ref')->nullable()->index(); // linked Ladill user if host has account + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('frontdesk_visitors', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->string('full_name'); + $table->string('company')->nullable(); + $table->string('phone')->nullable(); + $table->string('email')->nullable(); + $table->string('photo_path')->nullable(); + $table->string('id_document_path')->nullable(); + $table->string('watchlist_status')->default('allowed'); // allowed, requires_approval, blacklisted + $table->text('notes')->nullable(); + $table->unsignedInteger('visit_count')->default(0); + $table->boolean('is_frequent')->default(false); + $table->timestamps(); + $table->softDeletes(); + $table->index(['owner_ref', 'full_name']); + $table->index(['owner_ref', 'phone']); + $table->index(['owner_ref', 'email']); + }); + + Schema::create('frontdesk_visits', function (Blueprint $table) { + $table->id(); + $table->uuid('public_id')->unique(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->foreignId('branch_id')->nullable()->constrained('frontdesk_branches')->nullOnDelete(); + $table->foreignId('reception_desk_id')->nullable()->constrained('frontdesk_reception_desks')->nullOnDelete(); + $table->foreignId('visitor_id')->constrained('frontdesk_visitors')->cascadeOnDelete(); + $table->foreignId('host_id')->nullable()->constrained('frontdesk_hosts')->nullOnDelete(); + $table->string('visitor_type'); // visitor, contractor, vendor, interview_candidate, delivery + $table->string('status')->default('expected'); // scheduled, expected, waiting, checked_in, checked_out, cancelled, overdue + $table->string('purpose')->nullable(); + $table->unsignedInteger('expected_duration_minutes')->nullable(); + $table->timestamp('scheduled_at')->nullable(); + $table->timestamp('checked_in_at')->nullable(); + $table->timestamp('checked_out_at')->nullable(); + $table->timestamp('badge_expires_at')->nullable(); + $table->string('badge_code')->nullable()->index(); + $table->string('qr_token')->nullable()->unique(); + $table->string('photo_path')->nullable(); + $table->string('signature_path')->nullable(); + $table->boolean('policies_accepted')->default(false); + $table->json('vehicle_info')->nullable(); + $table->json('contractor_details')->nullable(); + $table->json('delivery_details')->nullable(); + $table->json('allowed_areas')->nullable(); + $table->text('notes')->nullable(); + $table->string('checked_in_by')->nullable(); // user_ref of receptionist + $table->string('checked_out_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + $table->index(['owner_ref', 'status']); + $table->index(['owner_ref', 'checked_in_at']); + }); + + Schema::create('frontdesk_devices', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->foreignId('branch_id')->nullable()->constrained('frontdesk_branches')->nullOnDelete(); + $table->foreignId('reception_desk_id')->nullable()->constrained('frontdesk_reception_desks')->nullOnDelete(); + $table->string('name'); + $table->string('type'); // reception_computer, kiosk, tablet, badge_printer, etc. + $table->string('status')->default('offline'); // online, offline, maintenance + $table->string('device_token')->nullable()->unique(); + $table->json('config')->nullable(); + $table->timestamp('last_online_at')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('frontdesk_watchlist_entries', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->foreignId('visitor_id')->nullable()->constrained('frontdesk_visitors')->nullOnDelete(); + $table->string('full_name')->nullable(); + $table->string('company')->nullable(); + $table->string('status'); // allowed, requires_approval, blacklisted + $table->text('reason')->nullable(); + $table->string('created_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('frontdesk_audit_logs', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->nullable()->constrained('frontdesk_organizations')->nullOnDelete(); + $table->string('actor_ref')->nullable(); + $table->string('action'); + $table->string('subject_type')->nullable(); + $table->unsignedBigInteger('subject_id')->nullable(); + $table->json('metadata')->nullable(); + $table->string('ip_address')->nullable(); + $table->timestamps(); + $table->index(['owner_ref', 'created_at']); + }); + } + + public function down(): void + { + Schema::dropIfExists('frontdesk_audit_logs'); + Schema::dropIfExists('frontdesk_watchlist_entries'); + Schema::dropIfExists('frontdesk_devices'); + Schema::dropIfExists('frontdesk_visits'); + Schema::dropIfExists('frontdesk_visitors'); + Schema::dropIfExists('frontdesk_hosts'); + Schema::dropIfExists('frontdesk_members'); + Schema::dropIfExists('frontdesk_reception_desks'); + Schema::dropIfExists('frontdesk_buildings'); + Schema::dropIfExists('frontdesk_branches'); + Schema::dropIfExists('frontdesk_organizations'); + } +}; diff --git a/database/migrations/2026_06_27_120000_create_notifications_table.php b/database/migrations/2026_06_27_120000_create_notifications_table.php new file mode 100644 index 0000000..52e3b00 --- /dev/null +++ b/database/migrations/2026_06_27_120000_create_notifications_table.php @@ -0,0 +1,25 @@ +uuid('id')->primary(); + $table->string('type'); + $table->morphs('notifiable'); + $table->text('data'); + $table->timestamp('read_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('notifications'); + } +}; diff --git a/database/migrations/2026_06_27_130000_add_integration_fields_to_visits.php b/database/migrations/2026_06_27_130000_add_integration_fields_to_visits.php new file mode 100644 index 0000000..da936f1 --- /dev/null +++ b/database/migrations/2026_06_27_130000_add_integration_fields_to_visits.php @@ -0,0 +1,50 @@ +string('external_ref')->nullable()->after('public_id'); + $table->string('source')->nullable()->after('external_ref'); + $table->json('integration_metadata')->nullable()->after('notes'); + $table->index(['organization_id', 'external_ref', 'source']); + }); + + Schema::create('frontdesk_webhook_endpoints', function (Blueprint $table) { + $table->id(); + $table->string('owner_ref')->index(); + $table->foreignId('organization_id')->constrained('frontdesk_organizations')->cascadeOnDelete(); + $table->string('url'); + $table->string('secret')->nullable(); + $table->json('events')->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamps(); + }); + + Schema::create('frontdesk_offline_checkins', function (Blueprint $table) { + $table->id(); + $table->foreignId('device_id')->nullable()->constrained('frontdesk_devices')->nullOnDelete(); + $table->string('client_id')->unique(); + $table->json('payload'); + $table->timestamp('synced_at')->nullable(); + $table->foreignId('visit_id')->nullable()->constrained('frontdesk_visits')->nullOnDelete(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('frontdesk_offline_checkins'); + Schema::dropIfExists('frontdesk_webhook_endpoints'); + + Schema::table('frontdesk_visits', function (Blueprint $table) { + $table->dropIndex(['organization_id', 'external_ref', 'source']); + $table->dropColumn(['external_ref', 'source', 'integration_metadata']); + }); + } +}; diff --git a/deploy/bin/ladill-hosting-admin b/deploy/bin/ladill-hosting-admin new file mode 100755 index 0000000..88b5ff1 --- /dev/null +++ b/deploy/bin/ladill-hosting-admin @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +set -euo pipefail + +usage() { + cat <<'EOF' >&2 +Usage: + ladill-hosting-admin self-check + ladill-hosting-admin mkdir + ladill-hosting-admin chown + ladill-hosting-admin chmod + ladill-hosting-admin write-file + ladill-hosting-admin symlink + ladill-hosting-admin nginx-test + ladill-hosting-admin reload-nginx + ladill-hosting-admin certbot-webroot + ladill-hosting-admin certbot-renew + ladill-hosting-admin run-cmd + ladill-hosting-admin read-file +EOF + exit 64 +} + +require_abs_path() { + local path="${1:-}" + + if [[ -z "$path" || "${path#/}" == "$path" ]]; then + echo "Expected an absolute path, got: $path" >&2 + exit 64 + fi +} + +ensure_domain() { + local value="${1:-}" + + if [[ ! "$value" =~ ^[A-Za-z0-9.-]+$ ]]; then + echo "Invalid domain: $value" >&2 + exit 64 + fi +} + +ensure_owner_group() { + local value="${1:-}" + + if [[ ! "$value" =~ ^[A-Za-z_][A-Za-z0-9_-]*:[A-Za-z_][A-Za-z0-9_-]*$ ]]; then + echo "Invalid owner:group value: $value" >&2 + exit 64 + fi +} + +ensure_mode() { + local value="${1:-}" + + if [[ ! "$value" =~ ^[0-7]{3,4}$ && ! "$value" =~ ^[ugoa,+-=rwxX]+$ ]]; then + echo "Invalid chmod mode: $value" >&2 + exit 64 + fi +} + +command="${1:-}" + +case "$command" in + self-check) + exit 0 + ;; + mkdir) + [[ $# -eq 2 ]] || usage + require_abs_path "$2" + exec mkdir -p "$2" + ;; + chown) + [[ $# -eq 3 ]] || usage + ensure_owner_group "$2" + require_abs_path "$3" + exec chown -R "$2" "$3" + ;; + chmod) + [[ $# -eq 3 ]] || usage + ensure_mode "$2" + require_abs_path "$3" + exec chmod "$2" "$3" + ;; + write-file) + [[ $# -eq 3 ]] || usage + require_abs_path "$2" + tmpfile="$(mktemp)" + trap 'rm -f "$tmpfile"' EXIT + printf '%s' "$3" | base64 --decode > "$tmpfile" + install -m 0644 "$tmpfile" "$2" + rm -f "$tmpfile" + trap - EXIT + ;; + symlink) + [[ $# -eq 3 ]] || usage + require_abs_path "$2" + require_abs_path "$3" + exec ln -sfn "$2" "$3" + ;; + nginx-test) + exec nginx -t + ;; + reload-nginx) + exec systemctl reload nginx + ;; + certbot-webroot) + [[ $# -eq 4 ]] || usage + ensure_domain "$3" + require_abs_path "$4" + exec certbot certonly --webroot --non-interactive --agree-tos --no-eff-email -m "$2" -w "$4" -d "$3" -d "www.$3" + ;; + certbot-renew) + exec certbot renew --quiet --no-random-sleep-on-renew + ;; + run-cmd) + [[ $# -ge 2 ]] || usage + shift + exec bash -c "$*" + ;; + read-file) + [[ $# -eq 2 ]] || usage + require_abs_path "$2" + exec cat "$2" + ;; + *) + usage + ;; +esac diff --git a/deploy/bin/ladill-hosting-user b/deploy/bin/ladill-hosting-user new file mode 100755 index 0000000..bc3a45a --- /dev/null +++ b/deploy/bin/ladill-hosting-user @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail + +usage() { + echo "Usage: ladill-hosting-user " >&2 + exit 64 +} + +[[ $# -eq 2 ]] || usage + +username="$1" +payload_b64="$2" + +if [[ ! "$username" =~ ^[A-Za-z_][A-Za-z0-9_-]*$ ]]; then + echo "Invalid username: $username" >&2 + exit 64 +fi + +command="$(printf '%s' "$payload_b64" | base64 --decode)" + +exec runuser -u "$username" -- bash -lc "$command" diff --git a/deploy/deploy.sh b/deploy/deploy.sh new file mode 100755 index 0000000..abca0d8 --- /dev/null +++ b/deploy/deploy.sh @@ -0,0 +1,296 @@ +#!/usr/bin/env bash +# Fast on-host release deploy (same model as climpme/web/deploy/deploy.sh). +set -Eeuo pipefail + +APP_ROOT="${LADILL_APP_ROOT:-/var/www/ladill-frontdesk}" +RELEASES_DIR="$APP_ROOT/releases" +SHARED_DIR="$APP_ROOT/shared" +CURRENT_LINK="$APP_ROOT/current" +RELEASE_ARCHIVE="${LADILL_RELEASE_ARCHIVE:-/tmp/ladill-release.tgz}" +KEEP_RELEASES="${LADILL_KEEP_RELEASES:-5}" + +STAMP="$(date +%Y%m%d%H%M%S)" +NEW_RELEASE="$RELEASES_DIR/$STAMP" + +log() { + printf '[%s] %s\n' "$(date '+%F %T')" "$*" +} + +bootstrap_shared_env() { + local candidate="" + + if [ -f "$SHARED_DIR/.env" ]; then + return 0 + fi + + for candidate in "$CURRENT_LINK/.env" "$APP_ROOT/.env"; do + if [ -f "$candidate" ]; then + cp -fL "$candidate" "$SHARED_DIR/.env" + log "Bootstrapped shared .env from $candidate" + return 0 + fi + done + + return 1 +} + +ensure_writable_paths() { + local paths=("$@") + + [ "${#paths[@]}" -gt 0 ] || return 0 + + chmod -R ug+rwX "${paths[@]}" 2>/dev/null || true + + if command -v find >/dev/null 2>&1; then + find "${paths[@]}" -type d -exec chmod ug+rwx {} + 2>/dev/null || true + find "${paths[@]}" -type d -exec chmod g+s {} + 2>/dev/null || true + fi +} + +normalize_shared_permissions() { + local owner="${LADILL_DEPLOY_USER:-deploy}" + local group="${LADILL_DEPLOY_GROUP:-www-data}" + local shared_paths=("$SHARED_DIR/storage" "$SHARED_DIR/bootstrap-cache") + + id -u "$owner" >/dev/null 2>&1 || return 0 + getent group "$group" >/dev/null 2>&1 || return 0 + + if chown -R "$owner:$group" "${shared_paths[@]}" 2>/dev/null; then + : + elif command -v sudo >/dev/null 2>&1; then + sudo -n chown -R "$owner:$group" "${shared_paths[@]}" 2>/dev/null || true + fi + + ensure_writable_paths "${shared_paths[@]}" +} + +run_artisan() { + local command="$1" + + if [ -f "$NEW_RELEASE/artisan" ]; then + (cd "$NEW_RELEASE" && php artisan ${command}) + fi +} + +uses_sqlite() { + [ -f "$SHARED_DIR/.env" ] && grep -Eq '^DB_CONNECTION=sqlite([[:space:]]*)$' "$SHARED_DIR/.env" +} + +sqlite_database_setting() { + [ -f "$SHARED_DIR/.env" ] || return 1 + + grep -E '^DB_DATABASE=' "$SHARED_DIR/.env" | tail -n 1 | cut -d= -f2- | sed -e 's/^"//' -e 's/"$//' -e "s/^'//" -e "s/'$//" +} + +prepare_sqlite_database() { + local configured_path="" + local db_name="" + local shared_sqlite_path="" + local current_sqlite_path="" + local release_sqlite_path="" + + configured_path="$(sqlite_database_setting || true)" + [ -n "$configured_path" ] || configured_path="database/database.sqlite" + + if [[ "$configured_path" = /* ]]; then + shared_sqlite_path="$configured_path" + mkdir -p "$(dirname "$shared_sqlite_path")" + else + db_name="$(basename "$configured_path")" + shared_sqlite_path="$SHARED_DIR/database/$db_name" + current_sqlite_path="$CURRENT_LINK/$configured_path" + release_sqlite_path="$NEW_RELEASE/$configured_path" + + mkdir -p "$SHARED_DIR/database" "$(dirname "$release_sqlite_path")" + + if [ ! -f "$shared_sqlite_path" ]; then + if [ -f "$current_sqlite_path" ]; then + cp -fL "$current_sqlite_path" "$shared_sqlite_path" + log "Bootstrapped shared sqlite database from $current_sqlite_path" + elif [ -f "$APP_ROOT/$configured_path" ]; then + cp -fL "$APP_ROOT/$configured_path" "$shared_sqlite_path" + log "Bootstrapped shared sqlite database from $APP_ROOT/$configured_path" + else + touch "$shared_sqlite_path" + log "Created shared sqlite database at $shared_sqlite_path" + fi + fi + + rm -f "$release_sqlite_path" + ln -sfn "$shared_sqlite_path" "$release_sqlite_path" + ensure_writable_paths "$SHARED_DIR/database" + return 0 + fi + + if [ ! -f "$shared_sqlite_path" ]; then + touch "$shared_sqlite_path" + log "Created shared sqlite database at $shared_sqlite_path" + fi + + ensure_writable_paths "$(dirname "$shared_sqlite_path")" +} + +resolve_npm() { + if command -v npm >/dev/null 2>&1; then command -v npm; return 0; fi + local candidate + for candidate in "${NODE_ROOT:-/tmp/ladill-node-22-r1}/bin/npm" /tmp/ladill-node-*/bin/npm; do + [ -x "$candidate" ] && { echo "$candidate"; return 0; } + done + return 1 +} + +# Ensure compiled Vite assets exist in the release. CI builds them into the +# archive; this only (re)builds when the manifest is missing — e.g. a manual +# on-host deploy — so a release without assets is never promoted (which would +# make every @vite page 500). Runs before the current symlink is switched, so a +# failure here leaves the previous good release live. +build_frontend_assets() { + if [ -f "$NEW_RELEASE/public/build/manifest.json" ]; then + log "Frontend assets present — skipping vite build" + return 0 + fi + + [ -f "$NEW_RELEASE/package.json" ] || { log "No package.json — skipping vite build"; return 0; } + + local npm_bin + if ! npm_bin="$(resolve_npm)"; then + echo "ERROR: vite manifest missing and npm not found; cannot build frontend assets (pages would 500)." >&2 + return 1 + fi + + log "Building frontend assets with $npm_bin" + ( + cd "$NEW_RELEASE" + export PATH="$(dirname "$npm_bin"):$PATH" + if [ -f package-lock.json ]; then + npm ci --no-audit --no-fund + else + npm install --no-audit --no-fund + fi + npm run build + ) +} + +log "Preparing release $STAMP" +[ -f "$RELEASE_ARCHIVE" ] || { echo "Release archive not found: $RELEASE_ARCHIVE" >&2; exit 1; } + +mkdir -p "$RELEASES_DIR" "$SHARED_DIR" "$NEW_RELEASE" +tar -xzf "$RELEASE_ARCHIVE" -C "$NEW_RELEASE" +chmod -R u+rwX "$NEW_RELEASE" 2>/dev/null || true + +log "Linking shared paths" +mkdir -p "$SHARED_DIR/storage/"{app/public,app/private,framework/{cache/data,sessions,testing,views},logs} +mkdir -p "$SHARED_DIR/bootstrap-cache" +normalize_shared_permissions + +if bootstrap_shared_env; then + ln -sfn "$SHARED_DIR/.env" "$NEW_RELEASE/.env" +else + echo "Missing deployment environment file. Expected $SHARED_DIR/.env or an existing $CURRENT_LINK/.env / $APP_ROOT/.env to bootstrap from." >&2 + exit 1 +fi + +rm -rf "$NEW_RELEASE/storage" +ln -sfn "$SHARED_DIR/storage" "$NEW_RELEASE/storage" +mkdir -p "$NEW_RELEASE/bootstrap" +rm -rf "$NEW_RELEASE/bootstrap/cache" +ln -sfn "$SHARED_DIR/bootstrap-cache" "$NEW_RELEASE/bootstrap/cache" +normalize_shared_permissions + +if uses_sqlite; then + log "Preparing shared sqlite database" + prepare_sqlite_database + if id -u www-data >/dev/null 2>&1; then + chgrp www-data "$SHARED_DIR/database" 2>/dev/null || true + find "$SHARED_DIR/database" -type f -exec chgrp www-data {} + 2>/dev/null || true + find "$SHARED_DIR/database" -type d -exec chgrp www-data {} + 2>/dev/null || true + fi +fi + +log "Installing PHP dependencies" +if [ -f "$NEW_RELEASE/composer.json" ]; then + if [ "$(id -u)" -eq 0 ]; then + export COMPOSER_ALLOW_SUPERUSER=1 + fi + export COMPOSER_HOME="${COMPOSER_HOME:-/home/deploy/.composer}" + ( + cd "$NEW_RELEASE" + composer install \ + --no-dev \ + --prefer-dist \ + --no-interaction \ + --no-progress \ + --optimize-autoloader \ + --classmap-authoritative + ) +fi + +log "Ensuring frontend assets" +if ! build_frontend_assets; then + echo "Frontend asset build failed — keeping previous release live" >&2 + exit 1 +fi + +log "Running migrations" +if ! run_artisan "migrate --force"; then + log "Migration failed — clearing shared bootstrap cache" + run_artisan "optimize:clear" || true + exit 1 +fi + +switch_current_release() { + if ln -sfnT "$NEW_RELEASE" "$CURRENT_LINK" 2>/dev/null; then + return 0 + fi + + if command -v sudo >/dev/null 2>&1 && sudo -n ln -sfnT "$NEW_RELEASE" "$CURRENT_LINK"; then + return 0 + fi + + echo "Unable to update current release symlink at $CURRENT_LINK" >&2 + return 1 +} + +log "Switching current release" +if ! switch_current_release; then + echo "Failed to point $CURRENT_LINK at $NEW_RELEASE" >&2 + exit 1 +fi + +LIVE_REV="$(cat "$CURRENT_LINK/REVISION" 2>/dev/null || echo unknown)" +log "Live release: $STAMP (revision $LIVE_REV)" + +log "Optimizing Laravel" +if [ -L "$CURRENT_LINK" ] && [ -f "$CURRENT_LINK/artisan" ]; then + ( + cd "$CURRENT_LINK" + php artisan storage:link || true + php artisan optimize:clear || true + php artisan config:cache || true + php artisan route:cache || true + php artisan view:cache || true + ) +fi + +log "Reloading services" +if command -v systemctl >/dev/null 2>&1; then + systemctl reload php8.4-fpm 2>/dev/null || sudo -n systemctl reload php8.4-fpm + systemctl reload nginx 2>/dev/null || sudo -n systemctl reload nginx +fi + +log "Restarting queues" +if [ -L "$CURRENT_LINK" ] && [ -f "$CURRENT_LINK/artisan" ]; then + (cd "$CURRENT_LINK" && php artisan queue:restart) || true +fi +if command -v supervisorctl >/dev/null 2>&1; then + supervisorctl restart ladill-frontdesk-worker:* 2>/dev/null || true +fi + +log "Cleaning old releases" +mapfile -t OLD_RELEASES < <(ls -1dt "$RELEASES_DIR"/* 2>/dev/null | tail -n "+$((KEEP_RELEASES + 1))" || true) +if [ "${#OLD_RELEASES[@]}" -gt 0 ]; then + chmod -R u+rwX "${OLD_RELEASES[@]}" 2>/dev/null || true + rm -rf "${OLD_RELEASES[@]}" 2>/dev/null || true +fi + +log "Deploy completed: $STAMP" diff --git a/deploy/sudoers.ladill-hosting.example b/deploy/sudoers.ladill-hosting.example new file mode 100644 index 0000000..4dc5ce2 --- /dev/null +++ b/deploy/sudoers.ladill-hosting.example @@ -0,0 +1,7 @@ +# Replace `www-data` with the actual PHP-FPM/web user that runs the app. +# Install as `/etc/sudoers.d/ladill-hosting` with mode `0440`. +# +# These helpers are root-owned fixed entry points installed by the deploy script. + +www-data ALL=(root) NOPASSWD: /usr/local/bin/ladill-hosting-admin * +www-data ALL=(root) NOPASSWD: /usr/local/bin/ladill-hosting-user * diff --git a/deployment/setup-service-subdomain-nginx.sh b/deployment/setup-service-subdomain-nginx.sh new file mode 100755 index 0000000..afde633 --- /dev/null +++ b/deployment/setup-service-subdomain-nginx.sh @@ -0,0 +1,153 @@ +#!/usr/bin/env bash +# +# Provision an nginx vhost for one of Ladill's own service subdomains +# (auth./account./pay./qr./... .ladill.com), reusing the existing +# *.ladill.com wildcard TLS certificate. +# +# The monolith phase needs nothing here — the ladill.com vhost already +# serves *.ladill.com over the wildcard cert. Use this when a service gets +# its OWN app (separate Laravel app dir, or a backend on another host/port), +# so its subdomain stops falling through to the catch-all and routes to the +# real service instead. +# +# Idempotent + safe: writes to sites-available, validates with `nginx -t`, +# and only reloads on success (restores the previous config on failure). +# +# Usage: +# setup-service-subdomain-nginx.sh --app [--fpm ] +# setup-service-subdomain-nginx.sh --proxy +# +# Options: +# --app DIR Serve a Laravel app from DIR/public via PHP-FPM. +# --fpm SOCK PHP-FPM socket for --app (default: /run/php/php8.4-fpm-ladill.sock). +# --proxy URL Reverse-proxy the subdomain to URL (e.g. http://127.0.0.1:9001). +# --zone ZONE Apex zone (default: ladill.com). +# --cert NAME Let's Encrypt lineage under /etc/letsencrypt/live (default: ladill-wildcard). +# --dry-run Print the rendered vhost and exit without writing anything. +# +# Examples: +# setup-service-subdomain-nginx.sh auth --app /var/www/auth.ladill.com/current +# setup-service-subdomain-nginx.sh pay --proxy http://127.0.0.1:9002 +set -euo pipefail + +SUB="${1:-}"; shift || true +[ -n "$SUB" ] || { echo "ERROR: missing (e.g. 'auth')"; exit 2; } + +MODE=""; APP_DIR=""; PROXY_URL="" +FPM_SOCK="/run/php/php8.4-fpm-ladill.sock" +ZONE="ladill.com" +CERT="ladill-wildcard" +DRY_RUN=0 + +while [ $# -gt 0 ]; do + case "$1" in + --app) MODE="app"; APP_DIR="${2:?--app needs a dir}"; shift 2;; + --proxy) MODE="proxy"; PROXY_URL="${2:?--proxy needs a url}"; shift 2;; + --fpm) FPM_SOCK="${2:?}"; shift 2;; + --zone) ZONE="${2:?}"; shift 2;; + --cert) CERT="${2:?}"; shift 2;; + --dry-run) DRY_RUN=1; shift;; + *) echo "ERROR: unknown arg '$1'"; exit 2;; + esac +done + +[ -n "$MODE" ] || { echo "ERROR: choose a backend: --app or --proxy "; exit 2; } + +FQDN="${SUB}.${ZONE}" +CERT_DIR="/etc/letsencrypt/live/${CERT}" +WEBROOT="${APP_DIR:-/var/www/${ZONE}/current}/public" + +if [ "$MODE" = "app" ]; then + BODY=$(cat <> Backed up existing vhost to $BK" +fi + +printf '%s\n' "$VHOST" > "$AVAIL" +ln -sfn "$AVAIL" "$ENABLED" + +if nginx -t; then + systemctl reload nginx + echo ">> ${FQDN} vhost active (${MODE})." +else + echo "ERROR: nginx config test failed — rolling back." + if [ -n "${BK:-}" ] && [ -f "${BK:-}" ]; then + cp -a "$BK" "$AVAIL" + else + rm -f "$AVAIL" "$ENABLED" + fi + nginx -t && systemctl reload nginx || true + exit 1 +fi diff --git a/deployment/supervisor/ladill-frontdesk-worker.conf b/deployment/supervisor/ladill-frontdesk-worker.conf new file mode 100644 index 0000000..f33d8ed --- /dev/null +++ b/deployment/supervisor/ladill-frontdesk-worker.conf @@ -0,0 +1,14 @@ +[program:ladill-frontdesk-worker] +process_name=%(program_name)s_%(process_num)02d +command=php /var/www/ladill-frontdesk/current/artisan queue:work --sleep=3 --tries=3 --timeout=300 --max-time=3600 +autostart=true +autorestart=true +stopasgroup=true +killasgroup=true +user=deploy +numprocs=1 +redirect_stderr=true +stdout_logfile=/var/www/ladill-frontdesk/shared/storage/logs/worker.log +stdout_logfile_maxbytes=10MB +stdout_logfile_backups=5 +stopwaitsecs=3600 diff --git a/docs/openapi/frontdesk.yaml b/docs/openapi/frontdesk.yaml new file mode 100644 index 0000000..9acd5c8 --- /dev/null +++ b/docs/openapi/frontdesk.yaml @@ -0,0 +1,101 @@ +openapi: 3.0.3 +info: + title: Ladill Frontdesk API + version: 1.0.0 + description: Internal service API for sibling Ladill apps. +servers: + - url: /api +security: + - bearerAuth: [] +paths: + /visits: + get: + summary: List visits + parameters: + - in: query + name: owner + required: true + schema: + type: string + - in: query + name: status + schema: + type: string + responses: + '200': + description: Paginated visits + post: + summary: Create or schedule a visit + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [organization_id, full_name, visitor_type] + properties: + organization_id: + type: integer + external_ref: + type: string + schedule: + type: boolean + full_name: + type: string + visitor_type: + type: string + integration_metadata: + type: object + responses: + '201': + description: Visit created + /visits/{visit}/checkout: + post: + summary: Check out a visit + parameters: + - in: query + name: owner + required: true + schema: + type: string + responses: + '200': + description: Visit checked out + /devices/heartbeat: + post: + summary: Device heartbeat + security: [] + parameters: + - in: header + name: X-Device-Token + required: true + schema: + type: string + responses: + '200': + description: Device marked online + /kiosk/offline-sync: + post: + summary: Replay queued offline kiosk check-in + security: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [client_id, payload] + properties: + client_id: + type: string + format: uuid + payload: + type: object + responses: + '201': + description: Check-in synced +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..af2696a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2558 @@ +{ + "name": "ladill-crm", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@alpinejs/collapse": "^3.15.12", + "@tailwindcss/forms": "^0.5.11", + "alpinejs": "^3.15.12", + "qr-code-styling": "^1.9.2", + "qrcode-generator": "^2.0.4" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "axios": "^1.11.0", + "concurrently": "^9.0.1", + "laravel-vite-plugin": "^2.0.0", + "tailwindcss": "^4.0.0", + "vite": "^7.0.7" + } + }, + "node_modules/@alpinejs/collapse": { + "version": "3.15.12", + "resolved": "https://registry.npmjs.org/@alpinejs/collapse/-/collapse-3.15.12.tgz", + "integrity": "sha512-BKNANLtNXuWYOSAnajSKLPjTsmHRNrv0ALFTbpmqt2/klHFooPhctSwkhFVPQb7rZ8BjEKHmNaBwnSbgtpk6xg==", + "license": "MIT" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.61.0.tgz", + "integrity": "sha512-dnxczajOqt0gesZlN5pGQ1s1imQVrsmCw5G2Ci4oM+0WvNz3pyRnlWrT7McoZIb8VlFwCawdmbWRmxRn7HI+VQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.61.0.tgz", + "integrity": "sha512-Bp3JpGP00Vu3f238ivRrjf7z3xSzVPXqCmaJYA9t2c+c8vKYvOzmXF7LkkeUalTEGd6cZcSWe+PFIP3Vy48fRg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.61.0.tgz", + "integrity": "sha512-zaYIpr670mUmmZ1tVzUFplbQbG7h3Gugx3L5FoqhsC2m/YnLlR1a7zVLmXNPy+iY1tFPEbNG+HHBXZGyId0G5w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.61.0.tgz", + "integrity": "sha512-+P49fvkv2dSoeevUW+lgZ/I2JHSsJCK1Lyjj7Cu6E4UHG4tS9XIefzIjo5qhgELjAclnen1rLzK2PMKJdo+Dyg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.61.0.tgz", + "integrity": "sha512-l3FAAOyKJXH2ea6KNFN+MMgC/rnE94YGLXs2ehYqDcCoHt1DpvgWX75BhUJxN38XojP7Ul+4H8PRn7EdyqSDrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.61.0.tgz", + "integrity": "sha512-VokPN3TSctKj65cyCNPaUh4vMFA8awxOot/0sp+4J7ZlNRKQEhXhawqPwajoi8H5ZFt61i0ugZJuTKXBjGJ17Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.61.0.tgz", + "integrity": "sha512-DxH0P3wxm+Yzs/p3zrk9dw1rURu8p0Nv5+MRK/L7OtnLNg5rLZraSBFZ8iUXOd9f2BlhJyEpIZUH/emjq4UJ4g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.61.0.tgz", + "integrity": "sha512-T6ZvMNe84kAz6TBWHC7hGAoEtzP1LWYw/AqayGWEF6uISt3Abk/st06LqRD9THd7Xz3NxzurUpzAuEAUbZf+nw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.61.0.tgz", + "integrity": "sha512-q/4hzvQkDs8b4jIBab1pnLiiM0ayTZsN2amBFPDzuyZxjEd4wDwx0UJFYM3cOZzSf5Kw8fnWSprJzIBMkcR44Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.61.0.tgz", + "integrity": "sha512-vvYWX3akdEAY6km+9wAqFDnk6pQsbJKVnj7xawcvs/+fdlYBGp+U+Qq/lLfpIxYIZvZLHMAKD9HLdacSx/r3dw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.61.0.tgz", + "integrity": "sha512-DePa5cqOxDP/Zp0VOXpeWaGew5iIv5DXp9NYbzkX5PFQyWVX9184WCTh3hvr/7lhXo8ZVlbFLkz8+o/q1dU6gA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.61.0.tgz", + "integrity": "sha512-LV8aWMB8UChglMCEzs7RkN0GsH29RJaLLqwm9fCIjlqwxQTiWAqNcc7wjBkH31hV0PU/yVxGYvrYsgfea2qw6g==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.61.0.tgz", + "integrity": "sha512-QoNSnwQtaeNu5grdBbsL0tt1uyl5EnS8DA8Mr3nluMXbhdQNyhN+G4tBax7VCdxLKj8YJ0/4OO9Ho84jMnJtKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.61.0.tgz", + "integrity": "sha512-/zZp5MKapIIApE8trN8qLGNSiRN9TUoaUZ1cmVu4XnVdd5LQLOXTtyi+vtfUbNnT3iyjzpPqYeKXmvJ+gJGYWw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.61.0.tgz", + "integrity": "sha512-RbrzcD3aJ1k3UbtMRRBNwojdVVyXjuVAFTfn/xPa6EEl6GE9Sm/akPgFTb9aAC9pMKGJ6CtWxaGrqWcabH+ySg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.61.0.tgz", + "integrity": "sha512-ZF+onDsBso8PJf1XaG9lB+O9RnBpKGnY6OrzC4CSHrtC1jb6jWLTKK4bRqdoCXHd22gyr2hiYmEAm8Wns/BOCw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.61.0.tgz", + "integrity": "sha512-Atk0aSIk5Zx2Wuh9dgRQgLP0Koc8hOeYpbWryMXyk8G8/HmPkwPPkMqIIDhrXHHYqfUzSJA/I7IWSBv8xSmRBA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.0.tgz", + "integrity": "sha512-0uMOcf3eZ5K+K4cYHkdxShFMPlPXCOdfDFEFn9dNYAEEd2cVvmOfH7zFgRVoDgmtQ1m9k5q7qfrHzyMAubKYUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.61.0.tgz", + "integrity": "sha512-mvFtE4A/t/7hRJ7X8Ozmu8FsIkAUat2nzl12pgU337BRmq87AQUJztwHz2Zv5/tjo9/C95E66CK03SI/ToEDJw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.61.0.tgz", + "integrity": "sha512-z9b9+aTxvt8n2rNltMPvyaUfB8NJ+CVyOrGK/MdIKHx7B+lXmZpm/XbRsU7Rpf3fRqJ2uS6mBJiJveCtq8LHDg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.61.0.tgz", + "integrity": "sha512-jXaXFqKMehsOc+g8R6oo33RRC6w07G9jDBxAE5eAKX7mOcCbZloYIPNhfG9Wl+P9O9IWHFO4OJgPi1Ml2qkt7w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.61.0.tgz", + "integrity": "sha512-OXNWVFocS2IA4+QplhTZZ2a+8hPZR7T8KuozsNmJKK8y7cp83StHvGksfHzPG3wczWTczyWHVQuqeiTUbjiyBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.61.0.tgz", + "integrity": "sha512-AlAbNtBO637LxSldqV43z0FfXoGfl2TW1DgAg/bs7aQswFbDewz2SJm3BUhiGfbOVtW571xbc9p+REdxhyN/Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.61.0.tgz", + "integrity": "sha512-QRSrQXyJ1M4tjNXdR0/G/IgV6lzfQQJYBjlWIEYkY2Xs86DRl/iEpQ4blMDjJxSl7n19eDKKXMg0AmuBVYy8pQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.61.0.tgz", + "integrity": "sha512-tkuFxhvKO/HlGd0VsINF6vHSYH8AF8W0TcNxKDK6JZmrehngFj78pToc8iemtnvwilDjs2G/qSzYFhe9U8q+fw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/forms": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.11.tgz", + "integrity": "sha512-h9wegbZDPurxG22xZSoWtdzc41/OlNEUQERNqI/0fOwa2aVlWGu7C35E/x6LDyD3lgtztFSSjKZyuVM0hxhbgA==", + "license": "MIT", + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.0.tgz", + "integrity": "sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.21.0", + "jiti": "^2.6.1", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.0" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.0.tgz", + "integrity": "sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.0", + "@tailwindcss/oxide-darwin-arm64": "4.3.0", + "@tailwindcss/oxide-darwin-x64": "4.3.0", + "@tailwindcss/oxide-freebsd-x64": "4.3.0", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.0", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.0", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.0", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.0", + "@tailwindcss/oxide-linux-x64-musl": "4.3.0", + "@tailwindcss/oxide-wasm32-wasi": "4.3.0", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.0", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.0" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.0.tgz", + "integrity": "sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.0.tgz", + "integrity": "sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.0.tgz", + "integrity": "sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.0.tgz", + "integrity": "sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.0.tgz", + "integrity": "sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.0.tgz", + "integrity": "sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.0.tgz", + "integrity": "sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.0.tgz", + "integrity": "sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.0.tgz", + "integrity": "sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.0.tgz", + "integrity": "sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.10.0", + "@emnapi/runtime": "^1.10.0", + "@emnapi/wasi-threads": "^1.2.1", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.0.tgz", + "integrity": "sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.0.tgz", + "integrity": "sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.0.tgz", + "integrity": "sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.0", + "@tailwindcss/oxide": "4.3.0", + "tailwindcss": "4.3.0" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vue/reactivity": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", + "integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.1.5" + } + }, + "node_modules/@vue/shared": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", + "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==", + "license": "MIT" + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/alpinejs": { + "version": "3.15.12", + "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.15.12.tgz", + "integrity": "sha512-nJvPAQVNPdZZ0NrExJ/kzQco3ijR8LwvCOadQecllESiqT4NyZ/57sN9V2XyvhlBGAbmlKYgeWZvYdKq99ij/Q==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "~3.1.1" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz", + "integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concurrently": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", + "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.3", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.22.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.22.1.tgz", + "integrity": "sha512-6QEuw3zoX1SJQc7b87aBXke/no+mG2bTBgw29gWMQonLmpEkWoCAVkl+M49e48AZlWzxiDzDZzYdp6kobcyLww==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-2.1.0.tgz", + "integrity": "sha512-z+ck2BSV6KWtYcoIzk9Y5+p4NEjqM+Y4i8/H+VZRLq0OgNjW2DqyADquwYu5j8qRvaXwzNmfCWl1KrMlV1zpsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "vite-plugin-full-reload": "^1.1.0" + }, + "bin": { + "clean-orphaned-assets": "bin/clean.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^7.0.0" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "license": "MIT", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/qr-code-styling": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/qr-code-styling/-/qr-code-styling-1.9.2.tgz", + "integrity": "sha512-RgJaZJ1/RrXJ6N0j7a+pdw3zMBmzZU4VN2dtAZf8ZggCfRB5stEQ3IoDNGaNhYY3nnZKYlYSLl5YkfWN5dPutg==", + "license": "MIT", + "dependencies": { + "qrcode-generator": "^1.4.4" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/qr-code-styling/node_modules/qrcode-generator": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-1.5.2.tgz", + "integrity": "sha512-pItrW0Z9HnDBnFmgiNrY1uxRdri32Uh9EjNYLPVC2zZ3ZRIIEqBoDgm4DkvDwNNDHTK7FNkmr8zAa77BYc9xNw==", + "license": "MIT" + }, + "node_modules/qrcode-generator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-2.0.4.tgz", + "integrity": "sha512-mZSiP6RnbHl4xL2Ap5HfkjLnmxfKcPWpWe/c+5XxCuetEenqmNFf1FH/ftXPCtFG5/TDobjsjz6sSNL0Sr8Z9g==", + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.61.0.tgz", + "integrity": "sha512-T9mWdbWfQtp0B5lv/HX+wrhYsmXRlcWnXXmJbXqKJhlRaoS6KMhq0gpyzW4UJfclcxrEdLnTgjT2NjruLONu0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.61.0", + "@rollup/rollup-android-arm64": "4.61.0", + "@rollup/rollup-darwin-arm64": "4.61.0", + "@rollup/rollup-darwin-x64": "4.61.0", + "@rollup/rollup-freebsd-arm64": "4.61.0", + "@rollup/rollup-freebsd-x64": "4.61.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.61.0", + "@rollup/rollup-linux-arm-musleabihf": "4.61.0", + "@rollup/rollup-linux-arm64-gnu": "4.61.0", + "@rollup/rollup-linux-arm64-musl": "4.61.0", + "@rollup/rollup-linux-loong64-gnu": "4.61.0", + "@rollup/rollup-linux-loong64-musl": "4.61.0", + "@rollup/rollup-linux-ppc64-gnu": "4.61.0", + "@rollup/rollup-linux-ppc64-musl": "4.61.0", + "@rollup/rollup-linux-riscv64-gnu": "4.61.0", + "@rollup/rollup-linux-riscv64-musl": "4.61.0", + "@rollup/rollup-linux-s390x-gnu": "4.61.0", + "@rollup/rollup-linux-x64-gnu": "4.61.0", + "@rollup/rollup-linux-x64-musl": "4.61.0", + "@rollup/rollup-openbsd-x64": "4.61.0", + "@rollup/rollup-openharmony-arm64": "4.61.0", + "@rollup/rollup-win32-arm64-msvc": "4.61.0", + "@rollup/rollup-win32-ia32-msvc": "4.61.0", + "@rollup/rollup-win32-x64-gnu": "4.61.0", + "@rollup/rollup-win32-x64-msvc": "4.61.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", + "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.0.tgz", + "integrity": "sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/vite": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.5.tgz", + "integrity": "sha512-KuOaNhcnGFN2zIPGA7wRmzF+lJA1sea7rHq17aiJ++9lzY1WWG6Jpwqwe1KNbRVPIqHmr8GLYx7jbrQcN/7/ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", + "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vite-plugin-full-reload/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f594a7f --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://www.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-vite-plugin": "^2.0.0", + "tailwindcss": "^4.0.0", + "vite": "^7.0.7" + }, + "dependencies": { + "@alpinejs/collapse": "^3.15.12", + "@tailwindcss/forms": "^0.5.11", + "alpinejs": "^3.15.12", + "qr-code-styling": "^1.9.2", + "qrcode-generator": "^2.0.4" + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..0275c65 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,38 @@ + + + + + tests/Unit + + + tests/Feature + + + + + app + + + + + + + + + + + + + + + + + + + + + diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..b574a59 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,25 @@ + + + Options -MultiViews -Indexes + + + 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] + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..3e89453 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/images/ladill-icons/bird.svg b/public/images/ladill-icons/bird.svg new file mode 100644 index 0000000..ad8a1a1 --- /dev/null +++ b/public/images/ladill-icons/bird.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/public/images/ladill-icons/domains.svg b/public/images/ladill-icons/domains.svg new file mode 100644 index 0000000..ba4956e --- /dev/null +++ b/public/images/ladill-icons/domains.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/public/images/ladill-icons/events.svg b/public/images/ladill-icons/events.svg new file mode 100644 index 0000000..6465988 --- /dev/null +++ b/public/images/ladill-icons/events.svg @@ -0,0 +1,2 @@ + + diff --git a/public/images/ladill-icons/pro.svg b/public/images/ladill-icons/pro.svg new file mode 100644 index 0000000..8ab5fc4 --- /dev/null +++ b/public/images/ladill-icons/pro.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/ladill-icons/qrplus.svg b/public/images/ladill-icons/qrplus.svg new file mode 100644 index 0000000..023c58d --- /dev/null +++ b/public/images/ladill-icons/qrplus.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/ladill-icons/server.svg b/public/images/ladill-icons/server.svg new file mode 100644 index 0000000..5fbb2ac --- /dev/null +++ b/public/images/ladill-icons/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/ladill-icons/wordpress.svg b/public/images/ladill-icons/wordpress.svg new file mode 100644 index 0000000..0be90e4 --- /dev/null +++ b/public/images/ladill-icons/wordpress.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/launcher-icons/accounting.svg b/public/images/launcher-icons/accounting.svg new file mode 100644 index 0000000..68b5263 --- /dev/null +++ b/public/images/launcher-icons/accounting.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/bird.svg b/public/images/launcher-icons/bird.svg new file mode 100644 index 0000000..ba4956e --- /dev/null +++ b/public/images/launcher-icons/bird.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/crm.svg b/public/images/launcher-icons/crm.svg new file mode 100644 index 0000000..5a15828 --- /dev/null +++ b/public/images/launcher-icons/crm.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/domains.svg b/public/images/launcher-icons/domains.svg new file mode 100644 index 0000000..ad8a1a1 --- /dev/null +++ b/public/images/launcher-icons/domains.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/email.svg b/public/images/launcher-icons/email.svg new file mode 100644 index 0000000..72877c8 --- /dev/null +++ b/public/images/launcher-icons/email.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/events.svg b/public/images/launcher-icons/events.svg new file mode 100644 index 0000000..feb13f8 --- /dev/null +++ b/public/images/launcher-icons/events.svg @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/frontdesk.svg b/public/images/launcher-icons/frontdesk.svg new file mode 100644 index 0000000..ea54262 --- /dev/null +++ b/public/images/launcher-icons/frontdesk.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/give.svg b/public/images/launcher-icons/give.svg new file mode 100644 index 0000000..8985473 --- /dev/null +++ b/public/images/launcher-icons/give.svg @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/hosting.svg b/public/images/launcher-icons/hosting.svg new file mode 100644 index 0000000..bd7b96f --- /dev/null +++ b/public/images/launcher-icons/hosting.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/invoice.svg b/public/images/launcher-icons/invoice.svg new file mode 100644 index 0000000..8c0e070 --- /dev/null +++ b/public/images/launcher-icons/invoice.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/link.svg b/public/images/launcher-icons/link.svg new file mode 100644 index 0000000..4122dc4 --- /dev/null +++ b/public/images/launcher-icons/link.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/mail.svg b/public/images/launcher-icons/mail.svg new file mode 100644 index 0000000..17ee6ca --- /dev/null +++ b/public/images/launcher-icons/mail.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/merchant.svg b/public/images/launcher-icons/merchant.svg new file mode 100644 index 0000000..5029df3 --- /dev/null +++ b/public/images/launcher-icons/merchant.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/mini.svg b/public/images/launcher-icons/mini.svg new file mode 100644 index 0000000..62957e6 --- /dev/null +++ b/public/images/launcher-icons/mini.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/pos.svg b/public/images/launcher-icons/pos.svg new file mode 100644 index 0000000..3bdb6c6 --- /dev/null +++ b/public/images/launcher-icons/pos.svg @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/qrplus.svg b/public/images/launcher-icons/qrplus.svg new file mode 100644 index 0000000..023c58d --- /dev/null +++ b/public/images/launcher-icons/qrplus.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/servers.svg b/public/images/launcher-icons/servers.svg new file mode 100644 index 0000000..169dc36 --- /dev/null +++ b/public/images/launcher-icons/servers.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/sms.svg b/public/images/launcher-icons/sms.svg new file mode 100644 index 0000000..bc628c1 --- /dev/null +++ b/public/images/launcher-icons/sms.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/launcher-icons/transfer.svg b/public/images/launcher-icons/transfer.svg new file mode 100644 index 0000000..1a18372 --- /dev/null +++ b/public/images/launcher-icons/transfer.svg @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillcrm-logo.svg b/public/images/logo/ladillcrm-logo.svg new file mode 100644 index 0000000..1fc582f --- /dev/null +++ b/public/images/logo/ladillcrm-logo.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladilldomains-logo-white.svg b/public/images/logo/ladilldomains-logo-white.svg new file mode 100644 index 0000000..0ba849c --- /dev/null +++ b/public/images/logo/ladilldomains-logo-white.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladilldomains-logo.svg b/public/images/logo/ladilldomains-logo.svg new file mode 100644 index 0000000..72e4745 --- /dev/null +++ b/public/images/logo/ladilldomains-logo.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillemail-logo.svg b/public/images/logo/ladillemail-logo.svg new file mode 100644 index 0000000..f5d4f15 --- /dev/null +++ b/public/images/logo/ladillemail-logo.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillevents-logo.svg b/public/images/logo/ladillevents-logo.svg new file mode 100644 index 0000000..e23909f --- /dev/null +++ b/public/images/logo/ladillevents-logo.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillfrontdesk-logo.svg b/public/images/logo/ladillfrontdesk-logo.svg new file mode 100644 index 0000000..0008bdf --- /dev/null +++ b/public/images/logo/ladillfrontdesk-logo.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillhosting-logo.svg b/public/images/logo/ladillhosting-logo.svg new file mode 100644 index 0000000..6a66d01 --- /dev/null +++ b/public/images/logo/ladillhosting-logo.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillinvoice-logo.svg b/public/images/logo/ladillinvoice-logo.svg new file mode 100644 index 0000000..991b473 --- /dev/null +++ b/public/images/logo/ladillinvoice-logo.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillmini-logo-email.png b/public/images/logo/ladillmini-logo-email.png new file mode 100644 index 0000000..c22d791 Binary files /dev/null and b/public/images/logo/ladillmini-logo-email.png differ diff --git a/public/images/logo/ladillmini-logo.svg b/public/images/logo/ladillmini-logo.svg new file mode 100644 index 0000000..76652b5 --- /dev/null +++ b/public/images/logo/ladillmini-logo.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillqrplus-logo-white.svg b/public/images/logo/ladillqrplus-logo-white.svg new file mode 100644 index 0000000..3ea536b --- /dev/null +++ b/public/images/logo/ladillqrplus-logo-white.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/logo/ladillqrplus-logo.svg b/public/images/logo/ladillqrplus-logo.svg new file mode 100644 index 0000000..d9b81fd --- /dev/null +++ b/public/images/logo/ladillqrplus-logo.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/qr-icons/app.svg b/public/images/qr-icons/app.svg new file mode 100644 index 0000000..cf2c12f --- /dev/null +++ b/public/images/qr-icons/app.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/qr-icons/business-profile.svg b/public/images/qr-icons/business-profile.svg new file mode 100644 index 0000000..77284d8 --- /dev/null +++ b/public/images/qr-icons/business-profile.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/images/qr-icons/facebook.svg b/public/images/qr-icons/facebook.svg new file mode 100644 index 0000000..94a3b7b --- /dev/null +++ b/public/images/qr-icons/facebook.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/qr-icons/instagram.svg b/public/images/qr-icons/instagram.svg new file mode 100644 index 0000000..658eb6e --- /dev/null +++ b/public/images/qr-icons/instagram.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/qr-icons/linkedin.svg b/public/images/qr-icons/linkedin.svg new file mode 100644 index 0000000..875694f --- /dev/null +++ b/public/images/qr-icons/linkedin.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/qr-icons/list.svg b/public/images/qr-icons/list.svg new file mode 100644 index 0000000..ccf7f95 --- /dev/null +++ b/public/images/qr-icons/list.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/images/qr-icons/terms.svg b/public/images/qr-icons/terms.svg new file mode 100644 index 0000000..6b352e0 --- /dev/null +++ b/public/images/qr-icons/terms.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/qr-icons/tik-tok.svg b/public/images/qr-icons/tik-tok.svg new file mode 100644 index 0000000..7e6913c --- /dev/null +++ b/public/images/qr-icons/tik-tok.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/qr-icons/twitter.svg b/public/images/qr-icons/twitter.svg new file mode 100644 index 0000000..2e05e5f --- /dev/null +++ b/public/images/qr-icons/twitter.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/qr-icons/website.svg b/public/images/qr-icons/website.svg new file mode 100644 index 0000000..e6b7459 --- /dev/null +++ b/public/images/qr-icons/website.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/images/qr-icons/whatsapp.svg b/public/images/qr-icons/whatsapp.svg new file mode 100644 index 0000000..17ee32c --- /dev/null +++ b/public/images/qr-icons/whatsapp.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/qr-icons/wifi.svg b/public/images/qr-icons/wifi.svg new file mode 100644 index 0000000..d56723c --- /dev/null +++ b/public/images/qr-icons/wifi.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/images/qr-icons/youtube.svg b/public/images/qr-icons/youtube.svg new file mode 100644 index 0000000..cf2e8d9 --- /dev/null +++ b/public/images/qr-icons/youtube.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..ee8f07e --- /dev/null +++ b/public/index.php @@ -0,0 +1,20 @@ +handleRequest(Request::capture()); diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/resources/css/app.css b/resources/css/app.css new file mode 100644 index 0000000..273a549 --- /dev/null +++ b/resources/css/app.css @@ -0,0 +1,167 @@ +@import 'tailwindcss'; +@plugin '@tailwindcss/forms'; +@custom-variant dark (&:where(.dark, .dark *)); + +@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; +@source '../../storage/framework/views/*.php'; +@source '../**/*.blade.php'; +@source '../**/*.js'; + +@theme { + --font-sans: 'Figtree', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; +} + +[x-cloak] { + display: none !important; +} + +/* QR create/show: flush mobile action bar to the physical screen bottom (mobile only) */ +@media (max-width: 1023px) { + .mobile-action-bar { + position: fixed; + inset-inline: 0; + bottom: 0; + z-index: 50; + display: flex; + flex-direction: column; + background-color: #fff; + } + + .mobile-action-bar__toolbar { + display: flex; + height: 4rem; + flex-shrink: 0; + align-items: center; + gap: 0.75rem; + border-top: 1px solid rgb(226 232 240); + background-color: #fff; + padding-inline: 1rem; + } + + .mobile-action-bar__inset-fill { + flex-shrink: 0; + width: 100%; + background-color: #fff; + height: env(safe-area-inset-bottom, 0px); + min-height: max(env(safe-area-inset-bottom, 0px), 20px); + } +} + +/* Extra white bleed behind the bar for any remaining viewport gap on mobile */ +.qr-mobile-bottom-bleed { + position: fixed; + inset-inline: 0; + bottom: 0; + z-index: 48; + pointer-events: none; + background-color: #fff; + height: calc(4rem + env(safe-area-inset-bottom, 0px) + 24px); + min-height: calc(4rem + 24px); +} + +html.qr-mobile-page { + background-color: #fff; +} + +html.qr-mobile-page body { + background-color: #fff; +} + +/* Payment QR landing: lock scroll and keep the amount sheet flush to the screen bottom */ +@media (max-width: 767px) { + html.mini-payment-page, + html.mini-payment-page body { + overflow: hidden; + width: 100%; + height: 100%; + } + + html.mini-payment-page body { + position: fixed; + inset: 0; + } + + .mini-payment-sheet { + position: fixed; + inset-inline: 0; + bottom: 0; + z-index: 20; + } + + .mini-payment-bottom-bleed { + position: fixed; + inset-inline: 0; + bottom: 0; + z-index: 19; + pointer-events: none; + background-color: #fff; + height: calc(12rem + env(safe-area-inset-bottom, 0px)); + min-height: 8rem; + } +} + +.mobile-stats-card { + width: calc(66.666667% - 0.5rem); +} + +@layer components { + .btn-primary { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + border-radius: 9999px; + background-image: linear-gradient(to right, rgb(79 70 229), rgb(124 58 237)); + padding: 0.5rem 1rem; + font-size: 0.875rem; + line-height: 1.25rem; + font-weight: 600; + color: #fff; + box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + transition: filter 0.15s ease; + } + + .btn-primary:hover { + filter: brightness(0.92); + } + + .btn-primary:disabled { + opacity: 0.6; + pointer-events: none; + } + + .btn-primary-sm { + padding: 0.375rem 0.75rem; + font-size: 0.75rem; + line-height: 1rem; + } + + .btn-primary-lg { + padding: 0.625rem 1.25rem; + } + + .btn-fab { + display: inline-flex; + height: 2.75rem; + width: 2.75rem; + align-items: center; + justify-content: center; + border-radius: 9999px; + background-image: linear-gradient(to right, rgb(79 70 229), rgb(124 58 237)); + color: #fff; + box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); + transition: filter 0.15s ease; + } + + .btn-fab:hover { + filter: brightness(0.92); + } +} + + +@media (min-width: 640px) { + .mobile-stats-card { + width: auto; + } +} diff --git a/resources/js/app.js b/resources/js/app.js new file mode 100644 index 0000000..ccd0523 --- /dev/null +++ b/resources/js/app.js @@ -0,0 +1,168 @@ +import Alpine from 'alpinejs'; +import collapse from '@alpinejs/collapse'; + +Alpine.plugin(collapse); + +// In-app notification bell + dropdown. +Alpine.data('notificationDropdown', (config = {}) => ({ + open: false, + loading: false, + notifications: [], + unreadCount: 0, + unreadUrl: config.unreadUrl || '/notifications/unread', + markReadUrl: config.markReadUrl || '/notifications/__ID__/read', + markAllReadUrl: config.markAllReadUrl || '/notifications/mark-all-read', + indexUrl: config.indexUrl || '/notifications', + csrfToken: config.csrfToken || document.querySelector('meta[name="csrf-token"]')?.content || '', + + init() { + this.fetchUnread(); + setInterval(() => this.fetchUnread(), 60000); + }, + async fetchUnread() { + try { + const res = await fetch(this.unreadUrl, { + headers: { Accept: 'application/json', 'X-Requested-With': 'XMLHttpRequest' }, + }); + const data = await res.json(); + this.notifications = data.notifications || []; + this.unreadCount = data.unread_count || 0; + } catch (e) { + console.error('Failed to fetch notifications', e); + } + }, + toggle() { + this.open = !this.open; + if (this.open) { + this.loading = true; + this.fetchUnread().finally(() => { this.loading = false; }); + } + }, + async markRead(id) { + const url = this.markReadUrl.replace('__ID__', id); + try { + await fetch(url, { + method: 'POST', + headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'X-CSRF-TOKEN': this.csrfToken, 'X-Requested-With': 'XMLHttpRequest' }, + }); + this.notifications = this.notifications.filter(n => n.id !== id); + this.unreadCount = Math.max(0, this.unreadCount - 1); + } catch (e) { + console.error('Failed to mark notification as read', e); + } + }, + async markAllRead() { + try { + await fetch(this.markAllReadUrl, { + method: 'POST', + headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'X-CSRF-TOKEN': this.csrfToken, 'X-Requested-With': 'XMLHttpRequest' }, + }); + this.notifications = []; + this.unreadCount = 0; + } catch (e) { + console.error('Failed to mark all notifications as read', e); + } + }, + getIconBg(icon) { + const map = { success: 'bg-green-50', task: 'bg-amber-50' }; + return map[icon] || 'bg-slate-100'; + }, + getIconColor(icon) { + const map = { success: 'text-green-600', task: 'text-amber-600' }; + return map[icon] || 'text-slate-500'; + }, +})); + +// Afia — in-app AI assistant slide-over. Opened via $dispatch('afia-open'). +Alpine.data('afia', (config = {}) => ({ + open: false, + input: '', + loading: false, + messages: [ + { role: 'assistant', text: config.greeting || "Hi, I'm Afia 👋 How can I help?" }, + ], + suggestions: config.suggestions || [], + init() { + window.addEventListener('afia-open', () => { + this.open = true; + this.$nextTick(() => this.$refs.input && this.$refs.input.focus()); + }); + }, + close() { this.open = false; }, + useSuggestion(s) { this.input = s; this.send(); }, + scrollDown() { + this.$nextTick(() => { const el = this.$refs.scroll; if (el) el.scrollTop = el.scrollHeight; }); + }, + async send() { + const text = this.input.trim(); + if (!text || this.loading) return; + const history = this.messages.map((m) => ({ role: m.role, text: m.text })); + this.messages.push({ role: 'user', text }); + this.input = ''; + this.loading = true; + this.scrollDown(); + try { + const res = await fetch(config.chatUrl, { + method: 'POST', + headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': config.csrf, 'Accept': 'application/json' }, + body: JSON.stringify({ message: text, history }), + }); + const data = await res.json(); + this.messages.push({ role: 'assistant', text: data.reply || data.message || 'Sorry, I could not respond.' }); + } catch (e) { + this.messages.push({ role: 'assistant', text: 'Network error — please try again.' }); + } + this.loading = false; + this.scrollDown(); + }, +})); + +// Wallet balance peek for the avatar dropdown. +Alpine.data('walletWidget', (config = {}) => ({ + display: '…', + async load() { + try { + const res = await fetch(config.url, { headers: { Accept: 'application/json', 'X-Requested-With': 'XMLHttpRequest' } }); + const data = await res.json(); + this.display = data.available ? data.formatted : 'View wallet'; + } catch (e) { + this.display = 'View wallet'; + } + }, +})); + +// Deal line-items editor — products/services as quote lines; deal value = subtotal. +Alpine.data('dealForm', (initialLines = [], products = []) => ({ + lines: Array.isArray(initialLines) ? initialLines : [], + products: Array.isArray(products) ? products : [], + selectedProduct: '', + addLine() { + this.lines.push({ product_id: '', description: '', quantity: 1, unit_price: '' }); + }, + removeLine(index) { + this.lines.splice(index, 1); + }, + addProductLine() { + const p = this.products.find((x) => String(x.id) === String(this.selectedProduct)); + if (!p) return; + this.lines.push({ + product_id: p.id, + description: p.name || '', + quantity: 1, + unit_price: (Number(p.unit_price_minor || 0) / 100).toFixed(2), + }); + this.selectedProduct = ''; + }, + lineTotal(line) { + return (parseFloat(line.quantity) || 0) * (parseFloat(line.unit_price) || 0); + }, + get subtotal() { + return this.lines.reduce((sum, line) => sum + this.lineTotal(line), 0); + }, + money(value) { + return (Number(value) || 0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); + }, +})); + +window.Alpine = Alpine; +Alpine.start(); diff --git a/resources/views/auth/signed-out.blade.php b/resources/views/auth/signed-out.blade.php new file mode 100644 index 0000000..5b7f6a2 --- /dev/null +++ b/resources/views/auth/signed-out.blade.php @@ -0,0 +1,52 @@ +@php + $signedOut = (array) config('signed_out'); + $logo = (string) ($signedOut['logo'] ?? 'images/logo/ladillcrm-logo.svg'); + $logoPath = public_path($logo); +@endphp + + + + + + Signed out — {{ $signedOut['title'] ?? config('app.name') }} + @include('partials.favicon') + + + @vite(['resources/css/app.css']) + + + +
+
+ +
+ {{ $signedOut['title'] ?? config('app.name') }} + +
+ +
+ +

You’re signed out

+

+ {{ $signedOut['description'] ?? ('Your '.($signedOut['title'] ?? config('app.name')).' session has ended. Sign in again to continue.') }} +

+ + + Sign in again + + + + Go to ladill.com + +
+
+ + diff --git a/resources/views/auth/sso-error.blade.php b/resources/views/auth/sso-error.blade.php new file mode 100644 index 0000000..3979643 --- /dev/null +++ b/resources/views/auth/sso-error.blade.php @@ -0,0 +1,23 @@ + + + + + + Sign-in problem · Ladill CRM + @vite(['resources/css/app.css']) + + +
+ Ladill CRM +

We couldn't sign you in

+

+ Sign-in didn't complete after a few tries. This is usually a temporary + issue with the Ladill account service. Please wait a moment and try again. +

+ @if ($reason !== '') +

Reference: {{ $reason }}

+ @endif + Try again +
+ + diff --git a/resources/views/auth/sso-logout-bridge.blade.php b/resources/views/auth/sso-logout-bridge.blade.php new file mode 100644 index 0000000..2540367 --- /dev/null +++ b/resources/views/auth/sso-logout-bridge.blade.php @@ -0,0 +1,26 @@ + + + + + + Signing out… + @include('partials.favicon') + + + + +

Signing you out of Ladill…

+ + + + diff --git a/resources/views/components/app-layout.blade.php b/resources/views/components/app-layout.blade.php new file mode 100644 index 0000000..1a5f0eb --- /dev/null +++ b/resources/views/components/app-layout.blade.php @@ -0,0 +1,34 @@ +@props(['title' => 'Ladill Frontdesk', 'heading' => null]) + + + + + + + {{ $title }} · Ladill Frontdesk + @include('partials.favicon') + + + @vite(['resources/css/app.css', 'resources/js/app.js']) + + +
+
+ +
+ @include('partials.topbar', ['heading' => $heading ?? $title]) +
+ @include('partials.flash') + {{ $slot }} +
+
+
+ @include('partials.wallet-topup-modal', ['openOnLoad' => (bool) session('topup_required')]) + + diff --git a/resources/views/components/badge.blade.php b/resources/views/components/badge.blade.php new file mode 100644 index 0000000..a35a20f --- /dev/null +++ b/resources/views/components/badge.blade.php @@ -0,0 +1,15 @@ +@props(['color' => 'slate']) +@php + $map = [ + 'slate' => 'bg-slate-100 text-slate-700', + 'indigo' => 'bg-indigo-100 text-indigo-700', + 'green' => 'bg-green-100 text-green-700', + 'red' => 'bg-red-100 text-red-700', + 'amber' => 'bg-amber-100 text-amber-700', + 'blue' => 'bg-blue-100 text-blue-700', + ]; + $classes = $map[$color] ?? $map['slate']; +@endphp +merge(['class' => "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium $classes"]) }}> + {{ $slot }} + diff --git a/resources/views/components/field.blade.php b/resources/views/components/field.blade.php new file mode 100644 index 0000000..5b84fec --- /dev/null +++ b/resources/views/components/field.blade.php @@ -0,0 +1,37 @@ +@props([ + 'name', + 'label' => null, + 'type' => 'text', + 'value' => null, + 'options' => [], + 'placeholder' => '', + 'required' => false, + 'rows' => 4, +]) +@php + $label = $label ?? \Illuminate\Support\Str::headline($name); + $current = old($name, $value); + $base = 'mt-1 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; +@endphp +
only('class') }}> + + + @if ($type === 'textarea') + + @elseif ($type === 'select') + + @else + + @endif + + @error($name)

{{ $message }}

@enderror +
diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php new file mode 100644 index 0000000..a823707 --- /dev/null +++ b/resources/views/components/modal.blade.php @@ -0,0 +1,88 @@ +@props([ + 'name', + 'show' => false, + 'maxWidth' => '2xl' +]) + +@php +$maxWidth = [ + 'sm' => 'sm:max-w-sm', + 'md' => 'sm:max-w-md', + 'lg' => 'sm:max-w-lg', + 'xl' => 'sm:max-w-xl', + '2xl' => 'sm:max-w-2xl', +][$maxWidth]; +@endphp + +
+ {{-- Backdrop click to close --}} +
+ + {{-- Panel: bottom-sheet on mobile, centered card on sm+ --}} +
+ {{-- Drag handle (mobile only) --}} +
+
+
+ + {{-- Close button (desktop only) --}} + + + {{ $slot }} +
+
diff --git a/resources/views/email/contact-message.blade.php b/resources/views/email/contact-message.blade.php new file mode 100644 index 0000000..e06167d --- /dev/null +++ b/resources/views/email/contact-message.blade.php @@ -0,0 +1,18 @@ + + + + + + + +
+
+
{{ $bodyText }}
+ @if (! empty($fromName)) +

— {{ $fromName }}

+ @endif +
+

Sent via Ladill CRM

+
+ + diff --git a/resources/views/frontdesk/admin/branches/create.blade.php b/resources/views/frontdesk/admin/branches/create.blade.php new file mode 100644 index 0000000..2085ea7 --- /dev/null +++ b/resources/views/frontdesk/admin/branches/create.blade.php @@ -0,0 +1,13 @@ + +
+

Add branch

+
+ @csrf +
+
+
+
+ +
+
+
diff --git a/resources/views/frontdesk/admin/branches/edit.blade.php b/resources/views/frontdesk/admin/branches/edit.blade.php new file mode 100644 index 0000000..842e912 --- /dev/null +++ b/resources/views/frontdesk/admin/branches/edit.blade.php @@ -0,0 +1,14 @@ + +
+

Edit branch

+
+ @csrf @method('PUT') +
+
+
+
+ + +
+
+
diff --git a/resources/views/frontdesk/admin/branches/index.blade.php b/resources/views/frontdesk/admin/branches/index.blade.php new file mode 100644 index 0000000..e1e37db --- /dev/null +++ b/resources/views/frontdesk/admin/branches/index.blade.php @@ -0,0 +1,25 @@ + +
+

Branches

+ @if (app(\App\Services\Frontdesk\FrontdeskPermissions::class)->can(auth()->user() ? app(\App\Services\Frontdesk\OrganizationResolver::class)->memberFor(auth()->user(), $organization) : null, 'admin.branches.manage')) + Add branch + @endif +
+ +
+ @forelse ($branches as $branch) +
+
+

{{ $branch->name }}

+

{{ $branch->address ?? 'No address' }} · {{ $branch->buildings_count }} building(s)

+
+
+ Buildings + Edit +
+
+ @empty +

No branches yet.

+ @endforelse +
+
diff --git a/resources/views/frontdesk/admin/buildings/index.blade.php b/resources/views/frontdesk/admin/buildings/index.blade.php new file mode 100644 index 0000000..cfb4162 --- /dev/null +++ b/resources/views/frontdesk/admin/buildings/index.blade.php @@ -0,0 +1,35 @@ + +
+
+ ← Branches +

{{ $branch->name }}

+
+
+ +
+ @csrf + + + +
+ +
+ @forelse ($buildings as $building) +
+
+

{{ $building->name }}

+

{{ $building->reception_desks_count }} desk(s)

+
+
+ Desks +
+ @csrf @method('DELETE') + +
+
+
+ @empty +

No buildings yet.

+ @endforelse +
+
diff --git a/resources/views/frontdesk/admin/desks/index.blade.php b/resources/views/frontdesk/admin/desks/index.blade.php new file mode 100644 index 0000000..2166160 --- /dev/null +++ b/resources/views/frontdesk/admin/desks/index.blade.php @@ -0,0 +1,28 @@ + + ← Buildings +

{{ $building->name }}

+ +
+ @csrf + + + +
+ +
+ @forelse ($desks as $desk) +
+
+

{{ $desk->name }}

+

{{ $desk->location ?? '—' }}

+
+
+ @csrf @method('DELETE') + +
+
+ @empty +

No reception desks yet.

+ @endforelse +
+
diff --git a/resources/views/frontdesk/admin/members/create.blade.php b/resources/views/frontdesk/admin/members/create.blade.php new file mode 100644 index 0000000..f31f12d --- /dev/null +++ b/resources/views/frontdesk/admin/members/create.blade.php @@ -0,0 +1,28 @@ + +
+

Add team member

+

Enter the Ladill user public ID (OIDC sub) of the person to invite.

+
+ @csrf +
+
+ + +
+
+ + +
+ +
+
+
diff --git a/resources/views/frontdesk/admin/members/index.blade.php b/resources/views/frontdesk/admin/members/index.blade.php new file mode 100644 index 0000000..109f7f6 --- /dev/null +++ b/resources/views/frontdesk/admin/members/index.blade.php @@ -0,0 +1,31 @@ + +
+

Team members

+ Add member +
+ +
+ + + + + + @foreach ($members as $member) + + + + + + + @endforeach + +
User IDRoleBranch
{{ $member->user_ref }}{{ $roles[$member->role] ?? $member->role }}{{ $member->branch?->name ?? 'All branches' }} + @if ($member->user_ref !== auth()->user()->public_id) +
+ @csrf @method('DELETE') + +
+ @endif +
+
+
diff --git a/resources/views/frontdesk/audit/index.blade.php b/resources/views/frontdesk/audit/index.blade.php new file mode 100644 index 0000000..3501dea --- /dev/null +++ b/resources/views/frontdesk/audit/index.blade.php @@ -0,0 +1,57 @@ + +
+
+

Audit log

+

Security and compliance activity

+
+ @if ($canExport) + Export CSV + @endif +
+ +
+ + + + + +
+ +
+ + + + + + + + + + + @forelse ($logs as $log) + + + + + + + @empty + + @endforelse + +
TimeActionActorDetails
{{ $log->created_at?->format('M j, g:i A') }}{{ $actions[$log->action] ?? $log->action }}{{ $log->actor_ref ?? 'System' }} + @if ($log->metadata) + {{ collect($log->metadata)->except('_awaiting_approval')->map(fn ($v, $k) => "$k: $v")->join(' · ') }} + @else + — + @endif +
No audit entries found.
+
+ +
{{ $logs->links() }}
+
diff --git a/resources/views/frontdesk/badges/pdf.blade.php b/resources/views/frontdesk/badges/pdf.blade.php new file mode 100644 index 0000000..1307247 --- /dev/null +++ b/resources/views/frontdesk/badges/pdf.blade.php @@ -0,0 +1,31 @@ + + + + + Visitor Badge · {{ $visit->badge_code }} + + + +
+
{{ $visit->organization->name ?? 'Visitor' }}
+
{{ $visit->visitor->full_name }}
+
+ @if ($visit->visitor->company){{ $visit->visitor->company }}
@endif + Host: {{ $visit->host?->name ?? '—' }}
+ Type: {{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }}
+ Check-in: {{ $visit->checked_in_at?->format('g:i A') }} +
+
{{ $visit->badge_code }}
+
Expires {{ $visit->badge_expires_at?->format('g:i A') ?? 'end of day' }}
+
+ + diff --git a/resources/views/frontdesk/badges/render.blade.php b/resources/views/frontdesk/badges/render.blade.php new file mode 100644 index 0000000..32b2c67 --- /dev/null +++ b/resources/views/frontdesk/badges/render.blade.php @@ -0,0 +1,47 @@ + + + + + Visitor Badge · {{ $visit->badge_code }} + + + + @if ($preview ?? false) +
Badge preview — Print badge
+ @endif +
+ @if (($template['show_photo'] ?? true) && $photoUrl) + Visitor photo + @endif +
{{ $visit->organization->name ?? 'Visitor' }}
+
{{ $visit->visitor->full_name }}
+
+ @if (($template['show_company'] ?? true) && $visit->visitor->company){{ $visit->visitor->company }}
@endif + @if ($template['show_host'] ?? true)Host: {{ $visit->host?->name ?? '—' }}
@endif + @if ($template['show_type'] ?? true)Type: {{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }}
@endif + Check-in: {{ $visit->checked_in_at?->format('g:i A') }} +
+
{{ $visit->badge_code }}
+
Expires {{ $visit->badge_expires_at?->format('g:i A') ?? 'end of day' }}
+ @if (($template['show_qr'] ?? true) && $qrSvg) +
{!! $qrSvg !!}
+ @endif + @if (! empty($template['footer_text'])) + + @endif +
+ + diff --git a/resources/views/frontdesk/badges/template.blade.php b/resources/views/frontdesk/badges/template.blade.php new file mode 100644 index 0000000..87d45b5 --- /dev/null +++ b/resources/views/frontdesk/badges/template.blade.php @@ -0,0 +1,44 @@ + +

Badge template

+

Configure fields shown on printed visitor badges.

+ +
+ @csrf @method('PUT') + +
+

Layout

+
+ @foreach ([ + 'show_photo' => 'Visitor photo', + 'show_qr' => 'QR code', + 'show_host' => 'Host name', + 'show_company' => 'Company', + 'show_type' => 'Visitor type', + ] as $key => $label) + + @endforeach +
+
+ + +
+
+ + +
+ @if ($canManage) + + @endif +
+
+ + @if ($sampleVisit) +
+

Live preview

+ +
+ @endif +
diff --git a/resources/views/frontdesk/compliance/recovery.blade.php b/resources/views/frontdesk/compliance/recovery.blade.php new file mode 100644 index 0000000..5ab0124 --- /dev/null +++ b/resources/views/frontdesk/compliance/recovery.blade.php @@ -0,0 +1,46 @@ + +

Archived records

+

Restore soft-deleted visitors and visits

+ +
+
+
+

Archived visitors

+
+ @forelse ($deletedVisitors as $visitor) +
+
+

{{ $visitor->full_name }}

+

Deleted {{ $visitor->deleted_at?->diffForHumans() }}

+
+
+ @csrf + +
+
+ @empty +

No archived visitors.

+ @endforelse +
+ +
+
+

Archived visits

+
+ @forelse ($deletedVisits as $visit) +
+
+

{{ $visit->visitor?->full_name ?? 'Unknown visitor' }}

+

Deleted {{ $visit->deleted_at?->diffForHumans() }}

+
+
+ @csrf + +
+
+ @empty +

No archived visits.

+ @endforelse +
+
+
diff --git a/resources/views/frontdesk/dashboard.blade.php b/resources/views/frontdesk/dashboard.blade.php new file mode 100644 index 0000000..fea574a --- /dev/null +++ b/resources/views/frontdesk/dashboard.blade.php @@ -0,0 +1,92 @@ + + @php + $cards = [ + ['label' => 'Visitors Today', 'value' => number_format($stats['visitors_today']), 'href' => route('frontdesk.visits.index')], + ['label' => 'Currently Inside', 'value' => number_format($stats['currently_inside']), 'href' => route('frontdesk.visits.index', ['status' => 'checked_in'])], + ['label' => 'Expected Arrivals', 'value' => number_format($stats['expected_arrivals']), 'href' => route('frontdesk.visits.index', ['status' => 'expected'])], + ['label' => 'Waiting', 'value' => number_format($stats['waiting']), 'href' => route('frontdesk.visits.index', ['status' => 'waiting'])], + ['label' => 'Overdue', 'value' => number_format($stats['overdue']), 'href' => route('frontdesk.visits.index', ['status' => 'overdue'])], + ['label' => 'Pending Approval', 'value' => number_format($stats['pending_approvals']), 'href' => route('frontdesk.visits.index', ['status' => 'waiting'])], + ['label' => 'Checked Out', 'value' => number_format($stats['checked_out_today']), 'href' => route('frontdesk.visits.index', ['status' => 'checked_out'])], + ['label' => 'Deliveries', 'value' => number_format($stats['deliveries_today']), 'href' => route('frontdesk.visits.index')], + ['label' => 'Contractors', 'value' => number_format($stats['contractors_today']), 'href' => route('frontdesk.visits.index')], + ]; + @endphp + +
+
+

{{ $organization->name }}

+

Reception dashboard

+
+ +
+ +
+ @foreach ($cards as $card) + +

{{ $card['label'] }}

+

{{ $card['value'] }}

+
+ @endforeach +
+ +
+
+
+

Currently inside

+ Security view +
+ @forelse ($currentVisitors as $visit) + + {{ strtoupper(substr($visit->visitor->full_name, 0, 1)) }} +
+

{{ $visit->visitor->full_name }}

+

Host: {{ $visit->host?->name ?? '—' }} · {{ $visit->checked_in_at?->diffForHumans() }}

+
+
+ @empty +

No visitors currently inside.

+ @endforelse +
+ +
+
+

Expected today

+ Calendar +
+ @forelse ($expectedVisitors as $visit) + +
+

{{ $visit->visitor->full_name }}

+

{{ $visit->scheduled_at?->format('g:i A') ?? 'TBD' }} · {{ $visit->host?->name }} · {{ str_replace('_', ' ', $visit->status) }}

+
+
+ @empty +

No expected arrivals today.

+ @endforelse +
+ + @if ($pendingApprovals->isNotEmpty()) +
+
+

Pending approval

+
+ @foreach ($pendingApprovals as $visit) + +
+

{{ $visit->visitor->full_name }}

+

{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }} · {{ $visit->host?->name }}

+
+
+ @endforeach +
+ @endif +
+
diff --git a/resources/views/frontdesk/devices/create.blade.php b/resources/views/frontdesk/devices/create.blade.php new file mode 100644 index 0000000..cf1770c --- /dev/null +++ b/resources/views/frontdesk/devices/create.blade.php @@ -0,0 +1,40 @@ + +
+

Register device

+
+ @csrf +
+ + +
+
+ + +
+
+ + +
+
+ + +
+

Kiosks and printers receive a device token for unattended access.

+ +
+
+
diff --git a/resources/views/frontdesk/devices/edit.blade.php b/resources/views/frontdesk/devices/edit.blade.php new file mode 100644 index 0000000..ab78d8a --- /dev/null +++ b/resources/views/frontdesk/devices/edit.blade.php @@ -0,0 +1,73 @@ + +
+

Edit device

+
+ @csrf @method('PUT') +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + @if ($device->device_token) +
+

Device token

+ {{ $device->device_token }} + @if ($device->type === 'kiosk') + Open kiosk URL + @endif +
+ @endif + +
+ Back + +
+
+ + @if ($device->device_token) +
+ @csrf + +
+ @endif + +
+ @csrf @method('DELETE') + +
+
+
diff --git a/resources/views/frontdesk/devices/index.blade.php b/resources/views/frontdesk/devices/index.blade.php new file mode 100644 index 0000000..a5d6f55 --- /dev/null +++ b/resources/views/frontdesk/devices/index.blade.php @@ -0,0 +1,58 @@ + +
+
+

Devices

+

Kiosks, printers, and reception hardware

+
+ @if ($canManage) + Add device + @endif +
+ +
+ + + + + + + + + + + + + @forelse ($devices as $device) + + + + + + + + + @empty + + @endforelse + +
NameTypeStatusDesk / branchLast online
{{ $device->name }}{{ $deviceTypes[$device->type] ?? $device->type }} + + {{ $device->isOnline() ? 'Online' : ucfirst($device->status) }} + + + {{ $device->receptionDesk?->name ?? '—' }} + @if ($device->branch) + · {{ $device->branch->name }} + @endif + {{ $device->last_online_at?->diffForHumans() ?? 'Never' }} + @if ($canManage) + Edit + @endif + @if ($device->type === 'kiosk' && $device->device_token) + Open kiosk + @endif +
No devices registered yet.
+
+ + {{ $devices->links() }} +
diff --git a/resources/views/frontdesk/host-portal/index.blade.php b/resources/views/frontdesk/host-portal/index.blade.php new file mode 100644 index 0000000..67e936b --- /dev/null +++ b/resources/views/frontdesk/host-portal/index.blade.php @@ -0,0 +1,89 @@ + +
+
+

Host portal

+

{{ $host->name }} · {{ $organization->name }}

+
+
+
+ @csrf + +
+ Pre-register visitor +
+
+ + @if ($pending->isNotEmpty()) +
+

Awaiting your approval

+
+ @foreach ($pending as $visit) +
+
+

{{ $visit->visitor->full_name }}

+

{{ str_replace('_', ' ', $visit->visitor_type) }} · {{ $visit->purpose ?: 'No purpose given' }}

+
+
+ @csrf + +
+
+ @endforeach +
+
+ @endif + +
+

Upcoming visits

+
+ + + + + + + + + + @forelse ($upcoming as $visit) + + + + + + @empty + + @endforelse + +
VisitorWhenStatus
{{ $visit->visitor->full_name }}{{ $visit->scheduled_at?->format('M j, g:i A') ?? '—' }}{{ str_replace('_', ' ', $visit->status) }}
No upcoming visits.
+
+
+ +
+

Recent history

+
+ + + + + + + + + + @forelse ($recent as $visit) + + + + + + @empty + + @endforelse + +
VisitorStatusUpdated
{{ $visit->visitor->full_name }}{{ str_replace('_', ' ', $visit->status) }}{{ $visit->updated_at->diffForHumans() }}
No recent visits.
+
+
+
diff --git a/resources/views/frontdesk/host-portal/schedule.blade.php b/resources/views/frontdesk/host-portal/schedule.blade.php new file mode 100644 index 0000000..51a1782 --- /dev/null +++ b/resources/views/frontdesk/host-portal/schedule.blade.php @@ -0,0 +1,54 @@ + +
+

Pre-register visitor

+

Schedule a visit as {{ $host->name }}

+ +
+ @csrf +
+ + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ Cancel + +
+
+
+
diff --git a/resources/views/frontdesk/hosts/create.blade.php b/resources/views/frontdesk/hosts/create.blade.php new file mode 100644 index 0000000..2c7cacd --- /dev/null +++ b/resources/views/frontdesk/hosts/create.blade.php @@ -0,0 +1,42 @@ + +
+

Add host

+
+ @csrf +
+ + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+ +
+
+
diff --git a/resources/views/frontdesk/hosts/edit.blade.php b/resources/views/frontdesk/hosts/edit.blade.php new file mode 100644 index 0000000..8d56c47 --- /dev/null +++ b/resources/views/frontdesk/hosts/edit.blade.php @@ -0,0 +1,33 @@ + +
+

Edit host

+
+ @csrf @method('PUT') +
+
+
+
+
+
+
+
+
+
+ + +
+ +
+ + +

When set, this user can access the host self-service portal.

+
+ +
+
+
diff --git a/resources/views/frontdesk/hosts/index.blade.php b/resources/views/frontdesk/hosts/index.blade.php new file mode 100644 index 0000000..3c5d7a8 --- /dev/null +++ b/resources/views/frontdesk/hosts/index.blade.php @@ -0,0 +1,36 @@ + +
+

Host directory

+ Add host +
+ +
+ + + + + + + + + + + + @forelse ($hosts as $host) + + + + + + + + @empty + + @endforelse + +
NameDepartmentOfficeContact
{{ $host->name }}{{ $host->department ?? '—' }}{{ $host->office ?? '—' }}{{ $host->email ?? $host->phone ?? '—' }} + Edit +
No hosts yet. Add your first host to enable visitor notifications.
+
+
{{ $hosts->links() }}
+
diff --git a/resources/views/frontdesk/integrations/edit.blade.php b/resources/views/frontdesk/integrations/edit.blade.php new file mode 100644 index 0000000..489ae56 --- /dev/null +++ b/resources/views/frontdesk/integrations/edit.blade.php @@ -0,0 +1,52 @@ + +

Integrations

+

Connect Ladill apps and external systems.

+ +
+

Supported Ladill apps

+
    + @foreach ($integrations as $key => $label) +
  • {{ $label }} ({{ $key }})
  • + @endforeach +
+

Sibling apps authenticate with service API keys and can create visits via POST /api/visits with external_ref for idempotency.

+
+ + @if ($canManage) +
+ @csrf @method('PUT') + +
+

Outbound webhooks

+
+ + +
+
+ + +
+
+

Events

+
+ @foreach ($webhookEvents as $event) + + @endforeach +
+
+ + +
+
+ @endif + +
+

Calendar feed (iCal)

+

Subscribe to scheduled visits in Outlook, Google Calendar, or Apple Calendar.

+ {{ $icalUrl }} +
+
diff --git a/resources/views/frontdesk/kiosk/index.blade.php b/resources/views/frontdesk/kiosk/index.blade.php new file mode 100644 index 0000000..14c44a8 --- /dev/null +++ b/resources/views/frontdesk/kiosk/index.blade.php @@ -0,0 +1,255 @@ + + + + + + + Visitor Check-in · {{ $organization->name }} + @vite(['resources/css/app.css', 'resources/js/app.js']) + + +
+
+

{{ $organization->name }}

+

Welcome — please check in

+
+ +
+ + + + + + + +
+
+ + + + diff --git a/resources/views/frontdesk/onboarding/show.blade.php b/resources/views/frontdesk/onboarding/show.blade.php new file mode 100644 index 0000000..f1cc2d8 --- /dev/null +++ b/resources/views/frontdesk/onboarding/show.blade.php @@ -0,0 +1,60 @@ + +
+

Welcome to Ladill Frontdesk

+

Set up your organization to start managing visitors.

+ +
+ @csrf + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ + +
+
+ +
+ + +
+ + +
+
+
diff --git a/resources/views/frontdesk/partials/type-fields.blade.php b/resources/views/frontdesk/partials/type-fields.blade.php new file mode 100644 index 0000000..cf7bad0 --- /dev/null +++ b/resources/views/frontdesk/partials/type-fields.blade.php @@ -0,0 +1,54 @@ +@props(['typeConfigs']) + +
+

Type-specific details

+ + @foreach ($typeConfigs as $type => $config) + @if (count($config['fields']) > 0) +
+ @if ($config['requires_approval']) +

This visitor type requires reception approval before a badge is issued.

+ @endif + + @foreach ($config['fields'] as $field) +
+ + + @if ($field['type'] === 'textarea') + + @elseif ($field['type'] === 'checkbox') + + @elseif ($field['type'] === 'photo') + + @elseif ($field['type'] === 'date') + + @elseif ($field['type'] === 'datetime-local') + + @else + + @endif +
+ @endforeach +
+ @endif + @endforeach +
diff --git a/resources/views/frontdesk/qr/checked-out.blade.php b/resources/views/frontdesk/qr/checked-out.blade.php new file mode 100644 index 0000000..a8a3a78 --- /dev/null +++ b/resources/views/frontdesk/qr/checked-out.blade.php @@ -0,0 +1,16 @@ + + + + + + Checked out + @vite(['resources/css/app.css']) + + +
+

+

{{ $visit->visitor->full_name }} checked out

+

{{ now()->format('g:i A') }}

+
+ + diff --git a/resources/views/frontdesk/qr/show.blade.php b/resources/views/frontdesk/qr/show.blade.php new file mode 100644 index 0000000..5399af4 --- /dev/null +++ b/resources/views/frontdesk/qr/show.blade.php @@ -0,0 +1,31 @@ + + + + + + Visit · {{ $visit->visitor->full_name }} + @vite(['resources/css/app.css']) + + +
+

{{ $visit->visitor->full_name }}

+

{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }}

+ +
+
Status
{{ str_replace('_', ' ', $visit->status) }}
+
Host
{{ $visit->host?->name ?? '—' }}
+
Checked in
{{ $visit->checked_in_at?->format('M j, g:i A') ?? '—' }}
+
Badge expires
{{ $visit->badge_expires_at?->format('g:i A') ?? '—' }}
+
+ +
{!! $qrSvg !!}
+ + @if ($visit->isInside()) +
+ @csrf + +
+ @endif +
+ + diff --git a/resources/views/frontdesk/reports/index.blade.php b/resources/views/frontdesk/reports/index.blade.php new file mode 100644 index 0000000..5df9449 --- /dev/null +++ b/resources/views/frontdesk/reports/index.blade.php @@ -0,0 +1,74 @@ + +
+
+

Reports

+

{{ $organization->name }}

+
+ @if ($canExport) + Export CSV + @endif +
+ +
+ + + +
+ +
+ @foreach ($summary as $key => $value) +
+

{{ str_replace('_', ' ', $key) }}

+

{{ $value }}

+
+ @endforeach +
+ +
+
+

Peak check-in hours

+
+ @php $maxPeak = max(1, collect($peakHours)->max('count')); @endphp + @foreach ($peakHours as $row) +
+
+ {{ $row['hour'] }} +
+ @endforeach +
+
+ +
+

Security incidents

+
+ @foreach ($security as $key => $count) +
{{ str_replace('_', ' ', $key) }}
{{ $count }}
+ @endforeach +
+
+
+ +
+
+

Visits by department

+ + @forelse ($departments as $row) + + @empty + + @endforelse +
{{ $row->department }}{{ $row->count }}
No data for this period.
+
+ +
+

Frequent visitors

+
    + @forelse ($frequentVisitors as $visitor) +
  • {{ $visitor->full_name }}{{ $visitor->visit_count }} visits
  • + @empty +
  • No frequent visitors yet.
  • + @endforelse +
+
+
+
diff --git a/resources/views/frontdesk/security/evacuation-badges.blade.php b/resources/views/frontdesk/security/evacuation-badges.blade.php new file mode 100644 index 0000000..c61b372 --- /dev/null +++ b/resources/views/frontdesk/security/evacuation-badges.blade.php @@ -0,0 +1,24 @@ + + + + + Evacuation badges · {{ $organization->name }} + + + +
+ {{ $visits->count() }} badge(s) — + +
+
+ @foreach ($rendered as $html) +
{!! $html !!}
+ @endforeach +
+ + diff --git a/resources/views/frontdesk/security/evacuation.blade.php b/resources/views/frontdesk/security/evacuation.blade.php new file mode 100644 index 0000000..3c3c0f5 --- /dev/null +++ b/resources/views/frontdesk/security/evacuation.blade.php @@ -0,0 +1,46 @@ + + + + + Emergency Evacuation Report · {{ $organization->name }} + + + + +

Emergency Evacuation Report

+

{{ $organization->name }} · Generated {{ now()->format('M j, Y g:i A') }} · {{ $occupancy->count() }} occupants

+ + + + + + + + + + + + + + @foreach ($occupancy as $visit) + + + + + + + + + @endforeach + +
NameTypeHostBranchChecked inPhone
{{ $visit->visitor->full_name }}{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }}{{ $visit->host?->name ?? '—' }}{{ $visit->branch?->name ?? '—' }}{{ $visit->checked_in_at?->format('g:i A') }}{{ $visit->visitor->phone ?? '—' }}
+ + diff --git a/resources/views/frontdesk/security/index.blade.php b/resources/views/frontdesk/security/index.blade.php new file mode 100644 index 0000000..aeb83a3 --- /dev/null +++ b/resources/views/frontdesk/security/index.blade.php @@ -0,0 +1,54 @@ + +
+
+

Security dashboard

+

{{ $occupancy->count() }} people currently inside

+
+ + Evacuation report + + + Verify badge + +
+ + @if ($expiredBadges->isNotEmpty()) +
+ {{ $expiredBadges->count() }} visitor(s) have expired badges but are still checked in. +
+ @endif + +
+ + + + + + + + + + + + + @foreach ($occupancy as $visit) + + + + + + + + + @endforeach + +
VisitorHostTypeChecked inBadge
{{ $visit->visitor->full_name }}{{ $visit->host?->name ?? '—' }}{{ str_replace('_', ' ', $visit->visitor_type) }}{{ $visit->checked_in_at?->format('g:i A') }}{{ $visit->badge_code }} + @if ($canCheckout) +
+ @csrf + +
+ @endif +
+
+
diff --git a/resources/views/frontdesk/security/verify.blade.php b/resources/views/frontdesk/security/verify.blade.php new file mode 100644 index 0000000..1e5735b --- /dev/null +++ b/resources/views/frontdesk/security/verify.blade.php @@ -0,0 +1,46 @@ + +
+

Badge verification

+

Scan or enter a badge code / QR token

+ +
+ @csrf + + +
+ + @isset($lookup) + @if ($visit) +
+
+
+

{{ $visit->visitor->full_name }}

+

{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }} · {{ $visit->host?->name }}

+
+ @if ($visit->isInside() && ! $visit->isBadgeExpired()) + Valid + @elseif ($visit->isInside() && $visit->isBadgeExpired()) + Expired badge + @else + {{ str_replace('_', ' ', $visit->status) }} + @endif +
+ +
+
Badge
{{ $visit->badge_code }}
+
Checked in
{{ $visit->checked_in_at?->format('M j, Y g:i A') ?? '—' }}
+
Expires
{{ $visit->badge_expires_at?->format('g:i A') ?? '—' }}
+
Branch
{{ $visit->branch?->name ?? '—' }}
+
Watchlist
{{ str_replace('_', ' ', $visit->visitor->watchlist_status) }}
+
+ + View full visit record +
+ @else +

No matching visit found for “{{ $lookup }}”.

+ @endif + @endisset +
+
diff --git a/resources/views/frontdesk/settings/edit.blade.php b/resources/views/frontdesk/settings/edit.blade.php new file mode 100644 index 0000000..2ffd8f0 --- /dev/null +++ b/resources/views/frontdesk/settings/edit.blade.php @@ -0,0 +1,121 @@ + + @php + $settings = $organization->settings ?? []; + @endphp + +

Settings

+

{{ $organization->name }}

+ +
+ @csrf @method('PUT') + +
+

Organization

+ @if ($canManage) +
+ + +
+
+ + +
+ @else +
+
Name
{{ $organization->name }}
+
Timezone
{{ $organization->timezone }}
+
+ @endif +
+ + @if ($canManage) +
+

Reception & kiosk

+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+

Notification channels

+
+ @foreach ($notificationChannels as $key => $label) + + @endforeach +
+
+
+

Notification events

+
+ @foreach ($notificationEvents as $key => $label) + + @endforeach +
+
+
+ + +

Comma-separated emails for the daily summary report.

+
+
+ + + @endif +
+ + +
diff --git a/resources/views/frontdesk/visitors/check-in.blade.php b/resources/views/frontdesk/visitors/check-in.blade.php new file mode 100644 index 0000000..aa00aaf --- /dev/null +++ b/resources/views/frontdesk/visitors/check-in.blade.php @@ -0,0 +1,66 @@ + +
+

Quick check-in

+

+ Returning visitor · {{ $visitor->full_name }} + @if ($visitor->is_frequent) + Frequent + @endif +

+ +
+
Company
{{ $visitor->company ?? '—' }}
+
Phone
{{ $visitor->phone ?? '—' }}
+
Email
{{ $visitor->email ?? '—' }}
+
Total visits
{{ $visitor->visit_count }}
+
+ +
+ @csrf + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ + + + +
+
+
diff --git a/resources/views/frontdesk/visitors/index.blade.php b/resources/views/frontdesk/visitors/index.blade.php new file mode 100644 index 0000000..ef640e3 --- /dev/null +++ b/resources/views/frontdesk/visitors/index.blade.php @@ -0,0 +1,35 @@ + +
+

Visitor database

+
+ +
+ +
+ +
+ + + + + + + + + + + @forelse ($visitors as $visitor) + + + + + + + @empty + + @endforelse + +
NameCompanyVisitsStatus
{{ $visitor->full_name }}{{ $visitor->company ?? '—' }}{{ $visitor->visit_count }}{{ str_replace('_', ' ', $visitor->watchlist_status) }}
No visitors yet.
+
+
{{ $visitors->links() }}
+
diff --git a/resources/views/frontdesk/visitors/show.blade.php b/resources/views/frontdesk/visitors/show.blade.php new file mode 100644 index 0000000..aca15c6 --- /dev/null +++ b/resources/views/frontdesk/visitors/show.blade.php @@ -0,0 +1,106 @@ + +
+
+

{{ $visitor->full_name }}

+

{{ $visitor->company }} · {{ $visitor->visit_count }} visits · {{ ucfirst(str_replace('_', ' ', $visitor->watchlist_status)) }}

+
+ @if ($canManage) + Quick check-in +
+ @csrf @method('DELETE') + +
+ @endif +
+ + @if ($canManage) +
+ @csrf @method('PATCH') +

Profile

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ + + @if ($visitor->photo_path) +

Current photo on file

+ @endif +
+
+ + + @if ($visitor->id_document_path) +

Current document on file

+ @endif +
+
+ +
+ +
+ @csrf @method('PATCH') +

Watchlist

+
+ + +
+ +
+ @endif + + @if ($activity->isNotEmpty()) +
+
+

Activity

+
+ @foreach ($activity as $log) +
+

{{ $auditActions[$log->action] ?? $log->action }}

+

{{ $log->created_at?->format('M j, Y g:i A') }} · {{ $log->actor_ref ?? 'System' }}

+
+ @endforeach +
+ @endif + + +
diff --git a/resources/views/frontdesk/visits/calendar.blade.php b/resources/views/frontdesk/visits/calendar.blade.php new file mode 100644 index 0000000..280c045 --- /dev/null +++ b/resources/views/frontdesk/visits/calendar.blade.php @@ -0,0 +1,39 @@ + +
+
+

Visit calendar

+

{{ $start->format('M j') }} – {{ $end->format('M j, Y') }}

+
+ +
+ +
+ @for ($day = $start->copy(); $day->lte($end); $day->addDay()) + @php $dateKey = $day->toDateString(); @endphp +
+
+

{{ $day->format('D') }}

+

{{ $day->format('M j') }}

+
+
+ @forelse ($visits->get($dateKey, collect()) as $visit) + +

{{ $visit->scheduled_at->format('g:i A') }}

+

{{ $visit->visitor->full_name }}

+

{{ str_replace('_', ' ', $visit->status) }}

+
+ @empty +

No visits

+ @endforelse +
+
+ @endfor +
+
diff --git a/resources/views/frontdesk/visits/create.blade.php b/resources/views/frontdesk/visits/create.blade.php new file mode 100644 index 0000000..0ef1dba --- /dev/null +++ b/resources/views/frontdesk/visits/create.blade.php @@ -0,0 +1,103 @@ + +
+

Check in visitor

+

Register a new visit or search for a returning visitor.

+ +
+ +
+ + @if ($returningVisitors->isNotEmpty()) +
+

Returning visitors

+ @foreach ($returningVisitors as $visitor) +
+ + Quick check-in +
+ @endforeach +
+ @endif + +
+ @csrf + + +
+ + +
+ +
+
+ + +
+
+ + +
+
+ + @include('frontdesk.partials.type-fields', ['typeConfigs' => $typeConfigs]) + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + +
+
+
diff --git a/resources/views/frontdesk/visits/index.blade.php b/resources/views/frontdesk/visits/index.blade.php new file mode 100644 index 0000000..f04e75e --- /dev/null +++ b/resources/views/frontdesk/visits/index.blade.php @@ -0,0 +1,49 @@ + +
+

Visits

+ +
+ +
+ + + +
+ +
+ + + + + + + + + + + + @forelse ($visits as $visit) + + + + + + + + @empty + + @endforelse + +
VisitorHostTypeStatusTime
{{ $visit->visitor->full_name }}{{ $visit->host?->name ?? '—' }}{{ str_replace('_', ' ', $visit->visitor_type) }}{{ str_replace('_', ' ', $visit->status) }}{{ $visit->checked_in_at?->format('M j, g:i A') ?? $visit->scheduled_at?->format('M j, g:i A') ?? $visit->created_at->format('M j, g:i A') }}
No visits yet.
+
+ +
{{ $visits->links() }}
+
diff --git a/resources/views/frontdesk/visits/schedule.blade.php b/resources/views/frontdesk/visits/schedule.blade.php new file mode 100644 index 0000000..a999823 --- /dev/null +++ b/resources/views/frontdesk/visits/schedule.blade.php @@ -0,0 +1,102 @@ + +
+

Pre-register visitor

+

Schedule an expected arrival without checking in.

+ +
+ +
+ + @if ($returningVisitors->isNotEmpty()) +
+

Returning visitors

+ @foreach ($returningVisitors as $visitor) + + @endforeach +
+ @endif + +
+ @csrf + + +
+ + +
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+
diff --git a/resources/views/frontdesk/visits/show.blade.php b/resources/views/frontdesk/visits/show.blade.php new file mode 100644 index 0000000..7592f5a --- /dev/null +++ b/resources/views/frontdesk/visits/show.blade.php @@ -0,0 +1,99 @@ + +
+
+
+

{{ $visit->visitor->full_name }}

+

{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }} · Badge {{ $visit->badge_code }}

+
+
+ @if ($visit->isInside()) + Print badge + Preview +
+ @csrf + +
+ @elseif ($canManage && $visit->awaitingApproval()) +
+ @csrf + +
+ @elseif ($canManage && $visit->canActivateCheckIn()) +
+ @csrf + + +
+ @elseif ($canManage && ! $visit->isInside()) +
+ @csrf @method('DELETE') + +
+ @endif +
+
+ + @if ($visit->awaitingApproval()) +

Awaiting reception approval before badge issue.

+ @endif + + @if ($canManage && $visit->isPending() && ! $visit->awaitingApproval()) +
+ @if (in_array($visit->status, ['expected', 'scheduled', 'overdue'], true)) +
+ @csrf + +
+ @endif +
+ @csrf + + +
+
+ @endif + + @php $typeDetails = $visit->typeDetailEntries(); @endphp + @if (count($typeDetails) > 0) +
+

{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }} details

+
+ @foreach ($typeDetails as $label => $value) +
+
{{ $label }}
+
{{ $value }}
+
+ @endforeach +
+
+ @endif + +
+
+

Visit details

+
+
Status
{{ str_replace('_', ' ', $visit->status) }}
+
Scheduled
{{ $visit->scheduled_at?->format('M j, Y g:i A') ?? '—' }}
+
Checked in
{{ $visit->checked_in_at?->format('M j, Y g:i A') ?? '—' }}
+
Checked out
{{ $visit->checked_out_at?->format('M j, Y g:i A') ?? '—' }}
+
Badge expires
{{ $visit->badge_expires_at?->format('g:i A') ?? '—' }}
+
Purpose
{{ $visit->purpose ?? '—' }}
+ @if ($visit->notes) +
Notes
{{ $visit->notes }}
+ @endif +
+
+
+

Host

+
+
Name
{{ $visit->host?->name ?? '—' }}
+
Department
{{ $visit->host?->department ?? '—' }}
+
Office
{{ $visit->host?->office ?? '—' }}
+
+
+
+
+
diff --git a/resources/views/frontdesk/watchlist/create.blade.php b/resources/views/frontdesk/watchlist/create.blade.php new file mode 100644 index 0000000..cae88e6 --- /dev/null +++ b/resources/views/frontdesk/watchlist/create.blade.php @@ -0,0 +1,47 @@ + +
+

Add watchlist entry

+ +
+ @csrf + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+
diff --git a/resources/views/frontdesk/watchlist/index.blade.php b/resources/views/frontdesk/watchlist/index.blade.php new file mode 100644 index 0000000..f14b427 --- /dev/null +++ b/resources/views/frontdesk/watchlist/index.blade.php @@ -0,0 +1,66 @@ + +
+
+

Watchlist

+

Flagged and blocked visitors

+
+ @if ($canManage) + Add entry + @endif +
+ +
+ + + +
+ +
+ + + + + + + + + + + + @forelse ($entries as $entry) + + + + + + + + @empty + + @endforelse + +
NameCompanyStatusReason
+ @if ($entry->visitor) + {{ $entry->full_name }} + @else + {{ $entry->full_name }} + @endif + {{ $entry->company ?? '—' }}{{ str_replace('_', ' ', $entry->status) }}{{ Str::limit($entry->reason, 60) ?: '—' }} + @if ($canManage) +
+ @csrf @method('DELETE') + +
+ @endif +
No watchlist entries.
+
+ +
{{ $entries->links() }}
+
diff --git a/resources/views/notifications/index.blade.php b/resources/views/notifications/index.blade.php new file mode 100644 index 0000000..737a023 --- /dev/null +++ b/resources/views/notifications/index.blade.php @@ -0,0 +1,24 @@ + +
+

Notifications

+ + + +
{{ $notifications->links() }}
+
+
diff --git a/resources/views/partials/afia-button.blade.php b/resources/views/partials/afia-button.blade.php new file mode 100644 index 0000000..35c0366 --- /dev/null +++ b/resources/views/partials/afia-button.blade.php @@ -0,0 +1,15 @@ +@props(['compact' => false]) + + diff --git a/resources/views/partials/afia.blade.php b/resources/views/partials/afia.blade.php new file mode 100644 index 0000000..68f74eb --- /dev/null +++ b/resources/views/partials/afia.blade.php @@ -0,0 +1,106 @@ +@php + $afiaGreeting = "Hi, I'm Afia 👋 Ask me about contacts, leads, your deal pipeline, logging activities, or sending an email or SMS…"; + $afiaSuggestions = [ + 'How do I add a contact?', + 'How does the deal pipeline work?', + 'How do I convert a lead?', + 'How do I email a contact?', + ]; +@endphp +{{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}} +
+
+ +
+
+
+ + + + +
+

Afia

+

CRM assistant

+
+
+
+ History + +
+
+ +
+
+ +
+
+
+ + + +
+
+
+
+ +
+ +
+
+ +
+
+ + +
+

Afia can make mistakes — verify important details.

+
+
+
diff --git a/resources/views/partials/boot-splash.blade.php b/resources/views/partials/boot-splash.blade.php new file mode 100644 index 0000000..5d86769 --- /dev/null +++ b/resources/views/partials/boot-splash.blade.php @@ -0,0 +1,43 @@ +@php + // Branded boot splash (Ladill Mail style). Self-icon from this app's subdomain. + $sub = strtolower((string) ((explode('.', (string) (parse_url((string) config('app.url'), PHP_URL_HOST) ?: '')))[0] ?? '')); + $icon = $sub !== '' && is_file(public_path("images/launcher-icons/{$sub}.svg")) ? "images/launcher-icons/{$sub}.svg" : null; + $label = (string) config('app.name', 'Ladill'); +@endphp +
+
+ @if ($icon) + + @endif +
+
Loading {{ $label }}…
+
+
+ + diff --git a/resources/views/partials/favicon.blade.php b/resources/views/partials/favicon.blade.php new file mode 100644 index 0000000..8933ddf --- /dev/null +++ b/resources/views/partials/favicon.blade.php @@ -0,0 +1,8 @@ +@php + $svgVer = @filemtime(public_path('favicon.svg')) ?: '1'; + $icoVer = @filemtime(public_path('favicon.ico')) ?: '1'; +@endphp + + + + diff --git a/resources/views/partials/flash.blade.php b/resources/views/partials/flash.blade.php new file mode 100644 index 0000000..657ef02 --- /dev/null +++ b/resources/views/partials/flash.blade.php @@ -0,0 +1,34 @@ +@if (session('success')) +
+
+

{{ session('success') }}

+
+
+@endif + +@if (session('error')) +
+
+

{{ session('error') }}

+
+
+@endif + +@if (session('warning')) +
+
+

{{ session('warning') }}

+
+
+@endif + +@if ($errors->any()) +
+

Please fix the following:

+
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+@endif diff --git a/resources/views/partials/launcher.blade.php b/resources/views/partials/launcher.blade.php new file mode 100644 index 0000000..c26873d --- /dev/null +++ b/resources/views/partials/launcher.blade.php @@ -0,0 +1,53 @@ +@php + // Shared Ladill app launcher — IDENTICAL across every app/service. + // Driven by config/ladill_launcher.php (fully-extracted apps only) + icons + // from public/images/launcher-icons/. Omits the current app (matched by + // APP_URL host). To replicate elsewhere, copy this file + the config + + // the launcher-icons folder verbatim. + $sidebar = (bool) ($sidebar ?? false); + $selfHost = parse_url((string) config('app.url'), PHP_URL_HOST); + $launcherApps = array_values(array_filter( + config('ladill_launcher.apps', []), + fn (array $app) => parse_url($app['url'], PHP_URL_HOST) !== $selfHost + )); +@endphp +@if (! empty($launcherApps)) +
+ +
! $sidebar, + 'bottom-full left-0 mb-2' => $sidebar, + ])> +

All apps

+
+ @foreach ($launcherApps as $app) + + + + + {{ $app['name'] }} + + @endforeach +
+
+
+@endif diff --git a/resources/views/partials/notification-dropdown.blade.php b/resources/views/partials/notification-dropdown.blade.php new file mode 100644 index 0000000..be1a23b --- /dev/null +++ b/resources/views/partials/notification-dropdown.blade.php @@ -0,0 +1,97 @@ +{{-- In-app notification bell + dropdown (scoped to this app). --}} + diff --git a/resources/views/partials/sidebar.blade.php b/resources/views/partials/sidebar.blade.php new file mode 100644 index 0000000..e553a91 --- /dev/null +++ b/resources/views/partials/sidebar.blade.php @@ -0,0 +1,114 @@ +
+
+ + Ladill Frontdesk + +
+ @php + $member = auth()->user() + ? app(\App\Services\Frontdesk\OrganizationResolver::class)->memberFor(auth()->user()) + : null; + $permissions = app(\App\Services\Frontdesk\FrontdeskPermissions::class); + $linkedHost = auth()->user() + ? app(\App\Services\Frontdesk\OrganizationResolver::class)->hostFor(auth()->user()) + : null; + + $nav = [ + ['name' => 'Reception', 'route' => route('frontdesk.dashboard'), 'active' => request()->routeIs('frontdesk.dashboard'), + 'icon' => ''], + ['name' => 'Check-in', 'route' => route('frontdesk.visits.create'), 'active' => request()->routeIs('frontdesk.visits.create'), + 'icon' => ''], + ['name' => 'Visits', 'route' => route('frontdesk.visits.index'), 'active' => request()->routeIs('frontdesk.visits.*') && !request()->routeIs('frontdesk.visits.create') && !request()->routeIs('frontdesk.visits.schedule*'), + 'icon' => ''], + ['name' => 'Schedule', 'route' => route('frontdesk.visits.schedule'), 'active' => request()->routeIs('frontdesk.visits.schedule*'), + 'icon' => ''], + ['name' => 'Calendar', 'route' => route('frontdesk.visits.calendar'), 'active' => request()->routeIs('frontdesk.visits.calendar'), + 'icon' => ''], + ['name' => 'Visitors', 'route' => route('frontdesk.visitors.index'), 'active' => request()->routeIs('frontdesk.visitors.*'), + 'icon' => ''], + ['name' => 'Hosts', 'route' => route('frontdesk.hosts.index'), 'active' => request()->routeIs('frontdesk.hosts.*'), + 'icon' => ''], + ['name' => 'Kiosk', 'route' => route('frontdesk.kiosk'), 'active' => request()->routeIs('frontdesk.kiosk') && !request()->routeIs('frontdesk.kiosk.device*'), + 'icon' => ''], + ]; + + if ($permissions->can($member, 'host.portal') || $linkedHost) { + $nav[] = ['name' => 'Host portal', 'route' => route('frontdesk.host.index'), 'active' => request()->routeIs('frontdesk.host.*'), + 'icon' => '']; + } + + $nav = array_merge($nav, [ + ['name' => 'Security', 'route' => route('frontdesk.security.index'), 'active' => request()->routeIs('frontdesk.security.*'), + 'icon' => ''], + ]); + + if ($permissions->can($member, 'reports.view')) { + $nav[] = ['name' => 'Reports', 'route' => route('frontdesk.reports.index'), 'active' => request()->routeIs('frontdesk.reports.*'), + 'icon' => '']; + } + + if ($permissions->can($member, 'devices.view')) { + $nav[] = ['name' => 'Devices', 'route' => route('frontdesk.devices.index'), 'active' => request()->routeIs('frontdesk.devices.*'), + 'icon' => '']; + } + + if ($permissions->can($member, 'watchlist.view')) { + $nav[] = ['name' => 'Watchlist', 'route' => route('frontdesk.watchlist.index'), 'active' => request()->routeIs('frontdesk.watchlist.*'), + 'icon' => '']; + } + + if ($permissions->can($member, 'audit.view')) { + $nav[] = ['name' => 'Audit log', 'route' => route('frontdesk.audit.index'), 'active' => request()->routeIs('frontdesk.audit.*'), + 'icon' => '']; + } + + $complianceNav = []; + if ($permissions->can($member, 'compliance.restore')) { + $complianceNav[] = ['name' => 'Recovery', 'route' => route('frontdesk.compliance.recovery'), 'active' => request()->routeIs('frontdesk.compliance.*')]; + } + + $adminNav = []; + if ($permissions->can($member, 'admin.branches.view')) { + $adminNav[] = ['name' => 'Branches', 'route' => route('frontdesk.branches.index'), 'active' => request()->routeIs('frontdesk.branches.*') || request()->routeIs('frontdesk.buildings.*') || request()->routeIs('frontdesk.desks.*')]; + } + if ($permissions->can($member, 'admin.members.view')) { + $adminNav[] = ['name' => 'Team', 'route' => route('frontdesk.members.index'), 'active' => request()->routeIs('frontdesk.members.*')]; + } + @endphp + + + +
diff --git a/resources/views/partials/topbar-account-switcher.blade.php b/resources/views/partials/topbar-account-switcher.blade.php new file mode 100644 index 0000000..dfcaf02 --- /dev/null +++ b/resources/views/partials/topbar-account-switcher.blade.php @@ -0,0 +1,24 @@ +{{-- Account switcher (desktop) — only when the user belongs to more than one account. --}} +@if (isset($accessibleAccounts) && $accessibleAccounts->count() > 1) + +@endif diff --git a/resources/views/partials/topbar-desktop-widgets.blade.php b/resources/views/partials/topbar-desktop-widgets.blade.php new file mode 100644 index 0000000..8161ddf --- /dev/null +++ b/resources/views/partials/topbar-desktop-widgets.blade.php @@ -0,0 +1,41 @@ +{{-- + Standard desktop top-right widgets: notifications → launcher → divider → avatar dropdown. +--}} +@php + $topbarUser = $user ?? auth()->user(); + $initials = collect(explode(' ', trim((string) $topbarUser?->name))) + ->filter()->take(2)->map(fn ($p) => strtoupper(substr($p, 0, 1)))->implode(''); + $avatarUrl = $topbarUser && method_exists($topbarUser, 'avatarUrl') + ? $topbarUser->avatarUrl() + : ($topbarUser?->avatar_url ?? null); + $showUserHeader = $showUser ?? true; +@endphp + +@includeIf('partials.notification-dropdown') + +@include('partials.launcher') + +@includeIf('partials.topbar-widgets-mid') + + + +
+ + +
+ @include('partials.user-profile-menu', [ + 'items' => \App\Support\UserProfileMenu::items($topbarUser), + 'user' => $topbarUser, + 'showUser' => $showUserHeader, + ]) +
+
diff --git a/resources/views/partials/topbar.blade.php b/resources/views/partials/topbar.blade.php new file mode 100644 index 0000000..f0cb387 --- /dev/null +++ b/resources/views/partials/topbar.blade.php @@ -0,0 +1,37 @@ +@php + $user = auth()->user(); + $initials = collect(explode(' ', trim((string) $user?->name))) + ->filter()->take(2)->map(fn ($p) => strtoupper(substr($p, 0, 1)))->implode(''); +@endphp +
+
+ + + {{-- Mobile: current page title --}} +

{{ $heading ?? 'Ladill Frontdesk' }}

+ + {{-- Desktop: search (visitors) --}} + +
+ +
+ + @includeIf('partials.topbar-widgets-prepend') + @include('partials.topbar-desktop-widgets', ['user' => $user, 'showUser' => true]) + @includeIf('partials.topbar-widgets-append') +
+
diff --git a/resources/views/partials/user-profile-menu.blade.php b/resources/views/partials/user-profile-menu.blade.php new file mode 100644 index 0000000..c78cb3e --- /dev/null +++ b/resources/views/partials/user-profile-menu.blade.php @@ -0,0 +1,70 @@ +@props([ + 'items' => [], + 'user' => null, + 'showUser' => false, + 'variant' => 'dropdown', + 'onNavigate' => null, +]) + +@php + $linkClass = match ($variant) { + 'dark' => 'block rounded-md px-3 py-2 text-sm text-slate-200 hover:bg-slate-800', + 'sheet' => 'block rounded-xl px-4 py-3 text-sm font-medium text-slate-700 transition hover:bg-slate-100', + default => 'block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100', + }; + + $logoutClass = match ($variant) { + 'dark' => 'w-full rounded-md px-3 py-2 text-left text-sm text-rose-300 hover:bg-rose-950/40', + 'sheet' => 'w-full rounded-xl px-4 py-3 text-left text-sm font-medium text-rose-600 transition hover:bg-rose-50', + default => 'w-full rounded-lg px-3 py-2 text-left text-sm text-rose-600 hover:bg-rose-50', + }; + + $logoutWrapperClass = match ($variant) { + 'sheet' => 'border-t border-slate-100 pt-2', + 'dark' => '', + default => '', + }; + + $dividerClass = match ($variant) { + 'dark' => 'my-1 border-t border-slate-800', + default => 'my-1 border-t border-slate-100', + }; + + $containerClass = match ($variant) { + 'dark' => 'mt-2 rounded-lg border border-slate-800 bg-slate-900 p-1', + 'sheet' => 'space-y-1 p-2 pb-4', + default => 'p-1', + }; +@endphp + +
merge(['class' => $containerClass]) }}> + @if ($showUser && $user) +
+

{{ $user->name ?? 'Your account' }}

+

{{ $user->email }}

+
+
+ @endif + + @foreach ($items as $item) + @if (($item['type'] ?? 'link') === 'link') + + {{ $item['label'] }} + + @elseif (($item['type'] ?? '') === 'wallet') + @includeIf('partials.wallet-widget') + @elseif (($item['type'] ?? '') === 'logout') + @if ($variant !== 'sheet') +
+ @endif +
+ @csrf + +
+ @endif + @endforeach +
diff --git a/resources/views/partials/wallet-topup-modal.blade.php b/resources/views/partials/wallet-topup-modal.blade.php new file mode 100644 index 0000000..d3e6aa3 --- /dev/null +++ b/resources/views/partials/wallet-topup-modal.blade.php @@ -0,0 +1,24 @@ +@props(['openOnLoad' => false, 'suggested' => 10, 'min' => 1, 'returnUrl' => null]) + + +
+

Top up your wallet

+

Add funds to your Ladill wallet to continue.

+
+ +
+ @csrf + + + + +

You'll be taken to Paystack to pay securely; funds land in your Ladill wallet.

+ +
+ + +
+
+
diff --git a/resources/views/partials/wallet-widget.blade.php b/resources/views/partials/wallet-widget.blade.php new file mode 100644 index 0000000..8661874 --- /dev/null +++ b/resources/views/partials/wallet-widget.blade.php @@ -0,0 +1,23 @@ +{{-- Wallet balance peek (links to the account wallet on account.ladill.com). --}} +@php + $balanceRoute = (string) config('billing.wallet_balance_route', 'wallet.balance'); + $balanceUrl = \Illuminate\Support\Facades\Route::has($balanceRoute) ? route($balanceRoute) : null; +@endphp +@if ($balanceUrl) + + + + + + + + + Wallet balance + + + + + +@endif diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 0000000..ce8c7f3 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,29 @@ +) via auth.service:frontdesk. Scoped with ?owner= +| (platform user public_id / OIDC sub). +*/ + +Route::post('devices/heartbeat', DeviceHeartbeatController::class)->middleware('throttle:device-heartbeat')->name('devices.heartbeat'); +Route::post('kiosk/offline-sync', [\App\Http\Controllers\Api\OfflineSyncController::class, 'store'])->middleware('throttle:kiosk-device')->name('kiosk.offline-sync'); + +Route::middleware('auth.service:frontdesk')->group(function () { + Route::apiResource('visits', VisitController::class)->only(['index', 'store', 'show']); + Route::post('visits/{visit}/checkout', [VisitController::class, 'checkOut'])->name('visits.checkout'); + Route::post('visits/{visit}/activate', [VisitController::class, 'activate'])->name('visits.activate'); + Route::post('visits/{visit}/approve', [VisitController::class, 'approve'])->name('visits.approve'); + Route::post('visits/{visit}/cancel', [VisitController::class, 'cancel'])->name('visits.cancel'); + + Route::get('visitors', [VisitorController::class, 'index'])->name('visitors.index'); + Route::get('visitors/{visitor}', [VisitorController::class, 'show'])->name('visitors.show'); +}); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 0000000..a95f7c3 --- /dev/null +++ b/routes/console.php @@ -0,0 +1,14 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); + +Schedule::command('frontdesk:mark-overdue-visits')->everyFiveMinutes(); +Schedule::command('frontdesk:mark-expired-badges')->everyFifteenMinutes(); +Schedule::command('frontdesk:mark-devices-offline')->everyFiveMinutes(); +Schedule::command('frontdesk:send-daily-reports')->dailyAt('07:00'); diff --git a/routes/web.php b/routes/web.php new file mode 100644 index 0000000..2ae7533 --- /dev/null +++ b/routes/web.php @@ -0,0 +1,168 @@ + auth()->check() + ? redirect()->route('frontdesk.dashboard') + : redirect()->route('sso.connect'))->name('frontdesk.root'); + +Route::get('/login', [SsoLoginController::class, 'connect'])->name('login'); +Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect'); +Route::get('/sso/callback', [SsoLoginController::class, 'callback'])->name('sso.callback'); +Route::get('/sso/error', [SsoLoginController::class, 'failed'])->name('sso.failed'); +Route::post('/logout', [SsoLoginController::class, 'logout'])->name('logout'); +Route::get('/sso/logout-bridge', [SsoLoginController::class, 'logoutBridge'])->name('sso.logout-bridge'); +Route::get('/sso/logout-frontchannel', [SsoLoginController::class, 'frontchannelLogout'])->name('sso.logout-frontchannel'); +Route::get('/sso/platform-signed-out', [SsoLoginController::class, 'platformSignedOut'])->name('sso.platform-signed-out'); +Route::get('/signed-out', fn () => auth()->check() ? redirect()->route('frontdesk.dashboard') : view('auth.signed-out'))->name('frontdesk.signed-out'); + +Route::get('/q/{token}', [QrScanController::class, 'show'])->middleware('throttle:qr-scan')->name('frontdesk.qr.show'); +Route::post('/q/{token}/checkout', [QrScanController::class, 'checkOut'])->middleware('throttle:qr-scan')->name('frontdesk.qr.checkout'); + +Route::get('/integrations/ical/{organization}', IcalFeedController::class)->name('frontdesk.integrations.ical'); + +Route::middleware(['frontdesk.device:kiosk', 'throttle:kiosk-device'])->prefix('kiosk/d')->group(function () { + Route::get('/{token}', [KioskDeviceController::class, 'show'])->name('frontdesk.kiosk.device'); + Route::post('/{token}/check-in', [KioskDeviceController::class, 'checkIn'])->name('frontdesk.kiosk.device.check-in'); +}); + +Route::middleware(['auth', 'platform.session'])->group(function () { + Route::get('/onboarding', [OnboardingController::class, 'show'])->name('frontdesk.onboarding.show'); + Route::post('/onboarding', [OnboardingController::class, 'store'])->name('frontdesk.onboarding.store'); + + Route::middleware(['frontdesk.setup'])->group(function () { + Route::get('/dashboard', [DashboardController::class, 'index'])->name('frontdesk.dashboard'); + + Route::get('/notifications', [NotificationController::class, 'index'])->name('notifications.index'); + Route::get('/notifications/unread', [NotificationController::class, 'unread'])->name('notifications.unread'); + Route::post('/notifications/{id}/read', [NotificationController::class, 'markAsRead'])->name('notifications.mark-read'); + Route::post('/notifications/mark-all-read', [NotificationController::class, 'markAllAsRead'])->name('notifications.mark-all-read'); + + Route::get('/visits', [VisitController::class, 'index'])->name('frontdesk.visits.index'); + Route::get('/visits/calendar', [VisitController::class, 'calendar'])->name('frontdesk.visits.calendar'); + Route::get('/visits/create', [VisitController::class, 'create'])->name('frontdesk.visits.create'); + Route::post('/visits', [VisitController::class, 'store'])->name('frontdesk.visits.store'); + Route::get('/visits/schedule', [VisitController::class, 'scheduleForm'])->name('frontdesk.visits.schedule'); + Route::post('/visits/schedule', [VisitController::class, 'scheduleStore'])->name('frontdesk.visits.schedule.store'); + Route::get('/visits/{visit}', [VisitController::class, 'show'])->name('frontdesk.visits.show'); + Route::post('/visits/{visit}/activate', [VisitController::class, 'activate'])->name('frontdesk.visits.activate'); + Route::post('/visits/{visit}/approve', [VisitController::class, 'approve'])->name('frontdesk.visits.approve'); + Route::post('/visits/{visit}/waiting', [VisitController::class, 'markWaiting'])->name('frontdesk.visits.waiting'); + Route::post('/visits/{visit}/cancel', [VisitController::class, 'cancel'])->name('frontdesk.visits.cancel'); + Route::post('/visits/{visit}/checkout', [VisitController::class, 'checkOut'])->name('frontdesk.visits.checkout'); + Route::get('/visits/{visit}/badge', [BadgeController::class, 'print'])->name('frontdesk.visits.badge'); + Route::get('/visits/{visit}/badge/preview', [BadgeController::class, 'preview'])->name('frontdesk.visits.badge.preview'); + + Route::get('/settings/badge-template', [BadgeController::class, 'editTemplate'])->name('frontdesk.settings.badge'); + Route::put('/settings/badge-template', [BadgeController::class, 'updateTemplate'])->name('frontdesk.settings.badge.update'); + + Route::get('/reports', [ReportController::class, 'index'])->name('frontdesk.reports.index'); + Route::get('/reports/export', [ReportController::class, 'export'])->name('frontdesk.reports.export'); + + Route::get('/integrations', [IntegrationController::class, 'edit'])->name('frontdesk.integrations.edit'); + Route::put('/integrations', [IntegrationController::class, 'update'])->name('frontdesk.integrations.update'); + + Route::delete('/visits/{visit}', [ComplianceController::class, 'destroyVisit'])->name('frontdesk.visits.destroy'); + + Route::get('/visitors', [VisitorController::class, 'index'])->name('frontdesk.visitors.index'); + Route::get('/visitors/{visitor}', [VisitorController::class, 'show'])->name('frontdesk.visitors.show'); + Route::delete('/visitors/{visitor}', [ComplianceController::class, 'destroyVisitor'])->name('frontdesk.visitors.destroy'); + Route::get('/visitors/{visitor}/check-in', [VisitorController::class, 'checkInForm'])->name('frontdesk.visitors.check-in'); + Route::post('/visitors/{visitor}/check-in', [VisitorController::class, 'checkIn'])->name('frontdesk.visitors.check-in.store'); + Route::patch('/visitors/{visitor}', [VisitorController::class, 'update'])->name('frontdesk.visitors.update'); + Route::patch('/visitors/{visitor}/watchlist', [VisitorController::class, 'updateWatchlist'])->name('frontdesk.visitors.watchlist'); + + Route::get('/hosts', [HostController::class, 'index'])->name('frontdesk.hosts.index'); + Route::get('/hosts/create', [HostController::class, 'create'])->name('frontdesk.hosts.create'); + Route::post('/hosts', [HostController::class, 'store'])->name('frontdesk.hosts.store'); + Route::get('/hosts/{host}/edit', [HostController::class, 'edit'])->name('frontdesk.hosts.edit'); + Route::put('/hosts/{host}', [HostController::class, 'update'])->name('frontdesk.hosts.update'); + Route::delete('/hosts/{host}', [HostController::class, 'destroy'])->name('frontdesk.hosts.destroy'); + + Route::get('/kiosk', [KioskController::class, 'show'])->name('frontdesk.kiosk'); + Route::post('/kiosk/check-in', [KioskController::class, 'checkIn'])->name('frontdesk.kiosk.check-in'); + + Route::get('/host', [HostPortalController::class, 'index'])->name('frontdesk.host.index'); + Route::get('/host/schedule', [HostPortalController::class, 'scheduleForm'])->name('frontdesk.host.schedule'); + Route::post('/host/schedule', [HostPortalController::class, 'scheduleStore'])->name('frontdesk.host.schedule.store'); + Route::post('/host/visits/{visit}/approve', [HostPortalController::class, 'approve'])->name('frontdesk.host.approve'); + Route::post('/host/availability', [HostPortalController::class, 'toggleAvailability'])->name('frontdesk.host.availability'); + + Route::get('/devices', [DeviceController::class, 'index'])->name('frontdesk.devices.index'); + Route::get('/devices/create', [DeviceController::class, 'create'])->name('frontdesk.devices.create'); + Route::post('/devices', [DeviceController::class, 'store'])->name('frontdesk.devices.store'); + Route::get('/devices/{device}/edit', [DeviceController::class, 'edit'])->name('frontdesk.devices.edit'); + Route::put('/devices/{device}', [DeviceController::class, 'update'])->name('frontdesk.devices.update'); + Route::delete('/devices/{device}', [DeviceController::class, 'destroy'])->name('frontdesk.devices.destroy'); + Route::post('/devices/{device}/regenerate-token', [DeviceController::class, 'regenerateToken'])->name('frontdesk.devices.regenerate-token'); + + Route::get('/security', [SecurityController::class, 'index'])->name('frontdesk.security.index'); + Route::get('/security/evacuation', [SecurityController::class, 'evacuation'])->name('frontdesk.security.evacuation'); + Route::get('/security/evacuation/badges', [SecurityController::class, 'evacuationBadges'])->name('frontdesk.security.evacuation.badges'); + Route::get('/security/verify', [SecurityController::class, 'verifyForm'])->name('frontdesk.security.verify'); + Route::post('/security/verify', [SecurityController::class, 'verify'])->name('frontdesk.security.verify.lookup'); + Route::post('/security/visits/{visit}/checkout', [SecurityController::class, 'checkOut'])->name('frontdesk.security.checkout'); + + Route::get('/watchlist', [WatchlistController::class, 'index'])->name('frontdesk.watchlist.index'); + Route::get('/watchlist/create', [WatchlistController::class, 'create'])->name('frontdesk.watchlist.create'); + Route::post('/watchlist', [WatchlistController::class, 'store'])->name('frontdesk.watchlist.store'); + Route::delete('/watchlist/{entry}', [WatchlistController::class, 'destroy'])->name('frontdesk.watchlist.destroy'); + + Route::get('/audit-logs', [AuditLogController::class, 'index'])->name('frontdesk.audit.index'); + Route::get('/audit-logs/export', [AuditLogController::class, 'export'])->name('frontdesk.audit.export'); + + Route::get('/compliance/recovery', [ComplianceController::class, 'index'])->name('frontdesk.compliance.recovery'); + Route::post('/compliance/visitors/{visitorId}/restore', [ComplianceController::class, 'restoreVisitor'])->name('frontdesk.compliance.visitors.restore'); + Route::post('/compliance/visits/{visitId}/restore', [ComplianceController::class, 'restoreVisit'])->name('frontdesk.compliance.visits.restore'); + + Route::get('/settings', [SettingsController::class, 'edit'])->name('frontdesk.settings'); + Route::put('/settings', [SettingsController::class, 'update'])->name('frontdesk.settings.update'); + + Route::get('/branches', [BranchController::class, 'index'])->name('frontdesk.branches.index'); + Route::get('/branches/create', [BranchController::class, 'create'])->name('frontdesk.branches.create'); + Route::post('/branches', [BranchController::class, 'store'])->name('frontdesk.branches.store'); + Route::get('/branches/{branch}/edit', [BranchController::class, 'edit'])->name('frontdesk.branches.edit'); + Route::put('/branches/{branch}', [BranchController::class, 'update'])->name('frontdesk.branches.update'); + + Route::get('/branches/{branch}/buildings', [BuildingController::class, 'index'])->name('frontdesk.buildings.index'); + Route::post('/branches/{branch}/buildings', [BuildingController::class, 'store'])->name('frontdesk.buildings.store'); + Route::delete('/branches/{branch}/buildings/{building}', [BuildingController::class, 'destroy'])->name('frontdesk.buildings.destroy'); + + Route::get('/buildings/{building}/desks', [ReceptionDeskController::class, 'index'])->name('frontdesk.desks.index'); + Route::post('/buildings/{building}/desks', [ReceptionDeskController::class, 'store'])->name('frontdesk.desks.store'); + Route::delete('/buildings/{building}/desks/{desk}', [ReceptionDeskController::class, 'destroy'])->name('frontdesk.desks.destroy'); + + Route::get('/members', [MemberController::class, 'index'])->name('frontdesk.members.index'); + Route::get('/members/create', [MemberController::class, 'create'])->name('frontdesk.members.create'); + Route::post('/members', [MemberController::class, 'store'])->name('frontdesk.members.store'); + Route::delete('/members/{member}', [MemberController::class, 'destroy'])->name('frontdesk.members.destroy'); + + Route::get('/wallet', fn () => redirect()->away(ladill_account_url('/wallet')))->name('frontdesk.wallet'); + Route::get('/team', fn () => redirect()->away(ladill_account_url('/account/team')))->name('frontdesk.team'); + }); +}); diff --git a/storage/logs/.gitkeep b/storage/logs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/Feature/FrontdeskApiTest.php b/tests/Feature/FrontdeskApiTest.php new file mode 100644 index 0000000..7f1bcac --- /dev/null +++ b/tests/Feature/FrontdeskApiTest.php @@ -0,0 +1,117 @@ + ['care' => $this->apiKey]]); + + $this->user = User::create([ + 'public_id' => 'api-user-001', + 'name' => 'API User', + 'email' => 'api@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'API Org', + 'slug' => 'api-org', + 'settings' => ['onboarded' => true], + ]); + } + + public function test_api_requires_service_key(): void + { + $this->getJson('/api/visits?owner='.$this->user->public_id) + ->assertUnauthorized(); + } + + public function test_api_can_create_visit(): void + { + $response = $this->withHeaders(['Authorization' => 'Bearer '.$this->apiKey]) + ->postJson('/api/visits', [ + 'owner' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'API Visitor', + 'visitor_type' => 'visitor', + ]); + + $response->assertCreated(); + $this->assertDatabaseHas('frontdesk_visits', ['visitor_type' => 'visitor']); + } + + public function test_api_can_list_visits(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Listed Visitor', + ]); + + Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + ]); + + $this->withHeaders(['Authorization' => 'Bearer '.$this->apiKey]) + ->getJson('/api/visits?owner='.$this->user->public_id) + ->assertOk() + ->assertJsonPath('total', 1); + } + + public function test_api_scopes_to_owner(): void + { + $other = User::create([ + 'public_id' => 'other-user', + 'name' => 'Other', + 'email' => 'other@example.com', + ]); + + $visitor = Visitor::create([ + 'owner_ref' => $other->public_id, + 'organization_id' => Organization::create([ + 'owner_ref' => $other->public_id, + 'name' => 'Other Org', + 'slug' => 'other', + ])->id, + 'full_name' => 'Secret Visitor', + ]); + + Visit::create([ + 'owner_ref' => $other->public_id, + 'organization_id' => $visitor->organization_id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + ]); + + $this->withHeaders(['Authorization' => 'Bearer '.$this->apiKey]) + ->getJson('/api/visits?owner='.$this->user->public_id) + ->assertOk() + ->assertJsonPath('total', 0); + } +} diff --git a/tests/Feature/FrontdeskPhase10Test.php b/tests/Feature/FrontdeskPhase10Test.php new file mode 100644 index 0000000..b2f5639 --- /dev/null +++ b/tests/Feature/FrontdeskPhase10Test.php @@ -0,0 +1,139 @@ + ['care' => $this->careKey, 'lab' => 'test-lab-key']]); + + $this->user = User::create([ + 'public_id' => 'phase10-user-001', + 'name' => 'Phase10 User', + 'email' => 'phase10@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase10 Org', + 'slug' => 'phase10-org', + 'settings' => ['onboarded' => true], + ]); + } + + public function test_care_api_can_create_visit_with_external_ref(): void + { + $response = $this->withHeaders(['Authorization' => 'Bearer '.$this->careKey]) + ->postJson('/api/visits', [ + 'owner' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'external_ref' => 'care-appt-001', + 'full_name' => 'Care Patient', + 'visitor_type' => 'visitor', + 'integration_metadata' => ['appointment_id' => 'A-100'], + ]); + + $response->assertCreated(); + $this->assertDatabaseHas('frontdesk_visits', [ + 'external_ref' => 'care-appt-001', + 'source' => 'care', + ]); + } + + public function test_external_ref_is_idempotent_for_same_source(): void + { + $payload = [ + 'owner' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'external_ref' => 'lab-specimen-42', + 'full_name' => 'Lab Walk-in', + 'visitor_type' => 'visitor', + ]; + + config(['frontdesk.service_api_keys' => ['lab' => 'test-lab-key']]); + + $this->withHeaders(['Authorization' => 'Bearer test-lab-key']) + ->postJson('/api/visits', $payload) + ->assertCreated(); + + $this->withHeaders(['Authorization' => 'Bearer test-lab-key']) + ->postJson('/api/visits', $payload) + ->assertOk(); + + $this->assertSame(1, Visit::where('external_ref', 'lab-specimen-42')->count()); + } + + public function test_webhook_dispatched_on_check_in(): void + { + Http::fake(); + + WebhookEndpoint::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'url' => 'https://example.com/webhooks/frontdesk', + 'secret' => 'secret123', + 'events' => ['visit.checked_in'], + 'is_active' => true, + ]); + + $this->withHeaders(['Authorization' => 'Bearer '.$this->careKey]) + ->postJson('/api/visits', [ + 'owner' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Webhook Guest', + 'visitor_type' => 'visitor', + ]) + ->assertCreated(); + + Http::assertSent(fn ($request) => $request->url() === 'https://example.com/webhooks/frontdesk'); + } + + public function test_ical_feed_returns_calendar_data(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Scheduled Guest', + ]); + + Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_EXPECTED, + 'scheduled_at' => now()->addHours(2), + ]); + + $token = hash_hmac('sha256', "{$this->organization->id}:{$this->user->public_id}", (string) config('app.key')); + + $this->get(route('frontdesk.integrations.ical', [ + 'organization' => $this->organization->id, + 'owner' => $this->user->public_id, + 'token' => $token, + ])) + ->assertOk() + ->assertHeader('content-type', 'text/calendar; charset=utf-8') + ->assertSee('BEGIN:VCALENDAR'); + } +} diff --git a/tests/Feature/FrontdeskPhase11Test.php b/tests/Feature/FrontdeskPhase11Test.php new file mode 100644 index 0000000..d594e11 --- /dev/null +++ b/tests/Feature/FrontdeskPhase11Test.php @@ -0,0 +1,133 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase11-user-001', + 'name' => 'Phase11 User', + 'email' => 'phase11@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase11 Org', + 'slug' => 'phase11-org', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + } + + public function test_dashboard_stats_are_cached(): void + { + Cache::flush(); + + $this->actingAs($this->user)->get(route('frontdesk.dashboard'))->assertOk(); + $this->assertTrue(Cache::has('fd:dashboard:'.$this->user->public_id.':'.$this->organization->id.':all')); + } + + public function test_kiosk_device_route_is_rate_limited(): void + { + RateLimiter::clear('kiosk-device'); + + $device = Device::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'Limited Kiosk', + 'type' => 'kiosk', + 'device_token' => 'rate-limit-token', + 'status' => 'offline', + ]); + + for ($i = 0; $i < 31; $i++) { + $response = $this->postJson(route('frontdesk.kiosk.device.check-in', $device->device_token), [ + 'full_name' => 'Guest '.$i, + 'visitor_type' => 'visitor', + 'policies_accepted' => 1, + ]); + } + + $response->assertStatus(429); + } + + public function test_offline_sync_replays_queued_check_in(): void + { + $device = Device::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'branch_id' => Branch::first()->id, + 'name' => 'Offline Kiosk', + 'type' => 'kiosk', + 'device_token' => 'offline-sync-token', + 'status' => 'online', + ]); + + $clientId = '550e8400-e29b-41d4-a716-446655440000'; + + $this->postJson('/api/kiosk/offline-sync', [ + 'client_id' => $clientId, + 'payload' => [ + 'full_name' => 'Offline Guest', + 'visitor_type' => 'visitor', + 'policies_accepted' => true, + ], + ], ['X-Device-Token' => $device->device_token]) + ->assertCreated() + ->assertJsonPath('status', 'synced'); + + $this->postJson('/api/kiosk/offline-sync', [ + 'client_id' => $clientId, + 'payload' => [ + 'full_name' => 'Offline Guest', + 'visitor_type' => 'visitor', + 'policies_accepted' => true, + ], + ], ['X-Device-Token' => $device->device_token]) + ->assertOk() + ->assertJsonPath('status', 'already_synced'); + } + + public function test_app_layout_supports_dark_mode_toggle_markup(): void + { + $this->actingAs($this->user) + ->get(route('frontdesk.dashboard')) + ->assertOk() + ->assertSee('Toggle dark mode', false); + } +} diff --git a/tests/Feature/FrontdeskPhase2Test.php b/tests/Feature/FrontdeskPhase2Test.php new file mode 100644 index 0000000..144044d --- /dev/null +++ b/tests/Feature/FrontdeskPhase2Test.php @@ -0,0 +1,140 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->admin = User::create([ + 'public_id' => 'admin-001', + 'name' => 'Admin User', + 'email' => 'admin@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->admin->public_id, + 'name' => 'Phase2 Org', + 'slug' => 'phase2-org', + 'settings' => ['onboarded' => true], + ]); + + Member::create([ + 'owner_ref' => $this->admin->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->admin->public_id, + 'role' => 'org_admin', + ]); + } + + public function test_onboarding_creates_organization_and_branch(): void + { + Organization::query()->delete(); + Member::query()->delete(); + + $this->actingAs($this->admin) + ->post(route('frontdesk.onboarding.store'), [ + 'organization_name' => 'New Corp', + 'branch_name' => 'HQ', + 'timezone' => 'UTC', + 'badge_expiry_hours' => 8, + ]) + ->assertRedirect(route('frontdesk.dashboard')); + + $this->assertDatabaseHas('frontdesk_organizations', ['name' => 'New Corp']); + $this->assertDatabaseHas('frontdesk_branches', ['name' => 'HQ']); + $this->assertDatabaseHas('frontdesk_members', ['role' => 'org_admin']); + } + + public function test_org_admin_can_create_branch(): void + { + $this->actingAs($this->admin) + ->post(route('frontdesk.branches.store'), [ + 'name' => 'East Wing', + 'address' => '123 Main St', + ]) + ->assertRedirect(route('frontdesk.branches.index')); + + $this->assertDatabaseHas('frontdesk_branches', ['name' => 'East Wing']); + } + + public function test_org_admin_can_add_team_member(): void + { + $branch = Branch::create([ + 'owner_ref' => $this->admin->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'Main', + 'is_active' => true, + ]); + + $this->actingAs($this->admin) + ->post(route('frontdesk.members.store'), [ + 'user_ref' => 'receptionist-001', + 'role' => 'receptionist', + 'branch_id' => $branch->id, + ]) + ->assertRedirect(route('frontdesk.members.index')); + + $this->assertDatabaseHas('frontdesk_members', [ + 'user_ref' => 'receptionist-001', + 'role' => 'receptionist', + ]); + } + + public function test_receptionist_cannot_manage_branches(): void + { + $receptionist = User::create([ + 'public_id' => 'receptionist-001', + 'name' => 'Receptionist', + 'email' => 'rec@example.com', + ]); + + Member::create([ + 'owner_ref' => $this->admin->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $receptionist->public_id, + 'role' => 'receptionist', + ]); + + $this->actingAs($receptionist) + ->get(route('frontdesk.branches.create')) + ->assertForbidden(); + } + + public function test_receptionist_can_access_check_in(): void + { + $receptionist = User::create([ + 'public_id' => 'receptionist-002', + 'name' => 'Receptionist Two', + 'email' => 'rec2@example.com', + ]); + + Member::create([ + 'owner_ref' => $this->admin->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $receptionist->public_id, + 'role' => 'receptionist', + ]); + + $this->actingAs($receptionist) + ->get(route('frontdesk.visits.create')) + ->assertOk(); + } +} diff --git a/tests/Feature/FrontdeskPhase3Test.php b/tests/Feature/FrontdeskPhase3Test.php new file mode 100644 index 0000000..7ca4c1f --- /dev/null +++ b/tests/Feature/FrontdeskPhase3Test.php @@ -0,0 +1,258 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase3-user-001', + 'name' => 'Phase3 User', + 'email' => 'phase3@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase3 Org', + 'slug' => 'phase3-org', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + $this->branch = Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + } + + public function test_can_schedule_future_visit(): void + { + $scheduledAt = now()->addDay()->format('Y-m-d\TH:i'); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.schedule.store'), [ + 'full_name' => 'Future Guest', + 'email' => 'future@example.com', + 'visitor_type' => 'visitor', + 'scheduled_at' => $scheduledAt, + 'purpose' => 'Meeting', + ]) + ->assertRedirect(); + + $this->assertDatabaseHas('frontdesk_visits', [ + 'status' => Visit::STATUS_SCHEDULED, + 'purpose' => 'Meeting', + ]); + } + + public function test_can_schedule_today_visit_as_expected(): void + { + $scheduledAt = now()->addHour()->format('Y-m-d\TH:i'); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.schedule.store'), [ + 'full_name' => 'Today Guest', + 'email' => 'today@example.com', + 'visitor_type' => 'visitor', + 'scheduled_at' => $scheduledAt, + ]) + ->assertRedirect(); + + $this->assertDatabaseHas('frontdesk_visits', [ + 'status' => Visit::STATUS_EXPECTED, + ]); + } + + public function test_can_check_in_scheduled_visit(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Scheduled Guest', + 'email' => 'scheduled@example.com', + ]); + + $visit = Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_EXPECTED, + 'scheduled_at' => now()->addHour(), + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.activate', $visit), [ + 'policies_accepted' => '1', + ]) + ->assertRedirect(route('frontdesk.visits.show', $visit)); + + $visit->refresh(); + $this->assertSame(Visit::STATUS_CHECKED_IN, $visit->status); + $this->assertNotNull($visit->checked_in_at); + } + + public function test_can_mark_visit_waiting_and_cancel(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Waiting Guest', + ]); + + $visit = Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_EXPECTED, + 'scheduled_at' => now(), + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.waiting', $visit)) + ->assertRedirect(); + + $this->assertSame(Visit::STATUS_WAITING, $visit->fresh()->status); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.cancel', $visit), ['reason' => 'No show']) + ->assertRedirect(route('frontdesk.visits.index', ['status' => 'cancelled'])); + + $this->assertSame(Visit::STATUS_CANCELLED, $visit->fresh()->status); + } + + public function test_returning_visitor_quick_check_in(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Regular Guest', + 'visit_count' => 3, + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.visitors.check-in.store', $visitor), [ + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + ]) + ->assertRedirect(); + + $this->assertDatabaseHas('frontdesk_visits', [ + 'visitor_id' => $visitor->id, + 'status' => Visit::STATUS_CHECKED_IN, + ]); + } + + public function test_can_update_visitor_profile(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Profile Guest', + 'notes' => 'Old note', + ]); + + $this->actingAs($this->user) + ->patch(route('frontdesk.visitors.update', $visitor), [ + 'full_name' => 'Updated Guest', + 'company' => 'Acme Corp', + 'notes' => 'VIP guest', + ]) + ->assertRedirect(); + + $visitor->refresh(); + $this->assertSame('Updated Guest', $visitor->full_name); + $this->assertSame('Acme Corp', $visitor->company); + $this->assertSame('VIP guest', $visitor->notes); + } + + public function test_mark_overdue_command_updates_past_visits(): void + { + Carbon::setTestNow('2026-06-27 12:00:00'); + + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Late Guest', + ]); + + Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_EXPECTED, + 'scheduled_at' => now()->subHour(), + ]); + + $this->artisan('frontdesk:mark-overdue-visits') + ->assertSuccessful(); + + $this->assertDatabaseHas('frontdesk_visits', [ + 'visitor_id' => $visitor->id, + 'status' => Visit::STATUS_OVERDUE, + ]); + + Carbon::setTestNow(); + } + + public function test_calendar_page_loads(): void + { + $this->actingAs($this->user) + ->get(route('frontdesk.visits.calendar')) + ->assertOk() + ->assertSee('Visit calendar'); + } + + public function test_api_can_schedule_visit(): void + { + config(['frontdesk.service_api_keys.crm' => 'test-api-key']); + + $scheduledAt = now()->addDays(2)->toIso8601String(); + + $this->withHeader('Authorization', 'Bearer test-api-key') + ->postJson('/api/visits?owner='.$this->user->public_id, [ + 'schedule' => true, + 'organization_id' => $this->organization->id, + 'full_name' => 'API Guest', + 'email' => 'api@example.com', + 'visitor_type' => 'visitor', + 'scheduled_at' => $scheduledAt, + ]) + ->assertCreated() + ->assertJsonPath('status', Visit::STATUS_SCHEDULED); + } +} diff --git a/tests/Feature/FrontdeskPhase4Test.php b/tests/Feature/FrontdeskPhase4Test.php new file mode 100644 index 0000000..34ed62d --- /dev/null +++ b/tests/Feature/FrontdeskPhase4Test.php @@ -0,0 +1,177 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase4-user-001', + 'name' => 'Phase4 User', + 'email' => 'phase4@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase4 Org', + 'slug' => 'phase4-org', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + } + + public function test_contractor_check_in_stores_details_and_extended_badge(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Site Worker', + 'visitor_type' => 'contractor', + 'policies_accepted' => '1', + 'type_fields' => [ + 'contract_company' => 'BuildCo', + 'supervisor' => 'Jane Smith', + 'safety_induction_completed' => '1', + 'permit_number' => 'PERMIT-99', + ], + ]) + ->assertRedirect(); + + $visit = Visit::first(); + $this->assertSame(Visit::STATUS_CHECKED_IN, $visit->status); + $this->assertSame('BuildCo', $visit->contractor_details['contract_company']); + $this->assertSame('PERMIT-99', $visit->contractor_details['permit_number']); + $this->assertTrue($visit->badge_expires_at->greaterThan(now()->addHours(11))); + } + + public function test_delivery_check_in_records_received_time(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Courier', + 'visitor_type' => 'delivery', + 'policies_accepted' => '1', + 'type_fields' => [ + 'courier_company' => 'FastPost', + 'recipient' => 'Finance Dept', + 'tracking_number' => 'TRK123', + ], + ]) + ->assertRedirect(); + + $visit = Visit::first(); + $this->assertSame('FastPost', $visit->delivery_details['courier_company']); + $this->assertArrayHasKey('received_at', $visit->delivery_details); + $this->assertTrue($visit->badge_expires_at->lessThanOrEqualTo(now()->addHours(2)->addMinute())); + } + + public function test_vendor_check_in_requires_approval(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Vendor Rep', + 'visitor_type' => 'vendor', + 'policies_accepted' => '1', + 'type_fields' => [ + 'vendor_company' => 'Supply Ltd', + 'service_type' => 'Office supplies', + ], + ]) + ->assertRedirect() + ->assertSessionHas('success', 'Visit submitted for approval.'); + + $visit = Visit::first(); + $this->assertSame(Visit::STATUS_WAITING, $visit->status); + $this->assertNull($visit->checked_in_at); + $this->assertTrue($visit->awaitingApproval()); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.approve', $visit)) + ->assertRedirect(); + + $visit->refresh(); + $this->assertSame(Visit::STATUS_CHECKED_IN, $visit->status); + $this->assertNotNull($visit->checked_in_at); + } + + public function test_kiosk_contractor_check_in_via_json(): void + { + $this->actingAs($this->user) + ->postJson(route('frontdesk.kiosk.check-in'), [ + 'full_name' => 'Kiosk Contractor', + 'visitor_type' => 'contractor', + 'policies_accepted' => true, + 'type_fields' => [ + 'contract_company' => 'Kiosk Build', + 'supervisor' => 'Supervisor', + 'safety_induction_completed' => true, + ], + ]) + ->assertOk() + ->assertJsonPath('visit.status', Visit::STATUS_CHECKED_IN); + + $this->assertDatabaseHas('frontdesk_visits', [ + 'visitor_type' => 'contractor', + 'status' => Visit::STATUS_CHECKED_IN, + ]); + } + + public function test_org_can_override_contractor_badge_expiry(): void + { + $this->actingAs($this->user) + ->put(route('frontdesk.settings.update'), [ + 'name' => 'Phase4 Org', + 'timezone' => 'UTC', + 'badge_expiry_hours' => 8, + 'kiosk_reset_seconds' => 120, + 'contractor_badge_expiry_hours' => 16, + ]) + ->assertRedirect(); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Long Shift Worker', + 'visitor_type' => 'contractor', + 'policies_accepted' => '1', + 'type_fields' => [ + 'contract_company' => 'BuildCo', + 'supervisor' => 'Jane Smith', + 'safety_induction_completed' => '1', + ], + ]); + + $visit = Visit::latest()->first(); + $this->assertTrue($visit->badge_expires_at->greaterThan(now()->addHours(15))); + } +} diff --git a/tests/Feature/FrontdeskPhase5Test.php b/tests/Feature/FrontdeskPhase5Test.php new file mode 100644 index 0000000..9a636c6 --- /dev/null +++ b/tests/Feature/FrontdeskPhase5Test.php @@ -0,0 +1,219 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase5-user-001', + 'name' => 'Phase5 User', + 'email' => 'phase5@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase5 Org', + 'slug' => 'phase5-org', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + } + + public function test_blacklisted_check_in_records_audit_log(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Blocked Person', + 'email' => 'blocked@example.com', + 'watchlist_status' => Visitor::WATCHLIST_BLACKLISTED, + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.store'), [ + 'visitor_id' => $visitor->id, + 'full_name' => 'Blocked Person', + 'email' => 'blocked@example.com', + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + ]) + ->assertForbidden(); + + $this->assertDatabaseHas('frontdesk_audit_logs', [ + 'action' => 'watchlist.blocked_attempt', + ]); + } + + public function test_flagged_visitor_check_in_queues_for_approval(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Flagged Person', + 'watchlist_status' => Visitor::WATCHLIST_REQUIRES_APPROVAL, + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.visitors.check-in.store', $visitor), [ + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + ]) + ->assertRedirect(); + + $visit = Visit::first(); + $this->assertSame(Visit::STATUS_WAITING, $visit->status); + $this->assertTrue($visit->awaitingApproval()); + + $this->assertDatabaseHas('frontdesk_audit_logs', [ + 'action' => 'watchlist.flagged_checkin', + ]); + } + + public function test_watchlist_admin_can_create_entry(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.watchlist.store'), [ + 'full_name' => 'Known Person', + 'status' => Visitor::WATCHLIST_BLACKLISTED, + 'reason' => 'Previous incident', + ]) + ->assertRedirect(route('frontdesk.watchlist.index')); + + $this->assertDatabaseHas('frontdesk_watchlist_entries', [ + 'full_name' => 'Known Person', + 'status' => Visitor::WATCHLIST_BLACKLISTED, + ]); + } + + public function test_audit_log_page_loads_and_exports_csv(): void + { + AuditLog::record( + $this->user->public_id, + 'visit.checked_in', + $this->organization->id, + $this->user->public_id, + Visit::class, + 1, + ['visitor' => 'Test'], + ); + + $this->actingAs($this->user) + ->get(route('frontdesk.audit.index')) + ->assertOk() + ->assertSee('Audit log'); + + $this->actingAs($this->user) + ->get(route('frontdesk.audit.export')) + ->assertOk() + ->assertHeader('content-type', 'text/csv; charset=UTF-8'); + } + + public function test_security_can_verify_badge_code(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Verify Me', + ]); + + $visit = Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'badge_code' => 'ABC12345', + 'checked_in_at' => now(), + 'badge_expires_at' => now()->addHours(4), + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.security.verify.lookup'), ['lookup' => 'ABC12345']) + ->assertOk() + ->assertSee('Verify Me') + ->assertSee('Valid'); + } + + public function test_soft_deleted_visitor_can_be_restored(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Archived Person', + ]); + + $visitor->delete(); + + $this->actingAs($this->user) + ->post(route('frontdesk.compliance.visitors.restore', $visitor->id)) + ->assertRedirect(); + + $this->assertNull($visitor->fresh()->deleted_at); + $this->assertDatabaseHas('frontdesk_audit_logs', ['action' => 'visitor.restored']); + } + + public function test_expired_badge_command_logs_alert(): void + { + Carbon::setTestNow('2026-06-27 18:00:00'); + + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Expired Badge Guest', + ]); + + Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now()->subHours(10), + 'badge_expires_at' => now()->subHour(), + 'badge_code' => 'EXP12345', + ]); + + $this->artisan('frontdesk:mark-expired-badges')->assertSuccessful(); + + $this->assertDatabaseHas('frontdesk_audit_logs', ['action' => 'badge.expired']); + + Carbon::setTestNow(); + } +} diff --git a/tests/Feature/FrontdeskPhase6Test.php b/tests/Feature/FrontdeskPhase6Test.php new file mode 100644 index 0000000..9ea05bc --- /dev/null +++ b/tests/Feature/FrontdeskPhase6Test.php @@ -0,0 +1,206 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase6-user-001', + 'name' => 'Phase6 User', + 'email' => 'phase6@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase6 Org', + 'slug' => 'phase6-org', + 'settings' => [ + 'onboarded' => true, + 'badge_expiry_hours' => 8, + 'notification_channels' => ['email'], + 'notification_events' => config('frontdesk.default_notification_events'), + ], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'host', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + + $this->host = Host::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'Phase6 Host', + 'email' => 'host@example.com', + 'user_ref' => $this->user->public_id, + 'is_available' => true, + ]); + } + + public function test_host_portal_lists_linked_profile(): void + { + $this->actingAs($this->user) + ->get(route('frontdesk.host.index')) + ->assertOk() + ->assertSee('Phase6 Host'); + } + + public function test_host_can_pre_register_visitor(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.host.schedule.store'), [ + 'full_name' => 'Expected Guest', + 'visitor_type' => 'visitor', + 'scheduled_at' => now()->addDay()->format('Y-m-d\TH:i'), + 'purpose' => 'Project review', + ]) + ->assertRedirect(route('frontdesk.host.index')); + + $visit = Visit::first(); + $this->assertSame($this->host->id, $visit->host_id); + $this->assertSame('Expected Guest', $visit->visitor->full_name); + $this->assertSame(Visit::STATUS_SCHEDULED, $visit->status); + } + + public function test_host_can_approve_pending_visit(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Vendor Rep', + ]); + + $visit = Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'host_id' => $this->host->id, + 'visitor_type' => 'vendor', + 'status' => Visit::STATUS_WAITING, + 'policies_accepted' => true, + 'contractor_details' => [ + 'vendor_company' => 'Acme', + 'service_type' => 'IT', + '_awaiting_approval' => true, + ], + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.host.approve', $visit)) + ->assertRedirect(route('frontdesk.host.index')); + + $this->assertSame(Visit::STATUS_CHECKED_IN, $visit->fresh()->status); + } + + public function test_check_in_notifies_linked_host_via_database(): void + { + Notification::fake(); + + $admin = User::create([ + 'public_id' => 'phase6-admin-001', + 'name' => 'Admin', + 'email' => 'admin@example.com', + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $admin->public_id, + 'role' => 'org_admin', + ]); + + $this->actingAs($admin) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Walk-in Guest', + 'host_id' => $this->host->id, + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + ]) + ->assertRedirect(); + + Notification::assertSentTo($this->user, FrontdeskAlertNotification::class); + } + + public function test_disabled_notification_event_skips_host_alert(): void + { + Notification::fake(); + + $this->organization->update([ + 'settings' => array_merge($this->organization->settings ?? [], [ + 'notification_events' => array_merge( + config('frontdesk.default_notification_events'), + ['visitor_arrived' => false], + ), + ]), + ]); + + $admin = User::create([ + 'public_id' => 'phase6-admin-002', + 'name' => 'Admin Two', + 'email' => 'admin2@example.com', + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $admin->public_id, + 'role' => 'org_admin', + ]); + + $this->actingAs($admin) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Silent Guest', + 'host_id' => $this->host->id, + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + ]) + ->assertRedirect(); + + Notification::assertNotSentTo($this->user, FrontdeskAlertNotification::class); + } + + public function test_host_can_toggle_availability(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.host.availability')) + ->assertRedirect(); + + $this->assertFalse($this->host->fresh()->is_available); + } +} diff --git a/tests/Feature/FrontdeskPhase7Test.php b/tests/Feature/FrontdeskPhase7Test.php new file mode 100644 index 0000000..6fe6e61 --- /dev/null +++ b/tests/Feature/FrontdeskPhase7Test.php @@ -0,0 +1,160 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase7-user-001', + 'name' => 'Phase7 User', + 'email' => 'phase7@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase7 Org', + 'slug' => 'phase7-org', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + + Host::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'Lobby Host', + 'is_available' => true, + ]); + + $this->deviceToken = 'kiosk-test-token-'.str_repeat('x', 32); + } + + public function test_admin_can_register_kiosk_device(): void + { + $this->actingAs($this->user) + ->post(route('frontdesk.devices.store'), [ + 'name' => 'Lobby Kiosk', + 'type' => 'kiosk', + ]) + ->assertRedirect(route('frontdesk.devices.index')); + + $device = Device::first(); + $this->assertSame('kiosk', $device->type); + $this->assertNotEmpty($device->device_token); + } + + public function test_kiosk_device_page_works_without_auth(): void + { + $device = $this->createKioskDevice(); + + $this->get(route('frontdesk.kiosk.device', $device->device_token)) + ->assertOk() + ->assertSee('Visitor Check-in'); + + $this->assertTrue($device->fresh()->isOnline()); + } + + public function test_kiosk_device_can_check_in_visitor(): void + { + $device = $this->createKioskDevice(); + $host = Host::first(); + + $this->postJson(route('frontdesk.kiosk.device.check-in', $device->device_token), [ + 'full_name' => 'Kiosk Guest', + 'host_id' => $host->id, + 'visitor_type' => 'visitor', + 'policies_accepted' => 1, + ])->assertOk() + ->assertJsonPath('visit.visitor_name', 'Kiosk Guest'); + + $visit = Visit::first(); + $this->assertSame(Visit::STATUS_CHECKED_IN, $visit->status); + $this->assertSame($device->branch_id, $visit->branch_id); + } + + public function test_device_heartbeat_api_marks_online(): void + { + $device = $this->createKioskDevice(['status' => 'offline', 'last_online_at' => null]); + + $this->postJson('/api/devices/heartbeat', [], [ + 'X-Device-Token' => $device->device_token, + ])->assertOk() + ->assertJsonPath('status', 'online'); + + $this->assertTrue($device->fresh()->isOnline()); + } + + public function test_mark_devices_offline_command(): void + { + Carbon::setTestNow(now()); + + $device = $this->createKioskDevice([ + 'status' => 'online', + 'last_online_at' => now()->subMinutes(30), + ]); + + $this->artisan('frontdesk:mark-devices-offline')->assertSuccessful(); + + $this->assertSame('offline', $device->fresh()->status); + + Carbon::setTestNow(); + } + + public function test_invalid_device_token_returns_not_found(): void + { + $this->get(route('frontdesk.kiosk.device', 'invalid-token')) + ->assertNotFound(); + } + + /** @param array $overrides */ + protected function createKioskDevice(array $overrides = []): Device + { + return Device::create(array_merge([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'branch_id' => Branch::first()->id, + 'name' => 'Test Kiosk', + 'type' => 'kiosk', + 'status' => 'offline', + 'device_token' => $this->deviceToken, + 'config' => ['mode' => 'self_service'], + ], $overrides)); + } +} diff --git a/tests/Feature/FrontdeskPhase8Test.php b/tests/Feature/FrontdeskPhase8Test.php new file mode 100644 index 0000000..072c408 --- /dev/null +++ b/tests/Feature/FrontdeskPhase8Test.php @@ -0,0 +1,153 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase8-user-001', + 'name' => 'Phase8 User', + 'email' => 'phase8@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase8 Org', + 'slug' => 'phase8-org', + 'settings' => [ + 'onboarded' => true, + 'badge_expiry_hours' => 8, + 'badge_template' => ['show_qr' => true, 'show_photo' => true], + ], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + } + + public function test_badge_template_settings_can_be_updated(): void + { + $this->actingAs($this->user) + ->put(route('frontdesk.settings.badge.update'), [ + 'show_photo' => '1', + 'show_qr' => '1', + 'show_host' => '1', + 'show_company' => '0', + 'show_type' => '1', + 'primary_color' => '#ff0000', + 'footer_text' => 'Property of Phase8 Org', + ]) + ->assertRedirect(); + + $settings = $this->organization->fresh()->settings; + $this->assertSame('#ff0000', $settings['badge_template']['primary_color']); + $this->assertFalse($settings['badge_template']['show_company']); + } + + public function test_check_in_stores_photo_from_base64(): void + { + $png = 'data:image/png;base64,'.base64_encode(UploadedFile::fake()->image('photo.png')->getContent()); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.store'), [ + 'full_name' => 'Photo Guest', + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + 'photo_data' => $png, + ]) + ->assertRedirect(); + + $visit = Visit::first(); + $this->assertNotNull($visit->photo_path); + Storage::disk('public')->assertExists($visit->photo_path); + } + + public function test_badge_preview_renders_for_checked_in_visit(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Badge Guest', + ]); + + $visit = Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + 'badge_code' => 'ABC123', + 'qr_token' => 'qr-token-123', + 'badge_expires_at' => now()->addHours(8), + ]); + + $this->actingAs($this->user) + ->get(route('frontdesk.visits.badge.preview', $visit)) + ->assertOk() + ->assertSee('Badge Guest') + ->assertSee('ABC123'); + } + + public function test_evacuation_badges_page_lists_current_visitors(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Inside Guest', + ]); + + Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + 'badge_code' => 'EVAC1', + 'qr_token' => 'evac-token', + 'badge_expires_at' => now()->addHours(8), + ]); + + $this->actingAs($this->user) + ->get(route('frontdesk.security.evacuation.badges')) + ->assertOk() + ->assertSee('Inside Guest'); + } +} diff --git a/tests/Feature/FrontdeskPhase9Test.php b/tests/Feature/FrontdeskPhase9Test.php new file mode 100644 index 0000000..500baa6 --- /dev/null +++ b/tests/Feature/FrontdeskPhase9Test.php @@ -0,0 +1,104 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'phase9-user-001', + 'name' => 'Phase9 User', + 'email' => 'phase9@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Phase9 Org', + 'slug' => 'phase9-org', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'HQ', + 'is_active' => true, + ]); + } + + public function test_reports_page_loads_with_summary(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Report Guest', + 'is_frequent' => true, + 'visit_count' => 6, + ]); + + Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + 'checked_out_at' => now()->addHour(), + 'badge_code' => 'RPT1', + 'qr_token' => 'rpt-token', + 'badge_expires_at' => now()->addHours(8), + ]); + + $this->actingAs($this->user) + ->get(route('frontdesk.reports.index')) + ->assertOk() + ->assertSee('Reports') + ->assertSee('Report Guest'); + } + + public function test_reports_can_export_csv(): void + { + $this->actingAs($this->user) + ->get(route('frontdesk.reports.export')) + ->assertOk() + ->assertHeader('content-type', 'text/csv; charset=UTF-8'); + } + + public function test_daily_report_command_runs(): void + { + $this->organization->update([ + 'settings' => array_merge($this->organization->settings ?? [], [ + 'report_daily_recipients' => ['admin@example.com'], + ]), + ]); + + $this->artisan('frontdesk:send-daily-reports')->assertSuccessful(); + } +} diff --git a/tests/Feature/FrontdeskWebTest.php b/tests/Feature/FrontdeskWebTest.php new file mode 100644 index 0000000..3dc4a39 --- /dev/null +++ b/tests/Feature/FrontdeskWebTest.php @@ -0,0 +1,163 @@ +withoutMiddleware(EnsurePlatformSession::class); + + $this->user = User::create([ + 'public_id' => 'test-user-001', + 'name' => 'Test User', + 'email' => 'test@example.com', + ]); + + $this->organization = Organization::create([ + 'owner_ref' => $this->user->public_id, + 'name' => 'Test Org', + 'slug' => 'test-org', + 'timezone' => 'UTC', + 'settings' => ['onboarded' => true, 'badge_expiry_hours' => 8, 'kiosk_reset_seconds' => 120], + ]); + + Member::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'user_ref' => $this->user->public_id, + 'role' => 'org_admin', + ]); + + Branch::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'Main Office', + 'is_active' => true, + ]); + } + + public function test_guest_is_redirected_to_sso(): void + { + $this->get('/dashboard')->assertRedirect(); + } + + public function test_unonboarded_user_is_redirected_to_onboarding(): void + { + Organization::query()->delete(); + Member::query()->delete(); + + $this->actingAs($this->user) + ->get(route('frontdesk.dashboard')) + ->assertRedirect(route('frontdesk.onboarding.show')); + } + + public function test_dashboard_loads_for_authenticated_user(): void + { + $this->actingAs($this->user) + ->get(route('frontdesk.dashboard')) + ->assertOk() + ->assertSee('Reception dashboard'); + } + + public function test_receptionist_can_check_in_visitor(): void + { + $host = Host::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'name' => 'Jane Host', + 'email' => 'jane@example.com', + ]); + + $response = $this->actingAs($this->user)->post(route('frontdesk.visits.store'), [ + 'full_name' => 'John Visitor', + 'company' => 'Acme Corp', + 'phone' => '+233201234567', + 'email' => 'john@example.com', + 'host_id' => $host->id, + 'visitor_type' => 'visitor', + 'purpose' => 'Meeting', + 'policies_accepted' => '1', + ]); + + $response->assertRedirect(); + $this->assertDatabaseHas('frontdesk_visitors', ['full_name' => 'John Visitor']); + $this->assertDatabaseHas('frontdesk_visits', ['status' => Visit::STATUS_CHECKED_IN]); + } + + public function test_receptionist_can_check_out_visitor(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'John Visitor', + ]); + + $visit = Visit::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'visitor_id' => $visitor->id, + 'visitor_type' => 'visitor', + 'status' => Visit::STATUS_CHECKED_IN, + 'checked_in_at' => now(), + ]); + + $this->actingAs($this->user) + ->post(route('frontdesk.visits.checkout', $visit)) + ->assertRedirect(); + + $this->assertEquals(Visit::STATUS_CHECKED_OUT, $visit->fresh()->status); + } + + public function test_blacklisted_visitor_cannot_check_in(): void + { + $visitor = Visitor::create([ + 'owner_ref' => $this->user->public_id, + 'organization_id' => $this->organization->id, + 'full_name' => 'Blocked Person', + 'watchlist_status' => Visitor::WATCHLIST_BLACKLISTED, + ]); + + $this->actingAs($this->user)->post(route('frontdesk.visits.store'), [ + 'visitor_id' => $visitor->id, + 'full_name' => 'Blocked Person', + 'visitor_type' => 'visitor', + 'policies_accepted' => '1', + ])->assertStatus(403); + } + + public function test_org_admin_can_update_settings(): void + { + $this->actingAs($this->user) + ->put(route('frontdesk.settings.update'), [ + 'name' => 'Updated Org', + 'timezone' => 'Africa/Accra', + 'badge_expiry_hours' => 6, + 'kiosk_reset_seconds' => 90, + 'notification_channels' => ['email'], + ]) + ->assertRedirect(); + + $this->organization->refresh(); + $this->assertEquals('Updated Org', $this->organization->name); + $this->assertEquals(6, $this->organization->settings['badge_expiry_hours']); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..eece6d4 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,14 @@ +withoutVite(); + } +} diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php new file mode 100644 index 0000000..5773b0c --- /dev/null +++ b/tests/Unit/ExampleTest.php @@ -0,0 +1,16 @@ +assertTrue(true); + } +} diff --git a/tests/Unit/WatchlistServiceTest.php b/tests/Unit/WatchlistServiceTest.php new file mode 100644 index 0000000..5e653c4 --- /dev/null +++ b/tests/Unit/WatchlistServiceTest.php @@ -0,0 +1,40 @@ + Visitor::WATCHLIST_BLACKLISTED]); + + $this->expectException(HttpException::class); + app(WatchlistService::class)->assertCanCheckIn($visitor); + } + + #[Test] + public function allowed_visitor_passes_watchlist_check(): void + { + $visitor = new Visitor(['watchlist_status' => Visitor::WATCHLIST_ALLOWED]); + + app(WatchlistService::class)->assertCanCheckIn($visitor); + $this->assertTrue(true); + } + + #[Test] + public function requires_approval_visitor_is_not_blocked_at_gate(): void + { + $visitor = new Visitor(['watchlist_status' => Visitor::WATCHLIST_REQUIRES_APPROVAL]); + + app(WatchlistService::class)->assertCanCheckIn($visitor); + $this->assertTrue(app(WatchlistService::class)->visitorNeedsApprovalQueue($visitor)); + } +} diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..f35b4e7 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,18 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import tailwindcss from '@tailwindcss/vite'; + +export default defineConfig({ + plugins: [ + laravel({ + input: ['resources/css/app.css', 'resources/js/app.js'], + refresh: true, + }), + tailwindcss(), + ], + server: { + watch: { + ignored: ['**/storage/framework/views/**'], + }, + }, +});