prompts-data-productstage
v1.0.0
Published
Professional AI product photography prompts for various product categories. Curated templates for e-commerce, Etsy, Shopify, and online stores. Learn more at https://productstage.ai
Maintainers
Readme
@productstage/prompts-data
Professional AI product photography prompts library for e-commerce and online stores. This package contains curated prompt templates designed for various product categories, optimized for AI image generation platforms like Midjourney, Stable Diffusion, and DALL-E.
Features
- 29 Product Categories: From jewelry and watches to furniture and handmade items
- 100+ Prompt Templates: Carefully crafted professional photography prompts
- Flexible Querying: Filter by category, variant, keywords, and more
- TypeScript Support: Full type definitions included
- Easy Integration: Simple API for quick implementation
Installation
npm install @productstage/prompts-dataUsage
Basic Usage
import {
getAllCategories,
getPromptsWithCategories,
formatPrompt
} from '@productstage/prompts-data';
// Get all categories
const categories = getAllCategories();
console.log(`Available categories: ${categories.length}`);
// Get prompts with category information
const prompts = getPromptsWithCategories({ activeOnly: true });
console.log(`Total active prompts: ${prompts.length}`);
// Format a prompt with category names
const formattedPrompt = formatPrompt(prompts[0]);
console.log(formattedPrompt);Filter by Category
import { getPromptsByCategoryId } from '@productstage/prompts-data';
// Get prompts for jewelry (category ID 11)
const jewelryPrompts = getPromptsByCategoryId(11);
jewelryPrompts.forEach(prompt => {
console.log(`${prompt.variant}: ${prompt.template}`);
});Advanced Querying
import { getPromptsWithCategories } from '@productstage/prompts-data';
// Get all hero prompts for jewelry
const heroPrompts = getPromptsWithCategories({
mainCategory: 'jewelry',
variant: 'Hero',
activeOnly: true
});
// Get prompts for specific subcategory
const necklacePrompts = getPromptsWithCategories({
subCategory: 'necklace',
activeOnly: true
});
// Find categories by keyword
import { findCategoriesByKeyword } from '@productstage/prompts-data';
const handmadeCategories = findCategoriesByKeyword('handmade');Random Prompts
import { getRandomPrompts, getRandomPromptsByCategory } from '@productstage/prompts-data';
// Get 5 random prompts
const randomPrompts = getRandomPrompts(5);
// Get 3 random prompts for watches
const randomWatchPrompts = getRandomPromptsByCategory(8, 3);Custom Formatting
import { formatPromptWithNames } from '@productstage/prompts-data';
// Use a prompt template with custom product names
const prompt = {
id: 1,
productCategoryId: 7,
template: '{main_category} {sub_category} on a marble surface...',
variant: 'Custom',
isActive: true
};
const customPrompt = formatPromptWithNames(
prompt,
'luxury watch',
'gold automatic'
);
console.log(customPrompt);
// Output: "luxury watch gold automatic on a marble surface..."API Reference
Functions
getAllCategories(): ProductCategory[]
Returns all available product categories.
getCategoryById(id: number): ProductCategory | undefined
Returns a category by its ID.
findCategoriesByMainCategory(mainCategory: string): ProductCategory[]
Finds categories by main category name (case-insensitive).
findCategoriesByKeyword(keyword: string): ProductCategory[]
Finds categories matching a keyword in main category, subcategory, or keywords array.
getAllPrompts(): ProductPrompt[]
Returns all prompt templates.
getPromptsWithCategories(options?: PromptQueryOptions): PromptWithCategory[]
Returns prompts with category information, optionally filtered.
Options:
categoryId?: number- Filter by category IDmainCategory?: string- Filter by main category namesubCategory?: string- Filter by subcategory namevariant?: string- Filter by variant name (partial match)activeOnly?: boolean- Return only active promptskeywords?: string[]- Filter by category keywords
getPromptsByCategoryId(categoryId: number, activeOnly?: boolean): ProductPrompt[]
Returns all prompts for a specific category.
getRandomPrompts(count: number, activeOnly?: boolean): ProductPrompt[]
Returns random prompts from the collection.
getRandomPromptsByCategory(categoryId: number, count: number, activeOnly?: boolean): ProductPrompt[]
Returns random prompts for a specific category.
formatPrompt(prompt: ProductPrompt): string
Formats a prompt template by replacing {main_category} and {sub_category} placeholders with actual category names.
formatPromptWithNames(prompt: ProductPrompt, mainCategory: string, subCategory?: string): string
Formats a prompt template with custom category names.
Data Structure
ProductCategory
interface ProductCategory {
id: number;
mainCategory: string;
subCategory: string | null;
keywords: string[];
}ProductPrompt
interface ProductPrompt {
id: number;
productCategoryId: number;
template: string;
variant: string;
isActive: boolean;
}PromptWithCategory
interface PromptWithCategory extends ProductPrompt {
category: ProductCategory;
}Supported Categories
The package includes prompts for the following product categories:
- Bags: Shoulder bags, handbags
- Furniture: Lounge chairs, home furniture
- Apparel: Hats, clothing
- Accessories: Fashion accessories
- Shoes: Hiking boots, footwear
- Watches: Bracelet watches, timepieces
- Jewelry: Necklaces, bracelets, rings, earrings
- Handmade: Ceramics, textiles, leather goods, woodwork
- Household: Cleaning brushes, home items
- Beauty Tools: Face mask bowls, cosmetic tools
- Kitchenware: Cutting boards, cookware
- Home Decor: Decorative bowls, vases
- Lighting: Wall sconces, fixtures
- Home Organization: Bookends, storage
- Headwear: Caps, hats
- Clothing: Men's shirts
- Toys: Wooden models, playthings
- Home Appliances: Humidifiers, electronics
- Electronics: Headphones, tech accessories
Use Cases
- E-commerce Product Photography: Generate professional product images for online stores
- Etsy Sellers: Create lifestyle shots for handmade items
- Shopify Store Owners: Produce consistent product imagery
- Amazon Sellers: Generate compliant product photos
- Digital Marketers: Create promotional product content
- Design Agencies: Quick prototyping for product photography concepts
Examples
Generate Product Images with AI
import { getPromptsByCategoryId, formatPrompt } from '@productstage/prompts-data';
// Get prompts for necklace
const necklacePrompts = getPromptsByCategoryId(11);
const selectedPrompt = necklacePrompts[0];
// Format and use with AI image generation
const aiPrompt = formatPrompt(selectedPrompt);
console.log(aiPrompt);
// Now use aiPrompt with your preferred AI image generation API
// e.g., OpenAI DALL-E, Stability AI, Midjourney, etc.Build a Product Photography Generator
import {
getAllCategories,
getRandomPromptsByCategory
} from '@productstage/prompts-data';
function generateProductImage(categoryName: string) {
const categories = getAllCategories();
const category = categories.find(c =>
c.mainCategory.toLowerCase() === categoryName.toLowerCase()
);
if (!category) {
throw new Error('Category not found');
}
const prompt = getRandomPromptsByCategory(category.id, 1)[0];
return prompt.template
.replace(/{main_category}/g, category.mainCategory)
.replace(/{sub_category}/g, category.subCategory || '');
}
// Usage
const imagePrompt = generateProductImage('jewelry');License
MIT
Author
ProductStage.ai - Professional AI Product Photography Tools
Links
Contributing
We welcome contributions! If you have improvements or new prompt templates, please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Support
For issues, questions, or suggestions, please open an issue on GitHub or visit ProductStage.ai.
