How pkrverma/lcv2 works
Project Type and Purpose
• This is a mobile full-stack proof-of-concept application (“Future of Furniture”) combining an Android client (Jetpack Compose + ARCore) with a lightweight Node.js backend.
• The Android app uses ARCore to render furniture in AR, Jetpack Compose for UI, Retrofit for networking, and Firebase Auth (via google-services.json) for user authentication.
• The backend (app/backend/server.js) likely provides REST endpoints for product listings, orders, and payment processing.
Main Components
a. Android Client
• UI Layer (Jetpack Compose Screens: HomeScreen, DetailScreen, CheckoutScreen, etc.)
• ViewModel Layer (SharedViewModel) – implements MVVM, holds UI state & orchestrates business logic
• Network Layer (RetrofitClient, ApiService) – defines HTTP API to the backend
• AR Core Integration – invoked in PaymentHandler or MainActivity for AR rendering
• Firebase Auth Helper – handles login/register/forgot-password flows via Firebase SDK
• Local Data Utils (LocalData) – for any cached or persisted data
b. Backend Service (Node.js / Express)
• server.js – entry point defining REST endpoints (products, orders, auth callbacks, payments)
• .env – config for DB connections or secret keys
• (Implicit) Database or storage – could be MongoDB/PostgreSQL or Firebase functions
c. External Services
• Google ARCore – on-device AR rendering engine
• Firebase Auth – user authentication & management
• (Optional) Payment Gateway – invoked from PaymentHandler or backend
Relationships & Data Flows
• UI Events → SharedViewModel → Repository/Network → ApiService → Node.js Backend → Database/Payment Gateway
• On login/register, Android calls Firebase SDK → Firebase Auth service → returns token → passed to backend for session management
• AR interactions stay on-device via ARCore
• On “Place Order”, backend processes payment (via gateway) and persists order
Architectural Patterns & Design Principles
• MVVM on the Android side: Compose UI ↔ ViewModel ↔ Repository ↔ Network
• Layered separation: UI, business logic, data layer
• Use of single-responsibility modules: screens, network, utils, models
• Backend follows RESTful service principles