# Delta POS Optimization & Offline Guide

Follow these steps to ensure your software runs at maximum speed and works perfectly in offline environments.

## 1. Database Performance (Crucial)
After every update or fresh installation, run the following command to apply speed-optimized indexes:
```bash
php artisan migrate
```

## 2. Laravel Speed Optimization
Run these commands to cache your system settings and routes. This prevents the system from re-calculating everything on every click:

### For Windows:
Create a file named `optimize.bat` in the root folder and run it, or run these manually:
```cmd
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache
```

### For Linux:
```bash
php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan event:cache
```

## 3. Production Readiness
If you are moving to a live server or finalized offline PC, optimize the code loader:
```bash
composer install --optimize-autoloader --no-dev
```

## 4. Offline Best Practices
- **Fonts:** We have already switched the system to use "System Fonts". This means it won't try to connect to Google Fonts, making it instant in offline mode.
- **CDNs:** While most libraries are local, ensure your browser has a good cache. For a 100% offline experience, download any remaining external JS/CSS links found in `resources/views/layouts/head.blade.php` or report views.

## 5. PHP OPcache (Hardware Level)
For enterprise-level speed, enable **OPcache** in your `php.ini` file:
```ini
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
```

---
*Created by Antigravity AI for Delta POS Stabilization Project.*
