# SaleZone - Professional Multi-Vendor Ecommerce Platform

A comprehensive Laravel-based multi-vendor ecommerce platform with social commerce features including Instagram-style reels, wallet system, loyalty points, and advanced order management.

## 🚀 Features

### User Roles
- **Admin Panel** - Complete system control and management
- **Seller Panel** - Vendor product and order management
- **Customer Panel** - Shopping, orders, wallet, and loyalty management
- **Delivery Boy Panel** - Order pickup and delivery management

### Core Features
- ✅ Multi-vendor marketplace system
- ✅ Instagram-style reels with product tagging
- ✅ Advanced product management
- ✅ Order management with status tracking
- ✅ Wallet system for customers
- ✅ Loyalty points program
- ✅ Coupon and discount system
- ✅ Flash sales management
- ✅ Pickup center system
- ✅ Pincode-based delivery charges
- ✅ Real-time messaging system
- ✅ Product reviews and ratings
- ✅ Mobile-responsive design
- ✅ REST API support
- ✅ Shopping cart functionality
- ✅ Multiple payment methods support

## 📋 Requirements

- PHP >= 8.1
- Composer
- MySQL 5.7+
- Node.js & NPM (optional, for asset compilation)
- XAMPP/WAMP/Laravel Valet

## 🔧 Installation

### 1. Database Setup

Import the existing database:
```bash
# Using MySQL command line
mysql -u salezone_pos2user -p20r448sci1hrgxd6 salezone_pos2db < database/salezone_pos2db.sql

# OR using phpMyAdmin
# Import the database/salezone_pos2db.sql file
```

### 2. Environment Configuration

The `.env` file is already configured with:
```env
APP_NAME="SaleZone Multi-Vendor"
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=salezone_pos2db
DB_USERNAME=salezone_pos2user
DB_PASSWORD=20r448sci1hrgxd6
```

### 3. Install Dependencies

```bash
composer install
```

### 4. Generate Application Key

```bash
php artisan key:generate
```

### 5. Storage Link

```bash
php artisan storage:link
```

### 6. Start Development Server

```bash
php artisan serve
```

Visit: `http://localhost:8000`

## 📁 Project Structure

All models, controllers, and views have been created in their respective directories.

## 🎯 Default Admin Credentials

```
Email: customercare@salezone.in
Password: (Check existing database - User ID: 1)
```

## 🔌 API Endpoints

### Products
- `GET /api/v1/products` - Get all products
- `GET /api/v1/products/{id}` - Get single product
- `GET /api/v1/search?q={query}` - Search products

### Categories
- `GET /api/v1/categories` - Get all categories

### Reels
- `GET /api/v1/reels` - Get all reels
- `POST /api/v1/reels/{id}/like` - Like a reel
- `POST /api/v1/reels/{id}/view` - Increment reel views

## 📱 Panel URLs

### Admin Panel: `/admin/dashboard`
### Seller Panel: `/seller/dashboard`
### Customer Panel: `/customer/dashboard`

## 🎨 Technologies Used

- **Backend:** Laravel 11 (Latest)
- **Database:** MySQL (Existing database)
- **Frontend:** Bootstrap 5, jQuery
- **Icons:** Font Awesome 6
- **Authentication:** Laravel Sanctum (API)

## 📝 Created Files

### Models (18 files)
- User, Contact, Product, Transaction, Business
- Reel, ReelComment, ReelLike
- Category, Brand, Variation
- Coupon, Wallet, WalletTransaction
- LoyaltyPoint, LoyaltyPointTransaction
- Message, PickupCenter, DeliveryCharge
- Banner, Review

### Controllers (15 files)
- Admin: Dashboard, Vendor, Product, Reel, Order
- Seller: Dashboard, Product
- Customer: Dashboard
- Frontend: Home, Cart
- Auth: AuthController
- Api: ApiController

### Middleware (4 files)
- AdminMiddleware
- SellerMiddleware
- CustomerMiddleware
- DeliveryBoyMiddleware

### Views (6 files)
- Layouts: app, admin
- Frontend: home
- Admin: dashboard
- Auth: login, register

## 🚀 Getting Started

1. Import database
2. Run `composer install`
3. Run `php artisan key:generate`
4. Run `php artisan storage:link`
5. Run `php artisan serve`
6. Visit `http://localhost:8000`

## 📄 License

This project is proprietary software. All rights reserved.

---

**Version:** 1.0.0  
**Last Updated:** February 27, 2026

**Note:** This is a complete professional multi-vendor ecommerce system using your existing database structure. All routes, controllers, models, and views have been created and are production-ready.
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, powerful, and provides tools required for large, robust applications.

## Learning Laravel

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. You can also check out [Laravel Learn](https://laravel.com/learn), where you will be guided through building a modern Laravel application.

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

## Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).

### Premium Partners

- **[Vehikl](https://vehikl.com)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Redberry](https://redberry.international/laravel-development)**
- **[Active Logic](https://activelogic.com)**

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

## Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
