content:
  1499→
  1500→---
  1501→
  1502→#### tests/Feature/Admin/DashboardTest.php
  1503→
  1504→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1505→|-----------|----------------------|----------------|----------|
  1506→| renders the admin dashboard | acting as admin; GET /admin | 200 response, sees "Dashboard" | happy path |
  1507→| shows KPI tiles with correct data | store has 5 orders totaling 25000 cents | sees order count 5, total revenue formatted | happy path |
  1508→| restricts dashboard to authenticated admins | unauthenticated GET /admin | redirected to /admin/login | authorization |
  1509→| filters metrics by date range | orders across multiple dates; filter to last 7 days | only matching orders included in KPIs | happy path |
  1510→
  1511→---
  1512→
  1513→#### tests/Feature/Admin/ProductManagementTest.php
  1514→
  1515→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1516→|-----------|----------------------|----------------|----------|
  1517→| lists products with pagination | create 25 products; GET /admin/products | first page shows 15 (or configured per-page), pagination controls visible | happy path |
  1518→| creates a product via admin form | Livewire test: fill title, description, submit | product in DB | happy path |
  1519→| edits a product via admin form | Livewire test: change title, submit | product updated | happy path |
  1520→| bulk archives selected products | select 3 products, trigger bulk archive | all 3 status = archived | happy path |
  1521→| uploads media from the product form | Livewire file upload on product edit | media attached to product | happy path |
  1522→| manages variants from the product form | add options and values via Livewire | variants generated | happy path |
  1523→| restricts product management to authorized roles | support user GET /admin/products: can see list (read-only); support user attempt to create product | 403 on create | authorization |
  1524→| staff can create but not delete products | staff user: create product succeeds; staff user: delete product | fails with 403 on delete | authorization |
  1525→
  1526→---
  1527→
  1528→#### tests/Feature/Admin/OrderManagementTest.php
  1529→
  1530→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1531→|-----------|----------------------|----------------|----------|
  1532→| lists orders with status filter | 3 pending, 2 paid orders; filter by status=paid | 2 results | happy path |
  1533→| shows order detail page | GET /admin/orders/{order} | sees order number, line items, totals | happy path |
  1534→| creates a fulfillment from order detail | Livewire action: select lines, submit fulfillment | fulfillment created | happy path |
  1535→| processes a refund from order detail | Livewire action: enter amount, submit refund | refund created | happy path |
  1536→| restricts order management by role | support user can view orders (read-only); support user cannot update or fulfill | appropriate 403 responses | authorization |
  1537→
  1538→---
  1539→
  1540→#### tests/Feature/Admin/DiscountManagementTest.php
  1541→
  1542→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1543→|-----------|----------------------|----------------|----------|
  1544→| lists discounts | create 3 discounts; GET /admin/discounts | sees all 3 | happy path |
  1545→| creates a percent discount | Livewire: code="SAVE10", type=percent, value=10 | discount in DB | happy path |
  1546→| creates a fixed discount | Livewire: code="5OFF", type=fixed, value=500 | discount in DB | happy path |
  1547→| validates discount code uniqueness within store | create discount with code "SAVE10"; attempt to create another with same code | validation error | validation |
  1548→| edits a discount | change value from 10 to 15 | updated in DB | happy path |
  1549→| disables a discount | set status to disabled | status = disabled | happy path |
  1550→
  1551→---
  1552→
  1553→#### tests/Feature/Admin/SettingsTest.php
  1554→
  1555→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1556→|-----------|----------------------|----------------|----------|
  1557→| renders the settings page | GET /admin/settings | 200 response, sees settings tabs | happy path |
  1558→| updates general store settings | update store name | store_settings updated | happy path |
  1559→| configures shipping zones | create zone with countries and rates | shipping_zone and shipping_rates in DB | happy path |
  1560→| configures tax settings | set mode=manual, rate=1900, prices_include_tax=true | tax_settings updated | happy path |
  1561→| restricts settings to owner and admin roles | staff user GET /admin/settings | 403 response | authorization |
  1562→| manages store domains | add a new domain | store_domain created | happy path |
  1563→
  1564→---
  1565→
  1566→#### tests/Feature/Search/SearchTest.php
  1567→
  1568→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1569→|-----------|----------------------|----------------|----------|
  1570→| returns products matching search query | products: "Blue Cotton T-Shirt", "Red Wool Sweater"; search "cotton" | finds "Blue Cotton T-Shirt" | happy path |
  1571→| scopes search to current store | store A has "T-Shirt", store B has "T-Shirt Deluxe"; search "t-shirt" on store A | only store A product returned | authorization |
  1572→| returns empty for no matches | search "xyznonexistent" | empty results | edge case |
  1573→| logs search query for analytics | perform search | search_queries row created | happy path |
  1574→| paginates search results | 25 matching products, 12 per page | page 1 has 12, page 2 has 12, page 3 has 1 | happy path |
  1575→
  1576→---
  1577→
  1578→#### tests/Feature/Search/AutocompleteTest.php
  1579→
  1580→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1581→|-----------|----------------------|----------------|----------|
  1582→| returns suggestions matching prefix | products: "Summer Dress", "Summer Hat", "Winter Coat"; autocomplete prefix "sum" | "Summer Dress" and "Summer Hat" returned | happy path |
  1583→| limits results to configured count | 20 matching products, limit 5 | 5 results returned | happy path |
  1584→| returns empty for very short prefix | autocomplete prefix "a" (below minimum) | empty or all results | edge case |
  1585→
  1586→---
  1587→
  1588→#### tests/Feature/Analytics/EventIngestionTest.php
  1589→
  1590→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1591→|-----------|----------------------|----------------|----------|
  1592→| tracks a page view event | POST analytics event: type=page_view | analytics_events row created | happy path |
  1593→| tracks an add to cart event | POST event: type=add_to_cart, properties include product_id | event stored with properties | happy path |
  1594→| scopes events to current store | track event on store A | event.store_id = store A id | happy path |
  1595→| includes session ID when available | track event with session | session_id stored | happy path |
  1596→| includes customer ID when authenticated | track event as logged-in customer | customer_id stored | happy path |
  1597→
  1598→---
  1599→
  1600→#### tests/Feature/Analytics/AggregationTest.php
  1601→
  1602→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1603→|-----------|----------------------|----------------|----------|
  1604→| aggregates daily metrics from raw events | create events: 5 page_views, 3 add_to_carts, 2 checkout_completed; run AggregateAnalytics job | analytics_daily row with correct counts | happy path |
  1605→| calculates revenue and AOV correctly | 3 orders: 1000, 2000, 3000 cents; aggregate | revenue=6000, aov=2000 | happy path |
  1606→| runs idempotently | run aggregation twice for same date | analytics_daily row has correct values (not doubled) | edge case |
  1607→
  1608→---
  1609→
  1610→#### tests/Feature/Webhooks/WebhookDeliveryTest.php
  1611→
  1612→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1613→|-----------|----------------------|----------------|----------|
  1614→| delivers a webhook to a subscribed URL | mock HTTP client; subscription for event_type "order.created"; dispatch event | HTTP POST made to target_url | happy path |
  1615→| signs the payload with HMAC | deliver webhook | `X-Platform-Signature` header present with valid signature | happy path |
  1616→| retries failed deliveries with exponential backoff | first delivery returns 500 | job retried, attempt_count incremented | edge case |
  1617→| marks delivery as failed after max retries | 6 total attempts exhausted (1 initial + 5 retries) | delivery status = failed | edge case |
  1618→| pauses subscription after circuit breaker threshold | 5 consecutive failures | subscription status = paused | edge case |
  1619→
  1620→---
  1621→
  1622→#### tests/Feature/Webhooks/WebhookSignatureTest.php
  1623→
  1624→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1625→|-----------|----------------------|----------------|----------|
  1626→| generates a valid HMAC-SHA256 signature | payload: '{"event":"order.created"}'; secret: 'test-secret' | signature matches expected hash | happy path |
  1627→| verifies a valid signature | generate signature, then verify | returns true | happy path |
  1628→| rejects a tampered payload | sign original, verify with modified payload | returns false | validation |
  1629→| rejects an incorrect secret | sign with secret A, verify with secret B | returns false | validation |
  1630→
  1631→---
  1632→
  1633→#### tests/Feature/Api/StorefrontCartApiTest.php
  1634→
  1635→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1636→|-----------|----------------------|----------------|----------|
  1637→| creates a cart | POST /api/storefront/v1/carts | 201 response, body has cart id, version 1 | happy path |
  1638→| retrieves a cart with lines and totals | create cart with 2 lines; GET /api/storefront/v1/carts/{id} | 200 response, lines array has 2 items, totals calculated | happy path |
  1639→| adds a line to the cart | POST /api/storefront/v1/carts/{id}/lines | 200 response, line added | happy path |
  1640→| updates a line quantity | PUT /api/storefront/v1/carts/{id}/lines/{lineId} | 200 response, quantity updated | happy path |
  1641→| removes a line | DELETE /api/storefront/v1/carts/{id}/lines/{lineId} | 200 response, line removed | happy path |
  1642→| validates variant exists on add | add nonexistent variant_id | 422 response | validation |
  1643→| validates quantity is positive | add with quantity=0 | 422 response | validation |
  1644→| returns 404 for nonexistent cart | GET /api/storefront/v1/carts/999 | 404 response | validation |
  1645→
  1646→---
  1647→
  1648→#### tests/Feature/Api/StorefrontCheckoutApiTest.php
  1649→
  1650→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1651→|-----------|----------------------|----------------|----------|
  1652→| creates a checkout from a cart | POST /api/storefront/v1/checkouts with cart_id | 201 response, checkout status=started | happy path |
  1653→| sets checkout address | PUT /api/storefront/v1/checkouts/{id}/address | 200 response, status=addressed | happy path |
  1654→| selects a shipping method | PUT /api/storefront/v1/checkouts/{id}/shipping-method | 200 response, status=shipping_selected, available rates returned in response | happy path |
  1655→| applies a discount code | POST /api/storefront/v1/checkouts/{id}/apply-discount with code | 200 response, discount applied in totals | happy path |
  1656→| retrieves checkout with totals | GET /api/storefront/v1/checkouts/{id} | 200 response, includes totals_json fields | happy path |
  1657→| selects a payment method | PUT /api/storefront/v1/checkouts/{id}/payment-method with method=credit_card | 200 response, status=payment_selected, payment_method stored | happy path |
  1658→| completes checkout with credit card payment | POST /api/storefront/v1/checkouts/{id}/pay with card fields | 200 response, status=completed, order created | happy path |
  1659→| rejects payment with declined card | POST /api/storefront/v1/checkouts/{id}/pay with magic decline number | 422 response, payment declined message | validation |
  1660→| validates required address fields | PUT address with missing city | 422 response | validation |
  1661→
  1662→---
  1663→
  1664→#### tests/Feature/Api/AdminProductApiTest.php
  1665→
  1666→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1667→|-----------|----------------------|----------------|----------|
  1668→| lists products with authentication | GET /api/admin/v1/stores/{storeId}/products with Bearer token | 200 response, paginated product list | happy path |
  1669→| creates a product via API | POST /api/admin/v1/stores/{storeId}/products with product data | 201 response, product in response | happy path |
  1670→| updates a product via API | PUT /api/admin/v1/stores/{storeId}/products/{id} with updated data | 200 response, product updated | happy path |
  1671→| deletes a draft product via API | DELETE /api/admin/v1/stores/{storeId}/products/{id} | 200 response | happy path |
  1672→| requires write-products ability for mutations | token with only read-products; POST /api/admin/v1/stores/{storeId}/products | 403 response | authorization |
  1673→| returns 401 without token | GET /api/admin/v1/stores/{storeId}/products without auth header | 401 response | authorization |
  1674→| paginates results | 25 products, default page size 15 | first page has 15 items, meta has total=25 | happy path |
  1675→
  1676→---
  1677→
  1678→#### tests/Feature/Api/AdminOrderApiTest.php
  1679→
  1680→| Test Name | Setup / Preconditions | Key Assertions | Category |
  1681→|-----------|----------------------|----------------|----------|
  1682→| lists orders with authentication | GET /api/admin/v1/stores/{storeId}/orders with Bearer token | 200 response, order list | happy path |
  1683→| retrieves a single order | GET /api/admin/v1/stores/{storeId}/orders/{id} | 200 response, order with lines, payments, fulfillments | happy path |
  1684→| filters orders by status | GET /api/admin/v1/stores/{storeId}/orders?status=paid | only paid orders returned | happy path |
  1685→| creates a fulfillment via API | POST /api/admin/v1/stores/{storeId}/orders/{id}/fulfillments | 201 response, fulfillment created | happy path |
  1686→| creates a refund via API | POST /api/admin/v1/stores/{storeId}/orders/{id}/refunds | 201 response, refund created | happy path |
  1687→| requires write-orders ability for mutations | token with only read-orders; POST fulfillment | 403 response | authorization |
  1688→
  1689→---
  1690→
  1691→## 4. Files to Create Inventory
  1692→
  1693→### Models (with migration, factory, seeder)
  1694→
  1695→| Name | Purpose |
  1696→|------|---------|
  1697→| `Organization` | Top-level tenant entity |
  1698→| `Store` | Individual store within an organization |
  1699→| `StoreDomain` | Domain mapping for a store |
  1700→| `StoreUser` | Pivot model with role attribute |
  1701→| `StoreSettings` | Per-store configuration |
  1702→| `Product` | Product entity |
  1703→| `ProductOption` | Product option definition |
  1704→| `ProductOptionValue` | Option value entry |
  1705→| `ProductVariant` | Product variant (SKU-level) |
  1706→| `InventoryItem` | Inventory tracking per variant |
  1707→| `Collection` | Product collection/category |
  1708→| `ProductMedia` | Product images and videos |
  1709→| `Theme` | Store theme entity |
  1710→| `ThemeFile` | Individual theme file |
  1711→| `ThemeSettings` | Theme configuration |
  1712→| `Page` | CMS page |
  1713→| `NavigationMenu` | Navigation menu entity |
  1714→| `NavigationItem` | Individual navigation item |
  1715→| `Cart` | Shopping cart entity |
  1716→| `CartLine` | Individual cart line item |
  1717→| `Checkout` | Checkout session entity |
  1718→| `ShippingZone` | Shipping zone configuration |
  1719→| `ShippingRate` | Shipping rate within a zone |
  1720→| `TaxSettings` | Per-store tax configuration |
  1721→| `Discount` | Discount code or automatic discount |
  1722→| `Customer` | Store customer entity |
  1723→| `CustomerAddress` | Customer address |
  1724→| `Order` | Order entity |
  1725→| `OrderLine` | Order line item |
  1726→| `Payment` | Payment record |
  1727→| `Refund` | Refund record |
  1728→| `Fulfillment` | Fulfillment record |
  1729→| `FulfillmentLine` | Fulfillment line item |
  1730→| `App` | Third-party app entity |
  1731→| `AppInstallation` | App installation per store |
  1732→| `OauthClient` | OAuth client for app |
  1733→| `OauthToken` | OAuth token for installation |
  1734→| `WebhookSubscription` | Webhook subscription per store |
  1735→| `WebhookDelivery` | Webhook delivery log |
  1736→| `AnalyticsEvent` | Raw analytics event |
  1737→| `AnalyticsDaily` | Pre-aggregated daily analytics |
  1738→| `SearchSettings` | Per-store search configuration |
  1739→| `SearchQuery` | Search query log |
  1740→
  1741→### Livewire Components - Admin
  1742→
  1743→| Name | Purpose |
  1744→|------|---------|
  1745→| `Admin/Auth/Login` | Admin login form |
  1746→| `Admin/Dashboard` | Admin dashboard |
  1747→| `Admin/Layout/Sidebar` | Admin sidebar navigation |
  1748→| `Admin/Layout/TopBar` | Admin top bar with store selector |
  1749→| `Admin/Products/Index` | Product list |
  1750→| `Admin/Products/Form` | Shared product form (create/edit mode) |
  1751→| `Admin/Collections/Index` | Collection list |
  1752→| `Admin/Collections/Form` | Shared collection form (create/edit mode) |
  1753→| `Admin/Orders/Index` | Order list |
  1754→| `Admin/Orders/Show` | Order detail |
  1755→| `Admin/Customers/Index` | Customer list |
  1756→| `Admin/Customers/Show` | Customer detail |
  1757→| `Admin/Discounts/Index` | Discount list |
  1758→| `Admin/Discounts/Form` | Shared discount form (create/edit mode) |
  1759→| `Admin/Settings/Index` | Settings tabs |
  1760→| `Admin/Settings/Shipping` | Shipping zone/rate management |
  1761→| `Admin/Settings/Taxes` | Tax settings |
  1762→| `Admin/Inventory/Index` | Inventory management - list and filter inventory items, adjust quantities (Spec 03 Section 8) |
  1763→| `Admin/Themes/Index` | Theme list |
  1764→| `Admin/Themes/Editor` | Theme editor |
  1765→| `Admin/Pages/Index` | Page list |
  1766→| `Admin/Pages/Form` | Shared page form (create/edit mode) |
  1767→| `Admin/Navigation/Index` | Navigation menu management |
  1768→| `Admin/Analytics/Index` | Analytics dashboard |
  1769→| `Admin/Search/Settings` | Search settings |
  1770→| `Admin/Apps/Index` | App directory |
  1771→| `Admin/Apps/Show` | Installed app detail |
  1772→| `Admin/Developers/Index` | API token and webhook management |
  1773→
  1774→### Livewire Components - Storefront
  1775→
  1776→| Name | Purpose |
  1777→|------|---------|
  1778→| `Storefront/Home` | Storefront home page |
  1779→| `Storefront/Collections/Index` | All collections grid |
  1780→| `Storefront/Collections/Show` | Collection product grid |
  1781→| `Storefront/Products/Show` | Product detail page |
  1782→| `Storefront/Cart/Show` | Full cart page |
  1783→| `Storefront/CartDrawer` | Slide-out cart drawer |
  1784→| `Storefront/Search/Index` | Search results page |
  1785→| `Storefront/Search/Modal` | Search autocomplete modal |
  1786→| `Storefront/Pages/Show` | CMS page renderer |
  1787→| `Storefront/Checkout/Show` | Multi-step checkout |
  1788→| `Storefront/Checkout/Confirmation` | Order confirmation |
  1789→| `Storefront/Account/Auth/Login` | Customer login |
  1790→| `Storefront/Account/Auth/Register` | Customer registration |
  1791→| `Storefront/Account/Dashboard` | Customer dashboard |
  1792→| `Storefront/Account/Orders/Index` | Customer order history |
  1793→| `Storefront/Account/Orders/Show` | Customer order detail |
  1794→| `Storefront/Account/Addresses/Index` | Customer address management |
  1795→
  1796→### Middleware
  1797→
  1798→| Name | Purpose |
  1799→|------|---------|
  1800→| `ResolveStore` | Resolves current store from hostname or session |
  1801→| `CheckStoreRole` | Validates user has required store role |
  1802→| `CustomerAuthenticate` | Customer guard authentication |
  1803→
  1804→### Policies
  1805→
  1806→| Name | Model |
  1807→|------|-------|
  1808→| `ProductPolicy` | Product |
  1809→| `OrderPolicy` | Order |
  1810→| `CollectionPolicy` | Collection |
  1811→| `DiscountPolicy` | Discount |
  1812→| `CustomerPolicy` | Customer |
  1813→| `StorePolicy` | Store |
  1814→| `PagePolicy` | Page |
  1815→| `ThemePolicy` | Theme |
  1816→| `FulfillmentPolicy` | Fulfillment |
  1817→| `RefundPolicy` | Refund |
  1818→
  1819→### Form Requests
  1820→
  1821→| Name | Purpose |
  1822→|------|---------|
  1823→| `StoreProductRequest` | Validate product creation |
  1824→| `UpdateProductRequest` | Validate product update |
  1825→| `StoreCollectionRequest` | Validate collection creation |
  1826→| `UpdateCollectionRequest` | Validate collection update |
  1827→| `StoreDiscountRequest` | Validate discount creation |
  1828→| `UpdateDiscountRequest` | Validate discount update |
  1829→| `SetCheckoutAddressRequest` | Validate checkout address |
  1830→| `SetCheckoutShippingRequest` | Validate checkout shipping selection |
  1831→| `CreateFulfillmentRequest` | Validate fulfillment creation |
  1832→| `CreateRefundRequest` | Validate refund creation |
  1833→| `StorePageRequest` | Validate page creation |
  1834→| `UpdatePageRequest` | Validate page update |
  1835→| `RegisterCustomerRequest` | Validate customer registration |
  1836→| `StoreShippingZoneRequest` | Validate shipping zone creation |
  1837→| `StoreShippingRateRequest` | Validate shipping rate creation |
  1838→| `UpdateTaxSettingsRequest` | Validate tax settings update |
  1839→| `StoreCustomerAddressRequest` | Validate customer address creation |
  1840→| `UpdateCustomerAddressRequest` | Validate customer address update |
  1841→
  1842→### Jobs
  1843→
  1844→| Name | Purpose |
  1845→|------|---------|
  1846→| `ProcessMediaUpload` | Resize images, update media status |
  1847→| `DeliverWebhook` | HTTP POST webhook with retry logic |
  1848→| `AggregateAnalytics` | Daily analytics aggregation |
  1849→| `CleanupAbandonedCarts` | Mark old active carts as abandoned |
  1850→| `ExpireAbandonedCheckouts` | Expire timed-out checkouts, release inventory |
  1851→
  1852→### Events
  1853→
  1854→| Name | Purpose |
  1855→|------|---------|
  1856→| `OrderCreated` | Dispatched when order is created |
  1857→| `OrderPaid` | Dispatched when payment is captured |
  1858→| `OrderFulfilled` | Dispatched when all lines fulfilled |
  1859→| `OrderCancelled` | Dispatched when order is cancelled |
  1860→| `OrderRefunded` | Dispatched when refund is processed |
  1861→| `CheckoutCompleted` | Dispatched when checkout completes |
  1862→| `CheckoutAddressed` | Dispatched when address is set |
  1863→| `CheckoutShippingSelected` | Dispatched when shipping is selected |
  1864→| `ProductStatusChanged` | Dispatched when product status transitions |
  1865→| `CartUpdated` | Dispatched when cart is mutated |
  1866→
  1867→### Tests
  1868→
  1869→**Unit tests to create (6 files):**
  1870→
  1871→| Name | Purpose |
  1872→|------|---------|
  1873→| `PricingEngineTest` | Pricing pipeline unit tests |
  1874→| `DiscountCalculatorTest` | Discount validation and calculation unit tests |
  1875→| `TaxCalculatorTest` | Tax calculation unit tests |
  1876→| `ShippingCalculatorTest` | Shipping rate calculation unit tests |
  1877→| `CartVersionTest` | Cart versioning unit tests |
  1878→| `HandleGeneratorTest` | Slug generation unit tests |
  1879→
  1880→**Feature tests to create (28 files):**
  1881→
  1882→| Name | Purpose |
  1883→|------|---------|
  1884→| `Tenancy/TenantResolutionTest` | Tenant resolution feature tests |
  1885→| `Tenancy/StoreIsolationTest` | Store isolation feature tests |
  1886→| `Auth/AdminAuthTest` | Admin authentication feature tests |
  1887→| `Auth/CustomerAuthTest` | Customer authentication feature tests |
  1888→| `Auth/SanctumTokenTest` | API token feature tests |
  1889→| `Products/ProductCrudTest` | Product CRUD feature tests |
  1890→| `Products/VariantTest` | Variant management feature tests |
  1891→| `Products/InventoryTest` | Inventory management feature tests |
  1892→| `Products/CollectionTest` | Collection feature tests |
  1893→| `Products/MediaUploadTest` | Media upload feature tests |
  1894→| `Cart/CartServiceTest` | Cart service feature tests |
  1895→| `Cart/CartApiTest` | Cart API feature tests |
  1896→| `Checkout/CheckoutFlowTest` | Checkout flow feature tests |
  1897→| `Checkout/CheckoutStateTest` | Checkout state machine feature tests |
  1898→| `Checkout/PricingIntegrationTest` | Pricing integration feature tests |
  1899→| `Checkout/DiscountTest` | Checkout discount feature tests |
  1900→| `Checkout/ShippingTest` | Checkout shipping feature tests |
  1901→| `Checkout/TaxTest` | Checkout tax feature tests |
  1902→| `Orders/OrderCreationTest` | Order creation feature tests |
  1903→| `Orders/RefundTest` | Refund feature tests |
  1904→| `Orders/FulfillmentTest` | Fulfillment feature tests |
  1905→| `Payments/MockPaymentProviderTest` | Mock PSP charge/decline feature tests |
  1906→| `Payments/PaymentServiceTest` | Payment service feature tests |
  1907→| `Payments/BankTransferConfirmationTest` | Bank transfer confirmation and auto-cancel tests |
  1908→| `Customers/CustomerAccountTest` | Customer account feature tests |
  1909→| `Customers/AddressManagementTest` | Address management feature tests |
  1910→| `Admin/DashboardTest` | Admin dashboard feature tests |
  1911→| `Admin/ProductManagementTest` | Admin product management feature tests |
  1912→| `Admin/OrderManagementTest` | Admin order management feature tests |
  1913→| `Admin/DiscountManagementTest` | Admin discount management feature tests |
  1914→| `Admin/SettingsTest` | Admin settings feature tests |
  1915→| `Search/SearchTest` | Search feature tests |
  1916→| `Search/AutocompleteTest` | Autocomplete feature tests |
  1917→| `Analytics/EventIngestionTest` | Analytics event ingestion feature tests |
  1918→| `Analytics/AggregationTest` | Analytics aggregation feature tests |
  1919→| `Webhooks/WebhookDeliveryTest` | Webhook delivery feature tests |
  1920→| `Webhooks/WebhookSignatureTest` | Webhook signature feature tests |
  1921→| `Api/StorefrontCartApiTest` | Storefront cart API feature tests |
  1922→| `Api/StorefrontCheckoutApiTest` | Storefront checkout API feature tests |
  1923→| `Api/AdminProductApiTest` | Admin product API feature tests |
  1924→| `Api/AdminOrderApiTest` | Admin order API feature tests |
  1925→
  1926→---
  1927→
  1928→## 5. Config File Changes
  1929→
  1930→| Config File | Change | Value | Purpose |
  1931→|-------------|--------|-------|---------|
  1932→| `config/database.php` | SQLite pragmas | WAL, foreign keys, busy_timeout 5000, synchronous normal | Optimized SQLite configuration |
  1933→| `config/auth.php` | Customer guard | Add customer guard, customer provider, customer password broker | Customer storefront auth |
  1934→| `config/session.php` | Driver | File driver, lifetime 120 | Session configuration |
  1935→| `config/cache.php` | Driver | File driver | Cache configuration |
  1936→| `config/queue.php` | Driver | Sync driver | Queue configuration |
  1937→| `config/filesystems.php` | Public disk | Media storage configuration | Public disk for media |
  1938→| `config/logging.php` | JSON channel | Structured JSON channel | Structured logging |
  1939→
  1940→### bootstrap/app.php Changes
  1941→
  1942→- Register middleware aliases: `store.resolve`, `role.check`, `auth:customer`
  1943→- Register middleware groups for `storefront` and `admin` route groups
  1944→- Configure rate limiters: `login` (5/min per IP), `api.admin` (60/min per token), `api.storefront` (120/min per IP), `checkout` (10/min per session), `search` (30/min per IP), `analytics` (60/min per IP), `webhooks` (100/min per IP)
  1945→- Configure exception handling
  1946→
  1947→### Routes Files
  1948→
  1949→| File | Contents |
  1950→|------|----------|
  1951→| `routes/web.php` | Admin auth routes, admin routes (prefix `/admin`), storefront routes, checkout routes, customer account routes |
  1952→| `routes/api.php` | Storefront API (prefix `/api/storefront/v1`), Admin API (prefix `/api/admin/v1`), Webhook receiver routes |
  1953→| `routes/console.php` | Scheduled jobs: `CleanupAbandonedCarts` daily, `ExpireAbandonedCheckouts` every 15 minutes, `AggregateAnalytics` daily, `CancelUnpaidBankTransferOrders` daily |
  1954→
  1955→### Service Providers
  1956→
  1957→**AppServiceProvider::boot() responsibilities:**
  1958→- Bind services to container (PaymentProvider, CartService, PricingEngine, etc.)
  1959→- Register rate limiters
  1960→- Register global scopes
  1961→- Register model observers (ProductObserver for FTS5 sync)
  1962→
  1963→### Services Directory
  1964→
  1965→| Service | Responsibility |
  1966→|---------|---------------|
  1967→| `CartService` | Cart CRUD, line management, version control, session binding |
  1968→| `CheckoutService` | State machine, transitions, address/shipping/payment coordination |
  1969→| `PricingEngine` | Deterministic pricing pipeline: subtotal -> discount -> shipping -> tax -> total |
  1970→| `DiscountService` | Discount validation, amount calculation, line allocation |
  1971→| `ShippingCalculator` | Zone matching, rate calculation |
  1972→| `TaxCalculator` | Tax calculation (exclusive/inclusive), rate lookup |
  1973→| `InventoryService` | Reserve, release, commit, restock operations |
  1974→| `ProductService` | Product CRUD, status transitions |
  1975→| `VariantMatrixService` | Cartesian product generation, variant lifecycle |
  1976→| `OrderService` | Order creation from checkout, numbering, inventory commit |
  1977→| `RefundService` | Refund creation, provider API, inventory restock |
  1978→| `FulfillmentService` | Fulfillment CRUD, tracking, status management |
  1979→| `NavigationService` | Menu tree building, URL resolution, caching |
  1980→| `SearchService` | FTS5 index management, query execution, autocomplete |
  1981→| `AnalyticsService` | Event tracking, daily aggregation |
  1982→| `WebhookService` | Event dispatch, HMAC signing, delivery management |
  1983→| `Payments\MockPaymentProvider` | In-process mock PSP: credit card (magic numbers), PayPal, bank transfer |
  1984→
  1985→---
  1986→
  1987→## 6. File Count Estimate
  1988→
  1989→| Category | Estimated Files |
  1990→|----------|-----------------|
  1991→| Migrations | 28-32 |
  1992→| Models | 32-36 |
  1993→| Livewire Components (Admin) | 28-30 |
  1994→| Livewire Components (Storefront) | 15-17 |
  1995→| Blade Views (Admin) | 28-30 |
  1996→| Blade Views (Storefront) | 18-22 |
  1997→| Blade Components (Storefront) | 8-10 |
  1998→| Services | 14-16 |

