How bsoc-bitbyte/nudj works
Project Type and Purpose
• This is a full-stack Android mobile application (“Nudj”) built with Kotlin and Jetpack Compose on the client side, using Firebase services for its backend.
• Hosts list and manage events; students browse, RSVP, and receive notifications.
High-level Architecture Components
a. Presentation Layer (Android App)
• UI (Jetpack Compose screens & components)
• Navigation (Compose Navigation in Screens.kt)
b. Application Layer
• ViewModels (BaseViewModel, per-screen ViewModels in ui/screens/*)
• UI State Classes (e.g., LoginUiState, ForgotPasswordUIState)
c. Domain/Data Layer
• Repositories (AuthRepository, FirebaseRepository, GoogleSignInClient)
• Models (User.kt, AuthResult.kt)
d. Dependency Injection
• Hilt or custom DI module (AuthModule.kt)
• Application class (NudjApplication.kt)
e. External Services
• Firebase Auth
• Firestore / Realtime Database (for event data)
• FCM (notifications)
• Google Sign-In
Relationships & Data Flows
• UI <–> ViewModel: Compose UI emits user actions; ViewModel exposes UIState via LiveData/StateFlow.
• ViewModel <–> Repository: ViewModels invoke repository methods for auth and data operations.
• Repository <–> Firebase Services: Repository delegates to Firebase SDK (Auth, Firestore, FCM).
• DI Container wires ViewModels to Repositories and SDK clients (GoogleSignInClient).
Architectural Patterns & Principles
• MVVM (Model-View-ViewModel)
• Single Activity (MainActivity) + Compose Navigation
• Clean separation of concerns: UI, state, domain logic, infrastructure
• Dependency Injection for testability and modularity
Detailed Steps for the Engineer
a. A large rectangle titled “Android App (com.tpc.nudj)”.
b. Inside, partition into horizontal layers:
1) Presentation: List key files/packages (ui/components, ui/screens, navigation)
2) ViewModel: BaseViewModel + each screen’s ViewModel
3) Data/Repository: AuthRepository, FirebaseRepository, GoogleSignInClient
4) DI: AuthModule, NudjApplication
• ViewModel → AuthRepository → Firebase Auth
• ViewModel → FirebaseRepository → Firestore
• FirebaseAuth events → AuthRepository → ViewModel
• FCM → Mobile OS → ViewModel → UI
e. Technologies alongside each component (e.g., “Jetpack Compose,” “StateFlow,” “Kotlin”).
f. Optionally, add a “Google OAuth” bubble linked to GoogleSignInClient.