Intelligent team messaging with AI-powered features
A production-ready React Native messaging app with real-time communication and 6 AI-powered features for productivity. Built with Expo, Firebase, and Claude AI.
- Real-time messaging with instant delivery
- Direct & group chats with participant management
- Read receipts with detailed read status in group chats
- Typing indicators with presence tracking
- Online/offline status for all participants
- Local notifications with conversation deep links
- Offline support with message retry/delete
-
π Thread Summarization
- Generate AI summaries of long conversations
- Configurable message count (10, 25, 50, 100)
- Extracts key points and main topics
-
π Semantic Search
- Search by meaning, not just keywords
- Powered by embeddings (OpenAI + Pinecone)
- Fast vector similarity search
-
β Action Items Extraction
- Auto-detects tasks from conversations
- Assigns to participants
- Tracks completion status
- Priority levels (high/medium/low)
-
π― Priority Detection
- Automatically flags urgent messages
- Visual badges for high-priority items
- Background processing pipeline
-
π Decision Tracking
- Captures key decisions from discussions
- Confidence scoring for decisions
- Searchable decision history
-
π Smart Meeting Scheduler
- Analyzes scheduling discussions
- Suggests 3 optimal meeting times
- Provides reasoning for each suggestion
- Copy-to-clipboard for quick sharing
- 3-tier error boundaries (app, screen, feature)
- User-friendly error messages (technical β plain language)
- Message retry/delete for failed sends
- AsyncStorage persistence (last 100 errors, last 50 failed messages)
- Developer logging with context and stack traces
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β React Native App β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Screens (Expo Router) β β
β β - Auth (login, register) β β
β β - Conversations List β β
β β - Chat Screen (messages + AI features) β β
β β - New Chat (direct + group) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Components β β
β β - MessageList, MessageBubble, MessageInput β β
β β - AI Modals (Summary, Search, Actions, etc.) β β
β β - Error Boundaries & Fallbacks β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Services β β
β β - authService, firestoreService β β
β β - aiService (Cloud Functions wrapper) β β
β β - presenceService, notificationService β β
β β - errorLogger, failedMessagesService β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β State (Zustand + AsyncStorage) β β
β β - authStore, chatStore β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Firebase Backend β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Firebase Authentication β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Cloud Firestore β β
β β - /users, /conversations, /messages β β
β β - /typingUsers, /ai_summaries, /ai_action_items β β
β β - Real-time listeners, participant-based security β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Cloud Functions (Node.js + TypeScript) β β
β β - AI features (summarize, search, actions, etc.) β β
β β - Rate limiting, caching, embeddings pipeline β β
β β - Security validation β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β External AI Services β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β Anthropic β β OpenAI β β
β β Claude 3.5 β β text-embedding β β
β β (Sonnet) β β -3-small β β
β β - Summarization β β - Embeddings β β
β β - Extraction β β β β
β β - Analysis β β β β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β ββββββββββββββββββββ β
β β Pinecone β β
β β Vector DB β β
β β - Semantic β β
β β search β β
β ββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
See ARCHITECTURE.md for detailed documentation.
- React Native 0.81 with Expo SDK 54
- Expo Router (file-based navigation)
- TypeScript for type safety
- Zustand for state management
- AsyncStorage for persistence
- Firebase Authentication (email/password)
- Cloud Firestore (NoSQL database)
- Cloud Functions (Node.js 20 + TypeScript)
- Firebase Admin SDK for server-side operations
- Anthropic Claude 3.5 Sonnet (summarization, extraction, analysis)
- OpenAI text-embedding-3-small (semantic embeddings)
- Pinecone (vector database for semantic search)
- Jest (265 tests: 212 backend + 53 frontend)
- ESLint with TypeScript rules
- TypeScript strict mode
- Firebase Emulator for integration tests
- Node.js 20+ (use
nvm useto auto-select) - Expo CLI
- Firebase CLI (
npm install -g firebase-tools) - iOS Simulator (Mac) or Android Emulator
git clone <repository-url>
cd message-ai
npm installCreate .env in project root:
# Firebase Config (from Firebase Console)
EXPO_PUBLIC_FIREBASE_API_KEY=your_api_key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
EXPO_PUBLIC_FIREBASE_APP_ID=your_app_id
# AI Services (Optional - only needed for AI features)
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
PINECONE_API_KEY=...
PINECONE_ENVIRONMENT=us-west1-gcp
PINECONE_INDEX_NAME=messageai-embeddingsSee PHASE_0_SETUP.md for detailed Firebase setup guide.
# Deploy Firestore rules
firebase deploy --only firestore:rules
# Deploy Cloud Functions (for AI features)
cd functions
npm install
npm run build
firebase deploy --only functionsnpx expo startThen press:
ifor iOS Simulatorafor Android Emulator- Scan QR code for physical device
npm run validate # Lint + type-check + all testsnpm test # Run all unit tests (265 tests)
cd functions && npm test # Backend only (212 tests)# Terminal 1: Start emulator
firebase emulators:start
# Terminal 2: Run tests
npm run test:integrationWhat's Tested:
- Rate limiting (per-user, per-conversation, global)
- Caching (age-based, message-count invalidation)
- Security (participant validation, access control)
- Error handling (translation, logging, retry/delete)
- Message array operations (pagination, deduplication)
# Create 1500-message test conversation
node scripts/createPerformanceTestData.js
# Test burst performance (10 messages in 2 seconds)
node scripts/testMessageBurst.js perf_test_1500
# Cleanup test data
node scripts/cleanupPerformanceTestData.jsSee PERFORMANCE_TEST_RESULTS.md for benchmarks.
Purpose: Generate concise summaries of long conversations.
How to Use:
- Open any conversation
- Tap the β¨ AI menu button
- Select "Summarize Thread"
- Choose message count (10/25/50/100)
- View summary with key points
Implementation:
- Cloud Function:
functions/src/ai/threadSummary.ts - Client:
components/SummaryModal.tsx - Caching: 1 hour (invalidates on new messages)
Purpose: Search by meaning, not just keywords.
How to Use:
- Open any conversation
- Tap the π search icon
- Enter natural language query
- View semantically relevant results
Example Queries:
- "When is the deadline?" β Finds deadline mentions
- "Who's working on the API?" β Finds API discussions
- "Budget approval status" β Finds budget-related messages
Implementation:
- Embeddings: OpenAI
text-embedding-3-small - Vector DB: Pinecone (1536 dimensions)
- Background pipeline: Auto-embeds new messages
- Cloud Function:
functions/src/ai/semanticSearch.ts
Purpose: Automatically detect and track tasks from conversations.
How to Use:
- Open any conversation
- Tap β¨ AI menu β "Extract Action Items"
- View detected tasks with:
- Task description
- Assigned person
- Priority (high/medium/low)
- Due date (if mentioned)
- Completion status
Features:
- Auto-assignment based on mentions
- Priority detection (urgent keywords)
- Toggle completion status
- Persistent in Firestore
Implementation:
- Cloud Function:
functions/src/ai/actionItems.ts - Caching: 15 minutes
- Client:
components/ActionItemsModal.tsx
Purpose: Auto-flag urgent messages for quick triage.
How to Use:
- Happens automatically in background
- High-priority messages show π΄ badge
- Detects: "urgent", "asap", "critical", deadlines
Implementation:
- Background pipeline: Batch analysis every 15 minutes
- Quick heuristic + Claude analysis
- Firestore:
messages/{id}.priorityfield - Visual: Priority badges in message bubbles
Purpose: Capture and track key decisions from discussions.
How to Use:
- Open any conversation
- Tap β¨ AI menu β "Track Decisions"
- View captured decisions with:
- Decision statement
- Confidence level
- Context/reasoning
- Timestamp
Implementation:
- Cloud Function:
functions/src/ai/decisionTracking.ts - Caching: 1 hour
- Client:
components/DecisionsModal.tsx
Purpose: Analyze scheduling discussions and suggest meeting times.
How to Use:
- Have a conversation about scheduling
- Tap β¨ AI menu β "Suggest Meeting Times"
- View 3 suggested times with reasoning
- Tap "Copy All" to paste into calendar app
Features:
- Analyzes last 50 messages
- Considers mentioned availability
- Provides confidence scores
- Accounts for constraints
Implementation:
- Cloud Function:
functions/src/ai/proactiveMeeting.ts - Uses Claude Tool Use API
- Client:
components/MeetingSchedulerModal.tsx
message-ai/
βββ app/ # Expo Router screens
β βββ (auth)/ # Login, register
β βββ (tabs)/ # Conversations list, new chat
β βββ chat/[id].tsx # Main chat screen
β βββ _layout.tsx # Root layout (error boundary)
βββ components/ # UI components
β βββ MessageList.tsx # Inverted FlatList for messages
β βββ MessageBubble.tsx # Individual message UI
β βββ AI modals/ # 6 AI feature modals
β βββ ErrorBoundary.tsx # Error handling
β βββ ErrorFallback.tsx # Error UI components
βββ services/ # Business logic
β βββ aiService.ts # Cloud Functions wrapper
β βββ authService.ts # Firebase Auth
β βββ firestoreService.ts # Firestore operations
β βββ errorLogger.ts # AsyncStorage error logging
β βββ failedMessagesService.ts # Message retry
βββ store/ # Zustand state
β βββ authStore.ts # User session
β βββ chatStore.ts # Conversations list
βββ utils/ # Helpers
β βββ errorTranslator.ts # User-friendly errors
β βββ timeFormat.ts # Smart date formatting
β βββ constants.ts # App constants
βββ functions/ # Cloud Functions
β βββ src/
β βββ ai/ # 6 AI feature functions
β βββ embeddings/ # Background pipeline
β βββ index.ts # Function exports
βββ docs/ # Documentation
βββ ARCHITECTURE.md # Detailed architecture
βββ phase2-ai-spike/ # AI implementation docs
βββ phase3-full-implementation/ # Final sprint docs
npm run lint # ESLint
npm run type-check # TypeScript
npm run validate # All checks + tests- Commit messages follow conventional commits
- All features tested before commit
- Validation passes before push
- No force pushes to main
| Metric | Target | Actual | Status |
|---|---|---|---|
| Message delivery | <200ms | ~150ms | β |
| Scroll performance | 60 FPS | Smooth | β |
| Initial render | <500ms | ~300ms | β |
| Burst handling (10msg/2s) | No jank | Smooth | β |
- Inverted FlatList for natural chat scrolling
- Pagination (100 messages initially, load more on scroll)
- Deduplication for real-time + paginated data
- Efficient array operations (sub-millisecond prepend/append)
See PERFORMANCE_TEST_RESULTS.md for details.
"Firebase config missing"
- Ensure
.envfile exists in project root - Variables must start with
EXPO_PUBLIC_ - Restart dev server after adding
.env
"Cloud Functions not working"
- Deploy functions:
cd functions && firebase deploy --only functions - Check API keys in Firebase Console β Functions β Configuration
- View logs:
firebase functions:log
"Tests failing"
- Clear cache:
npm test -- --clearCache - For integration tests: Ensure emulator is running
- Check Node version:
node -v(should be 20+)
See DEVELOPER_SETUP.md for comprehensive troubleshooting.
- ARCHITECTURE.md - System design, data flow, security
- Phase 2 AI Spike - AI implementation details
- Phase 3 Full Implementation - Final sprint PRD
- Testing Guide - Integration test documentation
- Performance Results - Benchmark data
- Local notifications only (FCM not configured)
- No message editing/deletion (intentional for MVP)
- No media uploads (text-only for now)
- No voice/video calls
- English only (no i18n)
See POST_MVP.md for roadmap.
This is an MVP project. For production use, consider:
- Implementing FCM for background notifications
- Adding message editing/deletion
- Media upload support (images, files)
- End-to-end encryption
- Internationalization (i18n)
- Analytics and monitoring
MIT License - See LICENSE for details.
Built with:
- Expo - React Native framework
- Firebase - Backend infrastructure
- Anthropic Claude - AI summarization and analysis
- OpenAI - Embeddings for semantic search
- Pinecone - Vector database
Made with β€οΈ for the Gauntlet.ai Founder Fellowship