content:
---

#### tests/Feature/Admin/DashboardTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| renders the admin dashboard | acting as admin; GET /admin | 200 response, sees "Dashboard" | happy path |
| shows KPI tiles with correct data | store has 5 orders totaling 25000 cents | sees order count 5, total revenue formatted | happy path |
| restricts dashboard to authenticated admins | unauthenticated GET /admin | redirected to /admin/login | authorization |
| filters metrics by date range | orders across multiple dates; filter to last 7 days | only matching orders included in KPIs | happy path |

---

#### tests/Feature/Admin/ProductManagementTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| lists products with pagination | create 25 products; GET /admin/products | first page shows 15 (or configured per-page), pagination controls visible | happy path |
| creates a product via admin form | Livewire test: fill title, description, submit | product in DB | happy path |
| edits a product via admin form | Livewire test: change title, submit | product updated | happy path |
| bulk archives selected products | select 3 products, trigger bulk archive | all 3 status = archived | happy path |
| uploads media from the product form | Livewire file upload on product edit | media attached to product | happy path |
| manages variants from the product form | add options and values via Livewire | variants generated | happy path |
| restricts product management to authorized roles | support user GET /admin/products: can see list (read-only); support user attempt to create product | 403 on create | authorization |
| staff can create but not delete products | staff user: create product succeeds; staff user: delete product | fails with 403 on delete | authorization |

