# Laravel Ecommerce Admin - Clean Deployment Package

This is a clean, production-ready copy of the Laravel ecommerce application without generated files, dependencies, or installation scripts.

## What's Included

### Core Application Files
- ✅ All source code (`app/`, `config/`, `routes/`)
- ✅ Database migrations and seeders
- ✅ Blade templates and views
- ✅ Frontend assets (CSS, JS)
- ✅ Public assets (images, compiled assets)
- ✅ Configuration files
- ✅ Documentation

### What's Excluded
- ❌ `vendor/` - Composer dependencies (regenerate with `composer install`)
- ❌ `node_modules/` - NPM dependencies (regenerate with `npm install`)
- ❌ `.env` - Environment config (copy from `.env.example`)
- ❌ `install/` - Installation wizard (not needed for updates)
- ❌ Generated cache files
- ❌ Log files
- ❌ Session files
- ❌ `.git/` - Git history

## Quick Start

### For New Installation
See `CPANEL_DEPLOYMENT.md` for complete setup instructions.

### For Updating Existing Installation
See `UPDATE_INSTRUCTIONS.md` for step-by-step update guide.

## Key Features

### E-commerce Core
- Product management with variants (colors, sizes)
- Category and brand management
- Shopping cart and checkout
- Order management
- Customer accounts
- Wishlist functionality
- Product reviews and ratings
- Coupon system
- Multi-payment gateway support

### Admin Panel
- Modern, responsive dashboard
- Role-based access control
- Two-factor authentication
- Admin action logging
- Comprehensive reporting
- Order management
- Customer management
- Content management (blogs, pages, banners)

### Payment Gateways
- bKash
- Nagad
- SSLCommerz
- Cash on Delivery (COD)

### Courier Integration
- **Steadfast** - Balance checking, order creation
- **Pathao** - Store management, order tracking
- **RedX** - Store management, pickup scheduling
- Courier error logging and retry functionality

### Incomplete Orders System
- Tracks abandoned checkouts
- Admin dashboard for recovery
- Fraud detection integration
- Automatic cleanup

### Fraud Detection
- Duplicate order detection
- Phone number tracking
- IP-based blocking
- Configurable thresholds

### Frontend Features
- Pixel-perfect storefront design
- Mobile-responsive layout
- Product search and filtering
- Category browsing
- Blog system
- Contact forms
- Order tracking
- Customer dashboard

## System Requirements

- PHP 8.2 or higher
- MySQL 5.7+ or MariaDB 10.3+
- Composer 2.x
- Node.js 18+ and NPM (for asset compilation)
- Apache/Nginx web server
- SSL certificate (recommended)

## File Structure

```
laracom/
├── app/                    # Application logic
│   ├── Http/              # Controllers, Middleware
│   ├── Models/            # Eloquent models
│   ├── Services/          # Business logic services
│   └── Helpers/           # Helper functions
├── bootstrap/             # Application bootstrap
├── config/                # Configuration files
├── database/              # Migrations and seeders
│   ├── migrations/        # Database migrations
│   └── seeders/           # Database seeders
├── public/                # Public web root
│   ├── css/              # Compiled CSS
│   ├── js/               # Compiled JavaScript
│   └── storage/          # Symlink to storage
├── resources/             # Raw assets and views
│   ├── css/              # Source CSS
│   ├── js/               # Source JavaScript
│   └── views/            # Blade templates
├── routes/                # Route definitions
├── storage/               # File storage
│   ├── app/              # Application files
│   └── framework/        # Framework files
├── tests/                 # Automated tests
├── .env.example          # Environment template
├── composer.json         # PHP dependencies
├── package.json          # NPM dependencies
└── artisan               # CLI tool
```

## Documentation Files

- `README.md` - This file
- `CPANEL_DEPLOYMENT.md` - Complete deployment guide
- `UPDATE_INSTRUCTIONS.md` - Quick update guide
- `DEPLOYMENT_GUIDE.md` - General deployment information
- `COURIER_SETTINGS_IMPLEMENTATION.md` - Courier integration details
- `INCOMPLETE_ORDERS_COURIER_IMPLEMENTATION.md` - Incomplete orders system
- `FRONTEND_ADMIN_AUDIT_NOTES.md` - Frontend implementation notes

## Default Admin Credentials

After running the seeder:
- **Email**: admin@example.com
- **Password**: password

⚠️ **IMPORTANT**: Change these credentials immediately after first login!

## Security Checklist

- [ ] Change default admin credentials
- [ ] Set `APP_DEBUG=false` in production
- [ ] Set strong `APP_KEY`
- [ ] Use HTTPS (SSL certificate)
- [ ] Set proper file permissions (755 for directories, 644 for files)
- [ ] Protect `.env` file
- [ ] Enable firewall
- [ ] Regular backups
- [ ] Keep dependencies updated

## Support & Maintenance

### Logs Location
- Application logs: `storage/logs/laravel.log`
- Web server logs: Check cPanel or server logs

### Cache Management
```bash
# Clear all caches
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear

# Rebuild caches
php artisan config:cache
php artisan route:cache
php artisan view:cache
```

### Database Maintenance
```bash
# Run migrations
php artisan migrate

# Rollback last migration
php artisan migrate:rollback

# Fresh install (WARNING: Deletes all data)
php artisan migrate:fresh --seed
```

## Version Information

- Laravel: 11.x
- PHP: 8.2+
- Database: MySQL 5.7+ / MariaDB 10.3+
- Node: 18+

## License

This is a proprietary application. All rights reserved.

## Getting Help

1. Check the documentation files in this directory
2. Review Laravel documentation: https://laravel.com/docs
3. Check application logs: `storage/logs/laravel.log`
4. Review migration files for database structure
5. Check controller files for business logic

## Recent Updates

### January 2026
- Enhanced courier integration with connection testing
- Incomplete orders tracking system
- Improved fraud detection
- Admin action logging
- Two-factor authentication
- Better mobile responsiveness
- Performance optimizations

---

**Ready to deploy?** Start with `CPANEL_DEPLOYMENT.md` for new installations or `UPDATE_INSTRUCTIONS.md` for updates.
