User Dashboard, Developer API Keys & Interactive Invoice Canvas System

# User Dashboard, Developer API Keys, Subscriptions & Invoice Canvas Architecture Comprehensive technical documentation for the User Dashboard redesign, Developer API key gating, Subscriptions management, and the interactive Alpine.js Invoice Canvas. --- ### 1. Dashboard Layout - **Shared Layout:** `resources/views/layouts/user_dashboard.blade.php` - **Navigation:** - My Subscription (`/user/subscription`) - Developer API Keys (`/user/api-keys`) - Invoice Builder (`/user/invoices`) - Notifications (`/user/notifications`) --- ### 2. Developer Subscriptions & API Key System - **`developer_subscriptions` Table:** - `id, name, price, annual_price, description, max_domains, max_requests_per_day, features (JSON), status` - **`user_developer_subscriptions` Table:** - `id, user_id, subscription_id, domains (JSON - allowed hostnames), status, expires_at` - **`user_api_keys` Table:** - `id, user_id, name, api_service, domain, api_key, status` - **Domain Restriction:** Keys are cryptographically checked against incoming caller domain headers in API requests. --- ### 3. Interactive Invoice Canvas (`/user/invoices/create`) - **Canvas Preview (Left Panel):** Printable invoice driven by real-time reactive Alpine.js state. - **Design Panel (Right Panel):** - 5 pre-styled templates: `classic`, `modern`, `minimal`, `corporate`, `creative` - Accent Color picker - Font Family selector (Inter, Georgia, Courier, Arial) - Logo upload / CDN URL - Dynamic Line Items table with automatic Tax, Discount & Subtotal math - **Database Model:** `user_invoices` storing both the invoice numbers and the `design_settings` JSON object for 100% fidelity upon reload.