Smart Souvenir
Kasir self-service berbasis RFID untuk toko souvenir. Pelanggan memindai barang di kiosk, melihat keranjang beserta diskonnya, lalu membayar dengan QRIS. An RFID self-service checkout for a souvenir shop. Customers scan items at a kiosk, see their cart and discounts, then pay with QRIS.
ArsitekturArchitecture
Oranye = bagian yang saya kerjakanOrange = the part I built
-
Arduino + MFRC522
Membaca UID tag, mengenkripsinya, lalu mengirim lewat serial (9600 baud).Reads the tag UID, encrypts it, and sends it over serial (9600 baud).
AES-128-CBC
-
RFID Bridge
Server Node.js yang mendekripsi UID dan mem-broadcast-nya ke kiosk dan panel admin lewat WebSocket.A Node.js server that decrypts the UID and broadcasts it to the kiosk and admin panel over WebSocket.
-
Kiosk & adminKiosk & admin
Frontend HTML + JS. Kiosk menambahkan barang ke keranjang dari UID yang diterima.HTML + JS frontend. The kiosk adds an item to the cart from each UID it receives.
-
Backend Express
REST API untuk produk, diskon, pembayaran, struk, dan panel admin.REST API for products, discounts, payment, receipts and the admin panel.
-
Firebase RTDB
Integrasi Realtime Database lewat Admin SDK: produk, tag RFID, transaksi, dan diskon.Realtime Database integration through the Admin SDK: products, RFID tags, transactions and discounts.
Alur transaksiCheckout flow
- 01Pelanggan menempelkan barang ke pembaca RFID. Arduino membaca UID, mengenkripsinya dengan AES-128-CBC, lalu mengirimnya lewat serial.The customer taps an item on the RFID reader. The Arduino reads the UID, encrypts it with AES-128-CBC and sends it over serial.
- 02RFID Bridge mendekripsi UID dan mem-broadcast-nya ke semua klien WebSocket.The RFID Bridge decrypts the UID and broadcasts it to every WebSocket client.
- 03Kiosk mengambil data produk dari UID dan menambahkannya ke keranjang. Tag yang sama tidak bisa dipindai dua kali.The kiosk looks up the product for that UID and adds it to the cart. The same tag can't be scanned twice.
- 04Diskon aktif diterapkan; per produk dipakai diskon terbesar antara diskon khusus produk dan diskon global.Active discounts apply; each product gets the larger of its own discount and the global one.
- 05Saat pelanggan menekan bayar, backend menyimpan transaksi ke Firebase dan membuat pembayaran QRIS lewat Midtrans.When the customer pays, the backend saves the transaction to Firebase and creates a QRIS payment through Midtrans.
- 06Setelah pembayaran berhasil, transaksi ditandai selesai dan tag RFID barang yang terjual dihapus dari database.Once payment succeeds, the transaction is marked complete and the sold items' RFID tags are removed from the database.
- 07Kiosk menampilkan struk transaksi.The kiosk shows the receipt.
Dikerjakan timBuilt by the team
- Kiosk pelangganCustomer kiosk
- Keranjang, diskon, dan tombol bayar untuk pelanggan.Cart, discounts and the pay button for customers.
- Panel adminAdmin panel
- Login JWT; laporan penjualan dengan ekspor CSV, produk dan tag RFID, inventaris, serta aturan diskon.JWT login; sales reports with CSV export, products and RFID tags, inventory, and discount rules.
- PembayaranPayment
- Midtrans Snap (QRIS), dengan webhook notifikasi yang diekspos lewat ngrok.Midtrans Snap (QRIS), with the notification webhook exposed through ngrok.
- REST API
- Endpoint Express untuk kiosk dan panel admin.Express endpoints for the kiosk and admin panel.