Byapari AI Documentation
Everything judges and developers need to understand the platform — architecture, APIs, the ML stack, and how to get started.
What is Byapari AI
Byapari AI is an AI-powered business intelligence platform designed for Bangladeshi merchants — upload your sales CSV and instantly receive KPIs, a 30-day Prophet forecast, AI-generated recommendations, a dynamic pricing engine, and a full business health score. Built for Infinity AI BuildFest 2026 by Team Nexion, it combines a FastAPI backend with a Next.js frontend to deliver real-time insights with zero manual configuration.
ব্যাপারী AI বাংলাদেশি ব্যবসায়ীদের জন্য একটি এআই-চালিত বিজনেস ইন্টেলিজেন্স প্ল্যাটফর্ম — আপনার সেলস CSV আপলোড করুন এবং সাথে সাথে পান KPI, ৩০-দিনের বিক্রয় পূর্বাভাস, AI পরামর্শ, ডাইনামিক প্রাইসিং ইঞ্জিন এবং সম্পূর্ণ বিজনেস হেলথ স্কোর। টিম নেক্সিয়নের তৈরি এই প্ল্যাটফর্ম ব্যবহারকারীকে কোনো কনফিগারেশন ছাড়াই রিয়েল-টাইম ব্যবসায়িক অন্তর্দৃষ্টি দেয়।
How It Works
Three steps from raw CSV to actionable business intelligence.
dateproduct_nameproduct_categorysalesprofitquantityratingreturnedstockpayment_methodcustomer_cityAPI Reference
REST endpoints accepting and returning JSON.
/api/ai-insightsFull AI analysis: KPIs, insights, health score, forecast, RAG tips/api/pricing-suggestionsPer-product dynamic pricing suggestions with priority ranking/uploadUpload CSV file (multipart/form-data), returns parsed data + quick KPIs/healthBackend health check — used by frontend connection indicator/api/ai-insightsRequest body (Content-Type: application/json):
{
"csv_data": [
{
"date": "2025-01-01",
"product_name": "Samsung Galaxy A54",
"product_category": "Electronics",
"sales": 1250000,
"profit": 312500,
"quantity": 5,
"rating": 4.8,
"returned": "No",
"stock": 15,
"payment_method": "Mobile Banking",
"customer_city": "Dhaka"
}
],
"lang": "en"
}Response (200 OK):
{
"insights": [
{
"type": "warning",
"title": "Low Stock Alert",
"message": "Samsung Galaxy A54 has only 15 units — reorder urgently.",
"priority": "high",
"confidence": 0.91
},
{
"type": "growth",
"title": "Top Performer Identified",
"message": "Galaxy A54 leading revenue with ৳1,250,000 in sales.",
"priority": "low",
"confidence": 0.85
}
],
"rag_recommendations": [
{
"id": "tip_12",
"text": "রমজান মাসে ইলেকট্রনিক্স পণ্যের চাহিদা ৩০% বাড়ে — আগে স্টক করুন।",
"category": "seasonal",
"relevance": 0.78
}
],
"health_score": 82,
"top_performer": { "product": "Samsung Galaxy A54", "revenue": 1250000 },
"worst_performer": null,
"forecast": [
{ "date": "2025-02-01", "predicted_sales": 1312500, "lower_bound": 1150000, "upper_bound": 1475000 }
],
"period_analyzed": "2025-01-01 to 2025-01-31",
"confidence": 0.87,
"data_points": 1,
"generated_at": "2025-01-31T14:32:00"
}/api/pricing-suggestionsResponse (200 OK):
{
"suggestions": [
{
"product": "Samsung Galaxy A54",
"suggestion": "increase_price",
"reason": "scarcity_premium",
"price_change_percent": 10,
"priority": "high",
"display_text": "Increase price by 10% — low stock with strong demand",
"current_metrics": {
"total_sales": 1250000,
"profit_margin": 25.0,
"avg_rating": 4.8,
"return_rate": 0.0,
"stock_days_remaining": 3.0,
"velocity": 41.67
}
}
],
"summary": {
"total_opportunities": 1,
"revenue_at_risk": 1250000,
"potential_uplift": 125000,
"top_priority": "Samsung Galaxy A54",
"stable_products": 0,
"total_products": 1
},
"generated_at": "2025-01-31T14:32:00"
}Architecture
Fully serverless architecture: Next.js frontend on Vercel, FastAPI backend on Railway.
Frontend Stack
Backend Stack
RAG Knowledge Base
Retrieval-Augmented Generation featuring 35 hand-curated Bengali business intelligence tips.
Byapari AI ships with 35 hand-curated Bengali business tips retrieved by a lightweight keyword-matching engine. When you upload your CSV, the system builds a context string from your business situation, scores it against the knowledge base, and surfaces the 3 most relevant tips — zero model downloads, instant startup, zero per-request API cost. Retrieved tips are injected into the LLM prompt as grounding context alongside knowledge-graph facts, your merchant profile, and live market signals.
How retrieval works
Tip categories
"রমজান মাসে ইলেকট্রনিক্স ও ফ্যাশন পণ্যের চাহিদা ৩০-৪০% বৃদ্ধি পায় — ঈদের ৩ সপ্তাহ আগে স্টক বাড়ান এবং বিশেষ বান্ডেল অফার তৈরি করুন।"
Translation: "Electronics and fashion demand rises 30-40% in Ramadan — stock up 3 weeks before Eid and create bundle deals."
Sample CSV
Use this to test the platform instantly — 10 rows, all required columns.
date,product_name,product_category,sales,profit,quantity,rating,returned,stock,payment_method,customer_city
2025-01-01,Cats Eye Jeans,Fashion,202608,64023.51,28,4.2,No,252,Cash on Delivery,Comilla
2025-01-03,Bashundhara Tissue Box,Home & Kitchen,669935,260869.93,35,4.6,No,221,Bank Transfer,Rangpur
2025-01-04,Awei Bluetooth Headset,Mobile Accessories,327761,121497.59,49,4.1,No,318,Bank Transfer,Chittagong
2025-01-09,Kiam Pressure Cooker,Home & Kitchen,370790,75429.26,35,4.5,No,64,Bank Transfer,Chittagong
2025-01-12,Samsung Galaxy A54,Electronics,1250000,312500.00,5,4.8,No,15,Mobile Banking,Dhaka
2025-01-15,Nike Running Shoes,Fashion,450000,135000.00,12,4.3,Yes,88,Cash on Delivery,Sylhet
2025-01-18,Walton Refrigerator,Home Appliances,980000,196000.00,3,4.7,No,22,Bank Transfer,Dhaka
2025-01-20,RFL Plastic Chair,Furniture,45000,13500.00,60,3.9,No,400,Cash on Delivery,Mymensingh
2025-01-22,Singer Sewing Machine,Home Appliances,320000,80000.00,8,4.4,No,35,Mobile Banking,RajshahiTip: The platform auto-detects and handles missing values, inconsistent casing in the returned column (Yes/yes/YES/1/true), and date format variations. Minimum 3 rows per product for pricing analysis.