Commit Graph

54 Commits

Author SHA1 Message Date
b265c89a72 Fix: Refactor TeleBot messaging to use database queue 2025-10-06 17:22:06 +01:00
6c95ed3145 Fix: Add TeleBot integration and expired payment handling
TeleBot Configuration:
- Added TeleBot API URL and API key to docker-compose.yml
- Configured to connect to telebot-service:5000 internally
- Enables customer notifications via Telegram bot

Expired Payment Handling:
- Auto-cancel orders when payment status is Expired
- Only cancels orders in PendingPayment status
- Logs cancellation for audit trail

Customer View Improvements:
- Hide cancelled orders from customer order lists
- Filters applied to both GetOrdersByIdentityAsync and GetOrdersByCustomerIdAsync
- Prevents confusion from displaying cancelled/expired orders

This resolves:
- No notifications to customers (TeleBot not configured)
- No notifications to admin (TeleBot connection failed)
- Expired orders remaining visible to customers
- Orders not auto-cancelled when payment expires

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 16:55:19 +01:00
cede0e7c47 Fix: Update interface to match confirmations parameter
- Added confirmations parameter to ICryptoPaymentService.ProcessPaymentWebhookAsync
- Updated CryptoPaymentService implementation to pass confirmations parameter
- Fixes build error: interface member signature mismatch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 16:35:09 +01:00
110ad5f956 Fix: Add confirmations support and fix notification logic
Webhook Improvements:
- Added Confirmations field to PaymentWebhookDto (default: 0)
- Updated webhook controller to pass confirmations to service layer
- Fixed notification logic to match order update conditions

Payment Confirmation Logic:
- Paid (2): Confirmed immediately regardless of confirmations
- Overpaid (3): Confirmed immediately regardless of confirmations
- Completed (7): Requires 3+ blockchain confirmations
- Notifications only sent when order is actually updated

This prevents premature notifications for unconfirmed 'Completed' status
while maintaining immediate processing for 'Paid' and 'Overpaid' statuses.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 16:26:39 +01:00
a519284fd1 Fix: Include Overpaid status in payment notifications
- Added PaymentStatus.Overpaid to notification trigger conditions
- Overpaid payments now update order status to PaymentReceived
- Overpaid payments now send admin push notifications
- Overpaid payments now send TeleBot customer notifications
- Resolves issue where successful overpayments were silent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 16:07:14 +01:00
217de2a5ab Feature: Human-Readable Text Format Product Import
Implemented a new text-based import format for bulk product imports that is
easier to read, write, and version control compared to CSV format.

## New Features

### Import Service (ProductImportService.cs)
- Added `ImportFromHumanTextAsync()` - Main text format parser
- Added `GenerateTemplateAsHumanText()` - Template generator
- Parser supports:
  - Product blocks starting with `#`
  - Descriptions between `<text>` tags (optional)
  - Key-value properties (category, price, weight, unit, stock)
  - Variants (lines starting with `-`)
  - Multi-buy offers (lines starting with `+`)
  - Variant collections (optional, after product name)

### Admin UI
- New controller actions:
  - `ImportText()` - GET: Show import form
  - `ImportText(textContent, file)` - POST: Process import
  - `DownloadTextTemplate()` - Download .txt template
- New view: `ImportText.cshtml`
  - Textarea for pasting text
  - File upload for .txt files
  - Format documentation sidebar
  - Links to CSV import and template downloads
- Updated `Index.cshtml` with dropdown menu for import options

### Template & Documentation
- Created `docs/ProductImportTemplate.txt` with 7 example products
- Demonstrates all format features:
  - Products with/without descriptions
  - Variants with stock levels
  - Multi-buy pricing tiers
  - Multiple weight units

## Text Format Specification

```
# Product Name; OptionalVariantCollection
<text>
Multi-line description (optional)
</text>
category: CategoryName
price: 10.00
weight: 100
unit: Grams
stock: 50

- Variant1; 8.00; 50
- Variant2; 12.00; 30

+ Multi-buy1; 2; 19.00
+ Multi-buy2; 3; 25.00
```

## Benefits
-  Git-friendly (easy to diff and version)
-  Human-readable and editable
-  Supports all product features
-  Multi-line descriptions
-  Clear structure with # delimiters
-  Optional fields (description, variants, multi-buys)
-  Comprehensive error reporting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 05:29:21 +01:00
a6f1c32461 Fix: Delete order now works for Customer-based orders
Root cause: Orders created with CustomerInfo had NULL IdentityReference
- CancelOrderAsync checked order.IdentityReference != identityReference
- NULL != "telegram:12345:username" → always returned false
- User saw "already processed" error even for pending orders

