Sprint 3 - Moviles-G45/FlutterApp GitHub Wiki
🧩 Sprint 3 - Deliverables
🚀 Functionalities and Design Details
📌 a. Features Delivered
1. 📍 Geofencing Purchase Reminder
Description:
This feature automatically detects when a user is near a shopping mall or commercial center and sends a personalized push notification reminding them to log any recent purchases. The notification acts as a real-time prompt, helping users maintain accurate expense tracking and stay within their budget goals.
Example Notification:
🛍️ "You're near Parque La Colina Mall — Did you spend on food or shopping? Log your transaction now to stay on budget!"
Context Awareness:
- The app uses geolocation services to determine proximity (~150 meters) to a curated list of over 20 major shopping malls in Bogotá.
- When detected near a mall, a notification is triggered with relevant context.
2. 🌙 Weekend Night Spending Reminder
Description:
Detects weekend nights (Friday–Saturday after 8 PM) and sends a notification alert to help users control entertainment spending.
📈 Business Questions (BQs)
| Member | Business Question | Sprint |
|---|---|---|
| Gabriela | How many consecutive months has the user successfully stayed within their monthly spending limit? | Sprint 2 |
| Juanda Obando | Which expense categories has the user exceeded their allocated budget for this month, and by what percentage? | Sprint 2 |
| Juanda Castillo | Which are the categories of type ‘needs’ in which the users spend the most? | Sprint 2 |
| Santiago | What are the months in which the users spend the most? | Sprint 2 |
| Miguel | How many consecutive months has the user successfully stayed within a fixed monthly spending limit? | Sprint 2 |
| Julian | How many days have passed since the last record of expenses of a user? | Sprint 2 |
| Gabriela | How much has the user contributed to a saving goal this month? | Sprint 3 |
| Juanda Obando | Which are the categories of type needs in which the users spend the most? | Sprint 3 |
| Juanda Castillo | How many users have an average daily expenditure between <50, 50 - 150, >150? | Sprint 3 |
| Santiago | Which are the categories of type ‘savings’ in which the users spend the most? | Sprint 3 |
| Miguel | Which are the categories of type ‘wants’ in which the users spend the most? | Sprint 3 |
| Julian | What are the months in which the users spend the most? | Sprint 3 |
🔗 Eventual Connectivity Strategies
🗂️ Local Storage Strategies
-
Authentication and Recovery Without Internet:
- Tokens and Credentials: Securely store user tokens and credentials in iOS Keychain after successful authentication.
- Localized Messages: Preload and store OS-specific error messages locally to ensure availability offline.
-
Main Screen Without Internet:
- Use of SharedPreferences to cache monthly balance and expenses, ensuring immediate offline access.
- Supports an offline-first strategy for reliability even during disconnections.
-
Transactions Without Internet:
- Transaction Queue: Persist offline-initiated transactions in durable local storage (Core Data/SQLite) to sync once reconnected.
- Data Security: Implement encryption or verification mechanisms to protect stored transactions.
🧠 Multi-threading Strategies
Smart Multithreading Strategy
To ensure smooth performance, especially with multiple geofenced malls, the proximity detection algorithm is offloaded to a background thread using Dart’s Isolate.
How It Works:
- Every 5 minutes, the app checks the user’s GPS location.
- A separate
Isolatecompares the user’s location to mall coordinates. - Reduces CPU load on the main thread, improves UI responsiveness, and saves battery.
- When proximity is confirmed, the
Isolatesends back the mall’s name, triggering a notification.
🧹 Caching Strategies
- Main Screen Caching:
- Uses the
shared_preferencespackage to cache essential data like balance and expenses. - If the user loses connection, cached data ensures seamless display of financial information.
- Upon reconnection, the app refreshes the data from the backend, keeping the cache updated.
- Uses the