SmartTantra is an IoT-powered smart retail checkout system built using the MERN stack and RFID technology. The system allows users to scan RFID-tagged products in real time, automatically manage cart sessions, and complete secure online payments using Razorpay.
The project simulates a modern cashier-less shopping experience where products are detected through RFID scanning and synchronized instantly with the web application.
- Real-time RFID tag scanning using Arduino + MFRC522
- Automatic cart updates
- Duplicate scan prevention
- Buzzer feedback on successful scans
- One active shopping session per user
- Session expiration and completion handling
- Counter-based session allocation
- JWT-based authentication
- Protected routes and middleware
- Session validation
- Add products automatically through RFID
- Quantity management
- Dynamic cart updates
- Razorpay payment gateway integration
- Payment verification using signature validation
- Failed payment handling
- Order receipt generation
- Order history
- Payment status tracking
- Product quantity tracking
- Automatic stock reduction after successful purchase
- Temporary receipt page
- Printable/downloadable receipts
- Payment confirmation flow
- React.js
- Vite
- Tailwind CSS
- React Router
- Axios
- Lucide React
- Framer/Motion Scroll Animations
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT Authentication
- Arduino Uno
- MFRC522 RFID Module
- RFID Tags/Cards
- Buzzer Module
- Razorpay
RFID Tag
↓
Arduino + MFRC522
↓
Serial Communication
↓
Node.js Serial Bridge
↓
Express Backend API
↓
MongoDB Database
↓
React Frontend
- User starts a shopping session
- RFID-tagged product is scanned
- Arduino reads RFID UID
- UID is sent to backend through serial bridge
- Backend matches RFID with product
- Product is added to active session cart
- Cart updates instantly on frontend
- User completes payment using Razorpay
- Order is stored in database
- Session is completed automatically
SmartTantra/
│
├── Client/
│ ├── src/
│ ├── components/
│ ├── pages/
│ ├── services/
│ ├── utils/
│ └── layouts/
│
├── Server/
│ ├── controllers/
│ ├── routes/
│ ├── middleware/
│ ├── models/
│ ├── config/
│ ├── scripts/
│ ├── utils/
│ └── .env
│
└── IoT/
├── Ardiuno/
└── basics.ino
└── node_bridge/
└── serial.js
git clone https://github.com/your-username/SmartTantra.git
cd SmartTantracd Server
npm installCreate .env
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret
RAZORPAY_KEY_ID=your_key
RAZORPAY_KEY_SECRET=your_secret
STORE_TOKEN=your_store_tokenRun backend:
npm run devcd Client
npm installCreate .env
VITE_API_URL=http://localhost:5000
VITE_RAZORPAY_KEY=your_razorpay_keyRun frontend:
npm run dev- MFRC522
- SPI
| RFID Module | Arduino |
|---|---|
| SDA | D10 |
| SCK | D13 |
| MOSI | D11 |
| MISO | D12 |
| RST | D9 |
| 3.3V | 3.3V |
| GND | GND |
| Buzzer | Arduino |
|---|---|
| Positive (+) | D8 |
| Negative (-) | GND |
Upload RFID scanner code using Arduino IDE.
POST /auth/registerPOST /auth/login
POST /session/createGET /session/current
POST /rfid/add-item
POST /payment/create-orderPOST /payment/verifyPOST /payment/mark-failed
GET /orders/history
- RFID integration with MERN stack
- IoT to web communication
- Real-time cart synchronization
- Payment gateway integration
- Session lifecycle management
- Hardware + software integration
- Backend architecture and middleware handling
- QR-based receipt verification
- Email receipts
- Admin dashboard
- Analytics system
- WebSocket-based real-time sync
- Industrial RFID support
- Multi-counter scalability
- AI-powered shopping insights
This project includes RFID-based IoT hardware integration using Arduino and MFRC522.
While the web application can be hosted normally, the RFID scanning functionality requires physical hardware and local serial communication, therefore it cannot be fully demonstrated through cloud hosting alone.
A demo video/screenshots of the RFID workflow are recommended for complete demonstration.
User store's entry page (where QR code needs to be scanned):

IoT Ardiuno Board with RFID Scanner and MFRC522:

Harmeet Singh
This project is for educational and academic purposes.



