#!/bin/bash

echo "================================"
echo "SaleZone Setup Script"
echo "================================"
echo ""

echo "Step 1: Installing Composer Dependencies..."
composer install
echo ""

echo "Step 2: Generating Application Key..."
php artisan key:generate
echo ""

echo "Step 3: Creating Storage Link..."
php artisan storage:link
echo ""

echo "Step 4: Clearing Cache..."
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
echo ""

echo "Step 5: Setting Permissions..."
chmod -R 775 storage bootstrap/cache
echo ""

echo "================================"
echo "Setup Complete!"
echo "================================"
echo ""
echo "Next Steps:"
echo "1. Import database: database/salezone_pos2db.sql"
echo "2. Run: php artisan serve"
echo "3. Visit: http://localhost:8000"
echo ""
echo "Default Admin Login:"
echo "Email: customercare@salezone.in"
echo "Password: Check database users table"
echo ""
