How thisaakash/aadhantermwork works
Project Type and Purpose
• This is a native Android mobile application (“app” module) for managing Companies and Students, handling user login, displaying data on maps, and sending/receiving notifications via Firebase Cloud Messaging (FCM).
High‑Level Architectural Components
a. UI Layer
• Activities (e.g., LoginActivity, MainActivity, AddCompanyActivity)
• Fragments (e.g., HomeFragment, MapFragment, NotificationFragment, ProfileFragment)
• Adapters & View Holders (e.g., CompanyAdapter, StudentAdapter)
b. Domain/Model Layer
• Data classes in model package (Company, Student, LoginRequest/Response, NotificationRequest)
c. Network/API Layer
• Retrofit interfaces in api package (AadhanApi, NotificationApi)
• HTTP client configuration (likely in AadhanApplication or a DI module)
d. Firebase Messaging Service
• MyFirebaseMessagingService handles inbound FCM pushes
e. Persistence (optional/local caches)
• SharedPreferences or SQLite – not explicit, but could be present for session tokens
f. Build & Configuration
• Gradle scripts (root & app/build.gradle)
• google‑services.json for Firebase config
External Dependencies & Services
• Firebase Cloud Messaging (push notifications)
• Backend REST APIs (endpoints consumed by AadhanApi & NotificationApi)
• Google Maps SDK (used in MapFragment + custom markers)
Relationships & Data Flows
• User taps UI → Activity/Fragment invokes Network Layer → HTTP calls to backend
• Backend → sends data (Companies, Students, Auth token) → displayed by UI
• Admin screens → POST/PUT calls via AadhanApi to create/update entities
• Notification flow:
– App registers FCM token via NotificationApi
– Backend pushes notifications via FCM → MyFirebaseMessagingService receives → triggers NotificationFragment updates
Architectural Patterns & Principles
• Layered architecture: clear separation of UI, domain, and networking
• Single Activity / multiple Fragments pattern in MainActivity
• Adapter pattern for lists (RecyclerView Adapters)
• Use of Intent‑Service (MyFirebaseMessagingService) for background message handling