Mobile companion app for the Ambient Code Platform (ACP).
β User Story 1: Monitor Active AI Sessions
- View dashboard with active sessions
- See session status, progress, and model information
- Navigate to detailed session view
- Real-time progress updates via Server-Sent Events (SSE)
- Error indicators for failed sessions
- Offline support with cached data
- Connection status indicator with retry capability
- Framework: React Native 0.81.5 + Expo SDK 54
- Language: TypeScript 5.x
- Routing: Expo Router (file-based)
- State Management: React Context + TanStack Query
- Storage: Expo SecureStore + AsyncStorage
- Auth: OAuth 2.0 + PKCE (prepared for Red Hat SSO)
- Performance: Comprehensive monitoring suite (dev only)
The app includes comprehensive performance monitoring in development mode:
- π Visual Dashboard - Tap the π button for real-time metrics
- πΎ Memory Tracking - Detect memory leaks and high usage
- π¬ FPS Monitoring - Track frame rate and UI jank
- π Render Tracking - Identify unnecessary re-renders
- π React Query DevTools - Monitor cache and network activity
Quick Access:
// In development console
performance.report() // Full performance reportSee Performance Monitoring Guide for complete documentation.
npm install && npm startRun on device:
- iOS:
npm run ios - Android:
npm run android - Physical device: Scan QR code with Expo Go app
See Setup Guide for detailed installation instructions.
The app currently uses mock data for testing without a backend:
- Mock sessions are defined in
utils/mockData.ts - Mock SSE events are generated by
MockSSEServiceinutils/mockData.ts - To switch to real API:
- Set
USE_MOCK_DATA = falseinhooks/useSessions.ts - Set
USE_MOCK_SSE = falseinhooks/useRealtimeSession.ts
- Set
- API configuration is in
utils/constants.ts
Mock SSE Behavior:
- Generates random session update events every 10-15 seconds
- 60% progress updates, 25% session updates, 15% status changes
- Only affects running sessions
- Simulates realistic real-time update patterns
app/ # Expo Router screens
βββ (tabs)/
β βββ index.tsx # Dashboard
βββ sessions/
β βββ [id].tsx # Session detail
β βββ index.tsx # Sessions list
βββ _layout.tsx # Root layout with providers
components/ # Reusable components
βββ session/ # Session-specific components
βββ ui/ # Base UI components
βββ layout/ # Layout components
services/ # Business logic
βββ api/ # API clients
βββ auth/ # Authentication
βββ storage/ # Data persistence
hooks/ # Custom React hooks
types/ # TypeScript types
utils/ # Utilities and constants
π Comprehensive documentation is available at the documentation site (deployed automatically)
-
Getting Started
- Quick Start - Get running in 5 minutes
- Setup Guide - Complete development environment setup
- Troubleshooting - Common issues and solutions
-
Architecture & Design
- Architecture Overview - Platform architecture and integration
- Design System - UI/UX guidelines, colors, typography
-
Development
- Contributing Guide - How to contribute
- API Reference - TypeScript API documentation
- Changelog - Version history
-
Project Management
- Development Backlog - Upcoming features and improvements
- Security Audit - Security assessment and recommendations
# Install Python dependencies
pip install -r requirements-docs.txt
# Start documentation server
mkdocs serve
# Visit http://localhost:8000- Project initialization
- Dependencies installed
- TypeScript configured
- Directory structure created
- TypeScript type definitions
- OAuth PKCE authentication flow
- API client with token refresh
- AsyncStorage cache utilities
- Theme system (light/dark/system)
- Auth and Theme contexts
- Sessions API service
- useSessions hook with polling (replaced with SSE)
- useOffline hook
- SessionCard, SessionProgress, ModelBadge, StatusBadge components
- Header with greeting and refresh spinner
- Dashboard screen
- Session detail screen
- Sessions list screen with filters
- Server-Sent Events (SSE) implementation
- Event type definitions (
types/realtime.ts) RealtimeServicewith automatic reconnection and exponential backoffMockSSEServicefor development testinguseRealtimeSessionhook for SSE integration- Direct React Query cache updates (no refetches)
- Connection state UI with retry functionality
- Support for
session.progress,session.updated, andsession.statusevents
- Start the app:
npm start - Open on device: Scan QR code or run in simulator
- View dashboard: See mock active sessions with real-time updates
- Watch live updates: Session progress bars update every 10-15 seconds automatically
- Tap session: View detailed session information
- View all sessions: Use "View All" or "{N} Running" button
- Filter sessions: Use filter chips (All/Running/Paused/Done)
- Pull to refresh: Test manual refresh functionality
- Connection status: If mock SSE disabled, see connection state indicator
- Test reconnection: When error state, tap "Retry" button
The following features are planned:
- Phase 5: User Story 2 - Review Completed Work
- Phase 6: User Story 3 - GitHub Notifications
- Phase 7: User Story 4 - Interactive Chat
- Phase 8: User Story 5 - Create New Sessions
- Phase 9: User Story 6 - Settings & Preferences
To connect to the real ACP backend:
- Update
API_BASE_URLinutils/constants.ts - Configure OAuth client ID and redirect URI
- Set
USE_MOCK_DATA = falseinhooks/useSessions.ts - Set
USE_MOCK_SSE = falseinhooks/useRealtimeSession.ts - Ensure backend endpoints match
services/api/*.ts - Implement SSE endpoint at
${API_BASE_URL}/sse/sessionswith event types:session.progress- Progress updatessession.updated- Incremental session changessession.status- Status transitions
App won't start:
npx expo start -c # Clear cacheType errors:
npm run lint # Check for issuesCan't find module errors:
npm install # Reinstall dependenciesThis is an MVP implementation. See specs/001-acp-mobile/ for full specifications, planning documents, and task breakdown.
Internal Red Hat project.