Skip to content

Frontend/apiservice/userdashboardimplementation#50

Merged
CDevmina merged 34 commits intoDevelopmentfrom
frontend/apiservice/userdashboardimplementation
Apr 23, 2025
Merged

Frontend/apiservice/userdashboardimplementation#50
CDevmina merged 34 commits intoDevelopmentfrom
frontend/apiservice/userdashboardimplementation

Conversation

@CDevmina
Copy link
Owner

This pull request introduces several updates to the Tapiro Store API, including new documentation, enhancements to user preference handling, and additional API endpoints. The changes primarily focus on improving API usability, adding validation mechanisms, and expanding functionality for managing user and store data.

Documentation Updates:

  • Added a comprehensive README.md file with detailed instructions for integrating with the Tapiro Store API, including authentication, endpoints, taxonomy usage, and error handling.

User Preferences Enhancements:

  • Removed the updateUserPreferences function in AIService.js and replaced its functionality with in-service validation for user preferences, including taxonomy-based validation and improved error handling. [1] [2]
  • Added support for demographic fields (gender, incomeBracket, country, age) in the registerUser function within AuthenticationService.js. These fields are now stored in the database and default to null if not provided. [1] [2]

New API Endpoints:

  • Introduced getStoreConsentLists in PreferenceManagement.js to retrieve a user's store opt-in and opt-out lists. [1] [2]
  • Added lookupStores in StoreProfile.js and StoreProfileService.js to fetch basic details (e.g., name) for a list of store IDs. [1] [2]
  • Added getTaxonomyCategories in Taxonomy.js to retrieve taxonomy categories via the TaxonomyService.

Code Refactoring and Cleanup:

  • Removed unused AIService imports and functions, replacing them with in-service logic and validation.
  • Enhanced error handling for MongoDB operations, including validation errors and taxonomy fetch failures, to provide more meaningful feedback to clients. [1] [2]

These changes collectively enhance the functionality, reliability, and developer experience of the Tapiro Store API.

CDevmina added 30 commits April 20, 2025 20:24
…sts and implement corresponding service logic
- Implemented new hooks for user activity summary, spending analytics, and store consent lists.
- Created new API endpoints for retrieving user activity summary, spending analytics, and store consent lists.
- Added new types for user activity summary, spending analytics, and store consent details in data contracts.
- Developed UserAnalyticsPage and UserConsentPage components for displaying analytics and managing consent.
- Updated UserDashboard to include recent activity and spending patterns.
- Created UserPreferencesPage for managing user preferences with a slider interface.
- Enhanced caching settings and keys for new data types.
- Added routes for new pages in the application.
- Updated package.json and package-lock.json to include recharts.
- Enhanced apiClient to instantiate the Taxonomy client.
- Created useTaxonomy hook for fetching taxonomy categories.
- Added new hooks in useUserHooks for recent user data, spending analytics, and store consent lists.
- Updated cache utility to include new cache keys for recent data and spending analytics.
- Expanded routing in main.tsx to include new user dashboard sub-routes for preferences, data sharing, and analytics.
…ces, enhance layout, and improve data handling
…ta structures, and improve UserDashboard layout
…schemas for provided and inferred demographics"

This reverts commit ff7fc57.
…acy setting changes, including cache invalidation
- Incremented schema version from 2.0.4 to 2.0.5.
- Added inferred demographic fields to user schema: inferredHasKids, inferredRelationshipStatus, inferredEmploymentStatus, inferredEducationLevel, inferredAgeBracket.
- Expanded taxonomy.yaml with new categories and attributes for kids' clothing, gardening, tools & home improvement, and more.
- Implemented demographic inference functions for employment status, education level, and age bracket.
- Integrated demographic inference into preference processing, enhancing user data with inferred demographics.
- Added new boosts in recommendation logic based on inferred demographics.
…d object structure

- Refactored updateUserProfile to use dot notation for demographic fields within a new demographicData object.
- Added validation for age input to ensure it is either null or an integer.
- Enhanced privacy settings update logic to use dot notation.
- Improved logging for user updates and cache invalidation.

chore: Increment schema version and update user schema to reflect demographicData structure

- Updated SCHEMA_VERSION to '2.0.7'.
- Refactored user schema to include demographicData object with relevant fields.
- Added inferred demographic fields within the demographicData object.

fix: Update taxonomy.yaml version to '1.0.2'

- Incremented version number for taxonomy file.

feat: Enhance demographic inference logic with detailed logging

- Added debug logging to demographic inference functions for better traceability.
- Updated inference functions to handle demographic data from the new structure.
- Implemented a fallback mechanism for processing user data and marking failures.

refactor: Improve preference processing logic and error handling

- Refactored process_user_data to extract demographics from the nested demographicData object.
- Enhanced error handling and logging for user data processing.
- Added a helper function to mark processing as failed in the database.
@CDevmina CDevmina added the enhancement New feature or request label Apr 23, 2025
@CDevmina CDevmina self-assigned this Apr 23, 2025
@CDevmina CDevmina merged commit cdab610 into Development Apr 23, 2025
3 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant