# AI Prompt Pack (Claude / ChatGPT / Code Generation)

Version: 1.0
Project: Laravel Single Vendor eCommerce
Purpose: AI-assisted full backend + frontend development

---

## 1. Core Idea of This File

This file is the **engine of AI development**.

You will **NOT** code manually.

Instead, you will use these structured prompts to generate:

- Laravel modules
- Controllers
- Models
- Migrations
- Services
- APIs
- Admin panels
- Business logic

---

## 2. Global AI Instruction (IMPORTANT)

Always tell AI:

```text
Follow Laravel best practices.
Use Service + Repository pattern.
Keep code modular and scalable.
Do not mix business logic in controller.
Use clean architecture.
Ensure performance optimized queries.
```

---

## 3. Project Base Prompt (FIRST PROMPT)

Use this at the start of the project:

```text
You are a senior Laravel architect.

I am building a single vendor eCommerce system with guest checkout.

Design a scalable backend architecture with:
- Modules
- Database design
- API structure
- Admin panel structure
- Service layer architecture

Make it production-ready and scalable.
```

---

## 4. Database Generation Prompt

```text
Design full MySQL database schema for a Laravel eCommerce system.

Include:
- products
- product_variants
- orders
- order_items
- payments
- expenses
- coupons
- settings
- admins
- roles
- permissions

Add:
- indexes
- foreign keys
- nullable rules
- data types

Optimize for high performance.
```

---

## 5. Product Module Prompt

```text
Build a Laravel Product Module.

Requirements:
- CRUD operations
- Image upload (multiple images)
- Product variants (size, color)
- SKU system
- Stock management
- SEO fields (meta title, meta description)
- Slug generation
- Active/inactive status

Use:
- Controller (thin)
- Service class (business logic)
- Repository pattern
- Form Request validation
```

---

## 6. Order Module Prompt

```text
Create a Laravel Order Management system.

Features:
- Guest checkout (no user login required)
- Order creation from cart
- Order status flow:
  pending → confirmed → processing → shipped → delivered → returned
- Order items relation
- Stock deduction on order confirm
- Invoice generation

Ensure consistency and atomic transactions.
```

---

## 7. Cart System Prompt

```text
Build a session-based cart system in Laravel.

Requirements:
- Add to cart
- Update quantity
- Remove item
- Clear cart
- Calculate total price
- Apply coupon discount

Store cart in session or Redis for performance.
```

---

## 8. Profit / Loss System Prompt

```text
Build a profit/loss calculation system.

Include:
- Product cost price
- Selling price
- Delivery cost
- Discount impact
- Expense tracking

Generate:
- Order profit
- Daily profit report
- Monthly profit report

Ensure accurate financial calculation logic.
```

---

## 9. Admin Panel Prompt

```text
Create a Laravel admin panel structure.

Modules:
- Dashboard
- Product management
- Order management
- Coupon system
- Expense tracking
- Courier integration
- Settings panel

Use role-based access control.
```

---

## 10. Settings System Prompt

```text
Build a dynamic settings system in Laravel.

Features:
- Website name
- Logo upload
- Theme colors (primary, secondary)
- Currency settings
- Section enable/disable (homepage sections)
- Payment settings
- Courier API keys

Store all settings in database key-value format.
```

---

## 11. Courier Integration Prompt

```text
Integrate courier APIs into Laravel system.

Support:
- SteadFast
- Pathao
- RedX
- Paperfly
- eCourier

Features:
- Create shipment
- Track shipment
- Update delivery status
- COD amount tracking

Make it service-based architecture.
```

---

## 12. API Prompt

```text
Create REST API for eCommerce system.

Endpoints:
- Products
- Cart
- Checkout
- Order tracking

Ensure:
- JSON responses
- Proper validation
- API versioning (/api/v1)
- Secure structure
```

---

## 13. Performance Optimization Prompt

```text
Optimize Laravel eCommerce application for high traffic.

Include:
- Caching strategy (Redis)
- Database indexing
- Eager loading
- Queue jobs for heavy tasks
- Image optimization (WebP)
- Lazy loading
```

---

## 14. Security Prompt

```text
Secure Laravel eCommerce system.

Include:
- CSRF protection
- SQL injection prevention
- XSS protection
- Admin role permissions
- Login attempt limit
- Activity logs
- Secure API authentication
```

---

## 15. Frontend Prompt

```text
Build frontend structure for eCommerce system.

Pages:
- Homepage
- Product listing
- Product details
- Cart
- Checkout
- Order success page

Focus:
- Mobile-first design
- Fast loading
- Conversion optimized UI
```

---

## 16. Debugging Prompt

```text
Find and fix bugs in Laravel eCommerce system.

Check:
- Order flow issues
- Stock mismatch
- Cart calculation errors
- API response errors
- Performance bottlenecks
```

---

## 17. Final Deployment Prompt

```text
Prepare Laravel eCommerce system for production deployment.

Include:
- Environment setup
- Queue worker setup
- Cron jobs
- Cache configuration
- SSL setup
- Server optimization
```

---

## 18. AI Usage Strategy

**How to use this file — Step-by-step workflow:**

1. Pick module prompt
2. Send to Claude
3. Generate code
4. Review
5. Integrate
6. Move to next module

---

## 19. Final Note

This file is your:

- 🧠 AI brain
- ⚙️ Development engine
- 🚀 Code generator system

> If used properly, you can build an enterprise-level eCommerce system without manual coding.
