
Phase 2 → File 02 → Claude

# LARAVEL 11 BACKEND GENERATION – FULL MVP STRUCTURE

You are a senior Laravel 11 engineer.

Generate a complete backend scaffold for the following system:

System: Tower Paints & Chems Distribution Management System

Stack:
- Laravel 11
- Sanctum authentication
- MySQL
- API-based

Requirements:

Entities:
- User (roles: admin, zonal, state, local, advert_center)
- Product
- Warehouse
- Inventory (product + warehouse)
- Sale
- Target

Rules:
- Each zonal/state has one warehouse
- Admin has main warehouse
- Sales deduct from user's assigned warehouse
- Prevent negative stock
- Weekly sales tracking
- Target tracking yearly
- Low stock warning logic
- Role-based middleware

Generate:

1. All migrations
2. All models with relationships
3. Controllers:
   - AuthController
   - ProductController
   - WarehouseController
   - InventoryController
   - SaleController
   - AdminController
4. Sanctum setup
5. API routes
6. Role middleware
7. Basic validation rules
8. Clean folder structure

IMPORTANT:
- Keep logic MVP-focused.
- No shipment tracking.
- No payment gateway.
- No complex transfer system.
- Clean and production ready.

Return everything in structured order.