Overview
The Social Feed API provides social networking features including following customers and stores, activity feeds, product interactions, and social discovery. The feed respects privacy settings - private accounts only show content to followers. Location:convex/customers/feed.ts
Privacy Controls
The feed system respects customer privacy settings:- Private accounts (default): Content only visible to followers
- Public accounts: Content visible to all users
- Users can always see their own content regardless of privacy settings
Follow Customer
Customer doing the following
Customer to follow
Follow Store
Customer following the store
Store to follow
Like Product
Product to like
Customer ID
Get Feed
Retrieve personalized product-focused activity feed for a customer. The feed respects privacy settings and only shows content the user is authorized to see. Uses custom cursor-based pagination where the cursor is a timestamp string.Customer ID (defaults to authenticated user if omitted)
Pagination options with
numItems (1-100) and cursor (timestamp string or null for first page)Feed Content Types
The feed includes these activity types (filtered by privacy):- Price Updates: From followed stores and on liked products
- Product Likes: From followed customers (only if you also like the product)
- Product Shares: From followed customers
- Direct Shares: Shared directly to you (always visible regardless of privacy)
- New Products: From followed stores
Get Feed Debug Info
Debug helper to inspect feed data sources for a customer. Returns counts of followed customers, stores, and recent activity.Customer ID (defaults to authenticated user if omitted)
Create Test Product Activity
Helper mutation to create test product activity events for development and testing purposes.Product ID for the activity event
Type of activity to create
Optional actor customer ID
Previous price (for price_update events)
New price (for price_update events)
Test Feed
Test function to validate feed functionality. Runs a feed query and returns diagnostic information.Number of items to request (default: 10)
Social feed includes activity from followed customers and stores with real-time updates. Privacy-restricted content is automatically filtered out.