---

#### tests/Feature/Admin/OrderManagementTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| lists orders with status filter | 3 pending, 2 paid orders; filter by status=paid | 2 results | happy path |
| shows order detail page | GET /admin/orders/{order} | sees order number, line items, totals | happy path |
| creates a fulfillment from order detail | Livewire action: select lines, submit fulfillment | fulfillment created | happy path |
| processes a refund from order detail | Livewire action: enter amount, submit refund | refund created | happy path |
| restricts order management by role | support user can view orders (read-only); support user cannot update or fulfill | appropriate 403 responses | authorization |

---

#### tests/Feature/Admin/DiscountManagementTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| lists discounts | create 3 discounts; GET /admin/discounts | sees all 3 | happy path |
| creates a percent discount | Livewire: code="SAVE10", type=percent, value=10 | discount in DB | happy path |
| creates a fixed discount | Livewire: code="5OFF", type=fixed, value=500 | discount in DB | happy path |
| validates discount code uniqueness within store | create discount with code "SAVE10"; attempt to create another with same code | validation error | validation |
| edits a discount | change value from 10 to 15 | updated in DB | happy path |
| disables a discount | set status to disabled | status = disabled | happy path |

---

#### tests/Feature/Admin/SettingsTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| renders the settings page | GET /admin/settings | 200 response, sees settings tabs | happy path |
| updates general store settings | update store name | store_settings updated | happy path |
| configures shipping zones | create zone with countries and rates | shipping_zone and shipping_rates in DB | happy path |
| configures tax settings | set mode=manual, rate=1900, prices_include_tax=true | tax_settings updated | happy path |
| restricts settings to owner and admin roles | staff user GET /admin/settings | 403 response | authorization |
| manages store domains | add a new domain | store_domain created | happy path |

---

#### tests/Feature/Search/SearchTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| returns products matching search query | products: "Blue Cotton T-Shirt", "Red Wool Sweater"; search "cotton" | finds "Blue Cotton T-Shirt" | happy path |
| scopes search to current store | store A has "T-Shirt", store B has "T-Shirt Deluxe"; search "t-shirt" on store A | only store A product returned | authorization |
| returns empty for no matches | search "xyznonexistent" | empty results | edge case |
| logs search query for analytics | perform search | search_queries row created | happy path |
| paginates search results | 25 matching products, 12 per page | page 1 has 12, page 2 has 12, page 3 has 1 | happy path |

