# MoreThanADiagnosis Mobile Platform React Native + Expo mobile app for iOS and Android. **Job ID**: MTAD-IMPL-2025-11-18-CL ## ๐Ÿ— Technology Stack - **Framework**: React Native 0.73+ - **Runtime**: Expo 51+ - **Navigation**: Expo Router - **Language**: TypeScript - **State Management**: Zustand - **API Client**: Axios + React Query ## ๐Ÿ“ฆ Project Structure ``` mobile/ โ”œโ”€โ”€ app/ # Expo Router (App Router) โ”‚ โ”œโ”€โ”€ _layout.tsx # Root layout โ”‚ โ”œโ”€โ”€ index.tsx # Home screen โ”‚ โ”œโ”€โ”€ (auth)/ # Auth group โ”‚ โ”‚ โ”œโ”€โ”€ login.tsx โ”‚ โ”‚ โ”œโ”€โ”€ signup.tsx โ”‚ โ”‚ โ””โ”€โ”€ _layout.tsx โ”‚ โ”œโ”€โ”€ (tabs)/ # Tab navigation โ”‚ โ”‚ โ”œโ”€โ”€ _layout.tsx โ”‚ โ”‚ โ”œโ”€โ”€ blog.tsx โ”‚ โ”‚ โ”œโ”€โ”€ forum.tsx โ”‚ โ”‚ โ”œโ”€โ”€ merch.tsx โ”‚ โ”‚ โ”œโ”€โ”€ podcast.tsx โ”‚ โ”‚ โ”œโ”€โ”€ profiles.tsx โ”‚ โ”‚ โ”œโ”€โ”€ resources.tsx โ”‚ โ”‚ โ””โ”€โ”€ tribute.tsx โ”‚ โ””โ”€โ”€ dashboard.tsx # User dashboard โ”œโ”€โ”€ components/ โ”‚ โ”œโ”€โ”€ common/ # Shared components โ”‚ โ”‚ โ”œโ”€โ”€ Header.tsx โ”‚ โ”‚ โ”œโ”€โ”€ Button.tsx โ”‚ โ”‚ โ”œโ”€โ”€ Input.tsx โ”‚ โ”‚ โ””โ”€โ”€ Card.tsx โ”‚ โ”œโ”€โ”€ layouts/ # Layout components โ”‚ โ”‚ โ”œโ”€โ”€ SafeAreaLayout.tsx โ”‚ โ”‚ โ””โ”€โ”€ TabsLayout.tsx โ”‚ โ””โ”€โ”€ mvps/ # MVP-specific components โ”‚ โ”œโ”€โ”€ blog/ โ”‚ โ”œโ”€โ”€ forum/ โ”‚ โ”œโ”€โ”€ merch/ โ”‚ โ”œโ”€โ”€ podcast/ โ”‚ โ”œโ”€โ”€ profiles/ โ”‚ โ”œโ”€โ”€ resources/ โ”‚ โ””โ”€โ”€ tribute/ โ”œโ”€โ”€ lib/ โ”‚ โ”œโ”€โ”€ api.ts # API client โ”‚ โ”œโ”€โ”€ auth.ts # Auth utilities โ”‚ โ”œโ”€โ”€ hooks.ts # Custom hooks โ”‚ โ”œโ”€โ”€ store.ts # Zustand store โ”‚ โ””โ”€โ”€ types.ts # TypeScript types โ”œโ”€โ”€ assets/ # Images, icons, fonts โ”œโ”€โ”€ app.json # Expo config โ”œโ”€โ”€ package.json โ”œโ”€โ”€ tsconfig.json โ””โ”€โ”€ README.md (this file) ``` ## ๐Ÿš€ Quick Start ### Prerequisites - Node.js 18+ - npm 8+ - Expo CLI: `npm install -g eas-cli` ### Installation 1. **Install dependencies** ```bash npm install ``` 2. **Set up environment variables** ```bash cp .env.example .env.local ``` 3. **Start development server** ```bash npm start ``` 4. **Run on device/emulator** ```bash # iOS npm run ios # Android npm run android # Web npm run web ``` ## ๐Ÿ“ฑ Platform Support - **iOS**: 13.0+ - **Android**: 6.0+ - **Web**: Responsive design via Expo Web ## ๐ŸŽจ Design System Integrates with MoreThanADiagnosis Design System (`../../openspec/specs/design-system.md`). **Accessible Components**: - Button (primary, secondary, ghost, danger) - Input (text, email, password) - Card - Modal - Navigation (tabs, drawer, stack) - Form helpers All components support: - Keyboard navigation - Screen reader (VoiceOver/TalkBack) - High contrast mode - Dynamic text sizing - Reduced motion ## ๐Ÿ” Authentication Uses OAuth2/OIDC flow with JWT tokens. **Secure Token Storage**: - Access tokens: Memory (expires in 15 min) - Refresh tokens: Secure storage (Expo SecureStore) - Automatic token refresh See `lib/auth.ts` for implementation. ## ๐Ÿ“Š Features (MVPs) ### 1. Blog - View published articles - Infinite scroll - Offline caching - Share via platform ### 2. Forum - Browse categories/threads - Read discussions - Real-time updates - Compose posts ### 3. Merch Store - Product catalog - Image gallery - Shopping cart - Checkout ### 4. Podcast - Episode list - Audio player - Download episodes - Playback queue ### 5. Profiles - View user profiles - Display pseudonym - Privacy-conscious design - Edit own profile ### 6. Resources - Search knowledge base - Filter by tag - Offline reading - Bookmarks ### 7. Tribute - View memorials - Create tribute entry - Share memories - Respectful layout ## ๐Ÿ”„ API Integration Communicates with FastAPI backend via `/api/v1/`. ```typescript import { apiClient } from '@/lib/api' const posts = await apiClient.get('/blog') ``` See `lib/api.ts` for client setup. ## ๐Ÿงช Testing **Development Testing**: ```bash npm start # Scan QR code with Expo Go app ``` **Build Testing**: ```bash npm run build:ios npm run build:android ``` ## ๐Ÿ“ฆ Building for Production ### iOS ```bash npm run build:ios npm run submit # Submit to App Store ``` ### Android ```bash npm run build:android npm run submit # Submit to Google Play ``` ### Requirements - Apple Developer Account (iOS) - Google Play Developer Account (Android) - EAS CLI configured ## โ™ฟ Accessibility (WCAG 2.2 AA+) - **VoiceOver (iOS)** and **TalkBack (Android)** support - Semantic component labels - Keyboard navigation - High contrast mode - Dynamic text sizing - Reduced motion animations ## ๐Ÿ“š Documentation - **Design System**: `../../openspec/specs/design-system.md` - **API Spec**: `../../backend/README.md` - **Architecture**: `../../openspec/specs/architecture.md` - **Expo Docs**: https://docs.expo.dev ## ๐Ÿ›  Troubleshooting ### Connection Issues 1. Ensure backend is running 2. Check API base URL in `.env.local` 3. Verify network connectivity ### Build Errors 1. Clear cache: `expo cache --clear` 2. Reinstall: `npm install` 3. Check Node version ### iOS Issues - Ensure Xcode is updated - Try: `npm install && npm run ios` ### Android Issues - Ensure Android Studio/SDK is installed - Try: `npm install && npm run android` ## ๐Ÿค Contributing 1. Create feature branch: `claude/feature-name-2025-11-18` 2. Follow OpenSpec lifecycle 3. Ensure accessibility compliance 4. Test on iOS and Android 5. Link commits to Job IDs ## Status - โœ… Project scaffolding complete - โณ Component development (pending) - โณ Screen implementation (pending) - โณ Integration testing (pending) - โณ App Store submission (pending) --- **Job ID**: MTAD-IMPL-2025-11-18-CL **Last Updated**: 2025-11-18 **Maintained By**: Claude (Mobile Agent)