Skip to content

Feature/414 415 419 420 user features#503

Merged
Olowodarey merged 5 commits intoArena1X:mainfrom
Dev-Vik-Tor:feature/414-415-419-420-user-features
Mar 30, 2026
Merged

Feature/414 415 419 420 user features#503
Olowodarey merged 5 commits intoArena1X:mainfrom
Dev-Vik-Tor:feature/414-415-419-420-user-features

Conversation

@Dev-Vik-Tor
Copy link
Copy Markdown
Contributor

User Features Implementation

Changes

Details

  • Created UserPreferences entity with 5 notification preference fields
  • Created UserFollow entity with follower/following relationships
  • Added user trends computation (accuracy, volume, profit/loss, category breakdown)
  • Added category analytics with trending status calculation
  • All endpoints include proper pagination, error handling, and access control

Closes #414
Closes #415
Closes #419
Closes #420

- Create UserPreferences entity with notification preference fields
- Create migration for user_preferences table
- Add UpdateUserPreferencesDto for API requests
- Implement getOrCreatePreferences and updatePreferences in UsersService
- Add PATCH /users/me/preferences endpoint in UsersController
- Update UsersModule to include UserPreferences entity
- Create UserFollow entity with follower/following relationships
- Create migration for user_follows table with unique constraint
- Add PaginationDto and follow-related DTOs
- Implement followUser, unfollowUser, getFollowers, getFollowing in UsersService
- Add POST /users/:address/follow endpoint
- Add DELETE /users/:address/unfollow endpoint
- Add GET /users/:address/followers endpoint with pagination
- Add GET /users/:address/following endpoint with pagination
- Update UsersModule to include UserFollow entity
- Create UserTrendsDto with trend data points and category performance
- Implement getUserTrends method in AnalyticsService
- Add computeAccuracyTrend to track accuracy rate over time
- Add computeVolumeTrend to track prediction volume over time
- Add computeProfitLossTrend to track cumulative profit/loss
- Add computeCategoryPerformance to breakdown performance by category
- Add GET /analytics/users/:address/trends endpoint
- Endpoint returns accuracy, volume, profit/loss trends and category breakdown
- Create CategoryStatsDto and CategoryAnalyticsResponseDto
- Implement getCategoryAnalytics method in AnalyticsService
- Calculate total markets, active markets, volume, and avg participants per category
- Add isCategoryTrending helper to determine trending categories (>50% active)
- Add GET /analytics/categories endpoint
- Endpoint returns sorted categories by market count with trending status
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment Mar 30, 2026 9:39am

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@Dev-Vik-Tor Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

- Remove unused 'follower' variable in unfollowUser method
- Add missing UserPreferences and UserFollow repository mocks to users.service.spec.ts test setup

Fixes Backend CI / Lint and Backend CI / Test failures
@Olowodarey Olowodarey merged commit 98c69b8 into Arena1X:main Mar 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants