SuperMartGPT is a full-stack AI prototype designed to modernize local supermarkets and confectionary stores—especially in linguistically diverse regions like India. It bridges the gap between traditional retail and modern AI by enabling text/voice interactions in regional languages, generating smart product recommendations, processing orders, and delivering actionable sales analytics to store owners.
┌─────────────┐ Voice/Text ┌───────────────┐ ┌───────────────┐
│ Customer ├────────────────►│ ├─────────────────►│ OpenAI APIs │
│ (Web UI) │ │ Next.js │ (Recs & NLP) │ (GPT-4o-mini) │
└──────┬──────┘ │ App Router │◄─────────────────┤ (Whisper) │
│ │ │ └───────────────┘
│ └───────┬───────┘
│ (OTP Login) │ (Orders & Analytics)
▼ ▼
┌─────────────┐ ┌───────────────┐ ┌───────────────┐
│ Supabase │ │ Supabase (DB) │ Read-Only │ Store Owner │
│ Auth System │ │ PostgreSQL ├─────────────────►│ (Dashboard) │
└─────────────┘ └───────────────┘ └───────────────┘
- The Problem vs. The Solution
- Key Features
- AI Integration (OpenAI)
- Tech Stack 5.Quick Start (Local Development)
- Authentication & Security
| The Problem (Local Supermarkets) | The SuperMartGPT Solution |
|---|---|
| Language Barriers: Communication gaps between diverse customers and staff. | Multilingual Chat & Voice: Native support for 8+ regional Indian languages. |
| No Product Discovery: Customers struggle to find specific or new items. | AI Recommendations: Smart, inventory-aware product suggestions. |
| Blind Operations: Store owners lack visibility into daily sales trends. | Admin Dashboard: Real-time revenue and top-selling product analytics. |
| Manual Ordering: Inefficient, error-prone, and leads to lost revenue. | Automated Cart: Customers manage carts and receive unique Order IDs. |
- Multilingual Chat: Seamless interaction in English, Hindi, Tamil, Telugu, Kannada, Malayalam, Bengali, and Marathi.
- Voice-to-Text Querying: Speak naturally to search for products instead of typing.
- Personalized AI Recommendations: Suggests complementary items based on current queries.
- Smart Shopping Cart: Easily add/remove items and securely place orders (generates a unique Order ID).
- User Authentication: Checkout is restricted to verified (logged-in) users only.
- Sales Analytics Dashboard: A password-protected hub for store owners.
- Revenue Tracking: Visualizes total revenue and units sold (utilizing both real orders and demo datasets).
- Top Sellers: Automatically identifies and ranks best-selling inventory.
SuperMartGPT relies heavily on OpenAI to provide a seamless, latency-optimized user experience while remaining highly cost-efficient.
| AI Task | OpenAI Model | Rationale |
|---|---|---|
| Chatbot & Reasoning | GPT-4o-mini |
Fast, affordable, and highly capable of contextual reasoning. |
| Multilingual Translation | GPT-4o-mini |
High accuracy across regional Indian dialects. |
| Product Recommendations | GPT-4o-mini |
Understands purchase intent to cross-sell/up-sell items. |
| Analytics Summaries | GPT-4o-mini |
Synthesizes raw DB sales data into plain-text admin insights. |
| Voice-to-Text Input | Whisper API |
Industry-leading speech recognition for noisy retail environments. |
- Frontend: Next.js (App Router), React, Tailwind CSS
- Backend: Next.js API Routes (Serverless)
- AI & NLP: OpenAI API (GPT-4o-mini, Whisper)
- Database: PostgreSQL (Hosted on Supabase)
- Authentication: Supabase Auth (Email OTP login)
- Deployment: Vercel
Easily run the full stack locally on your machine.
1. Clone and Install Dependencies:
git clone https://github.com/YOUR_USERNAME/SuperMartGPT.git
cd SuperMartGPT
npm install2. Configure Environment Variables:
Create a .env.local file in the root directory and add the following keys:
OPENAI_API_KEY=your_openai_key_here
SUPABASE_URL=your_supabase_url_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here
AUTH_PASSWORD=admin203. Boot the Application:
npm run devThe app will be available at: http://localhost:3000
- Passwordless Login: Employs secure Email OTP authentication via Supabase Auth for friction-free customer onboarding.
- Protected Routes: Order placements are strictly restricted to authenticated users. The Admin Analytics dashboard is shielded by a separate secure password.
- Zero Credential Leakage: All API keys and Supabase credentials are fundamentally separated from the source code using environment variables.
- Disclaimer: This repository does not contain real API keys. You must provide your own API keys in the
.env.localfile to use the AI and DB features.