Fix implemented:
- Include Customer entity in CancelOrderAsync query
- Extract Telegram user ID from identity reference format
- Match against Customer.TelegramUserId for modern orders
- Fallback to IdentityReference matching for legacy orders
- Enhanced logging to debug ownership/status issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 04:56:32 +01:00
330116e315 Fix: Include ProductVariant in all order queries
Root cause: Order queries were missing .ThenInclude(oi => oi.ProductVariant)
which caused ProductVariantName to be null in order DTOs even though
ProductVariantId was stored correctly.

Fixed queries:
- GetAllOrdersAsync (admin panel order list)
- GetOrdersByIdentityAsync (TeleBot order lookup)
- GetOrdersByCustomerIdAsync (customer order history)
- UpdateOrderStatusAsync (order status updates)

Now both TeleBot and admin panel will show which product variation
was selected in order details and order lists.
2025-10-06 00:59:42 +01:00
76707eb565 Fix: Complete workaround for EF Core 9 + SQLite GUID parameter bug - load all variants then filter in-memory 2025-10-05 17:01:52 +01:00
45da991945 Debug: Enhanced logging for variant loading investigation 2025-10-05 17:00:04 +01:00
6f4befa188 Debug: Add logging to GetProductByIdAsync 2025-10-05 16:58:35 +01:00
0e8b53df01 Fix: Apply variant loading workaround to GetProductByIdAsync 2025-10-05 16:55:20 +01:00
7dbdc0d46f Fix: Work around EF Core 9 + SQLite json_each bug preventing variant loading 2025-10-05 16:41:42 +01:00
3a2ef481b0 Debug: Add console logging to variant loading 2025-10-05 16:39:46 +01:00
8d1e3d153c Fix: Manually load ProductVariants with separate query instead of Include
**Root Cause**: EF Core Include() was not properly materializing the Variants navigation
property despite correct SQL JOIN generation.

**Solution**: Load variants separately and manually group by ProductId for DTO mapping.
This bypasses EF Core's navigation property fixup issues.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 16:33:33 +01:00
53ba1f4079 Try: Use AsSplitQuery to force separate SQL queries for navigation properties
This may help EF Core properly materialize the Variants collection.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 16:31:40 +01:00
91bcdad9db Fix: Remove AsNoTracking to enable navigation property fixup
AsNoTracking() prevents EF Core from properly wiring up navigation properties.
Removing it allows Include() to populate Variants collection correctly.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 16:29:48 +01:00
b05645d526 Fix: Load navigation properties before projection to ensure variants are included
**Problem**: EF Core was not materializing Variants navigation property when using
.Select() projection directly in the query. The .Include() was being ignored.

**Solution**: Changed approach to:
1. Load entities with .Include() + .ToListAsync() first
2. Then project to DTO with in-memory .Select()

This ensures navigation properties are fully loaded before mapping to DTOs.

**Impact**: Variants will now properly appear in all product API responses.

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 17:48:30 +01:00
22e910862a Fix: Remove filtered Include for variants in GetProductsByCategoryAsync
Previous commit (e931f77) only fixed GetAllProductsAsync and GetProductByIdAsync.
This commit fixes GetProductsByCategoryAsync which also had the broken filtered Include syntax.

**Impact**: Variants will now appear when browsing products by category in TeleBot.

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 17:45:13 +01:00
e931f772fb Fix: Remove filtered Include for variants - EF Core not executing JOIN
Critical bug where ProductVariants were never loaded from database.

**Problem:**
`.Include(p => p.Variants.Where(v => v.IsActive))` syntax was NOT
generating SQL JOIN statements in EF Core 9.0, causing all products
to return empty variants array even when variants exist in database.

**Solution:**
- Changed to simple `.Include(p => p.Variants)`
- Filtering still happens in DTO mapping (Select statement)
- Only IsActive variants are returned to API consumers

**Impact:**
- TeleBot can now display product variants with selection UI
- Variant pricing and stock levels now visible to customers
- Multi-variant products (e.g., Size/Color) now functional

