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.