growthstory

TwoLines

Consumer / Mobile / Real-time

TwoLines

Status

Active

Technologies

React NativeWebSocketsSupabaseNode.jsRevenueCat

A mobile-first shared space combining collaborative experiences, memories, AI-generated content, and lightweight relationship rituals.

Product Idea → UX → Real-time Architecture → AI Features → Monetization → Engagement

01 — Overview

TwoLines is a consumer application that creates a shared digital space for two people. It blends collaborative canvases, voice notes, and AI-generated moments into a lightweight daily ritual for staying connected.

02 — Problem

Most consumer AI applications are single-player utilities. The challenge was creating a multiplayer product that people repeatedly return to because it creates shared value and emotional connection, rather than just storing information or answering queries.

03 — Why it was technically difficult

Building a fluid, synchronous mobile app requires robust real-time state management. The app must handle spotty mobile connections, synchronize shared canvas states instantly over WebSockets, and orchestrate low-latency LLM calls to generate interactive content on the fly without breaking the user experience.

04 — Architecture

The client is built with React Native and Expo, connecting to a Node.js backend. Real-time state is managed via WebSockets and Supabase real-time subscriptions, with a dedicated AI generation service managing prompts and content delivery.

05 — Key engineering decisions

  • Real-time synchronization: Adopted WebSockets and Supabase for instant state updates, ensuring that both users see interactions simultaneously.
  • Mobile-first monetization: Integrated RevenueCat from day one to handle complex cross-platform subscription logic, paywalls, and entitlements.
  • Optimistic UI: Implemented aggressive optimistic UI updates to mask network latency and provide a buttery-smooth native feel.

06 — AI architecture

Shared Context/MoodPrompt AssemblyNode.js Generation ServiceStructured Content payloadWebSocket BroadcastShared Mobile Canvas

07 — Product decisions

  • Connection over utility: Prioritized features that prompt interaction (games, mood sharing) rather than pure productivity.
  • Shared AI: AI is used as a facilitator—generating conversation starters or games—rather than acting as a conversational agent itself.

08 — Outcome

Delivered a polished consumer application with deep mobile integration, demonstrating end-to-end product ownership from UX design and backend architecture to app store monetization.

09 — What I learned

Consumer product engineering is unforgiving. Latency that is acceptable in a B2B SaaS tool will cause a consumer app to be uninstalled immediately. I learned to heavily prioritize optimistic UI and precise real-time state management.