Skip to content

Wave-to-Meet Feature โ€” Implementation Summary โ€‹

What Was Built โ€‹

A complete social connection flow for Lantern that enables users to:

  1. Wave at anonymous lanterns they're interested in meeting
  2. Chat anonymously when waves are accepted
  3. Meet up using synchronized color beacons on both phones

Files Created โ€‹

Components โ€‹

Storybook Stories โ€‹

Documentation โ€‹

Modified Files โ€‹


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 visibility

Color 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 โ€‹

  1. Start dev server: npm run dev
  2. Click "Simulate Wave" button (top-right, dev only)
  3. Accept the wave notification
  4. Chat interface opens
  5. Click "Hold Up Lantern to Meet"
  6. Full-screen color beacon activates

Storybook โ€‹

bash
npm run storybook

Browse to:

  • Components > WaveManager
  • Components > Chat
  • Components > LanternBeacon

Test all states and color variants.


Backend Integration Needed โ€‹

Required Endpoints โ€‹

  1. POST /api/waves - Send wave
  2. POST /api/waves/:id/accept - Accept wave
  3. POST /api/waves/:id/decline - Decline wave
  4. WebSocket /ws/waves - Real-time notifications
  5. POST /api/messages - Send chat message
  6. GET /api/messages?connectionId=x - Fetch messages
  7. 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:

  1. You're at a coffee shop and see someone lit their lantern with 'Looking for React dev friends'
  2. You wave at them anonymouslyโ€”no photos, no profiles
  3. They accept, and a chat opens. Still anonymous.
  4. You decide to meet. Both tap 'Hold Up Lantern'
  5. Both phones glow the same colorโ€”let's say purple
  6. You look around the cafรฉ for someone with a purple phone
  7. You meet naturally, like humans always have

No swiping. No endless messages. Just presence, consent, and real connection."


Questions? โ€‹

Built with โค๏ธ for authentic human connection.

Built with VitePress