How sadiquereyaz/millia-connect works
Purpose and Runtime
MiliaConnect is a modular native Android campus companion. It automates Jamia WiFi captive-portal login, aggregates notices, tracks entrance results offline and in the background, and also includes attendance and rental-listing features. The runtime is Kotlin/Coroutines/Flow with Jetpack Compose, Material 3, Android lifecycle components, Room, and WorkManager.
Application Composition and Entry Points
The Android application starts through the manifest/application/activity stack, initializes app-wide dependencies, and renders the Compose root. MainActivity hosts MilliaConnectApp; BaseApplication is the likely process-level initialization point. App-level Koin wiring and environment/connectivity implementations bridge shared abstractions to Android.
• app/src/main/AndroidManifest.xml
• app/src/main/java/com/reyaz/milliaconnect1/MainActivity.kt
• app/src/main/java/com/reyaz/milliaconnect1/BaseApplication.kt
• app/src/main/java/com/reyaz/milliaconnect1/di/AppModule.kt
Navigation and Feature Boundaries
The app module composes feature screens behind a centralized navigation host, destination definitions, and feature-specific subgraphs. Features are independently built Android library modules and generally separate presentation (Compose screen/ViewModel/state), domain contracts/use cases, and data implementations.
• app/src/main/java/com/reyaz/milliaconnect1/navigation/MCNavHost.kt
• app/src/main/java/com/reyaz/milliaconnect1/navigation/AppDestinations.kt
• app/src/main/java/com/reyaz/milliaconnect1/navigation/graph/AttendanceNavGraph.kt
Portal / Campus WiFi Automation
The portal feature is a credential-backed login workflow. Its ViewModel drives UI state; use cases retrieve/store credentials and submit portal login through a repository. The remote scraper handles portal interactions; a WorkManager worker enables automatic background login. Campus-network detection is intentionally HTTP reachability-based rather than SSID access, avoiding sensitive WiFi/location permissions.
• feature/portal/src/main/java/com/reyaz/feature/portal/presentation/PortalViewModel.kt
• feature/portal/src/main/java/com/reyaz/feature/portal/data/remote/PortalScraper.kt
• feature/portal/src/main/java/com/reyaz/feature/portal/data/worker/AutoLoginWorker.kt
Notice and Result Acquisition Pipelines
Notices and results follow offline-first pipelines: scrape remote HTML/content, parse/map it into feature models, persist it in Room, and expose state to Compose ViewModels. Notice retrieval is on-demand through its repository/use case. Result refresh has explicit background fetch/sync workers and can feed user notifications when new results arrive.
• feature/notice/src/main/java/com/reyaz/feature/notice/data/remote/NoticeScraper.kt
• feature/notice/src/main/java/com/reyaz/feature/notice/data/local/NoticeDatabase.kt
• feature/result/src/main/java/com/reyaz/feature/result/data/ResultRepositoryImpl.kt
• feature/result/src/main/java/com/reyaz/feature/result/worker/ResultSyncWorker.kt
Other Product Domains
Attendance models schedules, subjects, tasks, and attendance state locally, surfaced by schedule/add-attendance ViewModels. Rent manages property listings and image uploads through repository boundaries. Both are integrated into app navigation but own their data/domain/presentation layers.
• feature/attendance/src/main/java/com/reyaz/feature/attendance/schedule/presentation/ScheduleViewModel.kt
• feature/attendance/src/main/java/com/reyaz/feature/attendance/schedule/data/dao/ScheduleModel.kt
• feature/rent/src/main/java/com/reyaz/feature/rent/data/repository/PropertyRepositoryImpl.kt
• feature/rent/src/main/java/com/reyaz/feature/rent/data/local/ImageApiService.kt
Shared Infrastructure and External Services
core modules establish cross-feature boundaries: Retrofit/network client, authenticated interception and PDF download/viewing; notification channels and dispatch; Firebase bindings; Firebase Analytics; Google credential-manager sign-in; and reusable Compose UI. Firebase configuration is supplied by the app module and supports Firestore/Storage-promotional content, analytics, and update checking. Koin modules bind implementations at module boundaries.
• core/network/src/main/java/com/reyaz/core/network/NetworkModule.kt
• core/network/src/main/java/com/reyaz/core/network/interceptor/AuthInterceptor.kt
• core/notification/src/main/java/com/reyaz/core/notification/manager/AppNotificationManager.kt
• core/auth/src/main/java/com/reyaz/core/auth/data/repository/GoogleServiceImpl.kt
• core/config/src/main/java/com/reyaz/core/config/FirebaseAppUpdateChecker.kt
• app/google-services.json
Main entry points: MCNavHost.kt Navigation host · NetworkModule.kt Network module · BaseApplication.kt Base application · AppModule.kt App Koin module
Components 21
App shell
- Android manifest
app/src/main/AndroidManifest.xml - Base application
app/src/main/java/com/reyaz/milliaconnect1/BaseApplication.kt - Main activity · Hosts MilliaConnectApp.
app/src/main/java/com/reyaz/milliaconnect1/MainActivity.kt - App Koin module
app/src/main/java/com/reyaz/milliaconnect1/di/AppModule.kt - Navigation host · Central destinations and feature subgraphs.
app/src/main/java/com/reyaz/milliaconnect1/navigation/MCNavHost.kt - Attendance graph
app/src/main/java/com/reyaz/milliaconnect1/navigation/graph/AttendanceNavGraph.kt
Product features
- Portal ViewModel · Drives credential-backed portal login state.
feature/portal/src/main/java/com/reyaz/feature/portal/presentation/PortalViewModel.kt - Portal scraper
feature/portal/src/main/java/com/reyaz/feature/portal/data/remote/PortalScraper.kt - Auto-login worker · Performs background portal login.
feature/portal/src/main/java/com/reyaz/feature/portal/data/worker/AutoLoginWorker.kt - Notice acquisition · Scrapes and maps notices for local storage.
feature/notice/src/main/java/com/reyaz/feature/notice/data/remote/NoticeScraper.kt - Notice database
feature/notice/src/main/java/com/reyaz/feature/notice/data/local/NoticeDatabase.kt - Result repository · Coordinates result retrieval and persisted state.
feature/result/src/main/java/com/reyaz/feature/result/data/ResultRepositoryImpl.kt - Result sync worker · Refreshes results in the background.
feature/result/src/main/java/com/reyaz/feature/result/worker/ResultSyncWorker.kt - Attendance feature · Schedules, subjects, tasks, and attendance state.
feature/attendance/src/main/java/com/reyaz/feature/attendance/schedule/presentation/ScheduleViewModel.kt - Property repository
feature/rent/src/main/java/com/reyaz/feature/rent/data/repository/PropertyRepositoryImpl.kt - Image API service
feature/rent/src/main/java/com/reyaz/feature/rent/data/local/ImageApiService.kt
Shared platform
- Network module · Shared HTTP, authentication, and download infrastructure.
core/network/src/main/java/com/reyaz/core/network/NetworkModule.kt - Notification manager
core/notification/src/main/java/com/reyaz/core/notification/manager/AppNotificationManager.kt - Google service
core/auth/src/main/java/com/reyaz/core/auth/data/repository/GoogleServiceImpl.kt - Firebase update checker
core/config/src/main/java/com/reyaz/core/config/FirebaseAppUpdateChecker.kt
External services
- Firebase · Supports analytics, Firestore, Storage, and update data.
app/google-services.json
Connections 23
- Android manifest → Base application: starts
- Base application → App Koin module: initializes
- Base application → Main activity: launches
- Main activity → Navigation host: renders
- Navigation host → Attendance graph: includes
- Navigation host → Portal ViewModel: routes to
- Navigation host → Notice acquisition: routes to
- Navigation host → Result repository: routes to
- Navigation host → Attendance feature: routes to
- Navigation host → Property repository: routes to
- App Koin module → Network module: binds
- App Koin module → Notification manager: binds
- Portal ViewModel → Portal scraper: submits login
- Auto-login worker → Portal scraper: background login
- Portal scraper → Network module: uses HTTP
- Notice acquisition → Notice database: persists
- Notice acquisition → Network module: scrapes via
- Result sync worker → Result repository: refreshes
- Result repository → Network module: fetches from
- Result sync worker → Notification manager: announces new results
- Property repository → Image API service: uploads images
- Google service → Firebase: authenticates with
- Firebase update checker → Firebase: checks