-
Notifications
You must be signed in to change notification settings - Fork 2
CRC Cards
Armaan Katyal edited this page Feb 25, 2025
·
11 revisions
MoodEventManager | |
---|---|
Responsibilities | Collaborators |
- Create a mood event with a timestamp, emotional state, optional trigger, and optional social situation - Validate required emotional state input - Store and retrieve mood event details from the database | - MoodEventDataHandler (from US 01) (to persist and retrieve mood event data) - MoodEventValidator (from US 01) (to check input correctness) - MoodEventRepository (from US 04) (to manage storage operations) |
MoodEventDataHandler | |
---|---|
Responsibilities | Collaborators |
- Manage interactions with the MoodEventRepository - Handle create, update, delete operations for mood events - Ensure that changes reflect properly across all views | - MoodEventRepository (from US 04) (to persist and fetch mood event data) - MoodEventManager (from US 01) (to process mood event operations) |
MoodEventValidator | |
---|---|
Responsibilities | Collaborators |
- Validate emotional state selection - Ensure event data adheres to formatting rules - Provide error messages for incorrect input | - MoodEventManager (from US 01) (to check validation before saving) - MoodEventDataHandler (from US 01) (to ensure valid data is stored) |
MoodEventUIHandler | |
---|---|
Responsibilities | Collaborators |
- Display mood event details when selected - Ensure UI consistency across input, editing, and history views - Manage real-time UI updates for mood event changes | - MoodEventManager (from US 01) (to retrieve and update event details) - MoodHistoryHandler (from US 04) (to display stored events) - MoodEventStyleManager (from US 01) (to maintain color and icon consistency) |
MoodEventStyleManager | |
---|---|
Responsibilities | Collaborators |
- Assign emoticons and colors to depict emotional states - Ensure consistency across mood history and analytics views - Maintain accessibility-friendly visual styles | - MoodEventUIHandler (from US 01) (to apply styles) - MoodEventManager (from US 01) (to retrieve emotional states) |
MoodEventEditor | |
---|---|
Responsibilities | Collaborators |
- Allow users to modify their own mood events - Ensure proper validation before saving updates - Store modifications in the database | - MoodEventManager (from US 01) (to update event details) - MoodEventValidator (from US 01) (to check for correctness) - MoodEventDataHandler (from US 01) (to handle event storage) |
MoodEventDeletion | |
---|---|
Responsibilities | Collaborators |
- Provide an option to delete a mood event - Display confirmation before deletion - Ensure permanent removal from the database | - MoodEventManager (from US 01) (to delete event) - MoodEventDataHandler (from US 01) (to handle removal) - MoodEventRepository (from US 04) (to delete stored data) |
MoodEventReason | |
---|---|
Responsibilities | Collaborators |
- Store and validate a brief textual reason for a mood event (max 20 characters, 3 words) - Ensure text input meets formatting rules - Provide feedback if the input is invalid - Store and retrieve the reason text from the database |
- MoodEvent (to attach the reason text) - MoodEventRepository (to persist and retrieve reason text) - Database (to store and fetch data) |
MoodEventPhoto | |
---|---|
Responsibilities | Collaborators |
- Capture or select an image - Display attached image in mood event - Ensure proper storage and retrieval of images - Store image metadata in the database |
- MoodEvent (to link images to moods) - MoodEventRepository (to persist photo metadata) - Database (to store and retrieve image paths) |
MoodEventPhotoCompressor | |
---|---|
Responsibilities | Collaborators |
- Compress images before storing them - Validate that the image is under 64KB - Provide error handling if an image exceeds the size limit - Ensure the image remains viewable after compression - Store compressed image metadata in the database |
- MoodEventPhoto (to manage images) - MoodEventRepository (to store compressed images) - Database (to save compressed image data) |
MoodEventSocialContext | |
---|---|
Responsibilities | Collaborators |
- Provide a dropdown list of predefined social situations - Store and validate the selected social situation - Ensure the correct social situation is displayed when viewing a mood event - Persist social situation data in the database |
- MoodEvent (to store the social situation) - MoodEventRepository (to persist and retrieve the selection) - Database (to store and fetch social context data) |
Profile | |
---|---|
Responsibilities | Collaborators |
- Store and manage user profile details (including username) - Ensure the username is unique during creation and updates - Validate the username against formatting and business rules |
- User Repository / Database - Validation Service (optional) |
MoodEvent | |
---|---|
Responsibilities | Collaborators |
- Hold the date/time of the event - Store the emotional state (e.g., happy, sad, etc.) - Store the "reason why" text description |
- Participant (from US 05, the owner of the event) |
MoodEventRepository | |
---|---|
Responsibilities | Collaborators |
- Persist (create, update, delete) MoodEvent objects - Retrieve mood events based on queries (e.g., all events for a user) |
- Database or storage mechanism - MoodEvent (to read/write data) |
MoodHistory | |
---|---|
Responsibilities | Collaborators |
- Retrieve mood events from the repository - Sort mood events in reverse chronological order - Apply filtering on the retrieved list (e.g., time-based, emotional state, text-based) - Provide a final list of mood events to the participant |
- MoodEventRepository (to fetch stored events) - RecentWeekFilter, EmotionalStateFilter, ReasonTextFilter (for specialized filtering) |
RecentWeekFilter | |
---|---|
Responsibilities | Collaborators |
- Identify mood events that occurred within the last 7 days - Filter out all other events |
- MoodEvent (to check event dates) - Date/time utilities (for calculating "one week ago") |
EmotionalStateFilter | |
---|---|
Responsibilities | Collaborators |
- Filter mood events by matching the event’s emotional state to a target state | - MoodEvent |
ReasonTextFilter | |
---|---|
Responsibilities | Collaborators |
- Filter mood events by searching for a given keyword in the "reason why" text | - MoodEvent |
Participant | |
---|---|
Responsibilities | Collaborators |
- Represent a user in the system - Manage personal info and associated mood events (from US 04) - Provide an identifier for follow relationships |
- FollowManager (to handle follow requests and permissions) - MoodEvent (already defined in US 04) |
FollowManager | |
---|---|
Responsibilities | Collaborators |
- Handle requests from one participant to follow another participant’s recent mood event (US 05.01.01) - Grant or deny follow permissions (US 05.02.01) - Store and manage the follow relationships between participants |
- Participant (both the requester and the requested) - MoodEvent (from US 04, if needed to fetch most recent) - Database / Storage (to persist follow relationships) |
MoodFollowingList | |
---|---|
Responsibilities | Collaborators |
- Retrieve the most recent mood events from participants that the user is permitted to follow (US 05.03.01) - Sort the retrieved mood events in reverse chronological order - Reuse existing filters (RecentWeekFilter, EmotionalStateFilter, ReasonTextFilter) from US 04 to narrow displayed events (US 05.04.01, 05.05.01, 05.06.01) - Provide the final list of mood events to the viewing participant |
- FollowManager (to determine which participants can be followed) - MoodEvent (from US 04) - RecentWeekFilter, EmotionalStateFilter, ReasonTextFilter (reused from US 04) |
LocationHandler | |
---|---|
Responsibilities | Collaborators |
- Retrieve the participant’s current location using GPS - Allow participants to attach or skip attaching the location to a mood event - Store location data (latitude and longitude) within the mood event |
- MoodEvent (to store location data, from US 04) - - Utility to retrieve current location - Participant (to associate mood events with the user, from US 05) |
MoodHistoryMapViewer | |
---|---|
Responsibilities | Collaborators |
- Display a map of mood events from the filtered mood history list that have locations - Represent mood events with markers/icons that depict emotional states - Update the map dynamically based on filters applied to mood history |
- MoodHistory (to supply filtered mood events, from US 04) - MoodEvent (to provide emotional state and location data, from US 04) - MapService (to render the map and place markers) |
MoodFollowingMapViewer | |
---|---|
Responsibilities | Collaborators |
- Display a map of mood events from the filtered mood following list that have locations - Show emotional states and usernames of participants on the map - Update the map view dynamically when filters are applied to the following list |
- MoodFollowingList (to supply mood events from followed participants, from US 05) - MoodEvent (to provide emotional state, location, and username data, from US 04) - MapService (to display the map and associated mood events) |
NearbyMoodMapViewer | |
---|---|
Responsibilities | Collaborators |
- Display a map of the most recent mood event from each participant if the event has a location within 5 km of the current location - Filter mood events based on proximity to the participant’s current location - Represent emotional states on the map for visualization |
- Participant (to provide access to the most recent mood events, from US 05) - MoodEvent (to supply emotional state and location data, from US 04) - Utility to retrieve the participant’s current location - MapService (to render the map with proximity-filtered mood events) |
OfflineMoodEventSync | |
---|---|
Responsibilities | Collaborators |
- Handle adding, editing, and deleting mood events while offline - Store offline changes locally in a queue or cache - Detect when connectivity is restored and trigger synchronization | - MoodEventManager (from US 01) (to manage event creation, updates, and deletion) - LocalStorageHandler (from US 07) (to store offline changes temporarily) - SyncManager (from US 07) (to handle synchronization once online) |
LocalStorageHandler | |
---|---|
Responsibilities | Collaborators |
- Store mood events locally when offline - Retrieve locally stored events when needed - Clear stored events once successfully synced to the database | - OfflineMoodEventSync (from US 07) (to store and retrieve offline data) - MoodEventRepository (from US 04) (to persist data once online) |
SyncManager | |
---|---|
Responsibilities | Collaborators |
- Detect network connectivity changes - Sync all offline mood events (additions, edits, deletions) once online - Resolve conflicts if the same mood event was modified both online and offline | - OfflineMoodEventSync (from US 07) (to get pending changes for synchronization) - MoodEventDataHandler (from US 01) (to push changes to the database) - NetworkMonitor (from US 07) (to detect when connectivity is restored) |
NetworkMonitor | |
---|---|
Responsibilities | Collaborators |
- Continuously check internet connectivity status - Notify SyncManager when the user goes online - Prevent sync failures due to unstable connections | - SyncManager (from US 07) (to notify when online status changes) - OfflineMoodEventSync (from US 07) (to pause/resume offline operations accordingly) |