# Smart Mobile Shop ERP - Laravel 12

A lightweight offline-friendly Laravel 12 Mobile Shop ERP for Afghanistan-style mobile businesses.

## Included modules

- Dashboard with stock, sales, profit, due, latest sales and latest mobiles
- Brand and model management: choose company first, then related mobile models
- Suppliers, customers and users
- Supplier purchase, customer-used-mobile purchase, and import purchase
- IMEI based mobile stock control
- New/used, local/import/supplier source tracking
- Sales invoice with QR code and barcode
- Customer and supplier payment tracking fields
- Reports: sales, purchases, stock, profit, ledgers
- CSV, XLS and print export routes
- Shop/company settings for logo text, address, phone, currency and invoice footer
- Pashto, Dari and English language files
- Offline local assets: simple Bootstrap-like custom CSS and tiny JavaScript only
- SQLite or MySQL supported

## Install

See `INSTALL_COMMANDS.txt`.

## Middleware note for Laravel 12

Open `bootstrap/app.php` and add these middleware aliases inside the `withMiddleware` block:

```php
$middleware->alias([
    'locale' => \App\Http\Middleware\SetLocale::class,
    'role' => \App\Http\Middleware\RoleMiddleware::class,
]);
```

## Default login

Email: `admin@mobile.test`
Password: `password`

Change this password after first login.

## QR and barcode

The system has fallback SVG generators, so invoices still display codes if optional packages are missing. For professional codes install:

```bash
composer require picqer/php-barcode-generator endroid/qr-code barryvdh/laravel-dompdf
```

## Offline desktop use

For desktop use, run it locally with XAMPP/Laragon or Laravel Herd and make a Desktop shortcut to:

```text
http://127.0.0.1:8000/login
```

For a more professional desktop wrapper, you can wrap the local URL with Electron or NativePHP later.
