Admin Documentation
How to Add New Products
To add new products to the catalog, you'll need to edit the product data file and upload media files to Cloudflare R2.
Step 1: Upload Media to R2
- Log in to your Cloudflare dashboard
- Navigate to R2 Object Storage
- Open your
product-catalog-mediabucket - Create a folder structure:
category/SKU/ - Upload images (JPG, PNG) and videos (MP4) to the SKU folder
- Make note of the public URLs for each file
Step 2: Update Product Data
Edit the file: data/products.json
{
"sku": "SAR-003",
"category": "Saree",
"name": "Banarasi Silk Saree",
"description": "Traditional Banarasi silk saree with zari work...",
"images": [
"https://media.example.com/saree/SAR-003/image1.jpg",
"https://media.example.com/saree/SAR-003/image2.jpg",
"https://media.example.com/saree/SAR-003/image3.jpg"
],
"videos": [
"https://media.example.com/saree/SAR-003/video1.mp4"
]
}Step 3: Deploy Changes
- Commit the changes to your Git repository
- Push to the main branch
- Cloudflare Pages will automatically rebuild and deploy
- Your new products will be live in 1-2 minutes
Product Data Structure
| Field | Type | Description |
|---|---|---|
sku | string | Unique product identifier (e.g., "SAR-001") |
category | string | One of: Saree, Bangles, Necklace, Earrings, Mens Wear |
name | string | Product display name |
description | string | Detailed product description for SEO |
images | array | Array of image URLs from R2 |
videos | array | Array of video URLs from R2 (optional) |
SKU Naming Convention
Use the following prefixes for SKU codes:
- SAR- for Saree (e.g., SAR-001, SAR-002)
- BAN- for Bangles (e.g., BAN-001, BAN-002)
- NEC- for Necklace (e.g., NEC-001, NEC-002)
- EAR- for Earrings (e.g., EAR-001, EAR-002)
- MEN- for Mens Wear (e.g., MEN-001, MEN-002)
Use sequential numbers starting from 001. This helps maintain organization and makes it easy to identify product categories.
📋 Quick Checklist
- ✅Images uploaded to R2 in correct folder structure
- ✅Image and video URLs are publicly accessible
- ✅SKU is unique and follows naming convention
- ✅Category matches one of the five available categories
- ✅Description is detailed and SEO-friendly
- ✅JSON syntax is valid (no missing commas or brackets)
- ✅Changes committed and pushed to repository