ECS6 Offline Dashboard for Monthly Expense and Income Summary - ISIS3510-MOBILE-T34/T34-Wiki-SpendiQ GitHub Wiki
Attribute | Details |
---|---|
Title/ID | F7 - Offline Dashboard for Monthly Expense and Income Summary |
Event Description | When the user is offline, they open the SpendiQ app and view the Home screen, which displays the total amount of money they have spent versus the total amount they have received in the last 30 days across all their registered accounts. |
System Response | - Data Retrieval and Display: - The app immediately retrieves two values from the device's secondary storage: - Total Expenses in the Last 30 Days - Total Income in the Last 30 Days - These values are displayed on the Home screen as soon as the user opens the app, providing quick and easy access to their financial summary. - Real-Time Updates: - The app maintains detailed records of expenses and incomes for the last 7 days in local secondary storage. - It uses this data to update the 30-day totals in real-time, even when offline. - Data Synchronization: - Whenever internet connectivity is restored, the app attempts to synchronize the updated 30-day totals and the last 7 days of detailed transaction data with the Firebase cloud database. - This ensures that the remote data reflects the most recent transactions and that the 30-day summary remains accurate across devices. - Handling Local Data Deletion: - If the user deletes the local data or if it gets cleared (e.g., after the 7-day offline limit is exceeded), they will need to log back into their account when internet connectivity is available. - Upon re-authentication, the app downloads the necessary data from the cloud to reconstruct the 30-day totals. - User Notifications: - The app may notify the user if the 30-day totals could be outdated due to lack of synchronization beyond 7 days. - Provides messages to inform the user when data synchronization is pending or has failed due to connectivity issues. |
Possible Antipatterns | - Stale or Inaccurate Data Presentation: - The 30-day totals might become inaccurate if synchronization does not occur within 7 days, potentially misleading the user. - Data Loss Risk: - If local data is deleted and the user remains offline, they lose access to their financial summaries until they can reconnect and re-download data. - Synchronization Conflicts: - Potential discrepancies between local and cloud data if not properly merged during synchronization, especially if transactions are edited while offline. - Excessive Local Storage Usage: - Storing too much data locally (e.g., if the detailed transaction data exceeds expected size) could consume significant device storage space. - User Frustration: - Lack of clear communication about data synchronization status may lead to confusion or dissatisfaction. |
Caching and Retrieving Strategy | - Caching: - 30-Day Totals: - Store the cumulative totals for expenses and incomes over the last 30 days in the device's secondary storage. - Detailed Transactions (Last 7 Days): - Keep detailed records of all expenses and incomes for the last 7 days locally to update the 30-day totals in real-time. - Data Retention: - Implement a rolling window to discard transaction data older than 7 days from local storage. - Retrieving: - On App Launch: - Retrieve the stored 30-day totals from local storage. - Update these totals using the detailed transactions from the last 7 days. - Real-Time Updates: - As new transactions are recorded (even offline), immediately reflect these in the 30-day totals displayed on the Home screen. - Synchronization: - Upon Connectivity Restoration: - Sync the detailed transactions from the last 7 days with the Firebase cloud database. - Update the 30-day totals in the cloud to match the locally calculated values. - Conflict Resolution: - Merge local and remote data carefully to avoid duplications or omissions. - Use timestamps and unique transaction IDs to reconcile any differences. |
Storage Type | - Local Storage (Device's Secondary Storage): - Summary Data: - Total expenses and incomes for the last 30 days. - Detailed Transaction Data: - Records of individual expenses and incomes for the last 7 days. - Note: - Data is stored securely and encrypted to protect user privacy. - Remote Storage (Firebase Cloud Database): - Comprehensive Transaction History: - All historical expenses and incomes beyond the last 7 days. - Backup of 30-Day Totals: - Latest 30-day summary to ensure consistency across devices. - User Profile and Settings: - Includes user preferences and any other relevant data. |
Stored Data Type | - Summary Data: - Total Expenses in Last 30 Days: - A single numeric value representing cumulative spending. - Total Income in Last 30 Days: - A single numeric value representing cumulative income. - Detailed Transaction Data (Last 7 Days): - Expense and Income Records: - Amount - Date and Timestamp - Category (e.g., food, salary, entertainment) - Description or Notes - Transaction ID - Synchronization Metadata: - Timestamps: - Last synchronization time. - Last local update time. - Flags: - Indicators of unsynced data. - Error logs if synchronization fails. |
Justification:
Offering an offline dashboard that summarizes monthly expenses and income greatly enhances user experience by providing immediate access to crucial financial information, even without internet connectivity. Users often need to monitor their financial health on the go, and having access to a clear and concise summary on the Home screen ensures that they can stay informed and make informed decisions at any time. This feature aligns with business rules that prioritize user empowerment through accessible and timely financial insights, fostering continuous engagement with the app.
From a business standpoint, maintaining this functionality offline ensures that users can rely on SpendiQ regardless of their connectivity status, thereby increasing the app's reliability and user trust. By storing and updating summary data locally, the app ensures that users have up-to-date information without the need for constant internet access, which is particularly beneficial for users in areas with unstable connections. Additionally, the synchronization strategy ensures that data remains accurate and consistent across devices by updating the cloud database when connectivity is restored. This approach not only supports the app’s operational integrity but also enhances its analytical capabilities, enabling the development team to gather accurate usage metrics and optimize features accordingly. Overall, this strategy is integral to providing a seamless and dependable user experience, reinforcing SpendiQ's role as a comprehensive personal finance assistant.