|
|
**Challenges and How We Solved Them**
|
|
|
**1. Backend and Frontend Data Synchronization**
|
|
|
Issue: Inconsistent data flow between the frontend and backend caused display errors and unexpected behavior during API calls.
|
|
|
Root Cause: Differences in how data was formatted and handled on each side, along with a lack of unified request/response standards.
|
|
|
Solution: We reviewed our API design, standardized request/response formats, validated headers, and updated frontend and backend to follow the same structure.
|
|
|
Outcome: The issue was fully resolved. Communication between components is now stable and reliable.
|
|
|
**2. MongoDB Integration**
|
|
|
Issue: Initial instability in database connections and difficulty in tracking data operations.
|
|
|
Root Cause: Incomplete database configuration and limited visibility into backend queries during development.
|
|
|
Solution: We reconfigured the database connection using stable parameters in mongoose.connect and enabled debug mode to monitor all database activity.
|
|
|
Outcome: The database now connects reliably, and debugging support helped improve data accuracy and response times.
|
|
|
**3. Password Reset via Email Verification**
|
|
|
Issue: Difficulty implementing a secure and highly security password reset system.
|
|
|
Root Cause: Lack of prior experience with email services and secure verification workflows.
|
|
|
Solution: We researched and integrated the nodemailer library with Gmail, using environment variables for security. A six digit verification code system was developed and tested extensively.
|
|
|
Outcome: Fully implemented. The password reset flow is now functional and secure, with no major side effects.
|
|
|
**4. Group Feature Integration and Ownership Logic**
|
|
|
Issue: Managing group creation, member control, and ownership transfer was complex and error prone.
|
|
|
Root Cause: The feature required coordinating multiple user roles and keeping shared data consistent, which added significant logic to the backend.
|
|
|
Solution: We created multiple backend endpoints to support group creation, invitations, and member updates. A permission based model was added to let owners transfer group control. We also created a dedicated MongoDB model to maintain group user relationships.
|
|
|
Outcome: The system now supports full group collaboration. Ownership transfer works smoothly, and data stays consistent across users.
|
|
|
**5. Item Management System**
|
|
|
Issue: Ensuring reliable creation, editing, and deletion of grocery items with correct data formatting.
|
|
|
Root Cause: The item model required handling various attributes like quantity, expiry date, and categories, which introduced complexity in validation and structure.
|
|
|
Solution: We used a MongoDB schema to define item attributes and created clean API endpoints for item management.
|
|
|
Outcome: The inventory system works reliably, supports all required fields, and is fully integrated with the group and reminder features.
|
|
|
|
|
|
…… |