# PRD.md --- Laravel 12 Product Requirements Template

## 0. Project Metadata

- Project name: `La Lita Bloom Beauty Store`
- Description: `A beauty store website designed for international tourists to explore beauty products for spa hotel amenities & beauty supplies, view product information, and make purchases or inquiries online.`
- Type: `E-COMMERCE  for BEAUTY STORE`
- Business: `La Lita Bloom Beauty Store`
- Business location: `Lombok, West Nusa Tenggara, Indonesia`
- Primary language: `English`
- Secondary language: `Indonesian`
- Target market: `International tourists`
- Laravel: `12`
- PHP: `8.2.12`
- Database: `MySQL`
- Frontend: `[BLADE/LIVEWIRE/INERTIA]`
- CSS: `[TAILWIND/BOOTSTRAP]`
- JavaScript: `[ALPINE/VUE/REACT]`

## 1. Product Overview

### What is the product?

`An e-commerce platform specifically tailored for a spa and beauty store, allowing customers (primarily international tourists) to browse premium beauty products, view detailed organic ingredients and scent profiles, and place orders with flexible fulfillment options.`

### What problem does it solve?

`Tourists often want to buy spa products but face barriers with complex local shipping or payment methods. This platform provides a frictionless experience by offering clear English descriptions, familiar online payments, and the option to simply pick up and pay for the items directly at the spa location.`

### Value proposition

`A seamless, transparent, and premium digital shopping experience that bridges the gap between high-quality spa products and international customers, offering localized flat-rate shipping and hassle-free in-store pickup.`

### Core product promise

> `> Effortlessly discover and purchase premium spa beauty products with transparent ingredients and flexible pickup or delivery options.`

## 2. Goals

### Primary Goals

1.  Provide a seamless checkout experience supporting two main fulfillment methods: Pay at Location (Pickup) and Online Delivery.
2.  Display highly detailed product information (ingredients, scent notes, weight) catering to health-conscious international tourists.
3.  Implement a manual shipping rate calculation system managed entirely by store admins without relying on third-party courier APIs.

### Business Goals

-   Increase sales of spa products to tourists by allowing them to secure items online and pay upon visiting the physical store.

### Technical Goals

-   Build a robust, fast, and scalable monolithic application using Laravel 12.
-   Integrate Midtrans Webhook for automated payment status updates.

## 3. Non-Goals

- Real-time API integration with logistics providers (e.g., RajaOngkir, Biteship) for dynamic shipping rates.
- Multi-vendor or marketplace capabilities.
- Complex loyalty points or multi-tier membership systems for the MVP.

## 4. Target Users

### Tourist / Expat (Customer)
Description: International visitors or expats looking for spa products, beauty supplies, organic spa products.
Needs: 
- English interface.
- Clear ingredient lists (for allergies/preferences).
- Easy payment and pickup options.
Pain points: 
- Difficulty navigating local e-commerce sites (language barrier, complex courier options).

Add roles as required.

## 5. Roles & Permissions

 Role | Description | Main Permissions |
| :--- | :--- | :--- |
| Guest | Unregistered user | Browse products, view details. | need login if checkout |
| Customer | Registered shopper | Manage addresses, place orders, view order history & tracking. |
| Admin | Store Manager / Staff | Manage products, manage manual shipping rates, process orders, input tracking receipts. |

Remove roles that are not needed.

## 6. Core Features

### Feature — Dual Fulfillment Checkout
Purpose: Allow customers to choose how they receive and pay for products.
User can: 
- Select "Pay at Location (Store Pick-up)" or "Home Delivery".
Business rules: 
- Pick-up orders skip the Midtrans payment gateway and set shipping cost to 0.
- Delivery orders calculate shipping based on manual zone rates and require Midtrans payment.
Acceptance criteria: 
- User receives a Pickup Code if selecting pick-up. User is redirected to Midtrans Snap if selecting delivery.

### Feature — Manual Shipping Zones
Purpose: Give admin full control over shipping costs without external APIs.
User can: 
- (Admin) Create flat rates based on provinces or custom zones.
Business rules: 
- Delivery cost = (Total Cart Weight in Kg) x (Rate per Kg of selected Zone).
Acceptance criteria: 
- Admin can add/edit/delete zones. Checkout automatically applies the correct rate based on the customer's province.

### Feature — Manual Order Tracking
Purpose: Keep customers informed about their shipped packages.
User can: 
- (Admin) Input courier name, tracking number, and upload a receipt photo.
- (Customer) View tracking details and receipt photo on their dashboard.
Business rules: 
- Status must be `paid` before it can transition to `shipped`.
Acceptance criteria: 
- Customer sees the tracking number and a button to copy it on the order details page.

## 7. User Journey

``` 
[BROWSE PRODUCTS]
   ↓
[ADD TO CART]
   ↓
[CHECKOUT: CHOOSE FULFILLMENT]
   ├──> (Option A: Pick-up) ──> [GET PICKUP CODE] ──> [PAY AT STORE & COLLECT]
   │
   └──> (Option B: Delivery) ──> [CALCULATE MANUAL SHIPPING] ──> [PAY VIA MIDTRANS] ──> [RECEIVE TRACKING RESI]
```

Alternative journeys: - error/recovery - cancellation - rescheduling -
failed transaction - permission denied

## 8. Authentication

Required: YES

Methods:

Session-based (Laravel default)

Requirements:

registration

login

logout

profile (manage addresses)

## 9. Authorization

Describe access rules:

``` text
Customer → Can only view and manage their own addresses and orders.
Admin → Can access the admin dashboard, manage all products, orders, and shipping settings.
```

## 10. Main Pages

### Public

/ (Home/Landing)

/products (Catalog)

/products/{slug} (Product Detail)

/cart

/checkout

### Customer

/dashboard (Order history)

/orders/{order_number} (Order tracking / Pickup code)

/profile (Address book)

### Admin

/admin/dashboard

/admin/products

/admin/orders

/admin/shipping-zones

## 11. UI/UX Direction

Design personality:
Design personality: PREMIUM / MINIMAL / SPA-AESTHETIC

Should feel:

Calming

Organic

Trustworthy

Should not feel:

Cluttered

Aggressive (no flashy sales banners)

Visual direction:

Primary colors: Earth tones, soft greens, warm neutrals.

Typography: Clean sans-serif for UI, elegant serif for headings.

Imagery: High-quality, multi-angle product shots, textural videos.

Avoid: - excessive gradients - generic AI aesthetics - excessive
glassmorphism - excessive animations - unnecessary rounded cards - giant
typography without purpose

## 12. Responsive Design

Required: - 360px - 390px - 768px - 1024px - desktop

Mobile requirements:

Bottom navigation or easy-to-reach hamburger menu.

Smooth off-canvas cart drawer.

## 13. Database Requirements

### Main Entities

User

CustomerAddress

Product

Order

OrderItem

ShippingZone

### Relationships

``` text
User
  │
  ├── 1:N ── CustomerAddress
  └── 1:N ── Order

Order
  │
  └── 1:N ── OrderItem

Product
  │
  └── 1:N ── OrderItem
```

### Entity Detail

Product
Fields:

id, name, slug, price, weight_grams, stock, short_description, description, ingredients, scent_notes, image_path, is_active.
Constraints:

slug must be unique. weight_grams cannot be null.

Order
Fields:

id, order_number, user_id, fulfillment_type (enum), payment_method, payment_status, order_status, total_product_price, shipping_cost, grand_total, courier_name, tracking_number, shipping_receipt_image, pickup_code, midtrans_snap_token.
Constraints:

order_number must be unique.

## 14. Status & Lifecycle
Allowed transitions for Delivery:

pending → processing (Triggered by Midtrans Webhook)

processing → shipped (Admin inputs tracking)

shipped → completed (Customer confirms receipt)

Allowed transitions for Pick-up:

ready_for_pickup → completed (Admin confirms payment & collection at store)

Payment statuses:

unpaid (For Pick-up)

pending (Awaiting Midtrans)

paid (Confirmed)

failed / expired (Midtrans timeout)

## 15. Payments

Required: YES
Method: Gateway & Cash/EDC
Provider: Midtrans (Core API / Snap)

Rules:

Delivery orders MUST be paid online via Midtrans.

Pick-up orders MUST bypass Midtrans and be paid at the physical location.

## 16. Notifications

Customer:

Email: Order Confirmation, Payment Received, Order Shipped (with tracking details).

Admin:

Email/Dashboard Alert: New Order Received, New Payment Verified.

Channels:

email

## 17. Search & Filtering

Search: YES
Fields:

product name, ingredients, scent_notes

Filters:

Category

Fulfillment availability

Sorting:

Price (Low-High), Newest