---

#### tests/Feature/Search/AutocompleteTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| returns suggestions matching prefix | products: "Summer Dress", "Summer Hat", "Winter Coat"; autocomplete prefix "sum" | "Summer Dress" and "Summer Hat" returned | happy path |
| limits results to configured count | 20 matching products, limit 5 | 5 results returned | happy path |
| returns empty for very short prefix | autocomplete prefix "a" (below minimum) | empty or all results | edge case |

---

#### tests/Feature/Analytics/EventIngestionTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| tracks a page view event | POST analytics event: type=page_view | analytics_events row created | happy path |
| tracks an add to cart event | POST event: type=add_to_cart, properties include product_id | event stored with properties | happy path |
| scopes events to current store | track event on store A | event.store_id = store A id | happy path |
| includes session ID when available | track event with session | session_id stored | happy path |
| includes customer ID when authenticated | track event as logged-in customer | customer_id stored | happy path |

---

#### tests/Feature/Analytics/AggregationTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| aggregates daily metrics from raw events | create events: 5 page_views, 3 add_to_carts, 2 checkout_completed; run AggregateAnalytics job | analytics_daily row with correct counts | happy path |
| calculates revenue and AOV correctly | 3 orders: 1000, 2000, 3000 cents; aggregate | revenue=6000, aov=2000 | happy path |
| runs idempotently | run aggregation twice for same date | analytics_daily row has correct values (not doubled) | edge case |

---

#### tests/Feature/Webhooks/WebhookDeliveryTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| delivers a webhook to a subscribed URL | mock HTTP client; subscription for event_type "order.created"; dispatch event | HTTP POST made to target_url | happy path |
| signs the payload with HMAC | deliver webhook | `X-Platform-Signature` header present with valid signature | happy path |
| retries failed deliveries with exponential backoff | first delivery returns 500 | job retried, attempt_count incremented | edge case |
| marks delivery as failed after max retries | 6 total attempts exhausted (1 initial + 5 retries) | delivery status = failed | edge case |
| pauses subscription after circuit breaker threshold | 5 consecutive failures | subscription status = paused | edge case |

---

#### tests/Feature/Webhooks/WebhookSignatureTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| generates a valid HMAC-SHA256 signature | payload: '{"event":"order.created"}'; secret: 'test-secret' | signature matches expected hash | happy path |
| verifies a valid signature | generate signature, then verify | returns true | happy path |
| rejects a tampered payload | sign original, verify with modified payload | returns false | validation |
| rejects an incorrect secret | sign with secret A, verify with secret B | returns false | validation |

---

#### tests/Feature/Api/StorefrontCartApiTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| creates a cart | POST /api/storefront/v1/carts | 201 response, body has cart id, version 1 | happy path |
| retrieves a cart with lines and totals | create cart with 2 lines; GET /api/storefront/v1/carts/{id} | 200 response, lines array has 2 items, totals calculated | happy path |
| adds a line to the cart | POST /api/storefront/v1/carts/{id}/lines | 200 response, line added | happy path |
| updates a line quantity | PUT /api/storefront/v1/carts/{id}/lines/{lineId} | 200 response, quantity updated | happy path |
| removes a line | DELETE /api/storefront/v1/carts/{id}/lines/{lineId} | 200 response, line removed | happy path |
| validates variant exists on add | add nonexistent variant_id | 422 response | validation |
| validates quantity is positive | add with quantity=0 | 422 response | validation |
| returns 404 for nonexistent cart | GET /api/storefront/v1/carts/999 | 404 response | validation |

---

#### tests/Feature/Api/StorefrontCheckoutApiTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| creates a checkout from a cart | POST /api/storefront/v1/checkouts with cart_id | 201 response, checkout status=started | happy path |
| sets checkout address | PUT /api/storefront/v1/checkouts/{id}/address | 200 response, status=addressed | happy path |
| selects a shipping method | PUT /api/storefront/v1/checkouts/{id}/shipping-method | 200 response, status=shipping_selected, available rates returned in response | happy path |
| applies a discount code | POST /api/storefront/v1/checkouts/{id}/apply-discount with code | 200 response, discount applied in totals | happy path |
| retrieves checkout with totals | GET /api/storefront/v1/checkouts/{id} | 200 response, includes totals_json fields | happy path |
| selects a payment method | PUT /api/storefront/v1/checkouts/{id}/payment-method with method=credit_card | 200 response, status=payment_selected, payment_method stored | happy path |
| completes checkout with credit card payment | POST /api/storefront/v1/checkouts/{id}/pay with card fields | 200 response, status=completed, order created | happy path |
| rejects payment with declined card | POST /api/storefront/v1/checkouts/{id}/pay with magic decline number | 422 response, payment declined message | validation |
| validates required address fields | PUT address with missing city | 422 response | validation |

---

#### tests/Feature/Api/AdminProductApiTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| lists products with authentication | GET /api/admin/v1/stores/{storeId}/products with Bearer token | 200 response, paginated product list | happy path |
| creates a product via API | POST /api/admin/v1/stores/{storeId}/products with product data | 201 response, product in response | happy path |
| updates a product via API | PUT /api/admin/v1/stores/{storeId}/products/{id} with updated data | 200 response, product updated | happy path |
| deletes a draft product via API | DELETE /api/admin/v1/stores/{storeId}/products/{id} | 200 response | happy path |
| requires write-products ability for mutations | token with only read-products; POST /api/admin/v1/stores/{storeId}/products | 403 response | authorization |
| returns 401 without token | GET /api/admin/v1/stores/{storeId}/products without auth header | 401 response | authorization |
| paginates results | 25 products, default page size 15 | first page has 15 items, meta has total=25 | happy path |

---

#### tests/Feature/Api/AdminOrderApiTest.php

| Test Name | Setup / Preconditions | Key Assertions | Category |
|-----------|----------------------|----------------|----------|
| lists orders with authentication | GET /api/admin/v1/stores/{storeId}/orders with Bearer token | 200 response, order list | happy path |
| retrieves a single order | GET /api/admin/v1/stores/{storeId}/orders/{id} | 200 response, order with lines, payments, fulfillments | happy path |
| filters orders by status | GET /api/admin/v1/stores/{storeId}/orders?status=paid | only paid orders returned | happy path |
| creates a fulfillment via API | POST /api/admin/v1/stores/{storeId}/orders/{id}/fulfillments | 201 response, fulfillment created | happy path |
| creates a refund via API | POST /api/admin/v1/stores/{storeId}/orders/{id}/refunds | 201 response, refund created | happy path |
| requires write-orders ability for mutations | token with only read-orders; POST fulfillment | 403 response | authorization |

---

## 4. Files to Create Inventory

### Models (with migration, factory, seeder)

| Name | Purpose |
|------|---------|
| `Organization` | Top-level tenant entity |
| `Store` | Individual store within an organization |
| `StoreDomain` | Domain mapping for a store |
| `StoreUser` | Pivot model with role attribute |
| `StoreSettings` | Per-store configuration |
| `Product` | Product entity |
| `ProductOption` | Product option definition |
| `ProductOptionValue` | Option value entry |
| `ProductVariant` | Product variant (SKU-level) |
| `InventoryItem` | Inventory tracking per variant |
| `Collection` | Product collection/category |
| `ProductMedia` | Product images and videos |
| `Theme` | Store theme entity |
| `ThemeFile` | Individual theme file |
| `ThemeSettings` | Theme configuration |
| `Page` | CMS page |
| `NavigationMenu` | Navigation menu entity |
| `NavigationItem` | Individual navigation item |
| `Cart` | Shopping cart entity |
| `CartLine` | Individual cart line item |
| `Checkout` | Checkout session entity |
| `ShippingZone` | Shipping zone configuration |
| `ShippingRate` | Shipping rate within a zone |
| `TaxSettings` | Per-store tax configuration |
| `Discount` | Discount code or automatic discount |
| `Customer` | Store customer entity |
| `CustomerAddress` | Customer address |
| `Order` | Order entity |
| `OrderLine` | Order line item |
| `Payment` | Payment record |
| `Refund` | Refund record |
| `Fulfillment` | Fulfillment record |
| `FulfillmentLine` | Fulfillment line item |
| `App` | Third-party app entity |
| `AppInstallation` | App installation per store |
| `OauthClient` | OAuth client for app |
| `OauthToken` | OAuth token for installation |
| `WebhookSubscription` | Webhook subscription per store |
| `WebhookDelivery` | Webhook delivery log |
| `AnalyticsEvent` | Raw analytics event |
| `AnalyticsDaily` | Pre-aggregated daily analytics |
| `SearchSettings` | Per-store search configuration |
| `SearchQuery` | Search query log |

### Livewire Components - Admin

| Name | Purpose |
|------|---------|
| `Admin/Auth/Login` | Admin login form |
| `Admin/Dashboard` | Admin dashboard |
| `Admin/Layout/Sidebar` | Admin sidebar navigation |
| `Admin/Layout/TopBar` | Admin top bar with store selector |
| `Admin/Products/Index` | Product list |
| `Admin/Products/Form` | Shared product form (create/edit mode) |
| `Admin/Collections/Index` | Collection list |
| `Admin/Collections/Form` | Shared collection form (create/edit mode) |
| `Admin/Orders/Index` | Order list |
| `Admin/Orders/Show` | Order detail |
| `Admin/Customers/Index` | Customer list |
| `Admin/Customers/Show` | Customer detail |
| `Admin/Discounts/Index` | Discount list |
| `Admin/Discounts/Form` | Shared discount form (create/edit mode) |
| `Admin/Settings/Index` | Settings tabs |
| `Admin/Settings/Shipping` | Shipping zone/rate management |
| `Admin/Settings/Taxes` | Tax settings |
| `Admin/Inventory/Index` | Inventory management - list and filter inventory items, adjust quantities (Spec 03 Section 8) |
| `Admin/Themes/Index` | Theme list |
| `Admin/Themes/Editor` | Theme editor |
| `Admin/Pages/Index` | Page list |
| `Admin/Pages/Form` | Shared page form (create/edit mode) |
| `Admin/Navigation/Index` | Navigation menu management |
| `Admin/Analytics/Index` | Analytics dashboard |
| `Admin/Search/Settings` | Search settings |
| `Admin/Apps/Index` | App directory |
| `Admin/Apps/Show` | Installed app detail |
| `Admin/Developers/Index` | API token and webhook management |

### Livewire Components - Storefront

| Name | Purpose |
|------|---------|
| `Storefront/Home` | Storefront home page |
| `Storefront/Collections/Index` | All collections grid |
| `Storefront/Collections/Show` | Collection product grid |
| `Storefront/Products/Show` | Product detail page |
| `Storefront/Cart/Show` | Full cart page |
| `Storefront/CartDrawer` | Slide-out cart drawer |
| `Storefront/Search/Index` | Search results page |
| `Storefront/Search/Modal` | Search autocomplete modal |
| `Storefront/Pages/Show` | CMS page renderer |
| `Storefront/Checkout/Show` | Multi-step checkout |
| `Storefront/Checkout/Confirmation` | Order confirmation |
| `Storefront/Account/Auth/Login` | Customer login |
| `Storefront/Account/Auth/Register` | Customer registration |
| `Storefront/Account/Dashboard` | Customer dashboard |
| `Storefront/Account/Orders/Index` | Customer order history |
| `Storefront/Account/Orders/Show` | Customer order detail |
| `Storefront/Account/Addresses/Index` | Customer address management |

### Middleware

