# POSPro SaaS - Complete POS & Inventory System

## 🚀 Architecture Overview
1. **Laravel Backend**: Acts as the central REST API. Uses JWT for authentication and Global Scopes (`TenantScope`) for isolated SaaS multi-tenancy.
2. **Flutter App**: Single codebase for Android/iOS. Features real-time POS, Bluetooth thermal printing, and interactive charts.
3. **Database**: MySQL schema ready for multi-tenant architecture.

## 🛠️ Installation Guide (cPanel / VPS)

### 1. Backend (Laravel) Setup
1. Create a new Laravel project: `composer create-project laravel/laravel pospro_backend`
2. Copy the contents of `laravel_core/` from this ZIP into your Laravel project.
3. Install JWT Auth: `composer require tymon/jwt-auth`
4. Upload to cPanel (place contents in `public_html` or setup a subdomain).
5. Import `database/pospro_saas_schema.sql` into your MySQL database via phpMyAdmin.
6. Configure `.env` with your DB credentials.

### 2. Mobile App (Flutter) Setup
1. Create a new Flutter project: `flutter create pospro_app`
2. Replace the `lib/` folder and `pubspec.yaml` with the contents of `flutter_app_core/` from this ZIP.
3. Run `flutter pub get`.
4. Update the `BASE_URL` in `lib/services/api_service.dart` to point to your Laravel backend.
5. Build APK: `flutter build apk --release`

## 🖨️ Bluetooth Printer Setup
The Flutter app uses `blue_thermal_printer`. Ensure you pair your Android device with the thermal printer via device settings before testing the POS print function.
