feat(android): Phase 1 MVP app — Compose UI, Room, sync #2

Merged
jdeville05 merged 1 commits from feature/android-frontend into main 2026-05-11 15:46:07 +00:00
Owner

Summary

Android client for Phase 1 of Pantree (Kotlin + Jetpack Compose + Room + Hilt + Retrofit).

  • Auth flows with EncryptedSharedPreferences token storage and deep-link password reset
  • Pantry / Recipes / Shopping List screens — every screen handles loading / error / empty / success
  • Recipe scaling, availability badges, ingredient / indicators
  • Sync on app open + foreground return via ProcessLifecycleOwner observer
  • Room caching for offline-read of cached data

Depends on

Backend PR (#1) must be merged and deployed before this app is functional.

Known issues (Phase 2 follow-up)

Severity Issue
Major API client missing /v1/ prefix on some endpoints
Major Sync response deserialization expects createdAt field server doesn't return
Major TokenStore.isLoggedIn() doesn't check token expiry

Test plan

  • Instrumented tests on device
  • Manual: signup/signin/Google OAuth
  • Manual: deep-link password reset
  • Manual: pantry/recipes/shopping list flows
  • Manual: multi-device sync after backend deploy
## Summary Android client for Phase 1 of Pantree (Kotlin + Jetpack Compose + Room + Hilt + Retrofit). - Auth flows with EncryptedSharedPreferences token storage and deep-link password reset - Pantry / Recipes / Shopping List screens — every screen handles loading / error / empty / success - Recipe scaling, availability badges, ingredient ✅/❌ indicators - Sync on app open + foreground return via ProcessLifecycleOwner observer - Room caching for offline-read of cached data ## Depends on Backend PR (#1) must be merged and deployed before this app is functional. ## Known issues (Phase 2 follow-up) | Severity | Issue | |----------|-------| | Major | API client missing /v1/ prefix on some endpoints | | Major | Sync response deserialization expects createdAt field server doesn't return | | Major | TokenStore.isLoggedIn() doesn't check token expiry | ## Test plan - [ ] Instrumented tests on device - [ ] Manual: signup/signin/Google OAuth - [ ] Manual: deep-link password reset - [ ] Manual: pantry/recipes/shopping list flows - [ ] Manual: multi-device sync after backend deploy
jdeville05 added 1 commit 2026-05-11 15:45:50 +00:00
- Build config: build.gradle (app + root), settings.gradle, AndroidManifest
- Application entry: PantreeApplication (Hilt), MainActivity (Compose host)
- Data layer:
  - ApiService (Retrofit interface, all 20 endpoints)
  - ApiModels (all request/response DTOs)
  - AuthInterceptor (JWT Bearer header injection)
  - TokenStore (EncryptedSharedPreferences)
  - SyncPreferences (DataStore, last-sync timestamp)
  - PantreeDatabase (Room, 5 entities)
  - Entities: PantryItemEntity, RecipeEntity, RecipeIngredientEntity, ShoppingListEntity, ShoppingListItemEntity
  - DAOs: PantryDao, RecipeDao, ShoppingListDao
  - Repositories: AuthRepository, PantryRepository, RecipeRepository, ShoppingListRepository, SyncRepository
- DI: AppModule (Hilt, provides OkHttp/Retrofit/Room/DAOs)
- Util: Result<T> sealed class, safeApiCall, toUserMessage (human-readable error mapping)
- Sync: SyncManager (DefaultLifecycleObserver, triggers on app open/foreground)
- Theme: Color, Type, Theme (Material 3, light + dark)
- Navigation: Screen sealed class, PantreeNavGraph (deep links for password reset)
- Shared components: LoadingState, ErrorState, EmptyState, OfflineBanner, PantreeTopBar
- Auth screens: SplashScreen, SignInScreen, SignUpScreen, ForgotPasswordScreen, ResetPasswordScreen + AuthViewModel
- Pantry screen: PantryScreen (list/add/edit/delete dialogs) + PantryViewModel
- Recipe screens: RecipesScreen (filter chips, search, availability badges) + RecipeDetailScreen (scale 1x/2x/3x, ingredient pantry status) + RecipeViewModel
- Shopping screens: ShoppingListsScreen + ShoppingListDetailScreen (check-off, progress bar, merge feedback, add-from-recipes) + ShoppingListViewModel
- Settings screen: sign out + account deletion (15-day window copy) + SettingsViewModel
- Tests: ResultTest (unit), RecipeDetailScreenTest (unit), PantryScreenTest (instrumented)
- README: architecture, module structure, UI states table, sync strategy, setup

Every screen handles loading / error / empty / success states.
Offline: cached Room data shown read-only.
jdeville05 merged commit b57522ed46 into main 2026-05-11 15:46:07 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jdeville05/pantree#2
No description provided.