Inspiration
Independent and growing merchants often juggle disconnected tools for inventory, customer tracking, spreadsheets, and marketing leaving valuable revenue insights trapped in raw data. We wanted to build an autonomous, all in one command center that acts like a 24/7 data analyst and growth strategist for everyday merchants.
What it does
Merchant Growth AI is a full-stack business intelligence and operations platform designed to help merchants manage and scale their stores effortlessly:
- Dynamic KPI Dashboard (
/): Real-time calculation of Total Revenue, Orders, New Customers, Average Order Value (AOV), and Gross Margin from live transactions, paired with an algorithmic AI Growth Score (0–100) evaluating sales velocity, retention, inventory health, and basket size. - Product Catalog & Inventory (
/products): Full CRUD management with automated low-stock (≤5) and out-of-stock alerts, profit margin calculations, and dynamic per-product revenue tracking. - Automated CRM (
/customers): Behavioral cohort segmentation (New, Returning, Loyal, High Value, At Risk) with full order history drawers. - Transactions Ledger (
/transactions): Multi-line-item sales recording across multiple payment methods (Card, Cash, UPI, Bank Transfer, Stripe) with cascading updates that automatically decrement stock and recalculate store analytics. - AI Marketing Center (
/campaigns): Generative AI copywriting tailored by tone, product, and incentive offer for Instagram, WhatsApp, Email, and SMS. - 24/7 AI Growth Assistant (
/assistant): A contextual business advisor aware of live store metrics, top-performing products, margins, and churn risks. - Multi-Dimensional Analytics & Growth Sprints (
/analytics,/growth-plan,/reports): Revenue velocity forecasting, weekday sales heatmaps, customer retention curves, prioritized growth sprint boards, and one-click CSV/print business reports.
How we built it
- Backend & Database: Engineered a production PostgreSQL schema on Supabase covering
profiles,merchants,products,customers,transactions,campaigns,growth_tasks,notifications,ai_conversations, andbusiness_settings. - Security & Data Isolation: Implemented strict Row Level Security (RLS) policies (
auth.uid() = user_id) so every merchant's operational data remains completely isolated, alongside a sandboxed Demo Mode for risk-free walkthroughs. - Frontend & Onboarding: Built a responsive web application featuring real authentication, a 4-step interactive merchant onboarding flow, Light/Dark mode support, and dynamic data visualizations.
Challenges we ran into
- Cascading State & Data Integrity: Ensuring that recording or refunding a multi-item transaction atomically updates product inventory, customer lifetime spend, cohort tags, revenue time-series, and AI recommendations without race conditions.
- Zero-State Experience: Designing a guided onboarding and empty-state experience so brand-new merchants aren't overwhelmed by blank charts before logging their first sale.
Accomplishments that we're proud of
- Replacing static mockups with a 100% live, zero hardcoded-data architecture backed by PostgreSQL and Row Level Security.
- Building an AI Growth Assistant and Marketing Generator grounded directly in each merchant's live catalog and transaction metrics rather than generic prompts.
What we learned
- Structuring relational database schemas with RLS from day one simplifies multi-tenant security and keeps frontend state clean.
- Combining deterministic metrics (margins, stock thresholds, cohort rules) with generative AI creates far more actionable business advice than relying on LLMs alone.
What's next for Merchant Growth AI
- Direct two-way integrations with POS systems, Shopify, and PayPal/Stripe webhooks for automated real-time transaction syncing.
- Automated one click campaign dispatching directly via WhatsApp Business and Email APIs.
Built With
- chart.js
- nextjs
- postgresql
- sql
- stripe
- supabase
- typescript