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.