| Name | Purpose |
|------|---------|
| `ResolveStore` | Resolves current store from hostname or session |
| `CheckStoreRole` | Validates user has required store role |
| `CustomerAuthenticate` | Customer guard authentication |

### Policies

| Name | Model |
|------|-------|
| `ProductPolicy` | Product |
| `OrderPolicy` | Order |
| `CollectionPolicy` | Collection |
| `DiscountPolicy` | Discount |
| `CustomerPolicy` | Customer |
| `StorePolicy` | Store |
| `PagePolicy` | Page |
| `ThemePolicy` | Theme |
| `FulfillmentPolicy` | Fulfillment |
| `RefundPolicy` | Refund |

### Form Requests

| Name | Purpose |
|------|---------|
| `StoreProductRequest` | Validate product creation |
| `UpdateProductRequest` | Validate product update |
| `StoreCollectionRequest` | Validate collection creation |
| `UpdateCollectionRequest` | Validate collection update |
| `StoreDiscountRequest` | Validate discount creation |
| `UpdateDiscountRequest` | Validate discount update |
| `SetCheckoutAddressRequest` | Validate checkout address |
| `SetCheckoutShippingRequest` | Validate checkout shipping selection |
| `CreateFulfillmentRequest` | Validate fulfillment creation |
| `CreateRefundRequest` | Validate refund creation |
| `StorePageRequest` | Validate page creation |
| `UpdatePageRequest` | Validate page update |
| `RegisterCustomerRequest` | Validate customer registration |
| `StoreShippingZoneRequest` | Validate shipping zone creation |
| `StoreShippingRateRequest` | Validate shipping rate creation |
| `UpdateTaxSettingsRequest` | Validate tax settings update |
| `StoreCustomerAddressRequest` | Validate customer address creation |
| `UpdateCustomerAddressRequest` | Validate customer address update |

### Jobs

| Name | Purpose |
|------|---------|
| `ProcessMediaUpload` | Resize images, update media status |
| `DeliverWebhook` | HTTP POST webhook with retry logic |
| `AggregateAnalytics` | Daily analytics aggregation |
| `CleanupAbandonedCarts` | Mark old active carts as abandoned |
| `ExpireAbandonedCheckouts` | Expire timed-out checkouts, release inventory |

### Events

| Name | Purpose |
|------|---------|
| `OrderCreated` | Dispatched when order is created |
| `OrderPaid` | Dispatched when payment is captured |
| `OrderFulfilled` | Dispatched when all lines fulfilled |
| `OrderCancelled` | Dispatched when order is cancelled |
| `OrderRefunded` | Dispatched when refund is processed |
| `CheckoutCompleted` | Dispatched when checkout completes |
| `CheckoutAddressed` | Dispatched when address is set |
| `CheckoutShippingSelected` | Dispatched when shipping is selected |
| `ProductStatusChanged` | Dispatched when product status transitions |
| `CartUpdated` | Dispatched when cart is mutated |

### Tests

**Unit tests to create (6 files):**

| Name | Purpose |
|------|---------|
| `PricingEngineTest` | Pricing pipeline unit tests |
| `DiscountCalculatorTest` | Discount validation and calculation unit tests |
| `TaxCalculatorTest` | Tax calculation unit tests |
| `ShippingCalculatorTest` | Shipping rate calculation unit tests |
| `CartVersionTest` | Cart versioning unit tests |
| `HandleGeneratorTest` | Slug generation unit tests |

**Feature tests to create (28 files):**

| Name | Purpose |
|------|---------|
| `Tenancy/TenantResolutionTest` | Tenant resolution feature tests |
| `Tenancy/StoreIsolationTest` | Store isolation feature tests |
| `Auth/AdminAuthTest` | Admin authentication feature tests |
| `Auth/CustomerAuthTest` | Customer authentication feature tests |
| `Auth/SanctumTokenTest` | API token feature tests |
| `Products/ProductCrudTest` | Product CRUD feature tests |
| `Products/VariantTest` | Variant management feature tests |
| `Products/InventoryTest` | Inventory management feature tests |
| `Products/CollectionTest` | Collection feature tests |
| `Products/MediaUploadTest` | Media upload feature tests |
| `Cart/CartServiceTest` | Cart service feature tests |
| `Cart/CartApiTest` | Cart API feature tests |
| `Checkout/CheckoutFlowTest` | Checkout flow feature tests |
| `Checkout/CheckoutStateTest` | Checkout state machine feature tests |
| `Checkout/PricingIntegrationTest` | Pricing integration feature tests |
| `Checkout/DiscountTest` | Checkout discount feature tests |
| `Checkout/ShippingTest` | Checkout shipping feature tests |
| `Checkout/TaxTest` | Checkout tax feature tests |
| `Orders/OrderCreationTest` | Order creation feature tests |
| `Orders/RefundTest` | Refund feature tests |
| `Orders/FulfillmentTest` | Fulfillment feature tests |
| `Payments/MockPaymentProviderTest` | Mock PSP charge/decline feature tests |
| `Payments/PaymentServiceTest` | Payment service feature tests |
| `Payments/BankTransferConfirmationTest` | Bank transfer confirmation and auto-cancel tests |
| `Customers/CustomerAccountTest` | Customer account feature tests |
| `Customers/AddressManagementTest` | Address management feature tests |
| `Admin/DashboardTest` | Admin dashboard feature tests |
| `Admin/ProductManagementTest` | Admin product management feature tests |
| `Admin/OrderManagementTest` | Admin order management feature tests |
| `Admin/DiscountManagementTest` | Admin discount management feature tests |
| `Admin/SettingsTest` | Admin settings feature tests |
| `Search/SearchTest` | Search feature tests |
| `Search/AutocompleteTest` | Autocomplete feature tests |
| `Analytics/EventIngestionTest` | Analytics event ingestion feature tests |
| `Analytics/AggregationTest` | Analytics aggregation feature tests |
| `Webhooks/WebhookDeliveryTest` | Webhook delivery feature tests |
| `Webhooks/WebhookSignatureTest` | Webhook signature feature tests |
| `Api/StorefrontCartApiTest` | Storefront cart API feature tests |
| `Api/StorefrontCheckoutApiTest` | Storefront checkout API feature tests |
| `Api/AdminProductApiTest` | Admin product API feature tests |
| `Api/AdminOrderApiTest` | Admin order API feature tests |

---

## 5. Config File Changes

| Config File | Change | Value | Purpose |
|-------------|--------|-------|---------|
| `config/database.php` | SQLite pragmas | WAL, foreign keys, busy_timeout 5000, synchronous normal | Optimized SQLite configuration |
| `config/auth.php` | Customer guard | Add customer guard, customer provider, customer password broker | Customer storefront auth |
| `config/session.php` | Driver | File driver, lifetime 120 | Session configuration |
| `config/cache.php` | Driver | File driver | Cache configuration |
| `config/queue.php` | Driver | Sync driver | Queue configuration |
| `config/filesystems.php` | Public disk | Media storage configuration | Public disk for media |
| `config/logging.php` | JSON channel | Structured JSON channel | Structured logging |

### bootstrap/app.php Changes

- Register middleware aliases: `store.resolve`, `role.check`, `auth:customer`
- Register middleware groups for `storefront` and `admin` route groups
- Configure rate limiters: `login` (5/min per IP), `api.admin` (60/min per token), `api.storefront` (120/min per IP), `checkout` (10/min per session), `search` (30/min per IP), `analytics` (60/min per IP), `webhooks` (100/min per IP)
- Configure exception handling

### Routes Files

| File | Contents |
|------|----------|
| `routes/web.php` | Admin auth routes, admin routes (prefix `/admin`), storefront routes, checkout routes, customer account routes |
| `routes/api.php` | Storefront API (prefix `/api/storefront/v1`), Admin API (prefix `/api/admin/v1`), Webhook receiver routes |
| `routes/console.php` | Scheduled jobs: `CleanupAbandonedCarts` daily, `ExpireAbandonedCheckouts` every 15 minutes, `AggregateAnalytics` daily, `CancelUnpaidBankTransferOrders` daily |

### Service Providers

**AppServiceProvider::boot() responsibilities:**
- Bind services to container (PaymentProvider, CartService, PricingEngine, etc.)
- Register rate limiters
- Register global scopes
- Register model observers (ProductObserver for FTS5 sync)

### Services Directory

| Service | Responsibility |
|---------|---------------|
| `CartService` | Cart CRUD, line management, version control, session binding |
| `CheckoutService` | State machine, transitions, address/shipping/payment coordination |
| `PricingEngine` | Deterministic pricing pipeline: subtotal -> discount -> shipping -> tax -> total |
| `DiscountService` | Discount validation, amount calculation, line allocation |
| `ShippingCalculator` | Zone matching, rate calculation |
| `TaxCalculator` | Tax calculation (exclusive/inclusive), rate lookup |
| `InventoryService` | Reserve, release, commit, restock operations |
| `ProductService` | Product CRUD, status transitions |
| `VariantMatrixService` | Cartesian product generation, variant lifecycle |
| `OrderService` | Order creation from checkout, numbering, inventory commit |
| `RefundService` | Refund creation, provider API, inventory restock |
| `FulfillmentService` | Fulfillment CRUD, tracking, status management |
| `NavigationService` | Menu tree building, URL resolution, caching |
| `SearchService` | FTS5 index management, query execution, autocomplete |
| `AnalyticsService` | Event tracking, daily aggregation |
| `WebhookService` | Event dispatch, HMAC signing, delivery management |
| `Payments\MockPaymentProvider` | In-process mock PSP: credit card (magic numbers), PayPal, bank transfer |

---

## 6. File Count Estimate

| Category | Estimated Files |
|----------|-----------------|
| Migrations | 28-32 |
| Models | 32-36 |
| Livewire Components (Admin) | 28-30 |
| Livewire Components (Storefront) | 15-17 |
| Blade Views (Admin) | 28-30 |
| Blade Views (Storefront) | 18-22 |
| Blade Components (Storefront) | 8-10 |
| Services | 14-16 |


userType: external

slug: iterative-seeking-pine

type: message

role: assistant

service_tier: standard

type: assistant


type: progress

hookEvent: PostToolUse

command: callback


type: user

role: user

