# Quick Setup Guide

## Step 1: Create Database

Open phpMyAdmin (http://localhost/phpmyadmin) and run:

```sql
CREATE DATABASE gline_shipping CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
```

## Step 2: Configure Database

The `.env` file is already configured with:
- Database: `gline_shipping`
- Username: `root`
- Password: (empty)

If your MySQL has a password, update `.env`:
```
DB_PASSWORD=your_password
```

## Step 3: Run Migrations

Open terminal in the project folder and run:

```bash
php artisan migrate
```

## Step 4: Add Sample Data (Optional)

```bash
php artisan db:seed --class=ShipmentSeeder
```

This creates a sample shipment with tracking number: **SHP-5567**

## Step 5: Start Server

```bash
php artisan serve
```

## Access the Application

- **Public Tracking**: http://localhost:8000
- **Admin Dashboard**: http://localhost:8000/admin/dashboard
- **User Dashboard**: http://localhost:8000/user/dashboard

## Test with Sample Data

If you ran the seeder, you can test with:
- Tracking Number: **SHP-5567**

## Email Configuration

For testing, emails are logged to `storage/logs/laravel.log`

For production, update `.env`:
```
MAIL_MAILER=smtp
MAIL_HOST=your-smtp-host
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password
```

## Troubleshooting

### Database Connection Error
- Check MySQL is running in XAMPP
- Verify database name in `.env`
- Check username/password

### Map Not Loading
- Check internet connection (uses OpenStreetMap)
- Verify coordinates are valid numbers

### Email Not Sending
- Check `.env` mail configuration
- For testing, check `storage/logs/laravel.log`

## Next Steps

1. Create shipments via admin dashboard
2. Add tracking updates with coordinates
3. Test public tracking page
4. Configure email for production

## Support

Check README.md for detailed documentation.
