Files
website/website/bootstrap/app.php
Claude Dev 45d25d61ba Idempotent provisioning, service soft-delete, Plans page redesign, doc updates
Part A: Fix duplicate Service creation on provisioning retry
- All 4 provisioning services use Service::firstOrCreate() keyed on
  subscription_id+service_type to prevent duplicates on queue retries
- HandleSubscriptionCreated sends notification before provisioning,
  no longer re-throws on failure
- RetryProvisioningCommand simplified to reuse existing Service records

Part B: Plans/Pricing page complete redesign
- Service type tabs (VPS, Dedicated, Web Hosting, MySQL)
- Billing cycle segmented toggle (monthly/quarterly/semi-annual/annual)
- Feature icons per service type, Popular/Best Value badges
- Stock indicators, effective monthly price calculations

Part C: Admin service soft-delete/archive
- Service model uses SoftDeletes trait
- Admin can archive and restore services
- Show archived toggle on services list
- Migration adds deleted_at column

Docs: Updated TASKS.md, CLAUDE.md, PROJECT_DEVELOPMENT.md, MEMORY.md
- Phase 3 marked complete, test counts updated (252 passing)
- SupportPal references replaced with standalone ticket system
- Frontend design skill background rule added
- Closed GitHub issues #3, #6, #7, #8, #9

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:30:57 -05:00

67 lines
2.5 KiB
PHP

<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Support\Facades\Route;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
then: function (): void {
Route::domain(config('app.domains.marketing'))
->middleware('web')
->group(base_path('routes/marketing.php'));
Route::domain(config('app.domains.account'))
->middleware(['web', 'auth', 'verified'])
->group(base_path('routes/account.php'));
Route::domain(config('app.domains.admin'))
->middleware(['web', 'auth', 'verified', 'role:admin'])
->group(base_path('routes/admin.php'));
Route::domain(config('app.domains.account'))
->middleware('web')
->group(base_path('routes/webhooks.php'));
},
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->trustProxies(at: '*');
$middleware->validateCsrfTokens(except: [
'webhooks/*',
'api/*',
'stripe/webhook',
'oauth/*',
// Admin API endpoints for testing
'*/settings/test-*',
]);
$middleware->web(append: [
\App\Http\Middleware\HandleInertiaRequests::class,
\App\Http\Middleware\ScreenshotAuthMiddleware::class,
]);
$middleware->prependToPriorityList(
\Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class,
\App\Http\Middleware\ScreenshotAuthMiddleware::class,
);
$middleware->redirectGuestsTo(fn () => 'https://'.config('app.domains.account').'/login');
$middleware->redirectUsersTo('/dashboard');
$middleware->alias([
'role' => \Spatie\Permission\Middleware\RoleMiddleware::class,
'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class,
'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class,
'ensure_not_suspended' => \App\Http\Middleware\EnsureUserNotSuspended::class,
]);
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();