Skip to content

Claude code team 5#10

Open
FabianWesner wants to merge 20 commits intomainfrom
claude-code-team-5
Open

Claude code team 5#10
FabianWesner wants to merge 20 commits intomainfrom
claude-code-team-5

Conversation

@FabianWesner
Copy link
Copy Markdown
Contributor

No description provided.

FabianWesner and others added 20 commits March 13, 2026 17:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… tests

- Organizations, Stores, StoreDomains, StoreUsers, StoreSettings models
- Customer model with store-scoped authentication
- ResolveStore middleware (hostname + session resolution, caching)
- BelongsToStore trait + StoreScope for tenant isolation
- Admin auth (Livewire Login/Logout), Customer auth (Login/Register)
- CustomerUserProvider for store-scoped customer authentication
- 10 authorization policies with role-based permission matrix
- Rate limiters (login, API, checkout)
- Sanctum token support for API authentication
- 34 Pest tests covering tenancy, auth, isolation, tokens
- All 67 tests passing, Pint clean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 2 - Catalog:
- Products, ProductOptions, ProductVariants, InventoryItems, Collections, ProductMedia
- ProductService (CRUD + status state machine)
- VariantMatrixService (cartesian product generation)
- InventoryService (reserve/release/commit/restock with transactions)
- HandleGenerator (unique slugs per store)
- ProcessMediaUpload job
- 46 Pest tests for catalog features

Phase 3 - Storefront:
- Themes, ThemeFiles, ThemeSettings, Pages, NavigationMenus, NavigationItems
- NavigationService (tree building + URL resolution with caching)
- ThemeSettingsService (singleton, active theme config)
- Full storefront Blade layout (header, nav, footer, dark mode, responsive)
- Blade components (price, product-card, badge, quantity-selector, etc.)
- 5 Livewire components (Home, Collections, Products, Pages)
- Error pages (404, 503)
- 28 Pest tests for storefront features

Bug fixes from Phase 1 browser verification:
- Admin logout redirect, duplicate error message, auth redirect
- Admin seeder uses admin@acme.test per spec

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 2 fixes:
- InventoryService: pessimistic locking with lockForUpdate()
- VariantMatrixService: enum usage instead of string literals
- ProductService: order_lines table guard
- products migration: published_at as timestamp

Phase 3 fixes:
- themes/pages migrations: published_at as timestamp
- Collections/Show: price filtering via variant join (not products table)
- Products/Show: tags iteration fix (array cast)
- Enum consistency across Livewire components
- Removed unused imports

Phase 8 Search (developer-2):
- SearchService with FTS5, ProductObserver, Search UI components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fixes

Phase 4 - Shopping Flow:
- Cart/CartLine/Checkout/ShippingZone/ShippingRate/TaxSettings/Discount models
- CartService (versioned optimistic concurrency)
- DiscountService (validation, proportional allocation)
- ShippingCalculator (zone matching, flat/weight/price rates)
- TaxCalculator (basis points, inclusive/exclusive modes)
- PricingEngine (7-step deterministic pipeline)
- CheckoutService (state machine with inventory reservation)
- Value objects: PricingResult, TaxLine, Address, etc.
- Scheduled jobs: ExpireAbandonedCheckouts, CleanupAbandonedCarts
- 5 discount codes seeded per spec (WELCOME10, FLAT5, FREESHIP, etc.)

Phase 8 review fixes:
- SQL safety: int cast on FTS5 product IDs
- N+1 fix: eager load variants in autocomplete
- Enum consistency in ProductObserver and SearchService
- Migration column types (timestamps)

162 tests passing, pint clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 4 Pest tests:
- Unit: PricingEngine (14), DiscountCalculator (13), TaxCalculator (7),
  ShippingCalculator (9), CartVersion (5)
- Feature: CartService (12), CartApi (8), CheckoutFlow (5),
  CheckoutState (9), PricingIntegration (5), Discount (6),
  Shipping (5), Tax (4)

Bug fixes from browser verification:
- Product card price: read from default variant instead of missing accessor
- Home page dark mode: added dark:bg classes to sections
- 404 page: storefront-consistent standalone template

Checkout UI finalization:
- Confirmation page with bank transfer instructions
- Cart drawer integration with Products/Show
- Cart/checkout routes registered

264 tests passing, pint clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- MockPaymentProvider with magic card numbers (success/decline/insufficient)
- OrderService: checkout completion, sequential order numbers, cancellation
- RefundService: partial/full refunds with optional restock
- FulfillmentService: fulfillment guard, shipped/delivered transitions
- Bank transfer: admin confirmation, auto-cancel after 7 days
- 7 models: CustomerAddress, Order, OrderLine, Payment, Refund,
  Fulfillment, FulfillmentLine
