# Quick Start Guide

## Installation in 5 Minutes

### 1. Install Dependencies
```bash
composer install
```

### 2. Setup Environment
```bash
cp .env.example .env
php artisan key:generate
```

Edit `.env`:
```env
DB_DATABASE=tower_paint
DB_USERNAME=root
DB_PASSWORD=your_password
```

### 3. Setup Database
```bash
php artisan migrate --seed
```

### 4. Start Server
```bash
php artisan serve
```

## Test the API

### Register a User
```bash
curl -X POST http://localhost:8000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "password": "Password123!",
    "password_confirmation": "Password123!",
    "phone": "+1234567890"
  }'
```

### Login
```bash
curl -X POST http://localhost:8000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "password": "Password123!"
  }'
```

Save the token from the response!

### Get User Profile
```bash
curl -X GET http://localhost:8000/api/auth/me \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"
```

## Development Tools

### Fix Code Style
```bash
composer pint
```

### Run Static Analysis
```bash
composer phpstan
```

### Run Tests
```bash
composer test
```

### Run All Quality Checks
```bash
composer quality
```

## Default Admin Credentials (Development Only)

```
Email: admin@towerpaint.com
Password: password
```

## Next Steps

1. ✅ User registration and authentication is ready
2. 📝 Implement partner registration
3. 📊 Add sales tracking
4. 🗺️ Add territory management
5. 📚 Add training system

Happy coding! 🚀