content:
  1998→| Services | 14-16 |
  1999→| Policies | 10 |
  2000→| Form Requests | 18-20 |
  2001→| Jobs | 5 |
  2002→| Events | 10 |
  2003→| Middleware | 3 |
  2004→| Enums | 18-20 |
  2005→| Factories | 25-28 |
  2006→| Seeders | 20-22 |
  2007→| Config changes | 6-7 |
  2008→| Routes | 3 |
  2009→| Value Objects | 3-4 |
  2010→| Contracts/Interfaces | 2-3 |
  2011→| Traits/Concerns | 2-3 |
  2012→| Scopes | 1 |
  2013→| Observers | 1 |
  2014→| Support classes | 2-3 |
  2015→| Tests (Unit) | 6 |
  2016→| Tests (Feature) | 28-30 |
  2017→| Tests (Browser) | 18 files (143 tests) |
  2018→| CSS/JS | 3-5 |
  2019→| **Total** | **~320-380 files** |
  2020→
  2021→---
  2022→
  2023→## 7. Verification Checklist
  2024→
  2025→1. Install Composer dependencies and confirm no errors
  2026→2. Install npm dependencies and run the Vite build; confirm it succeeds
  2027→3. Run a fresh migration on a clean SQLite database and confirm all migrations complete without errors
  2028→4. Run all seeders and confirm demo data is created without errors
  2029→5. Run all unit tests and confirm they pass
  2030→6. Run all feature tests and confirm they pass
  2031→7. Run all browser tests and confirm they pass (requires browser driver)
  2032→8. Run the code style formatter/checker and confirm code conforms to project standards
  2033→9. Manual smoke: visit the storefront domain and confirm it renders with products
  2034→10. Manual smoke: visit the admin login page and confirm it renders; authenticate as the demo admin user
  2035→11. Manual smoke: add a product to the cart, proceed through the full checkout flow
  2036→12. Manual smoke: in admin, create a product, manage an order, and process a fulfillment
  2037→13. List all registered routes and confirm they are correct with no duplicates
  2038→14. Run the config cache command and confirm it works (verifying no `env()` calls outside config files)
  2039→
  2040→---
  2041→
  2042→## 8. Seeder Execution Order
  2043→
  2044→Seeders must run in dependency order. The `DatabaseSeeder` should call them sequentially in this order:
  2045→
  2046→1. `OrganizationSeeder`
  2047→2. `StoreSeeder`
  2048→3. `StoreDomainSeeder`
  2049→4. `UserSeeder`
  2050→5. `StoreUserSeeder`
  2051→6. `StoreSettingsSeeder`
  2052→7. `TaxSettingsSeeder`
  2053→8. `ShippingSeeder` - creates shipping zones and rates
  2054→9. `CollectionSeeder` - creates collections (before products so products can be linked)
  2055→10. `ProductSeeder` - creates products with options, variants, inventory, media, and collection associations
  2056→11. `DiscountSeeder`
  2057→12. `CustomerSeeder` - creates customers and their addresses
  2058→13. `OrderSeeder` - creates sample orders with lines, payments, fulfillments
  2059→14. `ThemeSeeder` - creates themes with files and settings
  2060→15. `PageSeeder`
  2061→16. `NavigationSeeder` - creates navigation menus and items
  2062→17. `AnalyticsSeeder`
  2063→18. `SearchSettingsSeeder`
  2064→
  2065→See spec `07-SEEDERS-AND-TEST-DATA.md` for detailed seeder data definitions.
  2066→

type: text

content:
| Services | 14-16 |
| Policies | 10 |
| Form Requests | 18-20 |
| Jobs | 5 |
| Events | 10 |
| Middleware | 3 |
| Enums | 18-20 |
| Factories | 25-28 |
| Seeders | 20-22 |
| Config changes | 6-7 |
| Routes | 3 |
| Value Objects | 3-4 |
| Contracts/Interfaces | 2-3 |
| Traits/Concerns | 2-3 |
| Scopes | 1 |
| Observers | 1 |
| Support classes | 2-3 |
| Tests (Unit) | 6 |
| Tests (Feature) | 28-30 |
| Tests (Browser) | 18 files (143 tests) |
| CSS/JS | 3-5 |
| **Total** | **~320-380 files** |

---

## 7. Verification Checklist

1. Install Composer dependencies and confirm no errors
2. Install npm dependencies and run the Vite build; confirm it succeeds
3. Run a fresh migration on a clean SQLite database and confirm all migrations complete without errors
4. Run all seeders and confirm demo data is created without errors
5. Run all unit tests and confirm they pass
6. Run all feature tests and confirm they pass
7. Run all browser tests and confirm they pass (requires browser driver)
8. Run the code style formatter/checker and confirm code conforms to project standards
9. Manual smoke: visit the storefront domain and confirm it renders with products
10. Manual smoke: visit the admin login page and confirm it renders; authenticate as the demo admin user
11. Manual smoke: add a product to the cart, proceed through the full checkout flow
12. Manual smoke: in admin, create a product, manage an order, and process a fulfillment
13. List all registered routes and confirm they are correct with no duplicates
14. Run the config cache command and confirm it works (verifying no `env()` calls outside config files)

---

## 8. Seeder Execution Order

Seeders must run in dependency order. The `DatabaseSeeder` should call them sequentially in this order:

1. `OrganizationSeeder`
2. `StoreSeeder`
3. `StoreDomainSeeder`
4. `UserSeeder`
5. `StoreUserSeeder`
6. `StoreSettingsSeeder`
7. `TaxSettingsSeeder`
8. `ShippingSeeder` - creates shipping zones and rates
9. `CollectionSeeder` - creates collections (before products so products can be linked)
10. `ProductSeeder` - creates products with options, variants, inventory, media, and collection associations
11. `DiscountSeeder`
12. `CustomerSeeder` - creates customers and their addresses
13. `OrderSeeder` - creates sample orders with lines, payments, fulfillments
14. `ThemeSeeder` - creates themes with files and settings
15. `PageSeeder`
16. `NavigationSeeder` - creates navigation menus and items
17. `AnalyticsSeeder`
18. `SearchSettingsSeeder`

See spec `07-SEEDERS-AND-TEST-DATA.md` for detailed seeder data definitions.


type: thinking

thinking: This is a massive project. Let me now understand the current state of the codebase to see what already exists.


text: Now let me understand the current state of the codebase and read the remaining spec files.


Task

description: Explore current codebase state

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


text:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


Bash

command: find /Users/fabianwesner/Herd/shop -type f -name "*.json" -o -name ".env*" -o -name "*.php" | head -100

description: Get overview of project files

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


command: ls -la /Users/fabianwesner/Herd/shop/ | grep -v node_modules

description: List root directory contents

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


content:
total 1144
drwxr-xr-x@  39 fabianwesner  staff    1248 Feb 13 18:15 .
drwxr-xr-x@ 115 fabianwesner  staff    3680 Feb 12 15:18 ..
drwxr-xr-x@   3 fabianwesner  staff      96 Feb 13 18:02 .claude
drwxr-xr-x@   4 fabianwesner  staff     128 Feb 12 19:35 .cursor
-rw-r--r--@   1 fabianwesner  staff    6148 Feb 12 15:19 .DS_Store
-rw-r--r--@   1 fabianwesner  staff     252 Feb  4 19:45 .editorconfig
-rw-r--r--@   1 fabianwesner  staff    3394 Feb 12 22:02 .env
-rw-r--r--@   1 fabianwesner  staff    1086 Feb 11 12:21 .env.example
drwxr-xr-x@  16 fabianwesner  staff     512 Feb 13 18:16 .git
-rw-r--r--@   1 fabianwesner  staff     210 Feb  4 19:45 .gitattributes
drwxr-xr-x@   3 fabianwesner  staff      96 Feb 12 19:35 .github
-rw-r--r--@   1 fabianwesner  staff     286 Feb  4 19:45 .gitignore
drwxr-xr-x@  13 fabianwesner  staff     416 Feb 13 18:15 .idea
drwxr-xr-x@   3 fabianwesner  staff      96 Feb 12 19:35 .junie
-rw-r--r--@   1 fabianwesner  staff     455 Feb 13 18:02 .mcp.json
-rw-r--r--@   1 fabianwesner  staff     925 Feb 13 18:02 AGENTS.md
drwxr-xr-x@   8 fabianwesner  staff     256 Feb 13 18:02 app
-rwxr-xr-x@   1 fabianwesner  staff     425 Feb  4 19:45 artisan
drwxr-xr-x@   5 fabianwesner  staff     160 Feb 13 18:02 bootstrap
-rw-r--r--@   1 fabianwesner  staff   20750 Feb 13 18:02 CLAUDE.md
-rw-r--r--@   1 fabianwesner  staff    3286 Feb 13 18:09 composer.json
-rw-r--r--@   1 fabianwesner  staff  392537 Feb 13 18:09 composer.lock
drwxr-xr-x@  13 fabianwesner  staff     416 Feb 13 18:02 config
drwxr-xr-x@  14 fabianwesner  staff     448 Feb 13 17:54 database
-rw-r--r--@   1 fabianwesner  staff   98376 Feb 11 12:21 package-lock.json
-rw-r--r--@   1 fabianwesner  staff     633 Feb  4 19:45 package.json
-rw-r--r--@   1 fabianwesner  staff    1284 Feb  4 19:45 phpunit.xml
-rw-r--r--@   1 fabianwesner  staff      28 Feb  4 19:45 pint.json
drwxr-xr-x@  10 fabianwesner  staff     320 Feb 13 17:49 public
-rw-r--r--@   1 fabianwesner  staff    2645 Feb 13 18:15 README.md
drwxr-xr-x@  21 fabianwesner  staff     672 Feb 13 17:45 report
drwxr-xr-x@   5 fabianwesner  staff     160 Feb  4 19:45 resources
drwxr-xr-x@   5 fabianwesner  staff     160 Feb 13 18:02 routes
drwxr-xr-x   11 fabianwesner  staff     352 Feb 13 18:02 specs
drwxr-xr-x@   6 fabianwesner  staff     192 Feb 12 14:31 storage
drwxr-xr-x@   6 fabianwesner  staff     192 Feb 13 12:36 tests
drwxr-xr-x@  56 fabianwesner  staff    1792 Feb 13 18:06 vendor
-rw-r--r--@   1 fabianwesner  staff     460 Feb  4 19:45 vite.config.js

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


