# Neksura Provider Topup Game

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Laravel](https://img.shields.io/badge/Laravel-12.x-red.svg)](https://laravel.com)
[![PHP](https://img.shields.io/badge/PHP-8.2%2B-blue.svg)](https://php.net)

Sistem provider topup game berbasis Laravel 12 dengan integrasi API Digiflazz dan Payment Gateway Duitku/Tripay.

**Developed by [CodeCrush](https://www.facebook.com/share/16zKD4tBKH/)**

---

## 🚀 Quick Start

### 1. Clone Repository

```bash
git clone https://github.com/neksura/neksura-topup-provider.git
cd neksura-topup-provider
```

### 2. Install Dependencies

```bash
# Install PHP dependencies
composer install

# Install Node dependencies
npm install
```

### 3. Environment Setup

```bash
# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate
```

### 4. Database Configuration

Edit `.env` file:

```env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=neksura_provider
DB_USERNAME=root
DB_PASSWORD=

# Digiflazz API
DIGIFLAZZ_USERNAME=your_username
DIGIFLAZZ_API_KEY=your_api_key

# Tripay
TRIPAY_MERCHANT=
TRIPAY_APIKEY=
TRIPAY_PRIVATEKEY=

# Duitku
DUITKU_MERCHANT=
DUITKU_APIKEY=
```

### 5. Run Migration & Seeder

```bash
php artisan migrate --seed
```

### 6. Build Assets

```bash
npm run build
```

### 7. Start Server

```bash
php artisan serve
```

## 🔑 Default Login

**Admin Panel**: `http://localhost:8000/admin`

- **Email**: `admin@admin.com`
- **Password**: `12345678`

> ⚠️ **Penting**: Ubah password setelah login pertama kali!

---

### 3. Setup Cron Job (Production)

```bash
crontab -e
```

Tambahkan:
```
* * * * * cd /path/to/neksura-topup-provider && php artisan schedule:run >> /dev/null 2>&1
```

### 4. Test Manual

```bash
# Test command langsung
php artisan digiflazz:fetch-products

# Lihat daftar schedule
php artisan schedule:list

# Test schedule
php artisan schedule:run
```

---

## 🛠️ Tech Stack

- **Framework**: Laravel 12.x
- **PHP**: 8.2+
- **Database**: MySQL 8.0+
- **Cache**: Redis
- **Queue**: Redis
- **Frontend**: Vite + Tailwind CSS

---

## 📞 Support

- **Developer**: CodeCrush
- **Facebook**: [https://www.facebook.com/share/16zKD4tBKH/](https://www.facebook.com/share/16zKD4tBKH/)
- **Issues**: [GitHub Issues](https://github.com/neksura/neksura-topup-game/issues)

---

## 📝 License

This project is licensed under the MIT License.

---

**Built with ❤️ by CodeCrush**