**Test Case:**
Product 131cc3ad-07f4-4ec9-89ca-b05a0b4cfb41 has 7 variants:
- Size: Small, Medium, Large, XL
- Color: Black, White, Navy Blue
These will now appear in API responses and TeleBot UI.

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 15:23:43 +01:00
sysadmin
8075560877 Fix-variant-display-in-API 2025-10-03 20:20:25 +01:00
d9efababa6 Feature: Add product variant price override support
Enables individual variants to have their own prices, overriding the base product price.

**Database Changes:**
- Added Price (decimal?, nullable) to ProductVariants table
- Added ProductVariantId to OrderItems table with foreign key relationship
- Created index on OrderItems.ProductVariantId for performance

**API Changes:**
- ProductVariantDto: Added Price field
- CreateProductVariantDto: Added Price field with validation
- UpdateProductVariantDto: Added Price field
- OrderItemDto: Added ProductVariantId and ProductVariantName
- CreateOrderItemDto: Added ProductVariantId

**Business Logic:**
- OrderService: Variant price overrides base price (but multi-buy takes precedence)
- ProductService: All variant CRUD operations support Price field

**Admin UI:**
- CreateVariant: Price input with £ symbol and base price placeholder
- EditVariant: Price editing with £ symbol
- ProductVariants list: Shows variant price or "(base)" indicator

**Client Library:**
- Updated all DTOs to match server-side changes
- Full support for variant pricing in order creation

**Migration:**
- EF Core migration: 20251003173458_AddVariantPricing
- Backward compatible: NULL values supported for existing data

**Use Case:**
Products with size/color variants can now have different prices:
- Small T-shirt: £15.00 (variant override)
- Medium T-shirt: £18.00 (uses base price)
- Large T-shirt: £20.00 (variant override)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 18:35:43 +01:00
ec955e49d9 Fix: Categories Edit IsActive checkbox now works both ways
Fixed two issues preventing IsActive toggle:
1. Removed hidden field that was sending "false" even when checkbox checked
2. Updated CategoryService to always update IsActive, treating null as false

Checkbox behavior:
- Checked → sends "true" → IsActive = true
- Unchecked → sends nothing (null) → IsActive = false (via ?? operator)

This allows both setting inactive→active and active→inactive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 13:48:56 +01:00
7f4a502fe1 Feature: Add elegant PWA loading screen
Implemented a professional loading screen for the PWA to eliminate the
"hang and wait" experience during app initialization.

Changes:
- Added full-screen gradient loading overlay with TeleShop branding
- Implemented animated triple-ring spinner with smooth animations
- Added automatic removal after PWA initialization (500ms fade-out)
- Included 5-second fallback timeout to prevent infinite loading
- Updated service worker cache version to v2
- Enhanced JWT validation to detect test/temporary keys
- Updated appsettings.json with secure JWT key

Design Features:
- Purple/blue gradient background matching brand colors
- Pulsing logo animation for visual interest
- Staggered spinner rings with cubic-bezier easing
- Fade-in-out loading text animation
- Mobile-responsive design (scales appropriately on all devices)

Technical Implementation:
- Loading screen visible by default (no FOUC)
- Removed via JavaScript when PWA manager initialization completes
- Graceful fade-out animation before DOM removal
- Console logging for debugging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 16:39:47 +01:00
5e90b86d8c Configure push notifications for internal-only access
- Changed VAPID subject from public URL to mailto format
- Updated docker-compose.yml to use mailto:admin@littleshop.local
- Removed dependency on thebankofdebbie.giize.com public domain
- All push notifications now work through VPN (admin.dark.side) only
- Added update-push-internal.sh helper script for deployment
- Improved security by keeping all admin traffic internal

Push notifications will continue working normally through FCM,
but all configuration and management stays on the internal network.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 21:15:42 +01:00
ec894ba529 Implement critical security fixes from code review 2025-09-29 05:26:29 +01:00
sysadmin
eb87148c63 Add variant collections system and enhance ProductVariant with weight/stock tracking
This commit introduces a comprehensive variant management system and enhances
the existing ProductVariant model with per-variant weight overrides and stock
tracking, integrated across Admin Panel and TeleBot.

Features Added:
- Variant Collections: Reusable variant templates (e.g., "Standard Sizes")
- Admin UI for managing variant collections (CRUD operations)
- Dynamic variant editor with JavaScript-based UI
- Per-variant weight and weight unit overrides
- Per-variant stock level tracking
- SalesLedger model for financial tracking

