## 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>
4.5 KiB
4.5 KiB
LittleShop Hostinger Deployment Guide
Overview
This guide covers deploying the LittleShop web application to your Hostinger VPS server that already has BTCPay Server running.
Server Information
- Host: srv1002428.hstgr.cloud / thebankofdebbie.giize.com
- IP: 31.97.57.205
- SSH Port: 2255
- User: sysadmin
- BTCPay Server: Already running at https://thebankofdebbie.giize.com
Prerequisites
- SSH access to the Hostinger server
- Docker and Docker Compose installed (already available)
- SSH key for authentication (vps_hardening_key)
Deployment Files Created
hostinger-docker-compose.yml- Docker Compose configuration for Hostinger.env.hostinger- Environment variables templatenginx.conf- Reverse proxy configurationdeploy-to-hostinger.sh- Automated deployment scriptHOSTINGER_DEPLOYMENT.md- This documentation
Quick Deployment
Automatic Deployment
# Run the automated deployment script
./deploy-to-hostinger.sh
Manual Deployment
If you prefer manual control:
# 1. Copy files to server
scp -i ./Hostinger/vps_hardening_key -P 2255 -r LittleShop/ sysadmin@31.97.57.205:/opt/littleshop/
scp -i ./Hostinger/vps_hardening_key -P 2255 hostinger-docker-compose.yml sysadmin@31.97.57.205:/opt/littleshop/docker-compose.yml
# 2. SSH to server
ssh -i ./Hostinger/vps_hardening_key -p 2255 sysadmin@31.97.57.205
# 3. Deploy on server
cd /opt/littleshop
docker-compose build
docker-compose up -d
Configuration
Environment Variables
Copy .env.hostinger to .env and update:
# BTCPay Server integration (already running on same server)
BTCPAY_SERVER_URL=https://thebankofdebbie.giize.com
BTCPAY_STORE_ID=your_store_id_from_btcpay
BTCPAY_API_KEY=your_api_key_from_btcpay
BTCPAY_WEBHOOK_SECRET=your_webhook_secret
# Security
JWT_SECRET_KEY=generate_a_strong_32_character_secret_key
Port Configuration
- Application: Runs on internal port 5000
- External Access: Port 8081 (to avoid conflict with BTCPay on 80/443)
- Nginx Proxy: Available for custom domain setup
DNS Configuration
To use a custom domain:
- Point your domain to the server IP:
31.97.57.205 - Update the domain in
nginx.confor docker-compose labels - Consider using a subdomain like
shop.thebankofdebbie.giize.com
SSL/HTTPS Setup
The configuration is ready for SSL with Let's Encrypt:
- Install Certbot on the server
- Generate certificates for your domain
- Update nginx.conf with certificate paths
- Restart the nginx container
BTCPay Server Integration
Your LittleShop will integrate with the existing BTCPay Server:
- Log into BTCPay at https://thebankofdebbie.giize.com
- Create a store for LittleShop
- Generate API keys
- Configure webhooks pointing to your LittleShop instance
- Update the environment variables
Monitoring and Maintenance
Check Application Status
# SSH to server
ssh -i ./Hostinger/vps_hardening_key -p 2255 sysadmin@31.97.57.205
# Check containers
docker-compose ps
# View logs
docker-compose logs littleshop
# Check application health
curl http://localhost:8081/api/test
Container Management
# Update application
docker-compose pull
docker-compose build
docker-compose up -d
# Restart application
docker-compose restart littleshop
# View resource usage
docker stats
Security Considerations
- Application runs in isolated Docker containers
- Firewall is already configured on the server
- Use HTTPS for production (configure SSL certificates)
- Regularly update container images for security patches
Troubleshooting
Common Issues
- Port conflicts: Ensure port 8081 is available
- DNS issues: Check domain configuration
- SSL problems: Verify certificate paths and permissions
- BTCPay connection: Ensure correct API keys and URLs
Log Locations
- Application logs:
docker-compose logs littleshop - Nginx logs:
docker-compose logs nginx - Server logs:
/var/log/syslog
Backup Strategy
- Database: Backup SQLite database file regularly
- Uploads: Backup product images and uploads
- Configuration: Keep copies of .env and docker-compose files
- Docker volumes: Use docker volume backup tools
Performance Optimization
- The server has 16GB RAM and should handle LittleShop easily
- Monitor disk usage as BTCPay Server also uses storage
- Consider setting up log rotation
- Use nginx caching for static assets
Support
- Check the main LittleShop documentation
- Review Hostinger server status in
Infrastructure.txt - BTCPay Server documentation for payment integration