Trajectory Mobile - Voice Capture + Idea Vault
A React Native / Expo app for capturing ideas via voice and text, with full-text search, offline sync, priority management, and iOS widgets.
Full Public Reader
Trajectory Mobile - Voice Capture + Idea Vault
A React Native / Expo app for capturing ideas via voice and text, with full-text search, offline sync, priority management, and iOS widgets.
Features
### ๐ค Voice Capture (CC-Speak Pattern)
- Low-latency recording - Audio system pre-warmed on mount for 10ms response
- Visual feedback - Pulse animation and duration display while recording
- Automatic file management - Recordings saved with proper cleanup
### ๐ก Idea Vault
- Dual input modes - Text or voice capture
- Auto-tagging - Smart tag suggestions based on content
- Custom tags - Add your own tags to organize ideas
- Priority levels - Urgent/High/Medium/Low with color-coded indicators
- Categories - Inbox, Project, Personal, Work, Creative, Research
- Swipe actions - Swipe left to delete, right to edit
- Persistent storage - Offline-first with sync queue
### ๐ Full-Text Search + Fuzzy Matching
- Ranked results - Exact phrase matches score highest
- Fuzzy matching - Levenshtein distance for typo-tolerant search
- Highlighted results - Matched text highlighted in search results
- Tag + Category filtering - Filter by tags, categories, and sync state
- Priority boost - Urgent/high ideas rank higher
### ๐ Statistics Dashboard
- Animated counters - Total ideas, this week, urgent count
- Priority breakdown - Visual bar chart by priority level
- Category distribution - At-a-glance category counts
- Top tags - Most used tags across all ideas
- Collapsible - Compact by default, tap to expand
### ๐ค Export & Sync
- Markdown export - Share/export all ideas as formatted markdown
- Offline-first sync - Queue-based with conflict resolution
- Background sync - Auto-syncs when coming online
- Conflict UI - Visual conflict resolution sheet
### ๐ฑ iOS Widget
- Small/Medium/Large home screen widgets
- Lock screen widgets (circular + rectangular)
- Quick Capture button on widget
- Quick Voice button for voice capture
- Priority indicators - Colored dots per idea
- Category icons - Visual category display
Getting Started
# Install dependencies
npm install
# Start Expo
npx expo start
# Run on iOS simulator
npm run ios
# Run on Android emulator
npm run android
# Run in browser
npm run webProject Structure
trajectory-mobile/
โโโ App.tsx # Entry point
โโโ src/
โ โโโ components/
โ โ โโโ IdeaCard.tsx # Individual idea display
โ โ โโโ NewIdeaSheet.tsx # Modal for creating ideas
โ โ โโโ SearchBar.tsx # Search input + tag filters
โ โ โโโ VoiceRecorder.tsx # Recording UI with animations
โ โโโ hooks/
โ โ โโโ useIdeaVault.ts # Idea CRUD + search + sync
โ โ โโโ useVoiceCapture.ts # Audio recording (CC-Speak)
โ โโโ screens/
โ โ โโโ HomeScreen.tsx # Main app screen
โ โโโ types/
โ โ โโโ index.ts # TypeScript interfaces
โ โโโ utils/
โ โโโ search.ts # Search algorithm + tag utils
โ โโโ storage.ts # AsyncStorage + markdown exportVoice Capture Architecture
The voice capture system uses the CC-Speak pattern for minimal latency:
1. Pre-warm - Audio mode configured on component mount
2. Instant start - No setup delay when recording begins
3. Real-time metering - 100ms update interval for visualizations
4. Clean teardown - Proper resource cleanup on cancel/stop
// Pre-warm settings for low latency
await Audio.setAudioModeAsync({
allowsRecordingIOS: true,
playsInSilentModeIOS: true,
interruptionModeIOS: 1, // DoNotMix
interruptionModeAndroid: 1, // DoNotMix
});Search Algorithm
The search uses a weighted scoring system:
| Match Type | Score |
|---|---|
| Exact phrase | +100 |
| Word boundary | +20 |
| Partial match | +10 |
| Tag match | +15 |
| Recency (per day) | +0.1 |
Backend Sync (Optional)
Set `EXPO_PUBLIC_TRAJECTORY_SYNC_URL` to enable backend sync:
EXPO_PUBLIC_TRAJECTORY_SYNC_URL=https://your-trajectory-api.comExpected API endpoint:
POST /api/ideas/sync
Body: { ideas: Idea[] }
Response: { ideas: Idea[] }Tech Stack
- React Native / Expo (SDK 53)
- TypeScript for type safety
- expo-av for audio recording
- expo-file-system for file management
- @react-native-async-storage for persistence
License
MIT
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
trajectory-mobile/README.md
Detected Structure
Method ยท Evaluation ยท Figures ยท Code Anchors ยท Architecture