ProductVariant Enhancements:
- Added Weight (decimal, nullable) field for variant-specific weights
- Added WeightUnit (enum, nullable) field for variant-specific units
- Maintains backward compatibility with product-level weights

TeleBot Integration:
- Enhanced variant selection UI to display stock levels
- Shows weight information with proper unit conversion (µg, g, oz, lb, ml, L)
- Compact button format: "Medium (15 in stock, 350g)"
- Real-time stock availability display

Database Migrations:
- 20250928014850_AddVariantCollectionsAndSalesLedger
- 20250928155814_AddWeightToProductVariants

Technical Changes:
- Updated Product model to support VariantCollectionId and VariantsJson
- Extended ProductService with variant collection operations
- Enhanced OrderService to handle variant-specific pricing and weights
- Updated LittleShop.Client DTOs to match server models
- Added JavaScript dynamic variant form builder

Files Modified: 15
Files Added: 17
Lines Changed: ~2000

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 17:03:09 +01:00
127be759c8 Refactor payment verification to manual workflow and add comprehensive cleanup tools
Major changes:
• Remove BTCPay Server integration in favor of SilverPAY manual verification
• Add test data cleanup mechanisms (API endpoints and shell scripts)
• Fix compilation errors in TestController (IdentityReference vs CustomerIdentity)
• Add deployment automation scripts for Hostinger VPS
• Enhance integration testing with comprehensive E2E validation
• Add Blazor components and mobile-responsive CSS for admin interface
• Create production environment configuration scripts

Key Features Added:
• Manual payment verification through Admin panel Order Details
• Bulk test data cleanup with proper cascade handling
• Deployment automation with systemd service configuration
• Comprehensive E2E testing suite with SilverPAY integration validation
• Mobile-first admin interface improvements

Security & Production:
• Environment variable configuration for production secrets
• Proper JWT and VAPID key management
• SilverPAY API integration with live credentials
• Database cleanup and maintenance tools

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 19:29:00 +01:00
7809b6e49c Fix SilverPay payment creation - use fiat_amount instead of amount
SilverPay API expects 'fiat_amount' and 'fiat_currency' fields, not 'amount'.
This was causing 422 Unprocessable Entity errors when creating payments.
2025-09-24 21:08:16 +01:00
524f0639e1 Fix multiple TeleBot and admin panel issues
- Fix admin panel to show all pending orders (PendingPayment + PaymentReceived)
- Fix currency display from USD ($) to GBP (£) throughout TeleBot
- Update payment methods to use dynamic SilverPay currency list
- Consolidate shipping address collection into single message
- Implement cart backup/restore on payment failure
- Remove unsupported XMR from TeleBot config

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 15:04:24 +01:00
caff08cb6f Deploy LittleShop to Hostinger with Docker and BunkerWeb
- Updated Docker configuration for production deployment
- Added SilverPay integration settings
- Configured for admin.thebankofdebbie.giize.com deployment
- Includes all recent security fixes and improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 13:00:17 +01:00
622bdcf111 🔒 SECURITY: Emergency fixes and hardening
EMERGENCY FIXES:
 DELETE MockSilverPayService.cs - removed fake payment system
 REMOVE mock service registration - no fake payments possible
 GENERATE new JWT secret - replaced hardcoded key
 FIX HttpClient disposal - proper resource management

SECURITY HARDENING:
 ADD production guards - prevent mock services in production
 CREATE environment configs - separate dev/prod settings
 ADD config validation - fail fast on misconfiguration

IMPACT:
- Mock payment system completely eliminated
- JWT authentication now uses secure keys
- Production deployment now validated on startup
- Resource leaks fixed in TeleBot currency API

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 05:45:49 +01:00
5138242a99 Fix SilverPay payment integration JSON serialization
- Changed JSON naming policy from CamelCase to SnakeCaseLower for SilverPay API compatibility
- Fixed field name from 'fiat_amount' to 'amount' in request body
- Used unique payment ID instead of order ID to avoid duplicate external_id conflicts
- Modified SilverPayApiResponse to handle string amounts from API
- Added [JsonIgnore] attributes to computed properties to prevent JSON serialization conflicts
- Fixed test compilation errors (mock service and enum casting issues)
- Updated SilverPay endpoint to http://10.0.0.52:8001/

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 04:38:28 +01:00
034b8facee Implement product multi-buys and variants system
Major restructuring of product variations:
- Renamed ProductVariation to ProductMultiBuy for quantity-based pricing (e.g., "3 for £25")
- Added new ProductVariant model for string-based options (colors, flavors)
- Complete separation of multi-buy pricing from variant selection

