Skip to content

Swipe Analytics Aggregation Pipeline #158

@zakkiyyat

Description

@zakkiyyat

Restaurants will want to know how well their food is performing on the platform.
Requirements:

  • Create a GET /api/restaurant/analytics endpoint.
  • Write a MongoDB aggregation pipeline that queries the UserSwipe collection.
  • Calculate the total number of impressions (likes + passes) and the "Match Rate" (likes / total impressions) for each of the restaurant's food items.
    Acceptance Criteria:
  • Pipeline efficiently groups data by food_id and calculates percentages.
  • Endpoint returns an array of objects containing the food name, total views, likes, passes, and conversion rate.
  • Endpoint is restricted to the authenticated restaurant owner.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions