Retail, Reimagined for the AI Era.
Walk into any store, scan the QR, and unlock personalized offers designed just for you.
Scan2Save transforms physical retail with adaptive intelligence. Our ML-powered recommendation engine learns shopper preferences in real-time, surfacing offers that actually matter while they browse. Checkout happens in seconds, not minutes.
This is shopping, evolved.
| For Shoppers | For Retailers |
|---|---|
| Hyper-personalized offers based on purchase history | Increased conversion through targeted discounts |
| Scan & Go checkout experience | Real-time inventory-aware promotions |
| No app download required (PWA) | Zero hardware integration costs |
A complete walkthrough of the Scan2Save experience — from scanning the store QR to checkout.
For testing the application:
User:
| Field | Value |
|---|---|
| Phone | +91 9696969696 |
| OTP | 000000 |
Admin:
| Field | Value |
|---|---|
| Phone | +91 1111111111 |
| OTP | 111111 |
Click to view the complete user journey
| Step | Screenshot | Description |
|---|---|---|
| 1 | ![]() |
Landing Page |
| 2 | ![]() |
Install Pop up |
| 3 | ![]() |
Install Button |
| 4 | ![]() |
User Dashboard |
| 5 | ![]() |
Store Page |
| 6 | ![]() |
Shopping Route |
| 7 | ![]() |
Checkout Page |
| 8 | ![]() |
Payment Simulation |
| 9 | ![]() |
Payment Success |
| 10 | ![]() |
Order History |
┌─────────────────────────────────────────────────────────────┐
│ FRONTEND │
│ Next.js 16 (App Router) + React 19 + TailwindCSS 4 │
│ /core │
└─────────────────────────────────┬───────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ API LAYER │
│ Next.js API Routes (Edge-ready) │
│ /core/app/api/* │
└─────────────────────────────────┬───────────────────────────┘
│
┌───────────────────────┼───────────────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ Firebase │ │ Supabase │ │ AI Engine │
│ (Auth) │ │ (PostgreSQL) │ │ (Groq/Gemini) │
│ │ │ via Prisma ORM │ │ │
└─────────────────┘ └─────────────────────┘ └─────────────────────┘
scan2save/
├── core/ # Main Next.js Application
│ ├── app/ # App Router pages & API routes
│ │ ├── api/ # Backend API endpoints
│ │ ├── admin/ # Admin dashboard (protected)
│ │ ├── dashboard/ # User dashboard
│ │ ├── store/[storeId]/ # Dynamic store pages
│ │ ├── scan/ # QR scanning page
│ │ ├── cart/ # Shopping cart
│ │ ├── checkout/ # Checkout flow
│ │ └── ...
│ ├── components/ # Reusable React components
│ ├── lib/ # Utilities, contexts, clients
│ │ ├── prisma.ts # Prisma client
│ │ ├── firebase.ts # Firebase Admin SDK
│ │ └── CartContext.tsx # Cart state management
│ ├── prisma/
│ │ ├── schema.prisma # Database schema
│ │ └── seed.ts # Seed data
│ └── services/ # AI Recommendation Engine
│ └── recommendation-engine/
└── README.md # This file
- Node.js 18+
- PostgreSQL database (Supabase recommended)
- Firebase project (for OTP authentication)
# Clone the repository
git clone https://github.com/your-username/scan2save.git
cd scan2save/core
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your credentials
# Generate Prisma client
npx prisma generate
# Push schema to database
npx prisma db push
# Seed the database (optional)
npx prisma db seed
# Start development server
npm run devCreate a .env file in /core with:
# Database (Supabase PostgreSQL)
DATABASE_URL="postgresql://..."
DIRECT_URL="postgresql://..."
# Supabase Client
NEXT_PUBLIC_SUPABASE_URL="https://your-project.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"
# Firebase (for OTP Auth)
NEXT_PUBLIC_FIREBASE_API_KEY="..."
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="..."
NEXT_PUBLIC_FIREBASE_PROJECT_ID="..."
FIREBASE_PROJECT_ID="..."
FIREBASE_CLIENT_EMAIL="..."
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
# AI Recommendation Engine (optional)
GROQ_API_KEY="..."Shoppers scan a store's unique QR code to "enter" the digital store experience.
Real-time recommendation engine analyzes:
- Purchase history
- Browsing behavior
- Category affinities
- Time-based patterns
- Add products to cart by scanning barcodes
- Checkout via UPI/digital payments
- Generate exit pass QR for store verification
- Store management
- User analytics
- Offer creation
- Transaction verification
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TailwindCSS 4 |
| Backend | Next.js API Routes, Prisma ORM |
| Database | PostgreSQL (Supabase) |
| Auth | Firebase Phone Authentication |
| AI | Groq LLM / Google Gemini |
| Styling | TailwindCSS + Custom Design System |
| Icons | Lucide React |
| Theming | next-themes (Dark/Light mode) |
┌────────────┐ ┌─────────────┐ ┌──────────────┐
│ Landing │────▶│ Login │────▶│ Dashboard │
│ Page │ │ (OTP Auth) │ │ │
└────────────┘ └─────────────┘ └──────┬───────┘
│
▼
┌────────────┐ ┌─────────────┐ ┌──────────────┐
│ Checkout │◀────│ Cart │◀────│ Store Page │
│ │ │ │ │ (via QR Scan)│
└────────────┘ └─────────────┘ └──────────────┘
│
▼
┌─────────────┐
│ Orders │
│ History │
└─────────────┘
- Push to GitHub
- Import project in Vercel
- Add all environment variables in Vercel project settings
- Deploy!
Important: Ensure prisma generate runs during build (already configured in package.json).
This project is NOT open source. You may view this code for educational purposes only.
You may NOT:
- Copy, reproduce, or duplicate any portion of this code
- Modify or create derivative works
- Use this code in any other project
- Distribute or share this code
See LICENSE for full terms.
Built with ❤️ by Yashvanth S