Features implemented:
- Multi-buy deals with automatic price-per-unit calculation
- Product variants for colors/flavors/sizes with stock tracking
- TeleBot checkout supports both multi-buys and variant selection
- Shopping cart correctly calculates multi-buy bundle prices
- Order system tracks selected variants and multi-buy choices
- Real-time bot activity monitoring with SignalR
- Public bot directory page with QR codes for Telegram launch
- Admin dashboard shows multi-buy and variant metrics

Technical changes:
- Updated all DTOs, services, and controllers
- Fixed cart total calculation for multi-buy bundles
- Comprehensive test coverage for new functionality
- All existing tests passing with new features

Database changes:
- Migrated ProductVariations to ProductMultiBuys
- Added ProductVariants table
- Updated OrderItems to track variants

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 00:30:12 +01:00
b8bda63cfa Production deployment: Complete SilverPAY integration and e2e testing
- Complete MockSilverPayService with GetExchangeRateAsync method
- Fix compilation errors and webhook response types
- Successful e2e testing with real SilverPAY server integration
- TeleBot integration verified with production payment flow
- Database optimization with Alembic migration system
- Webhook integration confirmed and operational
- All code quality checks passed (0 errors, 0 warnings)

System now production-ready with full cryptocurrency payment support.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 20:47:00 +01:00
553088390e Remove BTCPay completely, integrate SilverPAY only, configure TeleBot with real token
- Removed all BTCPay references from services and configuration
- Implemented SilverPAY as sole payment provider (no fallback)
- Fixed JWT authentication with proper key length (256+ bits)
- Added UsersController with full CRUD operations
- Updated User model with Email and Role properties
- Configured TeleBot with real Telegram bot token
- Fixed launchSettings.json with JWT environment variable
- E2E tests passing for authentication, catalog, orders
- Payment creation pending SilverPAY server fix

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 19:22:29 +01:00
8b0e3e0611 Implement comprehensive notification system for LittleShop
- Add admin PWA push notifications for order management
- Integrate TeleBot customer messaging service
- Add push notification endpoints and VAPID key support
- Implement order status notifications throughout workflow
- Add notification UI components in admin panel
- Create TeleBotMessagingService for customer updates
- Add WebPush configuration to appsettings
- Fix compilation issues (BotStatus, BotContacts DbSet)
- Add comprehensive testing documentation

Features:
- Real-time admin notifications for new orders and status changes
- Customer order progress updates via TeleBot
- Graceful failure handling for notification services
- Test endpoints for notification system validation

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 16:17:24 +01:00
SilverLabs DevTeam
56e6496c3b Merge and add BTCPay external nodes configuration 2025-09-19 12:15:52 +01:00
SilverLabs DevTeam
73e8773ea3 Configure BTCPay with external nodes via Tor
- Set up Tor container for SOCKS proxy (port 9050)
- Configured Monero wallet with remote onion node
- Bitcoin node continues syncing in background (60% complete)
- Created documentation for wallet configuration steps
- All external connections routed through Tor for privacy

BTCPay requires manual wallet configuration through web interface:
- Bitcoin: Need to add xpub/zpub for watch-only wallet
- Monero: Need to add address and view key

System ready for payment acceptance once wallets configured.
2025-09-19 12:14:39 +01:00
d343037bbd Security: Fix critical vulnerabilities and implement security hardening
CRITICAL SECURITY FIXES:
- Fixed certificate validation bypass vulnerability in BTCPayServerService
  * Removed unsafe ServerCertificateCustomValidationCallback
  * Added environment-specific SSL configuration
  * Production now enforces proper SSL validation

- Fixed overly permissive CORS policy
  * Replaced AllowAnyOrigin() with specific trusted origins
  * Created separate CORS policies for Development/Production/API
  * Configured from appsettings for environment-specific control

- Implemented CSRF protection across admin panel
  * Added [ValidateAntiForgeryToken] to all POST/PUT/DELETE actions
  * Protected 10 admin controllers with anti-forgery tokens
  * Prevents Cross-Site Request Forgery attacks

