Skip to content

Add user activity feed model and endpoint #97

Description

@Akatenvictor

What

Add a user activity feed entity that records actions like uploads, purchases, follows, and saves for social discovery.

Why

Activity feeds provide social context and help users discover content through their network's actions. This drives engagement and organic content discovery.

Scope

  • In: ActivityFeed entity, activity recording hooks, feed endpoint, feed pagination
  • Out: Activity filtering, activity notifications, activity privacy controls

Acceptance Criteria

  • ActivityFeed entity with: userId, actionType, targetId, targetType, metadata, createdAt
  • Action types: song_upload, song_purchase, artist_follow, song_save, album_release
  • GET /api/feed/me returns activities from followed artists and self
  • GET /api/users/:id/activities returns public activities for a user
  • Cursor-based pagination for efficient feed traversal
  • Activities older than 90 days are excluded from feed queries
  • Activity recording is non-blocking (async)

Technical Context

  • New ActivityFeed entity in src/entities/
  • ActivityService in src/services/
  • ActivityController in src/controllers/
  • Feed endpoint on user or new feed routes
  • Hooks in SongService, MarketplaceService, ArtistProfileService for recording
  • Database index on userId and createdAt for feed query performance

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions