v2.0
Setup Required
Go to Admin Panel → System Settings → AI Settings. Enter your Anthropic API key, enable the master switch, then toggle individual features. Database-only features (Recommendations, Delivery ETA, Pricing, Forecasting) work without an API key.

Phase 1 — Product AI Tools

AI tools integrated directly into admin and vendor product add/edit forms. Available on web panel and Flutter vendor/store apps.

AI Product Descriptions

Click "Generate with AI" next to the description field. Claude generates an SEO-optimized 80-150 word description from the product name, category, and price.

TriggerButton on product add/edit form
InputProduct name, category, price
OutputPlain text description (2-3 paragraphs)
API Key RequiredYes (Claude)
PlatformsAdmin Panel, Vendor Panel, Vendor App (v3), Store App (v4)

Auto-Categorization

Click "AI Suggest" next to the category dropdown. Claude analyzes the product name against all available categories and auto-selects the best match.

TriggerButton on product form, next to category
InputProduct name + category tree
Outputcategory_id + sub_category_id (auto-selects dropdowns)
API Key RequiredYes (Claude)

Auto Image Tagging

Click "AI Tags" in the SEO section after uploading a product thumbnail. Claude Vision analyzes the image and generates 5-10 relevant SEO keywords.

TriggerButton in SEO section of product form
InputProduct thumbnail image + name
OutputArray of SEO tags → populates meta fields
API Key RequiredYes (Claude Vision)

AI Meta Description

Click "Generate with AI" next to the meta description field. Generates a 160-character SEO meta description from the product name and category.

TriggerButton next to meta description textarea
OutputPlain text, max 160 chars
API Key RequiredYes (Claude)

Phase 2 — Customer Experience

AI features that enhance the shopping experience for customers on the website and mobile app.

Shopping Assistant Chatbot

Floating chat widget on the storefront (bottom-left corner). Customers can search products, track orders, and get store info via natural conversation.

LocationAll 3 themes (Classic, Modern, Semi-Classic)
Intent Detectionproduct_search, order_tracking, store_info, greeting, general
Product SearchReturns product cards with images, prices, and links
Order TrackingShows order status, payment, amount, date (requires login)
API Key RequiredYes (Claude)
API EndpointPOST /api/v1/ai/chatbot

Review Summarization

AI generates a 2-3 sentence summary of all customer reviews, shown at the top of the Reviews tab. Cached for 24 hours, auto-invalidates on new reviews.

Minimum Reviews3 reviews required to generate summary
Cache Duration24 hours
DisplayGreen card above individual reviews
API Key RequiredYes (Claude)
API EndpointGET /api/v1/ai/review-summary/{productId}

Background Removal

One-click product image background removal using remove.bg API. Replaces busy backgrounds with clean white for professional product photos.

External APIremove.bg (API key required)
Max Image Size5MB
OutputPNG with white background
SetupEnter remove.bg API key in AI Settings

Phase 3 — Smart Commerce

Intelligent search and recommendation systems that boost discovery and conversions.

Smart NLP Search

Customers search naturally: "blue cotton shirt under 500 for men". Claude parses the query into structured filters (keywords, price range, color, brand, category, sort order).

InputNatural language search query (max 200 chars)
Parsed Filterskeywords, min_price, max_price, color, brand, category, sort
Cache5 minutes per unique query
FallbackRegular keyword search if AI disabled
API Key RequiredYes (Claude)
API EndpointPOST /api/v1/ai/smart-search

Product Recommendations Engine

Four recommendation algorithms — all database-driven (no AI API calls). Displayed on product detail pages and homepage across all 3 themes.

Frequently Bought TogetherCo-purchase analysis from order history
Similar ProductsSame category + similar price range
Trending NowMost ordered products in last 7 days
PersonalizedBased on customer's purchase history categories
Cache30-60 minutes
API Key RequiredNo (database queries only)
API EndpointsGET /api/v1/ai/recommendations/fbt/{id}
GET /api/v1/ai/recommendations/similar/{id}
GET /api/v1/ai/recommendations/trending
GET /api/v1/ai/recommendations/personalized

Phase 4 — Business Intelligence

AI-powered pricing, delivery prediction, and discount optimization tools for smarter business decisions.

Smart Delivery ETA

Predicts delivery time based on historical order data, haversine distance, vendor performance, and day-of-week patterns. Shown on product detail page for all 3 themes.

Logged-in UsersUses saved shipping address (server-side, instant)
Guest UsersBrowser geolocation prompt (client-side AJAX)
Distance Factors<5km: 0.8x, <20km: 1.0x, <50km: 1.3x, <200km: 1.6x, >200km: 2.0x
Weekend FactorSaturday/Sunday: 1.15x slower
Display"1-2 Days (18.6 km away)" in green
API Key RequiredNo (historical data + math)
API EndpointPOST /api/v1/ai/delivery-eta

Pricing Suggestions

Click "AI Price" on the product form. Analyzes all products in the same category and returns median price, average, min/max range, and competitive range (P25-P75).

TriggerButton next to unit price field
OutputSuggested price, average, range, competitor count
Auto-fillFills unit price field if empty
API Key RequiredNo (database queries only)

Discount Optimizer

Analyzes product metrics (views, sales, conversion rate, stock levels, days since last sale) and suggests an optimal discount percentage. Uses Claude API or falls back to rule-based engine.

Metrics AnalyzedViews, sales, conversion %, stock, days listed, days since last sale
OutputSuggested discount (0-50%), reasoning, urgency level
FallbackRule-based engine if no API key
API Key RequiredOptional (works without, better with)

Phase 5 — Advanced Features

Visual search, sales forecasting, and fraud detection for enterprise-grade intelligence.

Visual Search

Customer uploads a photo → Claude Vision identifies the product type, color, material, and style → searches the catalog for matching products.

InputProduct photo (JPEG/PNG/WebP, max 5MB)
AI AnalysisProduct type, color, material, style, search query
OutputUp to 12 matching products
API Key RequiredYes (Claude Vision)
API EndpointPOST /api/v1/ai/visual-search

Sales Forecasting Dashboard

Admin page showing 7-day revenue and order predictions with growth trends, daily breakdown table, and low-stock alerts. Uses moving averages and seasonal patterns.

LocationAdmin Panel → System Settings → Sales Forecast
PredictionsRevenue, orders, growth rate per day
Stock AlertsProducts predicted to run out within 7 days
Data SourceLast 30 days of order history
Cache30 minutes
API Key RequiredNo (historical data analysis)

Fraud Detection

Scores every order on 7 risk factors and flags suspicious orders for admin review. Accessible from Admin Panel sidebar.

LocationAdmin Panel → System Settings → Fraud Alerts
Risk Factors (7)New account + high value, multiple addresses, amount anomaly, unusual hours (2-5AM), guest + high value, rapid repeat orders, mismatched billing/shipping
Scoring0-100 score → Low (<25), Medium (25-49), High (50+)
Scan RangeLast 72 hours of orders
API Key RequiredNo (rule-based scoring)

API Reference

All AI features are available via REST API for Flutter mobile apps.

Customer App (v1) — /api/v1/ai/

MethodEndpointAuthPurpose
POST/ai/chatbotOptionalShopping assistant chat
GET/ai/review-summary/{productId}NoAI review digest
POST/ai/smart-searchNoNatural language search
POST/ai/visual-searchNoImage-based product search
GET/ai/recommendations/fbt/{id}NoFrequently bought together
GET/ai/recommendations/similar/{id}NoSimilar products
GET/ai/recommendations/trendingNoTrending products
GET/ai/recommendations/personalizedOptionalPersonalized picks
POST/ai/delivery-etaNoPredict delivery time

Vendor App (v3) — /api/v3/seller/ai/

MethodEndpointAuthPurpose
GET/ai/statusSellerGet AI feature toggles
POST/ai/generate-descriptionSellerGenerate product description
POST/ai/suggest-categorySellerAuto-categorize
POST/ai/generate-tagsSellerGenerate tags from image
POST/ai/suggest-pricingSellerCompetitive pricing
POST/ai/suggest-discountSellerDiscount recommendation

Store App (v4) — /api/v4/ai/

MethodEndpointAuthPurpose
GET/ai/statusNoGet AI feature toggles
POST/ai/generate-descriptionStoreGenerate product description
POST/ai/suggest-categoryStoreAuto-categorize
POST/ai/generate-tagsStoreGenerate tags from image
POST/ai/suggest-pricingStoreCompetitive pricing
POST/ai/suggest-discountStoreDiscount recommendation

AI Settings Configuration

SettingDefaultDescription
ai_features_enabledOFFMaster switch for all AI features
ai_anthropic_api_keyClaude API key from console.anthropic.com
ai_removebg_api_keyremove.bg API key (background removal only)
ai_product_descriptionOFFAI product descriptions
ai_auto_categorizationOFFAuto-categorization
ai_auto_taggingOFFAuto image tagging
ai_review_summaryOFFReview summarization
ai_background_removalOFFBackground removal
ai_chatbotOFFShopping assistant chatbot
ai_smart_searchOFFNLP smart search
ai_recommendationsON*Product recommendations (* works without API key)
ai_visual_searchOFFVisual search
ai_fraud_detectionOFFFraud detection alerts

Cost Estimation

FeatureAPI Calls/Day (Est.)Monthly Cost (Est.)
Product Descriptions10-50$2-10
Auto-Categorization10-50$1-5
Auto-Tagging (Vision)10-50$3-15
Review Summarization5-20$2-8
Chatbot50-500$10-100
Smart Search50-500$5-50
Visual Search (Vision)10-50$3-15
Discount Optimizer5-20$1-3
Recommendations$0 (no API calls)
Delivery ETA$0 (no API calls)
Sales Forecast$0 (no API calls)
Fraud Detection$0 (no API calls)
Total$27-206/month

Background Removal uses remove.bg API: $0.20/image (first 50 free/month).