arygm / QuickFix

A mobile app designed to connect users who need tasks done with skilled manual workers.
3 stars 0 forks source link

Storing the QuickFix in firestore and link them to the profiles #145

Open ramshty opened 2 weeks ago

ramshty commented 2 weeks ago

Description:

To support the core functionality of the QuickFix app, implement a backend in Firestore to store and link "QuickFix" services with user and worker profiles. This setup will allow each user to view and manage their pending QuickFixes, and each worker to track their assigned or pending tasks.

This backend structure is crucial for building the UI components for user and worker dashboards. It also enables us to finalize key features in the next sprint, such as job tracking and worker interaction, which are part of the following epics:


Features to Implement:

  1. Firestore Database Structure:

    • QuickFix Collection: Create a collection in Firestore to store each QuickFix service, including details such as service type, status (e.g., pending, completed), timestamps, and any relevant metadata.
    • User Profile Link: Link each QuickFix to the requesting user profile.
    • Worker Profile Link: Link each QuickFix to the assigned worker profile, including both pending and accepted tasks.
  2. Backend Logic:

    • QuickFix Creation and Assignment: Implement functions to create new QuickFix records and assign them to workers, updating profiles accordingly.
    • Status Updates: Allow for real-time updates on QuickFix status, reflecting changes in both user and worker profiles.
    • Data Retrieval: Set up functions to retrieve QuickFixes based on user ID or worker ID for efficient dashboard display.
  3. Permissions and Security Rules:

    • Firestore Security Rules: Ensure that only authorized users can view or modify QuickFix data.
    • Data Integrity Checks: Implement validation to ensure data consistency between QuickFix records and linked profiles.

Acceptance Criteria:


Tasks:

  1. Database Setup:

    • Create Firestore collections and define data structures for QuickFixes, linking to user and worker profiles.
  2. Backend Logic Implementation:

    • Develop functions to create, assign, update, and retrieve QuickFixes, ensuring accurate linking to profiles.
  3. Security and Validation:

    • Implement Firestore security rules and validation logic for data consistency.
  4. Testing and Verification:

    • Conduct tests to ensure QuickFixes are linked correctly, update in real-time, and adhere to security rules.

Notes:


By implementing this feature, we enable the QuickFix app to provide essential tracking and interaction capabilities, enhancing user experience and operational efficiency for both users and workers.