[FEATURE] - Activity Feed #56

Closed
opened 2026-02-19 16:42:35 -08:00 by naomi · 0 comments
Owner

Attestations

  • I have read and agree to the Code of Conduct
  • I have read and agree to the Community Guidelines.
  • I have confirmed that the issue I am opening is unique, and has not already been reported (whether closed or not).
  • I have reviewed the Security Policy and have determined that this is not a security vulnerability.
  • This is not a feature request or bug report that I am mis-filing to avoid the issue template.

Share your thoughts:

Create an activity feed that displays recent user activity across the library, showing suggestions, likes, comments, and other interactions.

Activity Types to Display

User Actions

  • Suggestions: "User X suggested [Book Name]"
  • Likes: "User X liked [Game Name]"
  • Comments: "User X commented on [Show Name]"
  • Achievements: "User X earned the 'Superfan' achievement"
  • Milestones: "User X submitted their 100th suggestion"

Admin Actions (Optional)

  • New Items: "New book added: [Book Name]"
  • Accepted Suggestions: "[Book Name] was added from User X's suggestion"
  • Status Changes: "[Game Name] marked as Finished"

Implementation Details

Database Design

  • Create Activity table with fields:
    • id, userId, activityType, entityType, entityId, metadata, createdAt
  • Index on createdAt for efficient querying
  • Consider data retention policy (archive old activities)

API Endpoints

  • GET /api/activity/feed - Get recent activity (paginated)
  • GET /api/activity/user/{userId} - Get specific user's activity
  • Query parameters: limit, offset, type (filter by activity type)

Frontend Display

  • Create /activity route or add to home page
  • Display as timeline/feed with timestamps
  • Show user avatars and badges
  • Link to relevant items and user profiles
  • Add "Load More" pagination
  • Real-time updates (optional WebSocket integration)

Activity Card Design

Each activity should show:

  • User avatar and username with badges
  • Action description with links
  • Timestamp (relative: "5 minutes ago", "2 days ago")
  • Media type icon
  • Link to the item or user profile

Privacy & Filtering

  • Allow users to opt-out of showing their activity
  • Add filters: "Show only suggestions", "Show only my activity", etc.
  • Option to hide certain activity types
  • Rate limiting to prevent spam

Performance Considerations

  • Cache recent activities (Redis or in-memory)
  • Limit query depth (e.g., last 30 days)
  • Use pagination with reasonable page sizes
  • Consider implementing infinite scroll

This issue was created with help from Hikari~ 🌸

### Attestations - [x] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [x] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [x] I have confirmed that the issue I am opening is unique, and has not already been reported (whether closed or not). - [x] I have reviewed the [Security Policy](https://docs.nhcarrigan.com/legal/security/) and have determined that this is not a security vulnerability. - [x] This is not a feature request or bug report that I am mis-filing to avoid the issue template. ### Share your thoughts: Create an activity feed that displays recent user activity across the library, showing suggestions, likes, comments, and other interactions. ## Activity Types to Display ### User Actions - **Suggestions**: "User X suggested [Book Name]" - **Likes**: "User X liked [Game Name]" - **Comments**: "User X commented on [Show Name]" - **Achievements**: "User X earned the 'Superfan' achievement" - **Milestones**: "User X submitted their 100th suggestion" ### Admin Actions (Optional) - **New Items**: "New book added: [Book Name]" - **Accepted Suggestions**: "[Book Name] was added from User X's suggestion" - **Status Changes**: "[Game Name] marked as Finished" ## Implementation Details ### Database Design - Create `Activity` table with fields: - `id`, `userId`, `activityType`, `entityType`, `entityId`, `metadata`, `createdAt` - Index on `createdAt` for efficient querying - Consider data retention policy (archive old activities) ### API Endpoints - `GET /api/activity/feed` - Get recent activity (paginated) - `GET /api/activity/user/{userId}` - Get specific user's activity - Query parameters: `limit`, `offset`, `type` (filter by activity type) ### Frontend Display - Create `/activity` route or add to home page - Display as timeline/feed with timestamps - Show user avatars and badges - Link to relevant items and user profiles - Add "Load More" pagination - Real-time updates (optional WebSocket integration) ### Activity Card Design Each activity should show: - User avatar and username with badges - Action description with links - Timestamp (relative: "5 minutes ago", "2 days ago") - Media type icon - Link to the item or user profile ## Privacy & Filtering - Allow users to opt-out of showing their activity - Add filters: "Show only suggestions", "Show only my activity", etc. - Option to hide certain activity types - Rate limiting to prevent spam ## Performance Considerations - Cache recent activities (Redis or in-memory) - Limit query depth (e.g., last 30 days) - Use pagination with reasonable page sizes - Consider implementing infinite scroll ✨ This issue was created with help from Hikari~ 🌸
naomi closed this issue 2026-02-20 01:51:25 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/library#56