Files
alfred-mobile/PROGRESS.md
jknapp 6d4ae2e5c3 Initial commit: Alfred Mobile - AI Assistant Android App
- 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
2026-02-09 11:12:51 -08:00

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:

  1. User taps "Sign In with Authentik" → Browser opens
  2. User authenticates → Browser redirects to alfredmobile://oauth/callback
  3. App receives callback → Parses code & state
  4. App exchanges code for tokens → Stores access token
  5. 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)
  • mutableStateOf needs 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


Next Session: Implement WebSocket client and establish connection to Alfred gateway! 🚀