- OAuth authentication via Authentik - WebSocket connection to OpenClaw gateway - Configurable gateway URL with first-run setup - User preferences sync across devices - Multi-user support with custom assistant names - ElevenLabs TTS integration (local + remote) - FCM push notifications for alarms - Voice input via Google Speech API - No hardcoded secrets or internal IPs in tracked files
3.4 KiB
3.4 KiB
Alfred Mobile - Development Progress
✅ Phase 1: Project Setup & Build (COMPLETE)
- Android project scaffolding (Jetpack Compose, Material 3, Hilt DI)
- Build system configuration (Gradle 8.2, API 26-34, Java 17)
- Wireless ADB deployment to tablet
- Basic UI placeholder to verify app stability
- Gitea repository setup
✅ Phase 2: OAuth Authentication (COMPLETE)
- OAuth configuration with Authentik
- AppAuth integration for OAuth 2.0 flow
- OAuthConfig - Endpoints and configuration
- AuthManager - OAuth flow orchestration
- OAuthCallbackActivity - Handle redirect URI
- LoginScreen UI - Clean Material 3 login interface
- MainScreen UI - Post-login placeholder
- Token storage (SharedPreferences)
- State management (mutableState in MainActivity)
- Critical Bug Fix: Token expiry validation (5min → 1min buffer)
- End-to-end OAuth flow working
OAuth Flow:
- User taps "Sign In with Authentik" → Browser opens
- User authenticates → Browser redirects to
alfredmobile://oauth/callback - App receives callback → Parses code & state
- App exchanges code for tokens → Stores access token
- UI updates → Shows "Logged In!" screen
Key Learnings:
- AppAuth
fromIntent()doesn't work with browser redirects (requires manual parsing) - Authentik issues 5-minute tokens (buffer must be <5 minutes)
mutableStateOfneeds to be class-level to persist across recomposition
🚧 Phase 3: WebSocket Connection (NEXT)
- WebSocket client implementation (OkHttp)
- OpenClaw protocol integration
- Message serialization/deserialization
- Connection state management
- Auto-reconnect logic
- Token-based authentication (pass OAuth token)
- Basic chat UI for testing
WebSocket Endpoint: wss://alfred-app.dnspegasus.net
Authentication: OAuth token from Phase 2
📋 Phase 4: Chat Interface (PLANNED)
- Message list (LazyColumn)
- Input field with send button
- Message bubbles (user vs Alfred)
- Typing indicators
- Error handling & retry
- Offline message queue
📋 Phase 5: Voice Features (PLANNED)
- Wake word detection (Porcupine SDK)
- Voice input (Android SpeechRecognizer)
- Voice output (Android TTS or ElevenLabs)
- Push-to-talk vs always-listening modes
- Voice activity UI indicators
📋 Phase 6: Polish & Features (PLANNED)
- Proper launcher icon (replace placeholder)
- Splash screen
- Settings screen
- Notification support
- Background service for wake word
- Dark/light theme toggle
- Release build configuration
Current Status
Last Updated: February 2, 2026 08:29 PST Phase: OAuth Complete ✅ → Starting WebSocket 🚀 Build: Debug APK installed on tablet Login: Fully functional OAuth flow with Authentik
Technical Stack
- Language: Kotlin
- UI: Jetpack Compose + Material 3
- DI: Hilt
- Networking: Retrofit (HTTP), OkHttp (WebSocket)
- OAuth: AppAuth library
- Database: Room (for future message persistence)
- Authentication: Authentik OAuth 2.0
- Gateway: OpenClaw at alfred-app.dnspegasus.net
Repository
- Location: https://repo.anhonesthost.net/jknapp/alfred-mobile
- Branch: main
- Commits: 6 (as of Phase 2 completion)
Next Session: Implement WebSocket client and establish connection to Alfred gateway! 🚀