Commit graph

138 commits

Author SHA1 Message Date
senke
76e95194de [BE-SVC-014] be-svc: Implement monitoring and alerting
- Created monitoring and alerting service with Prometheus integration
- Support for alert rules with thresholds and severities
- Alert firing and resolution tracking
- Notification callbacks for alert events
- Continuous monitoring with configurable intervals
- Default alert rules for common scenarios
- Prometheus query evaluation and threshold checking
- Comprehensive unit tests for core functionality
2025-12-24 16:54:19 +01:00
senke
66d64993d2 [BE-SVC-013] be-svc: Implement CDN integration
- Created CDN service with support for multiple providers
- Support for CloudFront, Cloudflare, and generic CDN
- URL generation for assets, audio, HLS streams, and images
- Cache invalidation with batch support
- Signed URL generation for private content
- Cache headers configuration
- Provider abstraction for easy switching
- Comprehensive unit tests for all functionality
2025-12-24 16:52:06 +01:00
senke
a4024e2f57 [BE-SVC-012] be-svc: Implement HLS streaming service
- Enhanced HLS streaming service with additional features
- Stream validation and health checks
- URL generation for master and quality playlists
- Stream cleanup and management
- Statistics and monitoring
- Stream listing with filtering and pagination
- Status updates and existence checks
- Comprehensive unit tests for core functionality
2025-12-24 16:49:57 +01:00
senke
540fc362e6 [BE-SVC-011] be-svc: Implement audio transcoding service
- Created AudioTranscodeService with FFmpeg support
- Support for multiple audio formats (MP3, AAC, FLAC, OGG, WAV, M4A)
- Configurable bitrates and quality presets (low, medium, high, lossless)
- Sample rate and channel configuration
- Timeout handling and error management
- Transcode and TranscodeMultiple methods
- FFmpeg availability checking
- Audio metadata extraction using ffprobe
- Format validation and codec selection
- Comprehensive unit tests for core functionality
2025-12-24 16:47:48 +01:00
senke
9335dea59e [BE-SVC-010] be-svc: Implement image processing service
- Enhanced image processing service with multiple features
- Support for multiple image sizes (thumbnail, small, medium, large)
- Multiple output formats (JPEG, PNG, WebP)
- Configurable quality settings and processing options
- ProcessImage with customizable options
- ProcessAvatar for optimized avatar processing
- ProcessImageMultipleSizes for batch processing
- OptimizeImage for target file size optimization
- Image format conversion and validation
- Comprehensive unit tests for core functions
2025-12-24 16:44:58 +01:00
senke
52d83be11a [BE-SVC-009] be-svc: Implement notification service
- Created Notification model for GORM with proper relationships
- Enhanced NotificationService with GORM-based implementation
- Features: pagination, filtering by type/read status, batch creation
- Mark as read (single and all), deletion (single and all read)
- Unread count and notification types listing
- Comprehensive unit tests for all operations
- Better error handling and logging
2025-12-24 16:41:11 +01:00
senke
4b525b79e2 [BE-SVC-008] be-svc: Implement analytics aggregation service
- Created AnalyticsAggregationService for analytics_events table
- Aggregation by event type and time period (hour, day, week, month)
- Support for filtering by event names and user ID
- Features: event counts, unique users, average per user, payload summary
- Top events ranking and user activity counts
- Uses PostgreSQL date_trunc and to_char for period grouping
- Added unit tests for service validation and helper functions
2025-12-24 16:38:09 +01:00
senke
cd4ec93826 [BE-SVC-007] be-svc: Implement recommendation engine
- Created TrackRecommendationService with ML-based algorithms
- Collaborative filtering (40%) using similar users' preferences
- Content-based filtering (30%) using track metadata (genre, artist, year)
- Popularity scoring (20%) based on play_count and like_count
- Recency scoring (10%) for recently uploaded tracks
- Support for seed tracks, genre filtering, and track exclusion
- Added unit tests for scoring algorithms
- Combines multiple algorithms for personalized recommendations
2025-12-24 16:34:17 +01:00
senke
86c410eda3 [BE-SVC-006] be-svc: Implement search service
- Created FullTextSearchService using PostgreSQL tsvector/tsquery
- Supports full-text search for tracks, users, and playlists
- Uses GIN indexes from migration 048_search_indexes.sql
- Features relevance scoring with ts_rank_cd
- Weighted search (title/name weighted higher than description)
- Pagination and minimum relevance score filtering
- Unified search across all types and individual search methods
- Added unit tests for service validation and query preparation
2025-12-24 16:31:40 +01:00
senke
f103781c4c [BE-SVC-005] be-svc: Implement file storage abstraction
- Added AWS SDK v2 dependency for S3 support
- Created S3StorageService implementing S3Service interface
- Support for AWS S3 and MinIO (S3-compatible storage)
- Added S3 configuration in config.go with environment variables
- Implemented upload, delete, presigned URL, and public URL methods
- Added unit tests for service validation and URL generation
- Service integrates with existing TrackStorageService
2025-12-24 16:28:51 +01:00
senke
36652713f7 [BE-SVC-004] be-svc: Implement email service 2025-12-24 16:11:02 +01:00
senke
6ffaeff33f [BE-SVC-003] be-svc: Implement background job queue 2025-12-24 16:08:51 +01:00
senke
16262a7b8f [BE-SVC-002] be-svc: Implement rate limiting per user 2025-12-24 16:04:36 +01:00
senke
ef0f85ecf1 [BE-SVC-001] be-svc: Implement caching layer for frequently accessed data 2025-12-24 16:02:16 +01:00
senke
958583d5b6 [BE-DB-018] be-db: Add database performance monitoring 2025-12-24 15:58:48 +01:00
senke
43c4addd1d [BE-DB-017] be-db: Add database migration rollback tests 2025-12-24 15:57:19 +01:00
senke
4d3ea2461d [BE-DB-016] be-db: Add database backup strategy 2025-12-24 15:55:46 +01:00
senke
efc89128f1 [BE-DB-015] be-db: Optimize database connection pooling 2025-12-24 15:53:19 +01:00
senke
ab2e0921c9 [BE-DB-014] be-db: Add database triggers for audit logging 2025-12-24 15:47:38 +01:00
senke
379585fcb1 [BE-DB-013] be-db: Add database views for common queries 2025-12-24 15:46:29 +01:00
senke
58a5a27d56 [BE-DB-012] be-db: Create migration for analytics_events table (already exists) 2025-12-24 15:45:17 +01:00
senke
aff0a733d0 [BE-DB-011] be-db: Add database constraints for data validation 2025-12-24 15:43:52 +01:00
senke
2d9accbc8a [BE-DB-010] be-db: Add composite indexes for common queries 2025-12-24 15:14:17 +01:00
senke
7dcd822afc [BE-DB-009] be-db: Add indexes for search queries 2025-12-24 15:13:03 +01:00
senke
7d45ad65fa [BE-DB-008] be-db: Create migration for notifications table 2025-12-24 15:12:11 +01:00
senke
0d60b0262a [BE-DB-007] be-db: Create migration for user_blocks table 2025-12-24 15:11:32 +01:00
senke
eb5b9f6483 [BE-DB-006] be-db: Create migration for user_follows table 2025-12-24 15:10:34 +01:00
senke
6795191696 [BE-DB-005] be-db: Create migration for playlist_share_link table 2025-12-24 15:09:44 +01:00
senke
41f3ce3c00 [BE-DB-004] be-db: Add created_at and updated_at timestamps to all models 2025-12-24 15:08:43 +01:00
senke
f31cf1380f [BE-DB-003] be-db: Add soft delete support to all models 2025-12-24 15:07:25 +01:00
senke
32b5f51c38 [BE-API-042] be-api: Implement OAuth callback endpoint 2025-12-24 15:05:40 +01:00
senke
e0871341ed [BE-API-041] be-api: Implement user delete endpoint with soft delete support 2025-12-24 15:03:21 +01:00
senke
b32cfedc23 [BE-API-039] be-api: Implement marketplace order details endpoint 2025-12-24 15:00:32 +01:00
senke
f096ba9d75 [BE-API-038] be-api: Implement marketplace order list endpoint 2025-12-24 14:50:39 +01:00
senke
ccad394dc7 [BE-API-037] be-api: Implement marketplace product update endpoint 2025-12-24 14:49:41 +01:00
senke
3128677ec5 [BE-API-036] be-api: Implement track analytics dashboard endpoint 2025-12-24 14:48:28 +01:00
senke
c940f44b0b [BE-API-035] be-api: Implement analytics events endpoint 2025-12-24 14:47:12 +01:00
senke
a4d00e7e57 [BE-API-026] be-api: Implement track quota endpoint validation 2025-12-24 14:45:12 +01:00
senke
943562a55f [BE-API-025] be-api: Implement upload resume endpoint validation 2025-12-24 14:42:52 +01:00
senke
739ee08b40 [BE-API-005] be-api: Implement playlist recommendations endpoint 2025-12-24 14:41:33 +01:00
senke
b1c1395c76 [FE-COMP-004] fe-comp: Add confirmation dialogs for destructive actions
- Created reusable ConfirmationDialog component for destructive actions
- Replaced native confirm() dialogs with ConfirmationDialog in ChatSidebar (leave room, delete room)
- Replaced native confirm() dialogs with ConfirmationDialog in RolesPage (delete role)
- Replaced Dialog with ConfirmationDialog in PlaylistActions (delete playlist)
- Replaced window.confirm() with ConfirmationDialog in SessionsPage (revoke session, revoke all sessions)
- All destructive actions now use consistent confirmation dialogs
- Confirmation dialogs include proper messaging, loading states, and variant support
- Improved UX with better visual feedback and clearer action descriptions
2025-12-24 14:38:55 +01:00
senke
47249693b3 [FE-COMP-003] fe-comp: Add empty states to all list views
- Created reusable EmptyState component with icon, title, description, and action support
- Improved empty state in PlaylistList with better messaging and icons
- Improved empty states in UserProfilePage for tracks and playlists tabs
- Added contextual messages based on whether viewing own profile or others
- Added helpful descriptions and icons to all empty states
- Empty states now provide clear guidance on what users can do next
- All list views now have consistent and helpful empty state messaging
2025-12-24 14:33:20 +01:00
senke
c0160b7e1a [FE-COMP-002] fe-comp: Add error boundaries to all pages
- Added ErrorBoundary to all public routes (login, register, forgot-password, verify-email, reset-password)
- Added ErrorBoundary to public user profile page (/u/:username)
- Added ErrorBoundary to protected routes: dashboard, marketplace, chat
- Added ErrorBoundary to settings/sessions route
- Added ErrorBoundary to admin/roles route
- Added ErrorBoundary to tracks/:id route
- Added ErrorBoundary to playlists/* route
- Added ErrorBoundary to search route
- Added ErrorBoundary to notifications route
- Added ErrorBoundary to error pages (404, 500)
- All pages now have error boundaries for graceful error handling
- Error boundaries provide fallback UI with retry and home navigation options
2025-12-24 14:31:28 +01:00
senke
a1e6fcfdcb [FE-COMP-001] fe-comp: Add loading states to all async operations
- Created ButtonLoading component for consistent loading button pattern
- Created comprehensive loading states pattern guide
- Documented best practices for loading states in async operations
- Identified and documented existing loading state implementations
- Provided patterns for form submissions, data fetching, mutations, and skeleton loaders
- Created checklist for implementing loading states
- Documented examples from existing codebase

Most components already have loading states implemented. Pattern guide ensures consistency for future implementations.
2025-12-24 13:25:10 +01:00
senke
b3eb9cee17 [FE-PAGE-014] fe-page: Add Notifications page
- Created dedicated Notifications page with full notification management
- Added notification service with API integration (get, mark as read, mark all as read)
- Added filtering by status (all/unread/read) and type (message/track/mention/system/etc)
- Added mark as read functionality for individual notifications
- Added mark all as read functionality
- Added notification type icons and labels
- Added notification timestamps with relative time formatting
- Added notification links support for navigation
- Added empty states for no notifications
- Added loading and error states
- Integrated with backend notification APIs
- Added route /notifications to router
- Added lazy loading for NotificationsPage component
- Added visual distinction for unread notifications (badge, background)
- Added notification type badges
2025-12-24 13:22:31 +01:00
senke
c81408c4ca [FE-PAGE-013] fe-page: Add Search page
- Created dedicated Search page with unified search interface
- Added search functionality for tracks, playlists, and users
- Implemented tabs for filtering results by type (All/Tracks/Playlists/Users)
- Added search query debouncing for performance
- Added URL query parameter synchronization (q, type)
- Added pagination for each result type
- Added empty states for no query and no results
- Added loading states for all search operations
- Added error handling for search failures
- Integrated with existing search APIs (tracks, playlists, users)
- Added search service for user search API
- Added route /search to router
- Added lazy loading for SearchPage component
- Added result previews in All tab (6 items per type)
- Added View All buttons to navigate to specific tabs
2025-12-24 13:19:54 +01:00
senke
814443ae90 [FE-PAGE-012] fe-page: Complete Sessions page implementation
- Added user agent parser to extract device information (OS, browser, device type)
- Added device information display with formatted device details
- Added location information display (with support for private IP detection)
- Enhanced session cards with device type badges and detailed info
- Improved device icon selection based on device type (mobile/tablet/desktop)
- Added formatted device info display (OS, browser, versions)
- Added location display with MapPin icon
- Added device type badge (mobile/tablet/desktop)
- Improved visual hierarchy with better spacing and badges
- Maintained existing session management actions (revoke, revoke all)
2025-12-24 13:16:32 +01:00
senke
31e81cd853 [FE-PAGE-011] fe-page: Complete Roles page implementation
- Added CreateRoleModal for creating new roles
- Added EditRoleModal for editing existing roles
- Added AssignRoleModal for assigning roles to users
- Fixed roleService type issues (roleId from number to string)
- Enhanced RolesPage with create/edit/assign functionality
- Added UI section for assigning roles to users by ID
- Integrated all modals with existing role management
- Added proper form validation and error handling
- Added loading states for all async operations
- Added display of user current roles in assign modal
2025-12-24 13:13:54 +01:00
senke
b83abe2dfd [FE-PAGE-010] fe-page: Complete User Profile page (public)
- Added user tracks display with grid layout and pagination
- Added user playlists display with grid layout and pagination
- Added stats section showing tracks, playlists, and followers count
- Implemented tabs for switching between tracks and playlists
- Enhanced FollowButton with API integration (follow/unfollow)
- Added follow/unfollow API functions in profileService
- Added followers/following API functions (getFollowers, getFollowing)
- Added View All links for tracks and playlists when count > 12
- Improved profile layout with better organization
- Added empty states for tracks and playlists sections
2025-12-24 13:09:30 +01:00
senke
af06339290 [FE-PAGE-009] fe-page: Complete Playlist List page implementation
- Added server-side search using searchPlaylists API
- Added filtering: visibility (public/private), owner (all/mine/others)
- Added client-side sorting: by date, title, track count (asc/desc)
- Enhanced filter UI with collapsible filters panel
- Added sort controls with field selector and order toggle
- Integrated search API when search query or filters are active
- Maintained existing bulk operations (delete, share, export)
- Added clear filters button when filters are active
- Improved UX with filter badges and active state indicators
2025-12-24 13:05:21 +01:00