content:
/Users/fabianwesner/Herd/shop/.junie/mcp/mcp.json
/Users/fabianwesner/Herd/shop/database/migrations/0001_01_01_000000_create_users_table.php
/Users/fabianwesner/Herd/shop/database/migrations/0001_01_01_000001_create_cache_table.php
/Users/fabianwesner/Herd/shop/database/migrations/0001_01_01_000002_create_jobs_table.php
/Users/fabianwesner/Herd/shop/database/migrations/2025_08_14_170933_add_two_factor_columns_to_users_table.php
/Users/fabianwesner/Herd/shop/database/seeders/DatabaseSeeder.php
/Users/fabianwesner/Herd/shop/database/factories/UserFactory.php
/Users/fabianwesner/Herd/shop/.cursor/mcp.json
/Users/fabianwesner/Herd/shop/bootstrap/app.php
/Users/fabianwesner/Herd/shop/bootstrap/cache/services.php
/Users/fabianwesner/Herd/shop/bootstrap/cache/packages.php
/Users/fabianwesner/Herd/shop/bootstrap/providers.php
/Users/fabianwesner/Herd/shop/app/Providers/AppServiceProvider.php
/Users/fabianwesner/Herd/shop/app/Providers/FortifyServiceProvider.php
/Users/fabianwesner/Herd/shop/app/Models/User.php
/Users/fabianwesner/Herd/shop/app/Livewire/Settings/TwoFactor.php
/Users/fabianwesner/Herd/shop/app/Livewire/Settings/DeleteUserForm.php
/Users/fabianwesner/Herd/shop/app/Livewire/Settings/TwoFactor/RecoveryCodes.php
/Users/fabianwesner/Herd/shop/app/Livewire/Settings/Password.php
/Users/fabianwesner/Herd/shop/app/Livewire/Settings/Profile.php
/Users/fabianwesner/Herd/shop/app/Livewire/Settings/Appearance.php
/Users/fabianwesner/Herd/shop/app/Livewire/Actions/Logout.php
/Users/fabianwesner/Herd/shop/app/Http/Controllers/Controller.php
/Users/fabianwesner/Herd/shop/app/Actions/Fortify/ResetUserPassword.php
/Users/fabianwesner/Herd/shop/app/Actions/Fortify/CreateNewUser.php
/Users/fabianwesner/Herd/shop/app/Concerns/ProfileValidationRules.php
/Users/fabianwesner/Herd/shop/app/Concerns/PasswordValidationRules.php
/Users/fabianwesner/Herd/shop/config/fortify.php
/Users/fabianwesner/Herd/shop/config/auth.php
/Users/fabianwesner/Herd/shop/config/app.php
/Users/fabianwesner/Herd/shop/config/mail.php
/Users/fabianwesner/Herd/shop/config/services.php
/Users/fabianwesner/Herd/shop/config/database.php
/Users/fabianwesner/Herd/shop/config/cache.php
/Users/fabianwesner/Herd/shop/config/session.php
/Users/fabianwesner/Herd/shop/config/queue.php
/Users/fabianwesner/Herd/shop/config/logging.php
/Users/fabianwesner/Herd/shop/config/filesystems.php
/Users/fabianwesner/Herd/shop/resources/views/welcome.blade.php
/Users/fabianwesner/Herd/shop/resources/views/flux/icon/layout-grid.blade.php
/Users/fabianwesner/Herd/shop/resources/views/flux/icon/folder-git-2.blade.php
/Users/fabianwesner/Herd/shop/resources/views/flux/icon/chevrons-up-down.blade.php
/Users/fabianwesner/Herd/shop/resources/views/flux/icon/book-open-text.blade.php
/Users/fabianwesner/Herd/shop/resources/views/flux/navlist/group.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/settings/layout.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/desktop-user-menu.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/app-logo-icon.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/auth-header.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/action-message.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/app-logo.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/placeholder-pattern.blade.php
/Users/fabianwesner/Herd/shop/resources/views/components/auth-session-status.blade.php
/Users/fabianwesner/Herd/shop/resources/views/dashboard.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/settings/delete-user-form.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/settings/two-factor.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/settings/password.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/settings/appearance.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/settings/profile.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/settings/two-factor/recovery-codes.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/reset-password.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/register.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/two-factor-challenge.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/confirm-password.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/forgot-password.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/verify-email.blade.php
/Users/fabianwesner/Herd/shop/resources/views/livewire/auth/login.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/auth.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/app/header.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/app/sidebar.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/auth/card.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/auth/simple.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/auth/split.blade.php
/Users/fabianwesner/Herd/shop/resources/views/layouts/app.blade.php
/Users/fabianwesner/Herd/shop/resources/views/partials/head.blade.php
/Users/fabianwesner/Herd/shop/resources/views/partials/settings-heading.blade.php
/Users/fabianwesner/Herd/shop/.mcp.json
/Users/fabianwesner/Herd/shop/node_modules/tinyglobby/package.json
/Users/fabianwesner/Herd/shop/node_modules/tapable/package.json
/Users/fabianwesner/Herd/shop/node_modules/@types/estree/package.json
/Users/fabianwesner/Herd/shop/node_modules/browserslist/package.json
/Users/fabianwesner/Herd/shop/node_modules/laravel-vite-plugin/package.json
/Users/fabianwesner/Herd/shop/node_modules/jiti/package.json
/Users/fabianwesner/Herd/shop/node_modules/strip-ansi/package.json
/Users/fabianwesner/Herd/shop/node_modules/lightningcss-darwin-arm64/package.json
/Users/fabianwesner/Herd/shop/node_modules/es-errors/package.json
/Users/fabianwesner/Herd/shop/node_modules/es-errors/tsconfig.json
/Users/fabianwesner/Herd/shop/node_modules/math-intrinsics/package.json
/Users/fabianwesner/Herd/shop/node_modules/math-intrinsics/tsconfig.json
/Users/fabianwesner/Herd/shop/node_modules/node-releases/package.json
/Users/fabianwesner/Herd/shop/node_modules/node-releases/data/processed/envs.json
/Users/fabianwesner/Herd/shop/node_modules/node-releases/data/release-schedule/release-schedule.json
/Users/fabianwesner/Herd/shop/node_modules/has-tostringtag/package.json
/Users/fabianwesner/Herd/shop/node_modules/has-tostringtag/tsconfig.json
/Users/fabianwesner/Herd/shop/node_modules/require-directory/package.json
/Users/fabianwesner/Herd/shop/node_modules/autoprefixer/package.json
/Users/fabianwesner/Herd/shop/node_modules/escalade/package.json
/Users/fabianwesner/Herd/shop/node_modules/detect-libc/package.json
/Users/fabianwesner/Herd/shop/node_modules/call-bind-apply-helpers/package.json
/Users/fabianwesner/Herd/shop/node_modules/call-bind-apply-helpers/tsconfig.json
/Users/fabianwesner/Herd/shop/node_modules/concurrently/package.json

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


Task

description: Read remaining spec files

prompt:
Read ALL the specification files in /Users/fabianwesner/Herd/shop/specs/ directory. I need the full content of:
1. specs/01-DATABASE-SCHEMA.md (read in chunks if needed)
2. specs/02-API-ROUTES.md (read in chunks if needed)
3. specs/03-ADMIN-UI.md (read in chunks if needed)
4. specs/04-STOREFRONT-UI.md (read in chunks if needed)
5. specs/05-BUSINESS-LOGIC.md (read in chunks if needed)
6. specs/06-AUTH-AND-SECURITY.md (read in chunks if needed)
7. specs/07-SEEDERS-AND-TEST-DATA.md (read in chunks if needed)
8. specs/08-PLAYWRIGHT-E2E-PLAN.md (read in chunks if needed)

For each file provide a comprehensive summary including:
- All table/column definitions
- All API endpoints
- All UI components and their specifications
- All business rules
- All test specifications
- All seeder data definitions

This is critical - I need ALL the details, not just summaries. Extract every table name, column, relationship, route, component, and test case.


text:
Read ALL the specification files in /Users/fabianwesner/Herd/shop/specs/ directory. I need the full content of:
1. specs/01-DATABASE-SCHEMA.md (read in chunks if needed)
2. specs/02-API-ROUTES.md (read in chunks if needed)
3. specs/03-ADMIN-UI.md (read in chunks if needed)
4. specs/04-STOREFRONT-UI.md (read in chunks if needed)
5. specs/05-BUSINESS-LOGIC.md (read in chunks if needed)
6. specs/06-AUTH-AND-SECURITY.md (read in chunks if needed)
7. specs/07-SEEDERS-AND-TEST-DATA.md (read in chunks if needed)
8. specs/08-PLAYWRIGHT-E2E-PLAN.md (read in chunks if needed)

For each file provide a comprehensive summary including:
- All table/column definitions
- All API endpoints
- All UI components and their specifications
- All business rules
- All test specifications
- All seeder data definitions

This is critical - I need ALL the details, not just summaries. Extract every table name, column, relationship, route, component, and test case.

prompt:
Read ALL the specification files in /Users/fabianwesner/Herd/shop/specs/ directory. I need the full content of:
1. specs/01-DATABASE-SCHEMA.md (read in chunks if needed)
2. specs/02-API-ROUTES.md (read in chunks if needed)
3. specs/03-ADMIN-UI.md (read in chunks if needed)
4. specs/04-STOREFRONT-UI.md (read in chunks if needed)
5. specs/05-BUSINESS-LOGIC.md (read in chunks if needed)
6. specs/06-AUTH-AND-SECURITY.md (read in chunks if needed)
7. specs/07-SEEDERS-AND-TEST-DATA.md (read in chunks if needed)
8. specs/08-PLAYWRIGHT-E2E-PLAN.md (read in chunks if needed)

For each file provide a comprehensive summary including:
- All table/column definitions
- All API endpoints
- All UI components and their specifications
- All business rules
- All test specifications
- All seeder data definitions

This is critical - I need ALL the details, not just summaries. Extract every table name, column, relationship, route, component, and test case.


prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


content:
     1→{
     2→    "$schema": "https://getcomposer.org/schema.json",
     3→    "name": "laravel/livewire-starter-kit",
     4→    "type": "project",
     5→    "description": "The official Laravel starter kit for Livewire.",
     6→    "keywords": [
     7→        "laravel",
     8→        "framework"
     9→    ],
    10→    "license": "MIT",
    11→    "require": {
    12→        "php": "^8.2",
    13→        "laravel/fortify": "^1.30",
    14→        "laravel/framework": "^12.0",
    15→        "laravel/tinker": "^2.10.1",
    16→        "livewire/flux": "^2.9.0",
    17→        "livewire/livewire": "^4.0"
    18→    },
    19→    "require-dev": {
    20→        "deptrac/deptrac": "^4.6",
    21→        "fakerphp/faker": "^1.23",
    22→        "laravel/boost": "^1.0",
    23→        "laravel/pail": "^1.2.2",
    24→        "laravel/pint": "^1.24",
    25→        "laravel/sail": "^1.41",
    26→        "mockery/mockery": "^1.6",
    27→        "nunomaduro/collision": "^8.6",
    28→        "pestphp/pest": "^4.3",
    29→        "pestphp/pest-plugin-laravel": "^4.0",
    30→        "phpstan/phpstan": "^2.1"
    31→    },
    32→    "autoload": {
    33→        "psr-4": {
    34→            "App\\": "app/",
    35→            "Database\\Factories\\": "database/factories/",
    36→            "Database\\Seeders\\": "database/seeders/"
    37→        }
    38→    },
    39→    "autoload-dev": {
    40→        "psr-4": {
    41→            "Tests\\": "tests/"
    42→        }
    43→    },
    44→    "scripts": {
    45→        "setup": [
    46→            "composer install",
    47→            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
    48→            "@php artisan key:generate",
    49→            "@php artisan migrate --force",
    50→            "npm install",
    51→            "npm run build"
    52→        ],
    53→        "dev": [
    54→            "Composer\\Config::disableProcessTimeout",
    55→            "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
    56→        ],
    57→        "lint": [
    58→            "pint --parallel"
    59→        ],
    60→        "test:lint": [
    61→            "pint --parallel --test"
    62→        ],
    63→        "test": [
    64→            "@php artisan config:clear --ansi",
    65→            "@test:lint",
    66→            "@php artisan test"
    67→        ],
    68→        "post-autoload-dump": [
    69→            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
    70→            "@php artisan package:discover --ansi"
    71→        ],
    72→        "post-update-cmd": [
    73→            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
    74→        ],
    75→        "post-root-package-install": [
    76→            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    77→        ],
    78→        "post-create-project-cmd": [
    79→            "@php artisan key:generate --ansi",
    80→            "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
    81→            "@php artisan migrate --graceful --ansi"
    82→        ],
    83→        "pre-package-uninstall": [
    84→            "Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
    85→        ]
    86→    },
    87→    "extra": {
    88→        "laravel": {
    89→            "dont-discover": []
    90→        }
    91→    },
    92→    "config": {
    93→        "optimize-autoloader": true,
    94→        "preferred-install": "dist",
    95→        "sort-packages": true,
    96→        "allow-plugins": {
    97→            "pestphp/pest-plugin": true,
    98→            "php-http/discovery": true
    99→        }
   100→    },
   101→    "minimum-stability": "stable",
   102→    "prefer-stable": true
   103→}
   104→

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


content:
     1→{
     2→    "$schema": "https://www.schemastore.org/package.json",
     3→    "private": true,
     4→    "type": "module",
     5→    "scripts": {
     6→        "build": "vite build",
     7→        "dev": "vite"
     8→    },
     9→    "dependencies": {
    10→        "@tailwindcss/vite": "^4.1.11",
    11→        "autoprefixer": "^10.4.20",
    12→        "axios": "^1.7.4",
    13→        "concurrently": "^9.0.1",
    14→        "laravel-vite-plugin": "^2.0",
    15→        "tailwindcss": "^4.0.7",
    16→        "vite": "^7.0.4"
    17→    },
    18→    "optionalDependencies": {
    19→        "@rollup/rollup-linux-x64-gnu": "4.9.5",
    20→        "@tailwindcss/oxide-linux-x64-gnu": "^4.0.1",
    21→        "lightningcss-linux-x64-gnu": "^1.29.1"
    22→    }
    23→}
    24→

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


content:
     1→APP_NAME=Laravel
     2→APP_ENV=local
     3→APP_KEY=base64:nW7zTogbucXWMRU2+3CxeYXYni4FTNdm8nIUeG7tOzQ=
     4→APP_DEBUG=true
     5→APP_URL=http://shop.test
     6→
     7→APP_LOCALE=en
     8→APP_FALLBACK_LOCALE=en
     9→APP_FAKER_LOCALE=en_US
    10→
    11→APP_MAINTENANCE_DRIVER=file
    12→# APP_MAINTENANCE_STORE=database
    13→
    14→# PHP_CLI_SERVER_WORKERS=4
    15→
    16→BCRYPT_ROUNDS=12
    17→
    18→LOG_CHANNEL=stack
    19→LOG_STACK=single
    20→LOG_DEPRECATIONS_CHANNEL=null
    21→LOG_LEVEL=debug
    22→
    23→DB_CONNECTION=sqlite
    24→# DB_HOST=127.0.0.1
    25→# DB_PORT=3306
    26→# DB_DATABASE=laravel
    27→# DB_USERNAME=root
    28→# DB_PASSWORD=
    29→
    30→SESSION_DRIVER=file
    31→SESSION_LIFETIME=120
    32→SESSION_ENCRYPT=false
    33→SESSION_PATH=/
    34→SESSION_DOMAIN=null
    35→
    36→BROADCAST_CONNECTION=log
    37→FILESYSTEM_DISK=local
    38→QUEUE_CONNECTION=sync
    39→
    40→CACHE_STORE=file
    41→# CACHE_PREFIX=
    42→
    43→MEMCACHED_HOST=127.0.0.1
    44→
    45→REDIS_CLIENT=phpredis
    46→REDIS_HOST=127.0.0.1
    47→REDIS_PASSWORD=null
    48→REDIS_PORT=6379
    49→
    50→MAIL_MAILER=log
    51→MAIL_SCHEME=null
    52→MAIL_HOST=127.0.0.1
    53→MAIL_PORT=2525
    54→MAIL_USERNAME=null
    55→MAIL_PASSWORD=null
    56→MAIL_FROM_ADDRESS="hello@example.com"
    57→MAIL_FROM_NAME="${APP_NAME}"
    58→
    59→AWS_ACCESS_KEY_ID=
    60→AWS_SECRET_ACCESS_KEY=
    61→AWS_DEFAULT_REGION=us-east-1
    62→AWS_BUCKET=
    63→AWS_USE_PATH_STYLE_ENDPOINT=false
    64→
    65→VITE_APP_NAME="${APP_NAME}"
    66→FORGE_TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiZTJlODczZTViNzQxOWIwMjk0MDA2MjI4Y2RlNzliMmM5ZDNhNjEzYWJkM2Q3NmMxNWYzZTI3OGE1NTRiZDgwNjk3ZDQ3ZWU1YWM1MmViNmMiLCJpYXQiOjE3NjkxODU2NTUuMDc1NjE0LCJuYmYiOjE3NjkxODU2NTUuMDc1NjE3LCJleHAiOjIwODQ3MTg0NTUuMDcyNzExLCJzdWIiOiIyNDE3NDgiLCJzY29wZXMiOlsic2VydmVyOnZpZXciLCJzZXJ2ZXI6Y3JlYXRlIiwic2VydmVyOmRlbGV0ZSIsInNlcnZlcjphcmNoaXZlIiwic2VydmVyOnRyYW5zZmVyIiwic2VydmVyOm1hbmFnZS1tZXRhIiwic2VydmVyOm1hbmFnZS1wYWNrYWdlcyIsInNlcnZlcjptYW5hZ2UtcGhwIiwic2VydmVyOm1hbmFnZS1sb2dzIiwic2VydmVyOm1hbmFnZS1uZXR3b3JrIiwic2VydmVyOm1hbmFnZS1uZ2lueC10ZW1wbGF0ZXMiLCJzZXJ2ZXI6bWFuYWdlLXNlcnZpY2VzIiwic2VydmVyOm1hbmFnZS1wYXNzd29yZCIsInNlcnZlcjpjcmVhdGUta2V5cyIsInNlcnZlcjpkZWxldGUta2V5cyIsInNlcnZlcjpjcmVhdGUtbW9uaXRvcnMiLCJzZXJ2ZXI6ZGVsZXRlLW1vbml0b3JzIiwic2VydmVyOmNyZWF0ZS1kYXRhYmFzZXMiLCJzZXJ2ZXI6ZGVsZXRlLWRhdGFiYXNlcyIsInNlcnZlcjpjcmVhdGUtYmFja3VwcyIsInNlcnZlcjpkZWxldGUtYmFja3VwcyIsInNlcnZlcjpjcmVhdGUtZGFlbW9ucyIsInNlcnZlcjpkZWxldGUtZGFlbW9ucyIsInNlcnZlcjpjcmVhdGUtc2NoZWR1bGVycyIsInNlcnZlcjpkZWxldGUtc2NoZWR1bGVycyIsInNlcnZlcjp3ZWItdGVybWluYWwiLCJzaXRlOmNyZWF0ZSIsInNpdGU6ZGVsZXRlIiwic2l0ZTptZXRhIiwic2l0ZTptYW5hZ2UtY29tbWFuZHMiLCJzaXRlOm1hbmFnZS1kZXBsb3lzIiwic2l0ZTptYW5hZ2UtbmdpbngiLCJzaXRlOm1hbmFnZS1wcm9qZWN0Iiwic2l0ZTptYW5hZ2UtZW52aXJvbm1lbnQiLCJzaXRlOm1hbmFnZS1ub3RpZmljYXRpb25zIiwic2l0ZTptYW5hZ2UtcXVldWVzIiwic2l0ZTptYW5hZ2UtcmVkaXJlY3RzIiwic2l0ZTptYW5hZ2Utc2VjdXJpdHkiLCJzaXRlOm1hbmFnZS1zc2wiLCJzaXRlOm1hbmFnZS1pbnRlZ3JhdGlvbnMiLCJzaXRlOm1hbmFnZS1oZWFydGJlYXRzIiwic3RvcmFnZTptYW5hZ2UiXX0.jnUjxC3lIQJLCTJ1AbgVDQ-JhExT7gQASOPMdtCWAW8HQbFEz4uvOERS1xGvwCFiUe0dJPt1O1G_Npi9SdjJaKiFJE-MrUoyKTkEOO41Ay6hftxx73p3QlyGfXZkx0IREaX8bgn6JwPFy5CLiOXhTzvBLj3JL0QVR2gUxPtGBgatO5KLQUyA8UCpA_mikRP2itUTshf0t2xF-fwKK6PK2iOIsG4TCaMpt3qPE_CJWataxQKOKFFa1qsek_LLwTwePfnEboys27wGht0G4-sMRTs_QzsGwwhrhpRm3f_16c7uH_mCNDhMLccJrl_N82yaJVPkgcpIag8hhx2sOtjNA6bl8ghyKA4-tdM1CwmFXeK-Lexd1pjyza9J8lG3cezK5wTlcNfrkTkhUNdE51h0IqCAVSnGxlfJIlzBJX9xOZl_NNdl4RItdoxUccfbbsZ7V-OjWoFEnZG2PTeupgnOGm10eEqd4nZkXD3TX_ecqX54pgmEakir3p_as7KVN1EygJlGGrv9FsZrdnyseah127Zz1EG1Mrh8LMVZv9SxQtvsE4Qw77N_rNmNznSgBVRgp7CBkglkolWijB8cGN2ktvVOGSeOJp77Oe1wfnH5E1VDochsDUW2R7ouFx6bJwS6_SV__wLOSjLYRmqHu9rscTKFPAo3A-ZsgJQGyfK7TIw"
    67→
    68→DB_DATABASE=database/shop.sqlite
    69→

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.


Bash

command: find /Users/fabianwesner/Herd/shop/specs -type f -name "*.md" | sort

prompt:
Read ALL the specification files in /Users/fabianwesner/Herd/shop/specs/ directory. I need the full content of:
1. specs/01-DATABASE-SCHEMA.md (read in chunks if needed)
2. specs/02-API-ROUTES.md (read in chunks if needed)
3. specs/03-ADMIN-UI.md (read in chunks if needed)
4. specs/04-STOREFRONT-UI.md (read in chunks if needed)
5. specs/05-BUSINESS-LOGIC.md (read in chunks if needed)
6. specs/06-AUTH-AND-SECURITY.md (read in chunks if needed)
7. specs/07-SEEDERS-AND-TEST-DATA.md (read in chunks if needed)
8. specs/08-PLAYWRIGHT-E2E-PLAN.md (read in chunks if needed)

For each file provide a comprehensive summary including:
- All table/column definitions
- All API endpoints
- All UI components and their specifications
- All business rules
- All test specifications
- All seeder data definitions

This is critical - I need ALL the details, not just summaries. Extract every table name, column, relationship, route, component, and test case.


content:
/Users/fabianwesner/Herd/shop/specs/01-DATABASE-SCHEMA.md
/Users/fabianwesner/Herd/shop/specs/02-API-ROUTES.md
/Users/fabianwesner/Herd/shop/specs/03-ADMIN-UI.md
/Users/fabianwesner/Herd/shop/specs/04-STOREFRONT-UI.md
/Users/fabianwesner/Herd/shop/specs/05-BUSINESS-LOGIC.md
/Users/fabianwesner/Herd/shop/specs/06-AUTH-AND-SECURITY.md
/Users/fabianwesner/Herd/shop/specs/07-SEEDERS-AND-TEST-DATA.md
/Users/fabianwesner/Herd/shop/specs/08-PLAYWRIGHT-E2E-PLAN.md
/Users/fabianwesner/Herd/shop/specs/09-IMPLEMENTATION-ROADMAP.md

prompt:
Read ALL the specification files in /Users/fabianwesner/Herd/shop/specs/ directory. I need the full content of:
1. specs/01-DATABASE-SCHEMA.md (read in chunks if needed)
2. specs/02-API-ROUTES.md (read in chunks if needed)
3. specs/03-ADMIN-UI.md (read in chunks if needed)
4. specs/04-STOREFRONT-UI.md (read in chunks if needed)
5. specs/05-BUSINESS-LOGIC.md (read in chunks if needed)
6. specs/06-AUTH-AND-SECURITY.md (read in chunks if needed)
7. specs/07-SEEDERS-AND-TEST-DATA.md (read in chunks if needed)
8. specs/08-PLAYWRIGHT-E2E-PLAN.md (read in chunks if needed)

For each file provide a comprehensive summary including:
- All table/column definitions
- All API endpoints
- All UI components and their specifications
- All business rules
- All test specifications
- All seeder data definitions

This is critical - I need ALL the details, not just summaries. Extract every table name, column, relationship, route, component, and test case.


command: find /Users/fabianwesner/Herd/shop/app -type f -name "*.php" | sort

description: List all PHP files in app directory

prompt:
Explore the current state of the Laravel project at /Users/fabianwesner/Herd/shop. I need to understand:

1. What files already exist (models, controllers, migrations, routes, views, tests, etc.)
2. Current state of composer.json dependencies
3. Current state of package.json
4. Current .env configuration
5. Current config files (auth.php, database.php, etc.)
6. Current routes/web.php, routes/api.php, routes/console.php
7. Current app directory structure
8. Current tests directory structure
9. Current database/migrations directory
10. Current resources/views directory

Give me a comprehensive overview of what already exists vs what needs to be built.