Commit Graph

124 Commits

Author SHA1 Message Date
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
c3842dc9c6 Fix: Update integration test to use HTTPS and bypass SSL verification
**Changes:**
- Add `-k` flag to all curl commands to bypass SSL certificate verification
- Update SilverPay URL to use https://bank.dark.side reverse proxy
- Simplify configuration (removed internal IP references)

**Test Results (8/12 passing):**
 LittleShop Admin: HTTP 200 (working)
 Categories API: HTTP 200 (working)
 Products API: HTTP 200 (working)
 SilverPay Home/Health/Wallet: HTTP 200 (working)
 SilverPay Currencies: HTTP 200 (working)
 SilverPay Auth: HTTP 401 (expected)
 Exchange Rate: Connection timeout (Tor routing issue)
 Create Order (SilverPay): Failed (needs investigation)
 Create Order (LittleShop): HTTP 400 (validation issue)
 Payment Integration: Blocked by order creation failures

**Infrastructure Status:**
- LittleShop: Deployed and responding correctly
- SilverPay: Core services operational, Tor routing has timeout issues
- Integration: Basic connectivity confirmed, order flow needs fixes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 15:31:37 +01:00
55303af5fd Update: Integration test URLs for new deployment domains
**Changes:**
- LittleShop Admin: https://admin.dark.side
- SilverPay: Internal LAN only (http://10.0.0.1:8001)
- Bank public URL: https://bank.dark.side (should not be accessible)

Updated configuration to reflect proper security setup where SilverPay is only accessible on internal network, not exposed to public internet.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 15:15:40 +01:00
cd479d8946 Fix: Prevent notification prompt from reappearing after timeout
**Issue:**
- Notification prompt kept reappearing after push subscription timeout
- Users stuck in loop when push notifications fail due to network restrictions

**Solution:**
- Auto-dismiss prompt on timeout errors
- Mark as permanently declined when timeout occurs
- Provide user-friendly error message
- Clean up error handling flow

**Technical Changes:**
- Check for timeout in error message
- Set both session and permanent dismissal flags
- Simplify error propagation from enableNotifications()
- Show concise error message for timeout scenarios

This fix ensures users in restricted network environments (VPNs, corporate firewalls, FCM blocked) won't be repeatedly prompted for push notifications that can't work.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 14:44:10 +01:00
5adf1b90d5 Refactor: Streamline product management UI and enhance PWA behavior
**Product List Improvements:**
- Move Import/Export to settings menu for cleaner interface
- Replace Edit/Variants/Multi-Buys buttons with single Details action
- Remove Blazor UI button from product list
- Simplify product row actions for better mobile UX

**Product Details Enhancements:**
- Add Danger Zone section with Delete button at bottom
- Improve visual hierarchy and action placement

**Navigation Updates:**
- Remove hamburger menu toggle (desktop nav always visible)
- Rename Settings to Menu in mobile bottom nav
- Update settings drawer header and icon

**Code Cleanup:**
- Remove unused Blazor, Variations, and Variants endpoints (243 lines)
- Consolidate variant/multi-buy management within product details
- Clean up ProductsController for better maintainability

**PWA & Notifications:**
- Add proper PWA support detection (only show if browser supports)
- Implement session-based notification prompt tracking
- Prevent repeated prompts after dismissal in same session
- Respect permanent dismissal preferences
- Enhance iOS Safari detection and instructions

**Technical Details:**
- 6 files changed, 96 insertions(+), 286 deletions(-)
- Build successful with 0 errors
- All features production-ready

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 14:35:52 +01:00
4992b6b839 Cleanup: Update .gitignore and verify TOR implementation
- Add publish directories to .gitignore (both root and TeleBot)
- Exclude compressed assets (*.br, *.gz) except wwwroot
- Exclude archive files (*.tar.gz, *.zip)
- Run TOR verification: 9/9 checks PASSED ✓
- Document nginx push notification configuration

This cleanup prevents build artifacts from cluttering git status while
maintaining proper TOR security configuration verification.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 16:20:16 +01:00
bb3d603f83 Revert: Roll back to previous working version
Rolling back nginx changes to restore working state for testing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 14:35:24 +01:00
c5e1fce271 Fix: Update nginx CORS config and document push notification setup
- Added CORS headers for admin.dark.side domain
- Added no-cache headers for PWA JavaScript files
- Documented push notification configuration steps
- Fixed split-tunnel VPN compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 14:09:23 +01:00
c31df615ab Revert .gitlab-ci.yml to working configuration
Keep authentication fix in Program.cs but use original CI/CD pipeline configuration that builds from Dockerfile

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 13:18:19 +01:00
d31c0b4aeb CI/CD: Add GitLab CI/CD pipeline for Hostinger deployment
- Updated .gitlab-ci.yml with complete build, test, and deploy stages
- Added authentication redirect fix in Program.cs (302 redirect for admin routes)
- Fixed Cookie vs Bearer authentication conflict for admin panel
- Configure pipeline to build from .NET 9.0 source
- Deploy to Hostinger VPS with proper environment variables
- Include rollback capability for production deployments

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 13:10:48 +01:00
e61b055512 Fix CORS policy for admin.dark.side domain
- Add https://admin.dark.side and http://admin.dark.side to ProductionCors allowed origins
- Increment version to 1.0.6
- Fixes push notification CORS blocking issue

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 03:22:40 +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
sysadmin
021cfc4edc "Push-notification-diagnostics-enhancement" 2025-09-30 17:48:23 +01:00
8b4cb6e78c Fix push notification UX and Chrome FCM connectivity issues
- Added Skip button for users who can't/don't want push notifications
- Fixed session storage issue preventing prompt re-showing on page change
- Enhanced error messaging with specific guidance for FCM connectivity issues
- Added localStorage persistence for user decline preference
- Improved timeout error messages to explain corporate firewall/VPN issues
- Added user-friendly confirmation dialog for timeout scenarios
- Prevents notification prompt from re-appearing after user skips or declines

Resolves Chrome Firebase Cloud Messaging service connectivity problems
commonly caused by corporate firewalls, VPNs, or network restrictions.

🤖 Generated with Claude Code
2025-09-30 16:50:57 +01:00
151abfb2f7 Enhance push notification debugging and timeout handling
- Improved browser push subscription timeout handling (30s)
- Enhanced server request timeout and error reporting (15s)
- Added detailed logging for subscription timing and endpoints
- Better user-friendly error messages for common failure scenarios
- Separated browser push service issues from server-side issues
- Added timeout detection for push service connectivity problems

🤖 Generated with Claude Code
2025-09-30 16:42:36 +01:00
4be8dbfa1b Configure push notifications for public domain - Add WebPush VAPID configuration to docker-compose.yml 2025-09-30 16:13:57 +01:00
aff6780848 feat: Consolidate deployments to GitLab CI/CD pipeline
- Add comprehensive integration test script for Hostinger VPS deployment
- Fixed database schema check in test script (correct database path)
- Consolidated deployment from manual (/opt/docker/littleshop) to GitLab CI/CD (/opt/littleshop)
- All deployment configuration now managed through GitLab pipeline
- Integration tests: 15/15 passing (100% success rate)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 13:57:09 +01:00
8fc58bb918 Database-migration-scripts-for-deployment-fixes 2025-09-29 17:30:34 +01:00
51cc0463de Update .gitlab-ci.yml file 2025-09-29 18:12:34 +02:00
d3371f011f Merge branch 'revert-84b0a880' into 'main'
Revert "Update .gitlab-ci.yml file"

See merge request Jamie/littleshop!1
2025-09-29 18:07:37 +02:00
37687757bb Revert "Update .gitlab-ci.yml file" 2025-09-29 18:07:37 +02:00
fb3269e680 Update .gitlab-ci.yml file 2025-09-29 17:58:58 +02:00
84b0a880f6 Update .gitlab-ci.yml file 2025-09-29 17:44:10 +02:00
sysadmin
f5e87d8b6b "Test-Infrastructure-v2.5.0-Coverage-Improvement" 2025-09-29 09:05:58 +01:00
sysadmin
c5c56ec3d8 "Test-infrastructure-fixes" 2025-09-29 08:03:36 +01:00
sysadmin
6e5f5ae279 "Test-infrastructure-improvements" 2025-09-29 06:59:49 +01:00
sysadmin
7c522535c6 "Security-fixes" 2025-09-29 06:37:15 +01:00
sysadmin
d096cf0ced deployment-script 2025-09-29 06:24:51 +01:00
sysadmin
c8fdbb2e03 security-and-docker-fixes 2025-09-29 06:23:52 +01:00
ec894ba529 Implement critical security fixes from code review 2025-09-29 05:26:29 +01:00
8a7c07ead7 Fix CI/CD: Add Docker network cleanup to prevent pool conflicts 2025-09-28 19:02:26 +01:00
7ffb3de3f2 Fix CI/CD: Force cleanup orphan containers before deployment 2025-09-28 19:00:09 +01:00
1b46222300 Security hardening: Fix critical JWT, rate limiting, and deployment issues 2025-09-28 18:52:05 +01:00
sysadmin
586d491b83 Add database force upgrade script with config preservation
This commit adds scripts to handle production database migrations that
failed due to schema inconsistencies. The force upgrade script preserves
critical configuration data while recreating the database structure.

Features:
- Exports and preserves SystemSettings (wallet addresses, API keys)
- Preserves Users (admin accounts with passwords)
- Preserves BotRegistrations (Telegram bot configuration)
- Creates timestamped backups before any changes
- Automatic rollback on failure
- Manual SQL migration script as fallback option

Usage:
  bash force-upgrade-production-db.sh

This is safe to use when product catalog data is not critical and
configuration/wallet data must be preserved.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 17:15:53 +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
191a9f27f2 Enable auto-deploy for LittleShop on main branch
- Added auto-deploy on successful builds for main branch
- Deployment uses commit SHA when no tag is present
- Manual deployment still available for tagged releases
- Follows same pattern as TeleBot deployment

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:54:48 +01:00
fd02836450 Add TeleBot CI/CD pipeline configuration
- Created .gitlab-ci.yml for automated builds and deployment
- Added docker-compose.production.yml for VPS deployment
- Added .env.production.example for configuration template
- Follows LittleShop deployment pattern
- Auto-deploy on main branch commits

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:53:43 +01:00
766216e542 Add TeleBot e2e test script
- Comprehensive e2e test for TeleBot functionality
- Tests LittleShop API connectivity
- Verifies catalog access and order creation
- Includes build verification
- Designed to run on VPS with VPN access

Build test passed 

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:52:20 +01:00
8e3efb7c3a Update TeleBot configuration and add versioning
- Updated LittleShop API URL to use VPN hostname (hq.lan)
- Added Version 1.0.3 properties to project file
- Follows infrastructure changes with VPN-based access

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:50:12 +01:00
6be1ea8085 Add version 1.0.5 and /api/version endpoint
- Added Version, AssemblyVersion, and FileVersion to project file
- Added /api/version endpoint returning version info
- Follows SilverPay versioning pattern

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:46:13 +01:00
e75411dab9 Fix health check port to 5100 (host port) 2025-09-27 08:03:06 +01:00
d57f3ddd59 Fix SSH variable quoting in GitLab CI/CD 2025-09-27 07:47:57 +01:00
5bae87d5ec Fix compilation error in TestController
Change order.Total to order.TotalAmount to match model property.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 07:44:03 +01:00
849d4994de Fix GitLab CI/CD Docker socket configuration
Remove docker:24-dind service to use runner's mounted Docker socket.
This fixes the 403 Git access error and Docker socket conflict.

Changes:
- Remove services: docker:24-dind from build and deploy jobs
- Change image from docker:24-dind to docker:24
- Update DOCKER_HOST to use unix socket

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 07:39:48 +01:00
6c05b7d0e8 Add GitLab CI/CD deployment pipeline
- Add .gitlab-ci.yml with build, deploy, and rollback stages
- Add docker-compose.production.yml (security-compliant, no hardcoded secrets)
- Update .env.example with SilverPay integration variables
- Add GITLAB-CI-DEPLOYMENT.md documentation

Security improvements:
- All secrets in VPS .env file (never in Git)
- Environment variables without defaults (fail-fast)
- SSH key authentication for CI/CD
- VPN-only access via hq.lan

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 07:05:02 +01:00
e2f809c4f3 Fix integration test: correct field name from customerIdentity to identityReference
Fixed:
• Order creation now uses correct 'identityReference' field
• Integration tests now pass at 92% (11/12)
• SilverPAY wallet unlock confirmed working
• Payment address generation validated

Test Results:
• SilverPAY Order Creation:  Working
• Exchange Rates:  Live data (£81,852/BTC)
• Order Creation:  Fixed field validation
• System Status: 92% operational

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 01:38:04 +01:00
33ca93150a Add comprehensive credentials and configuration documentation
📋 Critical system information documented:
• All production credentials and API keys
• Manual payment verification workflow details
• Deployment scripts and automation commands
• System architecture and maintenance procedures
• Test data cleanup mechanisms

🔐 Security: Contains production credentials - store securely

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 19:30:53 +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
1588c79df0 Add BotActivityTracker service registration 2025-09-25 02:30:40 +01:00
ac4fe688d9 Add bot activity tracking system 2025-09-25 01:28:56 +01:00