Smart Multi-Beacon Detection System

Inspector walks into area premises - Smart detection & prioritization

📱 Complete User Experience Flow

1
🚶
Inspector Arrives
Walks into busy area (pasar, mall, food court) with many premises
2
📡
Auto Detection
App detects all beacons within their range automatically
3
📊
Smart Sorting
Shows nearest first, highlights expired licenses
4
🎯
Quick Filter
Filter by distance, license status, or premise type
5
📍
Visual Map
See all premises on radar view with color coding
6
Start Inspection
Tap any premise to begin inspection immediately
Health Inspector
32
Detected
8
Expired
5
No License
🏃 Nearest First
⚠️ Expired (8)
❌ No License (5)
✅ Valid (19)
🍴 Restaurant
☕ Cafe
Restoran Mak Cik
🍜 Malay Restaurant
2.5m
⚠️ License Expired (30 days)
Excellent
C
Cafe Mocha
☕ Coffee Shop
3.8m
✅ License Valid (180 days)
Excellent
A
Burger Stall 23
🍔 Fast Food
5.2m
❌ No License Found
Good
?
Fresh Juice Corner
🥤 Beverage Stall
8.1m
✅ License Valid (90 days)
Good
B
Nasi Lemak Kak Ani
🍛 Local Food
12.3m
⚠️ License Expired (5 days)
Fair
A
ABC Bakery
🥖 Bakery
18.7m
✅ License Valid (300 days)
Fair
A
Tom Yam Specialist
🍲 Thai Restaurant
25.4m
❌ No License Found
Weak
?

📡 Live Beacon Radar

N
E
S
W
1
Restoran Mak Cik - 2.5m
2
Cafe Mocha - 3.8m
3
Burger Stall 23 - 5.2m
4
Fresh Juice - 8.1m
5
Nasi Lemak - 12.3m
6
ABC Bakery - 18.7m
7
Tom Yam - 25.4m
Status Legend
Valid License
Expired License
No License
Your Position

🔧 Technical Implementation

How Multi-Beacon Detection Works:

1. Continuous Scanning

App scans for beacons every 1 second, maintains list of all detected beacons with RSSI values

2. Distance Calculation

Using RSSI and TX Power: Distance = 10^((TX Power - RSSI) / (10 * N)) where N = 2 (path loss)

3. Smart Sorting Algorithm

Priority: 1) Distance (nearest first), 2) License status (expired/none higher), 3) Last inspection date

4. Real-time Updates

List updates as inspector moves, beacons appear/disappear based on signal strength

5. Batch API Calls

Send all beacon IDs in one request: POST /api/premises/batch with array of minor IDs

✅ Benefits of This Approach:

  • Inspector can quickly see which premises need urgent attention
  • No need to walk around searching - all info at fingertips
  • Prioritize expired licenses or unlicensed premises
  • Efficient route planning based on proximity
  • Works even in crowded areas with 50+ beacons