CONFIGURATION IMPROVEMENTS:
- Created appsettings.Development.json for dev-specific settings
- Added Security:AllowInsecureSSL flag (Development only)
- Added CORS:AllowedOrigins configuration arrays
- Created comprehensive security roadmap (ROADMAP.md)

ALSO FIXED:
- TeleBot syntax errors (Program.cs, MessageFormatter.cs)
- Added enterprise-full-stack-developer output style

Impact: All Phase 1 critical security vulnerabilities resolved
Status: Ready for security review and deployment preparation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 11:56:12 +01:00
SilverLabs DevTeam
6f0efa6252 Fix BTCPay Server integration for production deployment
- Fixed invoice creation to use GBP (fiat) instead of cryptocurrency amounts
- BTCPay Server now handles automatic crypto conversion
- Updated payment flow to use checkout links instead of raw wallet addresses
- Added comprehensive logging for debugging payment issues
- Created diagnostic endpoints for testing BTCPay connection and payments
- Added documentation for deployment and troubleshooting

The key issue was that BTCPay v2 manages wallet addresses internally and provides checkout links for customers to complete payments, rather than exposing raw crypto addresses.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 10:21:04 +01:00
SilverLabs DevTeam
a419bd7a78 Implement product variations, enhanced order workflow, mobile responsiveness, and product import system
## Product Variations System
- Add ProductVariation model with quantity-based pricing (1 for £10, 2 for £19, 3 for £25)
- Complete CRUD operations for product variations
- Enhanced ProductService to include variations in all queries
- Updated OrderItem to support ProductVariationId for variation-based orders
- Graceful error handling for duplicate quantity constraints
- Admin interface with variations management (Create/Edit/Delete)
- API endpoints for programmatic variation management

## Enhanced Order Workflow Management
- Redesigned OrderStatus enum with clear workflow states (Accept → Packing → Dispatched → Delivered)
- Added workflow tracking fields (AcceptedAt, PackingStartedAt, DispatchedAt, ExpectedDeliveryDate)
- User tracking for accountability (AcceptedByUser, PackedByUser, DispatchedByUser)
- Automatic delivery date calculation (dispatch date + working days, skips weekends)
- On Hold workflow for problem resolution with reason tracking
- Tab-based orders interface focused on workflow stages
- One-click workflow actions from list view

## Mobile-Responsive Design
- Responsive orders interface: tables on desktop, cards on mobile
- Touch-friendly buttons and spacing for mobile users
- Horizontal scrolling tabs with condensed labels on mobile
- Color-coded status borders for quick visual recognition
- Smart text switching based on screen size

## Product Import/Export System
- CSV import with product variations support
- Template download with examples
- Export existing products to CSV
- Detailed import results with success/error reporting
- Category name resolution (no need for GUIDs)
- Photo URLs import support

## Enhanced Dashboard
- Product variations count and metrics
- Stock alerts (low stock/out of stock warnings)
- Order workflow breakdown (pending, accepted, dispatched counts)
- Enhanced layout with more detailed information

## Technical Improvements
- Fixed form binding issues across all admin forms
- Removed external CDN dependencies for isolated deployment
- Bot Wizard form with auto-personality assignment
- Proper authentication scheme configuration (Cookie + JWT)
- Enhanced debug logging for troubleshooting

## Self-Contained Deployment
- All external CDN references replaced with local libraries
- Ready for air-gapped/isolated network deployment
- No external internet dependencies

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 01:39:31 +01:00
e1b377a042 Initial commit of LittleShop project (excluding large archives)
- BTCPay Server integration
- TeleBot Telegram bot
- Review system
- Admin area
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 15:07:38 +01:00
sysadmin
bcca00ab39 "Royal-Mail-shipping-integration-and-test-improvements" 2025-09-08 03:53:28 +01:00
sysadmin
be4d797c6c BTCPay-infrastructure-recovery 2025-09-04 21:28:47 +01:00
sysadmin
b4cee007c4 BTCPay-Server-integration-and-HAProxy-setup 2025-09-01 09:37:38 +01:00
sysadmin
ee4a5c3578 Product-enhancements-and-validation-fixes 2025-09-01 08:03:00 +01:00
sysadmin
c8a55c143b WebPush-and-photo-upload-fixes 2025-09-01 06:01:05 +01:00
sysadmin
5eb7647faf PWA-implementation 2025-09-01 04:49:05 +01:00
sysadmin
1829e5c940 "Fix-security-and-config-from-TestAgent" 2025-08-27 22:41:18 +01:00