Forumus is an Internal Forum application for university members built using Android Kotlin. The application provides a platform for students and teachers to share posts, engage in discussions, and communicate through direct messaging.
These are the fundamental features required for core app functionality:
| # | Feature | Description |
|---|---|---|
| 1 | User Registration | Email/password registration with role selection (Student/Teacher) |
| 2 | User Login | Email/password authentication with form validation |
| 3 | Forgot Password | Password recovery via email |
| 4 | Home Feed | Display list of posts with pull-to-refresh |
| 5 | Create Post | Create new posts with title and content |
| 6 | Post Detail | View full post content |
| 7 | Comments | Add comments to posts |
| 8 | Upvote/Downvote | Vote on posts and comments |
| 9 | User Profile | View user profile with their posts and comments |
| 10 | Edit Profile | Update display name and avatar |
| 11 | Search | Search for posts and users |
| 12 | Direct Messaging | Send text messages to other users |
| 13 | Chat List | View list of conversations |
| 14 | Notifications | In-app notification center |
| 15 | Settings | App preferences and account settings |
| 16 | Logout | Sign out from the application |
These are enhanced features that provide additional value and sophistication:
| # | Feature | Description |
|---|---|---|
| 1 | OTP Email Verification | 6-digit OTP verification during registration |
| 2 | Remember Me / Auto-Login | Persistent session with configurable timeout (7 days default) |
| 3 | Onboarding Flow | Multi-slide introduction for first-time users |
| 4 | Topic Filtering | Filter posts by multiple topics via drawer menu |
| 5 | AI Topic Suggestions | AI-powered topic recommendations when creating posts |
| 6 | AI Post Summary | Generate AI summaries of post content and comments |
| 7 | AI Content Moderation | Automatic validation of post content before publishing |
| 8 | Location Tagging | Add GPS location to posts using Google Places API |
| 9 | Map Preview | Custom avatar markers on map previews |
| 10 | Multi-Media Posts | Attach multiple images and videos to posts |
| 11 | Image Messages | Send up to 5 images per chat message |
| 12 | Share Post via DM | Share posts with other users through direct messages |
| 13 | Shared Post Preview | Render clickable post previews in chat messages |
| 14 | Infinite Scroll | Cursor-based pagination for posts and messages |
| 15 | Real-time Chat | Kotlin Flow with Firestore listeners for live updates |
| 16 | Push Notifications (FCM) | Firebase Cloud Messaging for chat and activity alerts |
| 17 | Threaded Comments | Nested reply system with parent-child relationships |
| 18 | Role Badges | Color-coded badges (Student/Teacher/Admin) |
| 19 | Dark Mode | Theme switching with immediate application |
| 20 | Expandable Content | "Show more..." truncation for long posts |
| 21 | Save/Bookmark Posts | Save posts for later access |
| 22 | Report Content | Report posts with violation categories |
| 23 | User Status System | Ban/Warn/Remind system with enforcement |
| 24 | Background Upload Worker | WorkManager for reliable message/image uploads |
| 25 | Summary Caching | Cache AI summaries to reduce API calls |
| 26 | Media Viewer | Fullscreen image/video viewer with zoom and swipe |
| 27 | Draft Auto-Save | Automatic saving of post drafts on exit |
| Category | Count |
|---|---|
| Basic Features | 16 |
| Advanced Features | 27 |
| Total Features | 43 |
| Category | Technology |
|---|---|
| Language | Kotlin |
| Min SDK | 24 (Android 7.0) |
| Target SDK | 36 |
| Architecture | MVVM (Model-View-ViewModel) |
| UI Binding | ViewBinding & DataBinding |
| Category | Libraries |
|---|---|
| Backend | Firebase Auth, Firestore, Firebase Storage, FCM |
| Networking | Retrofit, OkHttp, Moshi |
| Image Loading | Coil, Glide |
| Navigation | Jetpack Navigation Component with Safe Args |
| Lifecycle | ViewModel, LiveData, Coroutines |
| Location | Google Maps SDK, Places API |
| Background Tasks | WorkManager |
| UI Components | Material Design, SwipeRefreshLayout, CircleImageView |
Name: Splash Screen
Short Description: The initial loading screen displayed when the app launches. It handles theme initialization and auto-login validation before navigating users to the appropriate screen.
flowchart TD
A[App Launch] --> B[Apply Saved Theme]
B --> C{First Time User?}
C -->|Yes| D[Welcome Screen]
C -->|No| E{Valid Session + Remember Me?}
E -->|Yes| F[Main Activity - Home]
E -->|No| G[Login Screen]
Related App Screens:
- Welcome Activity (first-time users)
- Login Activity (returning users without session)
- Main Activity (users with valid session)
Screenshot Description:
splash_screen.png: App logo centered on branded background with loading indicator
Name: Onboarding / Welcome Flow
Short Description: A multi-slide introduction for first-time users explaining app features, followed by navigation to registration or login.
flowchart LR
A[Welcome Screen] --> B[Slide 1: Intro]
B --> C[Slide 2: Features]
C --> D[Slide 3: Get Started]
D --> E{User Choice}
E -->|Login| F[Login Screen]
E -->|Register| G[Register Screen]
Related App Screens:
- Welcome Activity
- Slide Activity
- Login Activity
- Register Activity
Screenshot Descriptions:
onboarding_welcome.png: Welcome screen with app introduction and Get Started buttononboarding_slide_1.png: First slide explaining community featuresonboarding_slide_2.png: Second slide explaining post and discussionsonboarding_slide_3.png: Final slide with login/register options
Name: User Registration
Short Description: New user registration with email validation, password requirements, role selection (Student/Teacher), and OTP email verification.
flowchart TD
A[Register Screen] --> B[Enter Details]
B --> C{Validate Input}
C -->|Invalid| D[Show Errors]
D --> B
C -->|Valid| E[Create Account]
E --> F[Send OTP Email]
F --> G[Verification Screen]
G --> H{Enter OTP}
H -->|Valid| I[Complete Registration]
I --> J[Success Screen]
J --> K[Login Screen]
H -->|Invalid| L[Show Error / Resend OTP]
L --> G
Related App Screens:
- Register Activity
- Verification Activity
- Success Activity
- Login Activity
Screenshot Descriptions:
register_form.png: Registration form with email, password, full name, and role selectionregister_validation.png: Form with validation error messages displayedotp_verification.png: OTP code entry screen with 6-digit input fieldsregistration_success.png: Success screen with confirmation message and proceed button
Name: User Login
Short Description: Authentication screen with email/password login, "Remember Me" functionality for persistent sessions, and forgot password navigation.
flowchart TD
A[Login Screen] --> B[Enter Credentials]
B --> C{Validate Input}
C -->|Invalid| D[Show Field Errors]
D --> B
C -->|Valid| E[Authenticate with Firebase]
E --> F{Authentication Result}
F -->|Success| G{User Status Check}
G -->|Normal/Reminded/Warned| H[Navigate to Home]
G -->|Banned| I[Banned Screen]
F -->|Email Not Verified| J[Verification Screen]
F -->|Error| K[Show Error Message]
K --> B
Related App Screens:
- Login Activity
- Main Activity (Home)
- Banned Activity
- Verification Activity
- Forgot Password Activity
Screenshot Descriptions:
login_screen.png: Login form with email, password fields, Remember Me checkboxlogin_error.png: Login screen showing authentication errorbanned_screen.png: Screen displayed for banned users with ban reason
Name: Forgot Password
Short Description: Password recovery flow using email verification and OTP-based reset mechanism.
flowchart TD
A[Login Screen] --> B[Tap Forgot Password]
B --> C[Forgot Password Screen]
C --> D[Enter Email]
D --> E{Email Exists?}
E -->|Yes| F[Send OTP]
F --> G[Enter OTP]
G --> H{OTP Valid?}
H -->|Yes| I[Reset Password Screen]
I --> J[Enter New Password]
J --> K[Password Updated]
K --> L[Login Screen]
H -->|No| M[Show Error / Resend]
M --> G
E -->|No| N[Show Error]
N --> D
Related App Screens:
- Forgot Password Activity
- Reset Password Activity
- Login Activity
Screenshot Descriptions:
forgot_password.png: Email entry screen for password recoveryreset_password.png: New password entry screen with confirmation field
Name: Home Feed
Short Description: Main feed displaying approved posts with infinite scrolling, pull-to-refresh, topic filtering via drawer menu, and quick access to create posts.
flowchart TD
A[Home Fragment] --> B[Load Initial Posts]
B --> C[Display Posts in RecyclerView]
C --> D{User Action}
D -->|Scroll Down| E[Load More Posts - Pagination]
E --> C
D -->|Pull Down| F[Refresh Feed]
F --> B
D -->|Tap Post| G[Post Detail Screen]
D -->|Tap Topic Filter| H[Open Drawer]
H --> I[Select Topics]
I --> J[Filter Posts by Topics]
J --> C
D -->|Tap Create| K[Create Post Screen]
Related App Screens:
- Home Fragment
- Post Detail Fragment
- Create Post Fragment
- Settings Fragment
- Profile Fragment
- Search Fragment
Screenshot Descriptions:
home_feed.png: Main feed showing list of posts with author info, content preview, vote countshome_feed_loading.png: Feed with loading indicator while fetching more postsdrawer_topics.png: Side drawer showing topic filter options with selection checkboxeshome_empty.png: Empty state when no posts match selected filters
Name: Post Card
Short Description: Individual post card displaying author information (avatar, name, role badge), creation timestamp, title, content with media (images/videos), topics, location, vote/comment counts, and action buttons.
Related App Screens:
- Home Fragment
- Profile Fragment
- Saved Posts Fragment
- Post Detail Fragment
Screenshot Descriptions:
post_card_text.png: Text-only post with title, content, author info, and engagement statspost_card_with_images.png: Post with image gallery showing 1-4 imagespost_card_with_video.png: Post with video thumbnail and play indicatorpost_card_with_location.png: Post showing location tag with map preview option
Name: Upvote/Downvote System
Short Description: Reddit-style voting mechanism allowing users to upvote or downvote posts and comments with real-time count updates.
flowchart TD
A[Post Display] --> B{User Taps Vote}
B -->|Upvote| C{Current State}
B -->|Downvote| D{Current State}
C -->|None| E[Add Upvote]
C -->|Already Upvoted| F[Remove Upvote]
C -->|Downvoted| G[Change to Upvote]
D -->|None| H[Add Downvote]
D -->|Already Downvoted| I[Remove Downvote]
D -->|Upvoted| J[Change to Downvote]
E --> K[Update UI & Firestore]
F --> K
G --> K
H --> K
I --> K
J --> K
Related App Screens:
- Home Fragment
- Post Detail Fragment
- Profile Fragment
Screenshot Descriptions:
voting_neutral.png: Post with no user vote showing default vote buttonsvoting_upvoted.png: Post showing highlighted upvote state with increased countvoting_downvoted.png: Post showing highlighted downvote state
Name: Create Post
Short Description: Full-featured post creation with title, content, multi-media attachments (images/videos), topic selection with AI suggestions, location tagging with Google Places integration, and auto-save draft functionality.
flowchart TD
A[Tap Create Button] --> B[Create Post Fragment]
B --> C[Enter Title & Content]
C --> D{Add Media?}
D -->|Camera| E[Capture Photo/Video]
D -->|Gallery| F[Select from Gallery]
E --> G[Preview Media]
F --> G
G --> H{Add Topics?}
H -->|Manual| I[Topic Selection Dialog]
H -->|AI Suggest| J[Get AI Topic Suggestions]
I --> K[Topics Selected]
J --> K
K --> L{Add Location?}
L -->|Yes| M[Location Picker Bottom Sheet]
M --> N[Search or Select Nearby Place]
N --> O[Location Tagged]
L -->|No| O
O --> P[Tap Submit]
P --> Q{Validation}
Q -->|Pass| R[Upload Media to Storage]
R --> S[Save Post to Firestore]
S --> T[AI Content Validation]
T --> U[Navigate to Home]
Q -->|Fail| V[Show Errors]
V --> C
Key Files:
| File | Purpose |
|---|---|
CreatePostFragment.kt |
Main UI Fragment handling user interactions, media selection, and form submission |
CreatePostViewModel.kt |
ViewModel managing post state, draft persistence, and post creation logic |
PostRepository.kt |
Repository handling Firestore operations, media upload to Firebase Storage |
fragment_create_post.xml |
Layout file defining the post creation form UI |
LocationPickerBottomSheet.kt |
Bottom sheet for location search and nearby places selection |
TopicAdapter.kt |
RecyclerView adapter for topic selection dialog |
SelectedImageAdapter.kt |
Adapter displaying selected images/videos with delete functionality |
NearbyPlacesAdapter.kt |
Adapter for displaying nearby places in location picker |
Implementation Details:
| Feature | Implementation |
|---|---|
| Multi-Media Upload | Images/videos uploaded to Firebase Storage with UUID-based naming, thumbnails generated for videos |
| Photo/Video Capture | Uses ActivityResultContracts.TakePicture and CaptureVideo with FileProvider for temp storage |
| Gallery Selection | PickMultipleVisualMedia contract supporting up to 10 images/videos |
| Video Duration Limit | Videos limited to 60 seconds, validated before adding to selection |
| Topic Selection | Custom dialog with checkbox list, max 5 topics limit |
| AI Topic Suggestions | Backend API /api/posts/getSuggestedTopics analyzes title/content for relevant topics |
| Location Tagging | Google Places API integration with Autocomplete and nearby places search |
| Map Preview | Custom marker with user avatar displayed on Google Maps |
| Draft Auto-Save | SharedPreferences-based draft saving on onPause(), restored on fragment creation |
| Form Validation | Post button enabled only when title and content are non-empty |
Data Flow - Create Post:
sequenceDiagram
participant User
participant Fragment as CreatePostFragment
participant VM as CreatePostViewModel
participant Repo as PostRepository
participant Storage as Firebase Storage
participant Firestore as Firestore
User->>Fragment: Fill form & tap Post
Fragment->>VM: createPost(title, content, topics, location)
VM->>VM: Set Loading state
VM->>Repo: savePost(context, post)
loop For each image
Repo->>Storage: Upload image
Storage-->>Repo: Image URL
end
loop For each video
Repo->>Storage: Upload video
Storage-->>Repo: Video URL
Repo->>Repo: Generate thumbnail
Repo->>Storage: Upload thumbnail
Storage-->>Repo: Thumbnail URL
end
Repo->>Repo: Generate Post ID (POST_yyyyMMdd_HHmmss_random)
Repo->>Firestore: Save post document
Firestore-->>Repo: Success
loop For each topic
Repo->>Firestore: Increment topic postCount
end
Repo-->>VM: Result.success(postId)
VM->>VM: Clear draft
VM->>Fragment: PostState.Success
Fragment->>User: Navigate to Home
Post Data Model:
data class Post(
var id: String = "",
var authorId: String = "",
var authorName: String = "",
var authorRole: UserRole = UserRole.STUDENT,
var authorAvatarUrl: String? = "",
var createdAt: Timestamp? = null,
var title: String = "",
var content: String = "",
var upvoteCount: Int = 0,
var downvoteCount: Int = 0,
var commentCount: Int = 0,
var imageUrls: MutableList<String> = mutableListOf(),
var videoUrls: MutableList<String> = mutableListOf(),
var videoThumbnailUrls: MutableList<String?> = mutableListOf(),
var votedUsers: MutableMap<String, VoteState> = mutableMapOf(),
var status: PostStatus = PostStatus.PENDING,
var topicIds: List<String> = emptyList(),
var locationName: String? = null,
var latitude: Double? = null,
var longitude: Double? = null
)Draft Management:
| Action | Behavior |
|---|---|
| Auto-Save | Triggered on onPause() - saves title, content, location, topics, and image URIs to SharedPreferences |
| Restore | On fragment creation, checks for existing draft and prompts user to restore |
| Clear | Draft cleared on successful post submission or user discard action |
| Exit Handling | Shows BottomSheetDialog with options: Save Draft / Discard / Continue Editing |
Related App Screens:
- Create Post Fragment
- Location Picker Bottom Sheet
- Topic Selection Dialog
- Home Fragment
Screenshot Descriptions:
create_post_empty.png: Empty post creation form with all input fieldscreate_post_with_content.png: Form filled with title, content, and attached mediacreate_post_topic_selection.png: Topic selection dialog with checkbox listcreate_post_ai_topics.png: AI-suggested topics displayed as chipscreate_post_location_picker.png: Bottom sheet with location search and nearby placescreate_post_map_preview.png: Map preview dialog showing selected locationcreate_post_draft_dialog.png: Exit confirmation dialog with draft optionscreate_post_media_preview.png: Horizontal scrollable list of selected images/videos
Name: Post Detail with Comments
Short Description: Full post view with complete content, media viewer, and threaded comment system supporting replies, voting, and nested discussions.
flowchart TD
A[Tap Post] --> B[Post Detail Fragment]
B --> C[Load Full Post]
C --> D[Display Post Header]
D --> E[Load Comments]
E --> F[Display Threaded Comments]
F --> G{User Action}
G -->|Add Comment| H[Bottom Input Bar]
H --> I[Type Comment]
I --> J[Submit Comment]
J --> K[Save to Firestore]
K --> L[Refresh Comments]
L --> F
G -->|Reply to Comment| M[Reply Mode Active]
M --> N[Submit Reply]
N --> K
G -->|Vote Comment| O[Toggle Vote]
O --> P[Update Comment Vote]
G -->|View Media| Q[Media Viewer Fragment]
Related App Screens:
- Post Detail Fragment
- Media Viewer Fragment
- Profile Fragment (tap author)
Screenshot Descriptions:
post_detail_full.png: Complete post view with all content and mediapost_detail_comments.png: Comment section showing threaded discussionspost_detail_reply.png: Reply mode active with reply-to indicatorpost_detail_input.png: Bottom input bar focused for comment entry
Name: AI Post Summary
Short Description: AI-powered feature that generates concise summaries of post content and comments, accessible via the post menu.
flowchart TD
A[Post Menu] --> B[Tap Summarize]
B --> C{Cache Check}
C -->|Cached| D[Display Cached Summary]
C -->|Not Cached| E[Call AI API]
E --> F{API Response}
F -->|Success| G[Cache Summary]
G --> H[Display Summary Dialog]
F -->|Error| I[Show Error Toast]
Related App Screens:
- Home Fragment
- Post Detail Fragment
Screenshot Descriptions:
post_menu_summarize.png: Post context menu showing Summarize optionsummary_loading.png: Loading indicator while generating summarysummary_dialog.png: Bottom sheet dialog displaying AI-generated summary
Name: Save Posts
Short Description: Bookmark feature allowing users to save posts for later access, viewable from the Settings screen.
flowchart TD
A[Post Menu] --> B{Is Saved?}
B -->|No| C[Tap Save]
C --> D[Add to User's Saved Posts]
D --> E[Show Success Toast]
B -->|Yes| F[Tap Unsave]
F --> G[Remove from Saved Posts]
G --> H[Show Removed Toast]
Related App Screens:
- Home Fragment (save action)
- Post Detail Fragment (save action)
- Saved Posts Fragment (view saved)
- Settings Fragment (navigate to saved)
Screenshot Descriptions:
save_post_option.png: Post menu with Save/Unsave optionsaved_posts_list.png: Saved posts screen showing bookmarked postssaved_posts_empty.png: Empty state when no posts are saved
Name: Report Post
Short Description: Content moderation feature allowing users to report posts that violate community guidelines, with violation category selection.
flowchart TD
A[Post Menu] --> B[Tap Report]
B --> C[Report Menu Dialog]
C --> D[Select Violation Type]
D --> E[Submit Report]
E --> F[Save Report to Firestore]
F --> G[Show Confirmation]
Related App Screens:
- Home Fragment
- Post Detail Fragment
- Profile Fragment
Screenshot Descriptions:
report_menu.png: Report dialog with violation category optionsreport_confirmation.png: Confirmation toast after successful report
Name: Share Post
Short Description: Share posts with other users via direct messages. Generates a shareable link that recipients can tap to view the post.
flowchart TD
A[Post Actions] --> B[Tap Share]
B --> C[Share Dialog]
C --> D[Load Recipients from Database]
D --> E[Search/Select Recipients]
E --> F[Tap Send]
F --> G[Generate Share URL]
G --> H[Get/Create Chat with Recipient]
H --> I[Send Message with Share Link]
I --> J[Show Success Toast]
Related App Screens:
- Home Fragment
- Post Detail Fragment
- Share Post Dialog
- Conversation Fragment (receiver side)
Screenshot Descriptions:
share_dialog.png: Share dialog with recipient search and selectionshare_recipient_selected.png: Dialog with selected recipients highlightedshare_in_chat.png: Chat message showing shared post preview
Name: Universal Search
Short Description: Unified search functionality to find posts and users with tabbed interface, search history, trending topics, and Vietnamese text support with accent-insensitive matching.
flowchart TD
A[Search Fragment] --> B[Display Search Bar]
B --> C{User Types Query}
C --> D[Show Search History]
D --> E{Tab Selection}
E -->|Posts Tab| F[Search Posts]
E -->|Users Tab| G[Search Users]
F --> H[Display Post Results]
G --> I[Display User Results]
H --> J{Tap Result}
I --> J
J -->|Post| K[Post Detail]
J -->|User| L[User Profile]
Key Files:
| File | Purpose |
|---|---|
SearchFragment.kt |
Main UI Fragment handling search input, tab switching, and result display |
SearchViewModel.kt |
ViewModel managing search logic, history persistence, and trending topics |
UserAdapter.kt |
RecyclerView adapter for displaying user search results |
HomeAdapter.kt |
Reused adapter for displaying post search results |
HistoryAdapter.kt |
Inner adapter class for search history list |
fragment_search.xml |
Layout file with SearchView, TabLayout, and result RecyclerViews |
item_user_search.xml |
Layout for individual user search result item |
Implementation Details:
| Feature | Implementation |
|---|---|
| Tabbed Search | TabLayout with two tabs: "Posts" and "People", switches search mode and results display |
| Search Bar | SearchView with dynamic query hint based on selected tab |
| Post Search | Searches by post title and topic names (not IDs), uses client-side filtering |
| User Search | Searches by full name and email, excludes admin accounts from results |
| Accent-Insensitive | Normalizer.NFD removes Vietnamese diacritics for better matching (e.g., "Nguyễn" matches "nguyen") |
| Search History | Separate history lists for posts and users, stored in SharedPreferences with max 5 items |
| Trending Topics | Displays top 5 topics by post count as clickable chips |
| Topic Lookup Map | Pre-loads topic ID→Name mapping for accurate search against topic names |
| Loading State | ProgressBar shown during search operations |
| Empty State | Shows "No results" message when search yields no matches |
Data Flow - Search Posts:
sequenceDiagram
participant User
participant Fragment as SearchFragment
participant VM as SearchViewModel
participant Repo as PostRepository
participant Prefs as SharedPreferences
User->>Fragment: Type query & submit
Fragment->>VM: searchPosts(query)
VM->>VM: Add to history
VM->>Prefs: Save history
VM->>VM: Normalize query (remove accents)
VM->>Repo: searchPostsCandidates()
Repo-->>VM: List<Post> (up to 100)
loop For each post
VM->>VM: Normalize title
VM->>VM: Lookup topic names from Map
VM->>VM: Check title OR topic match
end
VM->>Fragment: postResults LiveData
Fragment->>User: Display filtered posts
Data Flow - Search Users:
sequenceDiagram
participant User
participant Fragment as SearchFragment
participant VM as SearchViewModel
participant Repo as UserRepository
User->>Fragment: Switch to People tab
User->>Fragment: Type query & submit
Fragment->>VM: searchUsers(query)
VM->>VM: Add to history & normalize query
VM->>Repo: searchUsersCandidates()
Repo-->>VM: List<User>
loop For each user
VM->>VM: Normalize name & email
VM->>VM: Check name OR email match
VM->>VM: Exclude admin accounts
end
VM->>Fragment: userResults LiveData
Fragment->>User: Display filtered users
Search Algorithm:
// Post Search - matches title OR topic name
val filtered = allPosts.filter { post ->
val titleNorm = removeAccents(post.title)
val hasMatchingTopic = post.topicIds.any { topicId ->
val realName = topicNameMap[topicId] ?: topicId
val topicNameNorm = removeAccents(realName)
topicNameNorm.contains(normalizedQuery)
}
titleNorm.contains(normalizedQuery) || hasMatchingTopic
}
// User Search - matches fullName OR email
val filtered = allUsers.filter { user ->
val nameNorm = removeAccents(user.fullName)
val emailNorm = removeAccents(user.email)
nameNorm.contains(normalizedQuery) || emailNorm.contains(normalizedQuery)
}
// Accent removal for Vietnamese support
private fun removeAccents(str: String?): String {
val nfdNormalizedString = Normalizer.normalize(str, Normalizer.Form.NFD)
val pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+")
return pattern.matcher(nfdNormalizedString).replaceAll("").lowercase().trim()
}Search History Management:
| Action | Behavior |
|---|---|
| Add Keyword | New keyword added to front of list, duplicates removed |
| Max Items | Limited to 5 most recent keywords per category |
| Storage | JSON serialized to SharedPreferences with Gson |
| Separate Lists | Posts and People have independent history lists |
| Click History | Tapping history item auto-fills SearchView and executes search |
UI Components:
| Component | Description |
|---|---|
| SearchView | Material SearchView with custom background, dynamic hint |
| TabLayout | Two-tab layout (Posts/People) with indicator and ripple effect |
| Trending Chips | ChipGroup displaying trending topics with dynamic colors from topic config |
| History List | Simple list with search icon prefix for recent keywords |
| Results RecyclerViews | Separate RecyclerViews for posts and users, toggled by tab |
| BottomNavigationBar | Standard app navigation with Explore tab active |
Related App Screens:
- Search Fragment
- Post Detail Fragment (from post result)
- Profile Fragment (from user result)
Screenshot Descriptions:
search_empty.png: Search screen with empty state and search historysearch_posts_results.png: Search results showing matching postssearch_users_results.png: Search results showing matching users with avatar, name, emailsearch_no_results.png: Empty results state with no matches messagesearch_trending.png: Trending topics section with colored chipssearch_history.png: Recent search history list with search icons
Name: Topic Filtering
Short Description: Filter posts by topics using the drawer menu with multi-select capability and trending topics display.
Related App Screens:
- Home Fragment
- Drawer Menu
Screenshot Descriptions:
topic_filter_drawer.png: Drawer showing all available topics with iconstopic_selected.png: Drawer with selected topics highlightedfiltered_feed.png: Home feed showing only posts from selected topics
Name: User Profile
Short Description: Profile screen displaying user information (avatar, name, email, role, status), with tabs to view user's posts and replies/comments.
flowchart TD
A[Tap Profile] --> B[Profile Fragment]
B --> C[Load User Data]
C --> D[Display Profile Header]
D --> E[Load User Content]
E --> F{Filter Selection}
F -->|General| G[Show Posts + Comments Mixed]
F -->|Posts| H[Show User's Posts Only]
F -->|Replies| I[Show User's Comments Only]
G --> J[Display in RecyclerView]
H --> J
I --> J
Related App Screens:
- Profile Fragment
- Post Detail Fragment
- Settings Fragment (own profile)
Screenshot Descriptions:
profile_own.png: Current user's profile with edit options visibleprofile_other.png: Another user's profile viewprofile_posts_tab.png: Profile showing posts filter activeprofile_replies_tab.png: Profile showing replies/comments filter active
Name: Edit Profile
Short Description: Profile editing screen allowing users to update their display name and profile picture.
flowchart TD
A[Settings] --> B[Tap Edit Profile]
B --> C[Edit Profile Fragment]
C --> D[Display Current Info]
D --> E{User Action}
E -->|Change Name| F[Update Name Field]
E -->|Change Avatar| G[Image Selection Dialog]
G --> H{Source Selection}
H -->|Camera| I[Capture Photo]
H -->|Gallery| J[Select Image]
I --> K[Preview & Crop]
J --> K
K --> L[Upload to Firebase Storage]
L --> M[Update User Document]
M --> N[Show Success]
Related App Screens:
- Settings Fragment
- Edit Profile Fragment
Screenshot Descriptions:
edit_profile.png: Edit profile form with current avatar and nameedit_profile_avatar_dialog.png: Dialog for selecting avatar source (camera/gallery)edit_profile_saving.png: Loading state while saving changes
Name: Chat List
Short Description: List of all user conversations with real-time updates, displaying last message preview, timestamp, and unread indicator.
flowchart TD
A[Chats Fragment] --> B[Load User Chats Flow]
B --> C[Display Chat Items]
C --> D{User Action}
D -->|Tap Chat| E[Open Conversation]
D -->|Long Press| F[Delete Chat Dialog]
D -->|Tap Search| G[Search Users]
D -->|New Chat| H[User Search for New Conversation]
F --> I{Confirm Delete?}
I -->|Yes| J[Delete Chat]
I -->|No| C
Related App Screens:
- Chats Fragment
- Conversation Fragment
- User Search (within Chats)
Screenshot Descriptions:
chat_list.png: List of conversations with last message previewschat_list_unread.png: Chat list showing unread indicatorschat_delete_dialog.png: Confirmation dialog for chat deletionchat_list_empty.png: Empty state when user has no conversations
Name: Conversation Screen
Short Description: Real-time messaging interface supporting text messages, image attachments (up to 5 per message), message deletion, and shared post preview rendering.
flowchart TD
A[Open Conversation] --> B[Load Messages Flow]
B --> C[Display Messages in RecyclerView]
C --> D{User Action}
D -->|Type Message| E[Enter Text]
D -->|Attach Images| F[Select Images - Max 5]
D -->|Send| G[Upload Images if any]
G --> H[Send Message to Firestore]
H --> I[Real-time Update]
I --> C
D -->|Long Press Own Message| J[Delete Message Dialog]
J --> K{Confirm?}
K -->|Yes| L[Mark as Deleted]
L --> C
D -->|Tap Share Link| M[Navigate to Post Detail]
D -->|Scroll Up| N[Load Previous Messages - Pagination]
N --> C
Related App Screens:
- Conversation Fragment
- Image Selection Dialog
- Post Detail Fragment (from shared link)
- Media Viewer Fragment
Screenshot Descriptions:
conversation.png: Chat conversation showing sent and received messagesconversation_images.png: Messages with image attachmentsconversation_image_preview.png: Image preview before sendingconversation_shared_post.png: Message containing shared post preview cardconversation_delete_dialog.png: Delete message confirmationconversation_deleted.png: Deleted message placeholder
Name: Push Notifications
Short Description: Firebase Cloud Messaging integration for real-time notifications on new messages, comments, votes, and post status updates.
flowchart TD
A[FCM Message Received] --> B{Message Type}
B -->|Chat Message| C[Show Chat Notification]
B -->|General Notification| D[Show General Notification]
C --> E[Tap Notification]
D --> E
E --> F[Open MainActivity with Extras]
F --> G{Has chatId?}
G -->|Yes| H[Navigate to Conversation]
G -->|No| I{Has postId?}
I -->|Yes| J[Navigate to Post Detail]
I -->|No| K[Stay on Home]
Related App Screens:
- System Notification Tray
- Conversation Fragment
- Post Detail Fragment
Screenshot Descriptions:
notification_chat.png: System notification for new chat messagenotification_post.png: System notification for post activity (comment, vote)
Name: Notification Center
Short Description: Centralized notification screen displaying upvotes, comments, replies, post status updates (approved/rejected), with read/unread status and mark-all-as-read functionality.
flowchart TD
A[Notification Fragment] --> B[Load Notifications]
B --> C[Group by Date - Today/Earlier]
C --> D[Display in RecyclerView]
D --> E{User Action}
E -->|Tap Notification| F{Notification Type}
F -->|Upvote/Comment/Reply| G[Navigate to Post Detail]
F -->|Post Rejected| H[Show Rejection Dialog]
F -->|Post Approved| G
E -->|Mark All Read| I[Update All to isRead=true]
I --> D
G --> J[Mark as Read]
J --> K[Post Detail Fragment]
Related App Screens:
- Notification Fragment
- Post Detail Fragment
- Rejection Reason Dialog
Screenshot Descriptions:
notifications_list.png: Notification list with various notification typesnotifications_unread.png: Notifications with unread indicatorsnotification_rejection_dialog.png: Dialog showing post rejection reasonnotifications_empty.png: Empty state when no notifications
Name: Settings
Short Description: Central settings hub with user profile card, preference toggles (dark mode, notifications), and navigation to various app sections.
Related App Screens:
- Settings Fragment
- Edit Profile Fragment
- Saved Posts Fragment
- Help Center Fragment
- Community Guidelines Fragment
- About Fragment
Screenshot Descriptions:
settings_main.png: Main settings screen with all options visiblesettings_dark_mode.png: Settings with dark mode toggle enabled
Name: Dark Mode
Short Description: Theme switching capability with dark/light mode toggle, persisted preferences, and immediate application without app restart.
flowchart TD
A[Settings] --> B[Toggle Dark Mode Switch]
B --> C[Save Preference to SharedPreferences]
C --> D[Apply AppCompatDelegate Mode]
D --> E[Update Status Bar Appearance]
E --> F[UI Refreshes with New Theme]
Related App Screens:
- Settings Fragment
- All screens (theme applies globally)
Screenshot Descriptions:
light_mode_home.png: Home feed in light themedark_mode_home.png: Home feed in dark themedark_mode_settings.png: Settings screen in dark theme
Name: Notification Preferences
Short Description: Toggle controls for push notifications and email notifications with persisted preferences.
Related App Screens:
- Settings Fragment
Screenshot Descriptions:
notification_settings.png: Notification toggles section in settings
Name: Help Center
Short Description: FAQ and help topics section with expandable categories for user assistance.
Related App Screens:
- Help Center Fragment
Screenshot Descriptions:
help_center.png: Help center with expandable FAQ sections
Name: Community Guidelines
Short Description: Display of community rules and content policies for user reference.
Related App Screens:
- Community Guidelines Fragment
Screenshot Descriptions:
community_guidelines.png: Guidelines screen with policy sections
Name: About
Short Description: App information screen displaying version, development team credits, and app description.
Related App Screens:
- About Fragment
Screenshot Descriptions:
about_screen.png: About screen with app info and credits
Name: Fullscreen Media Viewer
Short Description: Full-screen image/video viewer with swipe gestures for navigation, zoom functionality, and pager-style interface for multiple media items.
flowchart TD
A[Tap Media in Post/Message] --> B[Media Viewer Fragment]
B --> C[Display Media at Position]
C --> D{User Gesture}
D -->|Swipe Left/Right| E[Navigate to Next/Previous]
D -->|Pinch Zoom| F[Zoom Image]
D -->|Tap| G[Toggle UI Visibility]
D -->|Back| H[Close Viewer]
Related App Screens:
- Media Viewer Fragment
- Post Detail Fragment (source)
- Conversation Fragment (source)
Screenshot Descriptions:
media_viewer_image.png: Fullscreen image viewmedia_viewer_multiple.png: Media viewer showing pagination dotsmedia_viewer_zoomed.png: Image in zoomed state
Name: Fullscreen Image
Short Description: Dedicated activity for viewing images in fullscreen from chat conversations with swipe navigation.
Related App Screens:
- Fullscreen Image Activity
- Conversation Fragment (source)
Screenshot Descriptions:
fullscreen_image.png: Single image in fullscreen mode
Name: Offline Message Queue
Short Description: Background worker ensuring messages are sent reliably, queuing messages when offline and processing when connection is restored.
flowchart TD
A[Send Message Action] --> B{Network Available?}
B -->|Yes| C[Send Immediately]
B -->|No| D[Queue with WorkManager]
D --> E[SendMessageWorker]
E --> F{Retry Logic}
F -->|Success| G[Message Sent]
F -->|Fail| H[Retry with Backoff]
H --> F
Related App Screens:
- Conversation Fragment (transparent to user)
Screenshot Descriptions:
message_pending.png: Message showing pending/sending indicator
Name: Session Management
Short Description: Token-based session management with auto-login, session expiry handling, and secure credential storage.
flowchart TD
A[App Launch] --> B{Valid Session Token?}
B -->|Yes| C{Remember Me Enabled?}
C -->|Yes| D{Session Expired?}
D -->|No| E[Auto Login - Go to Home]
D -->|Yes| F[Clear Session - Go to Login]
C -->|No| F
B -->|No| F
Related App Screens:
- Splash Activity
- Login Activity
- All authenticated screens
Screenshot Descriptions:
session_expired.png: Session expiry prompt
| Model | Key Fields | Purpose |
|---|---|---|
| User | uid, email, fullName, role (STUDENT/TEACHER/ADMIN), profilePictureUrl, status (NORMAL/REMINDED/WARNED/BANNED), fcmToken | User accounts |
| Post | id, authorId, title, content, imageUrls, videoUrls, topicIds, locationName, latitude, longitude, upvoteCount, downvoteCount, commentCount, status, votedUsers | Forum posts |
| Comment | id, postId, authorId, content, parentCommentId, replyToUserId, upvoteCount, downvoteCount, votedUsers | Post comments |
| Message | id, content, senderId, timestamp, type (TEXT/IMAGE/DELETED), imageUrls | Chat messages |
| Notification | id, type, actorId, actorName, targetId, previewText, isRead, rejectionReason | In-app notifications |
| Topic | id, name, description, icon, fillColor, postCount | Post categories |
| Report | id, postId, authorId, nameViolation, descriptionViolation | Content reports |
| Endpoint | Purpose |
|---|---|
/reset-password |
Password reset with secret key |
/get-suggested-topics |
AI-powered topic suggestions |
/send-otp-email |
OTP email delivery |
/send-welcome-email |
Welcome email after registration |
/notifications/trigger |
Trigger push notification |
/validate-post |
AI content validation |
/summarize-post |
AI post summarization |
Name: Expandable Post Content
Short Description: Long post content is truncated with a "Show more..." indicator. Users can tap to expand/collapse the full content inline within the feed.
flowchart TD
A[Post Content Rendered] --> B{Line Count > 4?}
B -->|Yes| C[Show Truncated + 'Show more...']
B -->|No| D[Show Full Content]
C --> E{User Taps Content}
E -->|Yes| F[Toggle Expansion State]
F --> G{Is Expanded?}
G -->|Yes| H[Show Full Content]
G -->|No| C
Related App Screens:
- Home Fragment
- Profile Fragment
- Saved Posts Fragment
Screenshot Descriptions:
post_collapsed.png: Post with truncated content and "Show more..." linkpost_expanded.png: Same post with full content visible
Name: User Role Badges
Short Description: Visual indicators next to author names showing their role (Student, Teacher, Admin) with color-coded badges.
| Role | Color | Usage |
|---|---|---|
| Student | Blue | Default university members |
| Teacher | Green | Faculty members |
| Admin | Red | System administrators |
Related App Screens:
- All screens displaying user information (Posts, Comments, Profile, Chats)
Screenshot Descriptions:
role_badge_student.png: Post author with blue Student badgerole_badge_teacher.png: Post author with green Teacher badgerole_badge_admin.png: Post author with red Admin badge
Name: Topic Tags with Custom Colors
Short Description: Posts display colored topic tags based on the topic's configured fillColor and fillAlpha values from Firestore.
Related App Screens:
- Home Fragment
- Post Detail Fragment
- Profile Fragment
Screenshot Descriptions:
topic_tags_colorful.png: Post with multiple colored topic tagstopic_tags_single.png: Post with single topic tag
Name: Swipe Refresh
Short Description: Standard pull-to-refresh pattern implemented across all list screens for manual data refresh.
Related App Screens:
- Home Fragment
- Chats Fragment
- Notification Fragment
- Profile Fragment
Screenshot Descriptions:
pull_to_refresh.png: Refresh indicator visible while refreshing
Name: Infinite Scroll Pagination
Short Description: Lists automatically load more content when user scrolls near the bottom, implementing Firestore cursor-based pagination.
flowchart TD
A[User Scrolls Down] --> B{Near Bottom of List?}
B -->|Yes| C{Is Loading?}
C -->|No| D[Set Loading = true]
D --> E[Fetch Next Page with lastDocument]
E --> F[Append to Existing List]
F --> G[Set Loading = false]
C -->|Yes| H[Skip - Already Loading]
B -->|No| I[Continue Scrolling]
Related App Screens:
- Home Fragment
- Profile Fragment
- Conversation Fragment (load previous messages)
Screenshot Descriptions:
loading_more.png: Loading indicator at bottom of list
Name: Location Picker Bottom Sheet
Short Description: Google Places-powered bottom sheet for selecting nearby locations or searching for specific places when creating posts.
flowchart TD
A[Tap Add Location] --> B[Location Picker Bottom Sheet]
B --> C{Has Location Permission?}
C -->|No| D[Request Permission]
D --> E{Granted?}
E -->|Yes| F[Fetch Nearby Places]
E -->|No| G[Show Permission Error]
C -->|Yes| F
F --> H[Display Nearby Places List]
H --> I{User Action}
I -->|Select Place| J[Enable Add Button]
J --> K[Tap Add Location]
K --> L[Return Selected Place]
I -->|Tap Search| M[Open Place Search]
I -->|Tap Preview Map| N[Show Map Preview Dialog]
Related App Screens:
- Create Post Fragment
- Location Picker Bottom Sheet
- Map Preview Dialog
Screenshot Descriptions:
location_picker.png: Bottom sheet with nearby places listlocation_map_preview.png: Dialog showing selected location on map with custom avatar markerlocation_search.png: Google Places Autocomplete search
Name: Post Location Tag
Short Description: Posts with location show a clickable location tag that opens Google Maps or shows coordinates.
flowchart TD
A[Post with Location] --> B[Display Location Button]
B --> C[User Taps Location]
C --> D{Google Maps Installed?}
D -->|Yes| E[Open Google Maps App]
D -->|No| F[Open Maps in Browser]
E --> G[Show Location with Marker]
F --> G
Related App Screens:
- Home Fragment
- Post Detail Fragment
Screenshot Descriptions:
post_with_location_tag.png: Post showing location taglocation_google_maps.png: Location opened in Google Maps
Name: Avatar Map Markers
Short Description: Map previews display custom markers featuring the user's avatar in a pin frame design.
Related App Screens:
- Create Post Fragment (map preview)
- Location Picker Bottom Sheet
Screenshot Descriptions:
custom_avatar_marker.png: Map showing custom marker with user avatar
Name: Background Message Worker
Short Description: WorkManager-based background worker for reliable message sending with image uploads, including foreground service notification and completion status.
flowchart TD
A[Send Message with Images] --> B[Create Work Request]
B --> C[Enqueue to WorkManager]
C --> D[Worker Starts]
D --> E{Has Images?}
E -->|Yes| F[Show Foreground Notification]
F --> G[Upload Images to Firebase Storage]
E -->|No| H[Send Message Directly]
G --> I[Send Message with URLs]
H --> J{Result}
I --> J
J -->|Success| K[Show Success Notification]
J -->|Failure| L[Show Failure Notification]
L --> M{Retry?}
M -->|Yes| D
M -->|No| N[Final Failure]
Work Request Configuration:
- Constraint: Network Required
- Retry Policy: Exponential backoff
- Foreground Service Type: Data Sync
Related App Screens:
- Conversation Fragment (triggers worker)
- System Notification (progress & result)
Screenshot Descriptions:
upload_progress_notification.png: System notification showing upload progressupload_success_notification.png: Notification confirming successful sendupload_failure_notification.png: Notification showing upload failure
Name: AI Summary Caching
Short Description: Intelligent caching system for AI-generated summaries to reduce API calls and improve performance.
flowchart TD
A[Request Summary] --> B{Cache Hit?}
B -->|Yes| C{Cache Valid?}
C -->|Yes| D[Return Cached Summary]
C -->|No| E[Call AI API]
B -->|No| E
E --> F[Store in Cache]
F --> G[Return Summary]
Related App Screens:
- Home Fragment
- Post Detail Fragment
Screenshot Descriptions:
- (Invisible to users - backend optimization)
Name: Repository Architecture
Short Description: Clean architecture with repositories abstracting Firebase operations from ViewModels.
| Repository | Purpose |
|---|---|
AuthRepository |
Authentication, registration, OTP verification, password reset |
PostRepository |
Post CRUD, voting, topics, AI interactions |
CommentRepository |
Comment CRUD, threaded replies, voting |
ChatRepository |
Real-time messaging, chat management |
UserRepository |
User profiles, search, saved posts |
NotificationRepository |
Notification management |
ReportRepository |
Content reporting |
Name: Kotlin Flow Integration
Short Description: Chat messages and conversations use Kotlin Flows with Firestore snapshots for real-time updates.
flowchart LR
A[Firestore] -->|Snapshot Listener| B[CallbackFlow]
B -->|Emit Changes| C[ViewModel]
C -->|LiveData/StateFlow| D[Fragment UI]
D -->|Display Updates| E[RecyclerView]
Related App Screens:
- Chats Fragment (chat list updates)
- Conversation Fragment (message updates)
Name: Preferences & Token Management
Short Description: SharedPreferences-based storage for user settings and session tokens.
| Storage Class | Data Stored |
|---|---|
PreferencesManager |
Dark mode, notifications, first-time flag, remember me |
TokenManager |
Session tokens, expiry times, user credentials (encrypted) |
Name: Session Token Expiry
Short Description: Configurable session timeout (default 7 days) with automatic logout on expiry.
Related App Screens:
- Splash Activity (session check)
- All authenticated screens
Screenshot Descriptions:
session_expired_dialog.png: Dialog prompting re-login
Name: Ban/Warning System
Short Description: Users with status BANNED are redirected to a dedicated banned screen with violation reason.
| Status | Effect |
|---|---|
| NORMAL | Full access |
| REMINDED | Access with reminder shown |
| WARNED | Access with warning shown |
| BANNED | Blocked from app, shown ban reason |
flowchart TD
A[Login Success] --> B{Check User Status}
B -->|NORMAL| C[Navigate to Home]
B -->|REMINDED/WARNED| D[Show Status Notification]
D --> C
B -->|BANNED| E[Navigate to Banned Screen]
E --> F[Display Ban Reason]
F --> G[Logout Option Only]
Related App Screens:
- Login Activity
- Banned Activity
Screenshot Descriptions:
banned_screen_full.png: Full banned screen with violation details
Name: Post Validation
Short Description: AI-powered content validation before post publication to detect violations.
flowchart TD
A[Submit Post] --> B[Upload Media]
B --> C[Save Post as PENDING]
C --> D[Call Validate Post API]
D --> E{Validation Result}
E -->|APPROVED| F[Update Status to APPROVED]
F --> G[Visible in Feed]
E -->|REJECTED| H[Update Status to REJECTED]
H --> I[Notify User with Reason]
Related App Screens:
- Create Post Fragment
- Notification Fragment (rejection notification)
Screenshot Descriptions:
post_pending.png: Post awaiting moderationpost_rejected_notification.png: Notification showing rejection reason
- ViewModel: Screen state management with lifecycle awareness
- LiveData: Observable data holders for UI updates
- Navigation Component: Type-safe navigation with Safe Args
- WorkManager: Reliable background task execution
- ViewBinding/DataBinding: Type-safe view access
- Firebase Auth: Email/password authentication
- Cloud Firestore: Real-time NoSQL database
- Firebase Storage: Media file uploads
- Firebase Cloud Messaging (FCM): Push notifications
- Retrofit + Moshi: REST API communication with JSON parsing
- OkHttp: HTTP client with logging interceptor
- Coil: Modern image loading with coroutines
- Glide: Image loading for maps and advanced transformations
- Google Maps SDK: Map display and markers
- Google Places API: Location search and nearby places
Here's a consolidated checklist of all screenshots to capture:
-
splash_screen.png -
onboarding_welcome.png -
onboarding_slide_1.png,onboarding_slide_2.png,onboarding_slide_3.png -
register_form.png,register_validation.png -
otp_verification.png -
registration_success.png -
login_screen.png,login_error.png -
forgot_password.png,reset_password.png -
banned_screen.png
-
home_feed.png,home_feed_loading.png,home_empty.png -
drawer_topics.png -
post_card_text.png,post_card_with_images.png,post_card_with_video.png -
post_card_with_location.png -
post_collapsed.png,post_expanded.png -
voting_neutral.png,voting_upvoted.png,voting_downvoted.png -
create_post_empty.png,create_post_with_content.png -
create_post_topic_selection.png,create_post_ai_topics.png -
create_post_location_picker.png,create_post_map_preview.png -
post_detail_full.png,post_detail_comments.png,post_detail_reply.png -
summary_dialog.png
-
search_empty.png,search_posts_results.png,search_users_results.png -
topic_filter_drawer.png -
profile_own.png,profile_other.png -
profile_posts_tab.png,profile_replies_tab.png -
edit_profile.png
-
chat_list.png,chat_list_unread.png,chat_list_empty.png -
chat_delete_dialog.png -
conversation.png,conversation_images.png -
conversation_image_preview.png -
conversation_shared_post.png -
conversation_deleted.png -
share_dialog.png,share_recipient_selected.png
-
notifications_list.png,notifications_empty.png -
notification_rejection_dialog.png -
settings_main.png -
light_mode_home.png,dark_mode_home.png -
help_center.png -
community_guidelines.png -
about_screen.png
-
media_viewer_image.png,media_viewer_multiple.png -
upload_progress_notification.png -
notification_chat.png
| Version | Date | Changes |
|---|---|---|
| 1.0 | January 2026 | Initial comprehensive documentation |
End of Feature Documentation