## 18. File Uploads

Required: YES
Types: Images (JPG, PNG, WEBP)
Maximum size: 100MB
Storage: PUBLIC
Access rules:

Admin only (for product images and manual shipping receipt uploads).

## 19. API Requirements

API required: NO (for MVP front-end/mobile app).

No API is required for the MVP. Use Laravel server-rendered functionality where appropriate.
(Exception: Incoming Webhook API for Midtrans).

## 20. External Integrations

  Integration   Purpose       Required
  ------------- ------------- ------------
  `[Midtrans]`   `[Process online payments (Snap) & verify status (Webhook)]`   `[YES]`

Never put real credentials or secrets here.

## 21. Business Rules

1.  `[Cart weight must be rounded up to the nearest Kilogram for shipping calculation (e.g., 1200g = 2kg)]`
2.  `[If a customer selects "Pay at Location", the shipping cost is strictly forced to 0]`
3.  `[RULEProducts with 0 stock cannot be added to the cart or checked out.]`

All important rules must be enforced server-side.

## 22. Security

Required:

CSRF

authentication

authorization (Admin middleware)

validation

secure password storage

## 23. SEO

SEO required: `[YES]`

Requirements: - title - meta description - canonical - sitemap -
robots.txt - Open Graph - structured data where appropriate

Target keywords: - `[Beauty products in Lombok, Spa products Lombok, Natural beauty products Lombok, Beauty store Lombok, Skincare Lombok, Body care Lombok, Lombok beauty products, Natural spa products Indonesia]`

## 24. Performance

Important pages:

Product Catalog

Checkout Page

Consider:

Image optimization (WebP format for product galleries).

Database indexing on slug and order_number.

## 25. Reporting & Analytics

Required: YES
Metrics:

Total Sales (divided by Fulfillment Type)

Top Selling Products

## 26. Audit & History

Required: YES

Track: order status changes (timestamp columns: paid_at, shipped_at)

status changes

important updates

financial actions

administrative actions

## 27. MVP Scope

Must Have
Product Catalog with ingredients/scent notes.

Dual fulfillment checkout (Pickup vs Delivery).

Manual shipping rate calculation based on weight.

Midtrans Snap integration.

Admin dashboard to manage orders and input manual tracking receipts.

Out of Scope
RajaOngkir / Biteship real-time integration.

Multi-currency checkout processing (transactions will be strictly IDR).

## 28. Future Versions

V2
Currency display converter (USD/EUR) on frontend.

Reviews and ratings.

## 29. Acceptance Criteria

The MVP is successful when: A customer can successfully generate a pickup code without being charged shipping.

A customer can successfully pay via Midtrans for a delivery order, with shipping correctly calculated based on admin's manual rates.

Midtrans webhook automatically updates the order status to processing.

## 30. Development Phases

### Phase 0 --- Discovery

-   inspect project
-   read PRD
-   architecture plan
-   identify ambiguities

### Phase 1 --- Foundation

-   configuration
-   authentication
-   roles
-   base database
-   authorization

### Phase 2 --- Core Data

-   migrations
-   models
-   relationships
-   seeders

### Phase 3 --- Core Feature

-   `[Shopping Cart & Checkout logic (Shipping calculation vs Free Pickup).]`

### Phase 4 --- Operations

-   admin
-   user
-   workflows

### Phase 5 --- Integrations

-   `[Admin panel (manage products, update order status to shipped, upload receipt images).]`

### Phase 6 --- UI Polish

-   responsive design
-   accessibility
-   visual refinement
-   SEO

### Phase 7 --- Testing

-   feature tests
-   unit tests
-   authorization tests
-   edge cases

### Phase 8 --- Production Readiness

-   environment configuration
-   caching
-   queues
-   storage
-   backups
-   monitoring
-   security review

## 31. Open Questions

-   `[Should the manual shipping zones be based purely on Province, or drilled down to City/Regency level for the MVP?]`

-   `[Are the provided Midtrans Sandbox credentials (Merchant ID: G395528357) ready to be added to the .env.example repository setup?]` Yes

Do not invent answers without confirmation.

## 32. Definition of Done

The product is ready when: - MVP acceptance criteria pass - important
business logic is tested - authorization is verified - validation is
implemented - mobile and desktop interfaces work - important error/empty
states exist - production security is reviewed - environment variables
are documented - no secrets are committed - migrations work from a clean
database - production build succeeds - known issues are documented
