How bhaveshdesale/signx works
Purpose and Runtime
This is a native Android sign-language application, built with Gradle/Kotlin and likely Jetpack Compose. It combines authentication, navigation, camera capture, on-device hand-landmark detection, and a remote sign-language API. The Android app entry configuration is app/src/main/AndroidManifest.xml; application/activity startup code is in app/src/main/java/com/example/signx/App.java and app/src/main/java/com/example/signx/MainActivity.kt.
Application Composition and Navigation
MainActivity.kt hosts the application UI and initializes the Compose-oriented screen flow. app/src/main/java/com/example/signx/navigation/NavGraph.kt is the primary route boundary between auth, home, and camera experiences. There are two UI organization areas: feature-facing screens under presentation/ and additional themed UI screens under ui/theme/Ui/; this indicates navigation or migration boundaries that should be reconciled before broad UI changes.
Authentication Feature
Authentication is modeled as a presentation state machine:
• app/src/main/java/com/example/signx/presentation/auth/AuthViewModel.kt
• app/src/main/java/com/example/signx/presentation/auth/AuthUiState.kt
• app/src/main/java/com/example/signx/presentation/auth/LoginScreen.kt
• app/src/main/java/com/example/signx/presentation/auth/RegisterScreen.kt
• app/src/main/java/com/example/signx/presentation/auth/HomeScreen.kt
Screens render state and dispatch user actions to AuthViewModel; successful auth likely gates access to home/camera routes. Firebase configuration is present at app/google-services.json and app/src/main/java/com/example/signx/google-services.json, making Google/Firebase services a material integration, though the exact Firebase product use is not visible from the tree.
Camera-to-Landmarks Pipeline
The camera feature is the core real-time processing path:
• app/src/main/java/com/example/signx/presentation/camera/CameraScreen.kt
• app/src/main/java/com/example/signx/presentation/camera/CameraViewModel.kt
• app/src/main/java/com/example/signx/presentation/camera/CameraAnalyzer.kt
• app/src/main/java/com/example/signx/presentation/camera/HandLandmarkDetector.kt
CameraScreen owns camera-facing UI and lifecycle integration. Frames flow through CameraAnalyzer into HandLandmarkDetector, which uses the packaged model app/src/assets/models/hand_landmarker.task. CameraViewModel is the state/control boundary between asynchronous camera inference and rendered recognition UI. Bitmap/frame conversion utilities are isolated in app/src/main/java/com/example/signx/utils/BitmapUtils.kt.
Sign-Language Data and Remote Boundary
The data layer separates API access from repository-facing consumption:
• app/src/main/java/com/example/signx/data/api/SignLanguageApiService.kt
• app/src/main/java/com/example/signx/data/repository/SignLanguageRepository.kt
• app/src/main/java/com/example/signx/data/model/SignLanguageRepository.kt
The API service is the external network boundary; repository classes should shield view models and camera logic from request/response details. The duplicated SignLanguageRepository name across data/model and data/repository is architecturally ambiguous and should be inspected before extending the data contract. Connectivity checks belong at app/src/main/java/com/example/signx/utils/NetworkUtils.kt, rather than in UI or analyzer code.
Principal End-to-End Flow
1. Android launches activity/application startup.
2. Navigation selects auth or main application routes.
3. Auth screens update AuthViewModel state and transition to home.
4. The user enters camera mode; camera frames are analyzed locally using the bundled hand-landmarker model.
5. Landmark/inference results update CameraViewModel and camera UI.
6. Where interpretation or sign-language content requires network access, feature code crosses through the repository and API-service boundary.
Build, Assets, and Platform Boundaries
The single app module is defined by app/build.gradle.kts; root dependency/version orchestration is in build.gradle.kts and gradle/libs.versions.toml. Android resources and permissions-facing platform configuration live in app/src/main/res/ and app/src/main/AndroidManifest.xml. The app’s key non-code dependencies are the local ML task model and Firebase/Google service configuration; remote API details are encapsulated by SignLanguageApiService.kt.
Main entry points: NavGraph.kt Route graph · AuthViewModel.kt Auth state controller · CameraScreen.kt Camera screen · CameraViewModel.kt Camera state controller
Components 18
Android platform
- App manifest · Declares app platform integration and permissions.
app/src/main/AndroidManifest.xml - Application startup
app/src/main/java/com/example/signx/App.java - Firebase configuration · Configured external Google/Firebase integration.
app/google-services.json
UI and navigation
- Main activity
app/src/main/java/com/example/signx/MainActivity.kt - Route graph · Routes between auth, home, and camera experiences.
app/src/main/java/com/example/signx/navigation/NavGraph.kt
Authentication
- Auth and home screens
app/src/main/java/com/example/signx/presentation/auth/LoginScreen.kt - Auth state controller
app/src/main/java/com/example/signx/presentation/auth/AuthViewModel.kt - Auth UI state
app/src/main/java/com/example/signx/presentation/auth/AuthUiState.kt
Camera inference
- Camera screen · Owns camera UI and lifecycle integration.
app/src/main/java/com/example/signx/presentation/camera/CameraScreen.kt - Camera state controller · Bridges asynchronous inference and rendered recognition UI.
app/src/main/java/com/example/signx/presentation/camera/CameraViewModel.kt - Frame analyzer
app/src/main/java/com/example/signx/presentation/camera/CameraAnalyzer.kt - Frame conversion
app/src/main/java/com/example/signx/utils/BitmapUtils.kt - Hand landmark detector
app/src/main/java/com/example/signx/presentation/camera/HandLandmarkDetector.kt - Hand landmarker model
app/src/assets/models/hand_landmarker.task
Sign-language data
- Sign-language repository · Shields feature code from API request and response details.
app/src/main/java/com/example/signx/data/repository/SignLanguageRepository.kt - Sign-language API · External network boundary.
app/src/main/java/com/example/signx/data/api/SignLanguageApiService.kt - Connectivity checks
app/src/main/java/com/example/signx/utils/NetworkUtils.kt - Ambiguous repository model · Duplicate repository name should be resolved before extending the data contract.
app/src/main/java/com/example/signx/data/model/SignLanguageRepository.kt
Connections 21
- App manifest → Application startup: launches
- Application startup → Main activity: starts
- Main activity → Route graph: hosts
- Route graph → Auth and home screens: routes to
- Auth and home screens → Auth state controller: dispatches actions
- Auth state controller → Auth UI state: updates
- Auth UI state → Auth and home screens: renders
- Auth state controller → Route graph: auth success transitions
- Firebase configuration → Auth state controller: supports integration
- Route graph → Camera screen: routes to
- Camera screen → Camera state controller: renders and controls
- Camera screen → Frame analyzer: supplies frames
- Frame analyzer → Frame conversion: converts frames
- Frame analyzer → Hand landmark detector: analyzes frames
- Hand landmarker model → Hand landmark detector: loaded by
- Hand landmark detector → Camera state controller: landmark results
- Camera state controller → Camera screen: recognition state
- Camera state controller → Sign-language repository: requests interpretation
- Sign-language repository → Connectivity checks: checks connectivity
- Sign-language repository → Sign-language API: uses
- Ambiguous repository model → Sign-language repository: name ambiguity