How ducshntrong/socialmediaapp works
Project type and purpose
• This is a native Android social-media client application (“Social Media App”) built in Kotlin.
• It follows a full-stack mobile architecture with UI screens (Activities & Fragments), presentation logic (ViewModels), local/remote data sources (Firebase services + on-device ML), and background services (JobScheduler).
• Core purpose: allow users to sign up/log in, create posts and stories, follow other users, chat, comment, receive notifications, take notes, and perform AI-driven NSFW/sentiment moderation on content.
File structure
Top-level
• build.gradle, settings.gradle, Gradle wrapper → standard Android/Gradle setup
• app/ → single Android module
app/src/main/java/com/htduc/socialmediaapplication
• Activities/Fragments → UI layer
• Adapters → RecyclerView and ViewPager adapters
• Models → data representations (User, Post, Comment, Story, etc.)
• ViewModel & ViewModelFactories → MVVM presentation layer
• Moderation → NSFWDetector (tflite model in assets), UserModerationManager
• Service → NotificationService (FCM), DeleteStoryJobService (JobScheduler)
• MyApplication.kt → application class, DI / initialization
app/src/main/assets
• nsfw1.tflite → on-device model for NSFW detection
Configuration & resources
• Firebase config (google-services.json), proguard rules, layouts, drawables, fonts, XML menus
README insights
• Lists features (profile, follow, story/post creation, like/comment, chat, notifications, notes)
• Dependencies: Firebase (Auth, Firestore/Realtime DB, Storage, Cloud Messaging), third-party UI and image libs, on-device ML model, scheduler
• Mentions “AI nsfw and sentiment analysis” → local ML for content moderation
Detail & fidelity
• Every major Activity/Fragment as a UI node
• ViewModel-Factory injection where relevant
• On-device ML asset loading under the Data layer
• Firebase services separately (Auth, DB, Storage, FCM)
• Denote periodic cleanup via JobScheduler