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

  1. Log in to your Cloudflare dashboard
  2. Navigate to R2 Object Storage
  3. Open your product-catalog-media bucket
  4. Create a folder structure: category/SKU/
  5. Upload images (JPG, PNG) and videos (MP4) to the SKU folder
  6. 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

  1. Commit the changes to your Git repository
  2. Push to the main branch
  3. Cloudflare Pages will automatically rebuild and deploy
  4. Your new products will be live in 1-2 minutes

Product Data Structure

FieldTypeDescription
skustringUnique product identifier (e.g., "SAR-001")
categorystringOne of: Saree, Bangles, Necklace, Earrings, Mens Wear
namestringProduct display name
descriptionstringDetailed product description for SEO
imagesarrayArray of image URLs from R2
videosarrayArray 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