Wave-to-Meet Feature โ Implementation Summary โ
What Was Built โ
A complete social connection flow for Lantern that enables users to:
- Wave at anonymous lanterns they're interested in meeting
- Chat anonymously when waves are accepted
- Meet up using synchronized color beacons on both phones
Files Created โ
Components โ
- src/components/WaveManager.jsx - Wave notification system
- src/components/Chat.jsx - Anonymous chat interface
- src/components/LanternBeacon.jsx - Color-matching beacon for meetups
Storybook Stories โ
- src/components/WaveManager.stories.jsx
- src/components/Chat.stories.jsx
- src/components/LanternBeacon.stories.jsx
Documentation โ
- WAVE_TO_MEET.md - Complete feature documentation
- Updated API.md with Wave endpoints
- Updated DOCS_INDEX.md with new feature link
Modified Files โ
- src/dashboard/Dashboard.jsx - Integrated wave flow
- src/App.jsx - Added routing comments
How It Works โ
User Flow โ
โโโโโโโโโโโโโโโโ
โ User browses โ
โ venues โ
โโโโโโโโฌโโโโโโโโ
โ
v
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Sees lantern โโโโโโโ>โ Clicks Wave โ
โ with shared โ โ button โ
โ interests โ โโโโโโโฌโโโโโโโโ
โโโโโโโโโโโโโโโโ โ
v
โโโโโโโโโโโโโโโโโโ
โ Wave sent to โ
โ recipient โ
โโโโโโโโโโฌโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
v v
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โ Declined โ โ Accepted! โ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโ
โ
v
โโโโโโโโโโโโโโโโโโ
โ Chat opens โ
โ (anonymous) โ
โโโโโโโโโโฌโโโโโโโโ
โ
v
โโโโโโโโโโโโโโโโโโ
โ "Hold Up โ
โ Lantern" โ
โโโโโโโโโโฌโโโโโโโโ
โ
v
โโโโโโโโโโโโโโโโโโ
โ Both phones โ
โ show matching โ
โ color beacon โ
โโโโโโโโโโโโโโโโโโTechnical Architecture โ
State Management (in Dashboard.jsx):
js
const [incomingWaves, setIncomingWaves] = useState([]) // Pending waves
const [activeConnections, setActiveConnections] = useState([]) // Accepted connections
const [activeChat, setActiveChat] = useState(null) // Current chat view
const [showBeacon, setShowBeacon] = useState(false) // Beacon visibilityColor Matching: When a wave is accepted, both users receive the same randomly-generated color:
- Amber (warm glow)
- Purple (mystic vibe)
- Blue (ocean feel)
- Green (forest calm)
- Pink (rose energy)
The color is stored in the connection object and synchronized via backend.
Testing the Feature โ
Development Mode โ
- Start dev server:
npm run dev - Click "Simulate Wave" button (top-right, dev only)
- Accept the wave notification
- Chat interface opens
- Click "Hold Up Lantern to Meet"
- Full-screen color beacon activates
Storybook โ
bash
npm run storybookBrowse to:
- Components > WaveManager
- Components > Chat
- Components > LanternBeacon
Test all states and color variants.
Backend Integration Needed โ
Required Endpoints โ
- POST /api/waves - Send wave
- POST /api/waves/:id/accept - Accept wave
- POST /api/waves/:id/decline - Decline wave
- WebSocket /ws/waves - Real-time notifications
- POST /api/messages - Send chat message
- GET /api/messages?connectionId=x - Fetch messages
- GET /api/connections/:id/beacon - Get matching color
See API.md and WAVE_TO_MEET.md for full specs.
Security Considerations โ
- Geofencing: Verify users are at same venue
- Rate limiting: 20 waves/min max
- Anonymity: No user IDs exposed, only lantern metadata
- Message encryption: Consider E2E encryption
- Auto-expiry: Connections expire when users leave venue
Design Decisions โ
Why Full-Screen Components? โ
- Chat: Immersive, focused experience without distractions
- Beacon: Maximum visibility for color matching in crowded venues
Why Color-Matching Instead of Names? โ
- Maintains anonymity until both users decide to reveal identities
- Works in noisy/crowded environments
- Fun, unique mechanic that aligns with "Lantern" branding
Why No Persistent Usernames? โ
Lantern is moment-based, not profile-based. Connections are ephemeral and tied to physical presence.
Future Enhancements โ
Short-term (MVP+) โ
- [ ] Add typing indicators in chat
- [ ] Add read receipts (optional)
- [ ] Sound/vibration on wave received
- [ ] Photo sharing in chat (ephemeral)
Medium-term โ
- [ ] Voice messages
- [ ] Group meetups (3+ people, same beacon color)
- [ ] Venue check-in QR verification
- [ ] Post-meetup feedback/ratings
Long-term โ
- [ ] Video chat
- [ ] Persistent friend list (opt-in)
- [ ] Multi-venue connections
- [ ] Beacon patterns (pulsing rhythms for differentiation)
Demo Script โ
For stakeholders/investors:
"Lantern is about real connections at real places. Here's how it works:
- You're at a coffee shop and see someone lit their lantern with 'Looking for React dev friends'
- You wave at them anonymouslyโno photos, no profiles
- They accept, and a chat opens. Still anonymous.
- You decide to meet. Both tap 'Hold Up Lantern'
- Both phones glow the same colorโlet's say purple
- You look around the cafรฉ for someone with a purple phone
- You meet naturally, like humans always have
No swiping. No endless messages. Just presence, consent, and real connection."
Questions? โ
- Feature docs: WAVE_TO_MEET.md
- API specs: API.md
- Contributing: CONTRIBUTING.md
Built with โค๏ธ for authentic human connection.