What problem does it solve?
This Skill provides a reusable likes/favorites infrastructure for ad sections across the app, including LikeButton on cards and detail views, a LikesProvider, AdLike model, server actions, storage, and guest-merge logic. It enables adding favorites to new sections or wiring LikeButton into cards and detail pages.
Core Features & Use Cases
- Unified likes infrastructure shared by all ad sections (cards and detail)
- LikeButton on listing cards and detail pages
- Guest merge support for likes across login
- Define and reuse entity type constants to drive storage and server actions
Quick Start
- Define a new entity type constant in LikesProvider for your section (e.g. ENTITY_TYPE_CARS = "vehicles-cars").
- Add LikeButton to listing cards with stopPropagation and entityType/publicId props.
- Add LikeButton to detail header with the same props and stopPropagation behavior.
- Ensure LikesProvider is wired in the app with initialLikedIds and guest merge extension if needed.