- 5 events: OrderCreated/Paid/Fulfilled/Cancelled/Refunded
- 264 tests passing, pint clean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lment

Code review fixes:
- OrderService: removed dead code
- RefundService: fixed import
- MockPaymentProvider: simplified match expression
- Checkout model: added PaymentMethod cast

Tests (45 new):
- OrderCreation (9): checkout completion, numbering, idempotency
- Refund (7): partial/full, amount validation, restock
- Fulfillment (12): guard, status transitions, tracking, ship/deliver
- MockPaymentProvider (6): magic cards, PayPal, bank transfer
- PaymentService (5): records per method, bank transfer flow
- BankTransferConfirmation (6): confirm, auto-fulfill, cancellation job

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 6 - Customer Accounts:
- Account dashboard, order history, order detail, address CRUD
- 14 tests covering all account functionality

Phase 9 - Analytics:
- AnalyticsEvent/AnalyticsDaily models, AnalyticsService
- AggregateAnalytics daily job, TrackPageView middleware
- 6 tests

Phase 10 - Apps & Webhooks:
- App/AppInstallation/OauthClient/OauthToken/WebhookSubscription/WebhookDelivery
- WebhookService with HMAC signing and verification
- DeliverWebhook job with exponential backoff and circuit breaker
- 11 tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 25 products with variants, options, inventory across 2 stores
- 12 customers with addresses, 18 orders with payments/fulfillments
- 6 collections, 5 discount codes, 5 users with roles
- 2 themes, 5 pages, 3 navigation menus
- All data supports Playwright E2E tests per spec 08

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Admin Panel (25 Livewire components, 25 blade views, 29 routes):
- Layout: Sidebar, TopBar, toast notifications, dark mode
- Dashboard: KPIs, Chart.js orders chart, top products, conversion funnel
- Products: Index (search/filter/bulk), Form (variants builder, media)
- Orders: Index (status tabs), Show (timeline, fulfillment/refund modals)
- Collections, Customers, Discounts, Settings (Shipping/Taxes)
- Themes (Index + Editor), Pages, Navigation, Analytics
- Inventory (inline editing), Apps, Developers (API tokens)

P6/9/10 review fixes:
- WebhookService/DeliverWebhook: enum consistency, retry logic fix
- Migration column types (timestamps)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 11 Polish:
- Skip links and ARIA labels on admin layout
- Dark mode audit (all views covered)
- 7 Polish tests

Phase 7 Admin review fixes (10 total):
- Dashboard/Analytics: fixed column name (total_amount)
- Customers: fixed search field (name vs first_name/last_name)
- Products Form: fixed variant column names, option reading
- Products Index: SECURITY - added store scoping to bulk operations
- Orders Show: fixed unit price column name
- Products form view: fixed dynamic Flux icon binding
- Admin test fixes: corrected Livewire testing API usage

Admin Pest tests:
- Dashboard, ProductManagement, OrderManagement,
  DiscountManagement, Settings tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Admin tests:
- Dashboard (4), ProductManagement (8), OrderManagement (5),
  DiscountManagement (6), Settings (6)

Bugs fixed:
- Dashboard/Analytics: CarbonImmutable infinite loop (addDay non-mutating)
- Settings/Shipping: wrong column names (countries_json, config_json, zone_id)
- Settings/Taxes: provider null violation, config_json storage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Critical:
- StoreScope: guard against unbound current_store in admin context
- Livewire: register ResolveStore as persistent middleware for /livewire/update

Medium:
- Admin pages index: use enum->value instead of passing enum to ucfirst()
- Admin inventory: use optionValues relationship instead of non-existent columns

Low:
- Chart.js CDN added to admin layout
- shop.test domain added to StoreDomainSeeder
- @fluxscripts directive added to admin layout

376 tests passing, pint clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Self-contained e-commerce platform with:
- Multi-tenant support (organizations, stores, domains)
- Product catalog (products, variants, options, inventory, collections, media)
- Shopping cart with optimistic concurrency
- Multi-step checkout with state machine
- Mock PSP (credit card, PayPal, bank transfer with magic cards)
- Order management (fulfillment, refunds, cancellation)
- Customer accounts (dashboard, order history, addresses)
- Full admin panel (25+ Livewire components with Flux UI)
- FTS5 search with autocomplete
- Analytics (event tracking, daily aggregation)
- Apps & Webhooks (HMAC signing, circuit breaker)
- Comprehensive seeders (25 products, 18 orders, 12 customers)

376 Pest tests passing
53 migrations
Browser verified at shop.test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
12 Security Hotspots
5.1% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant