Commit 5537157
committed
feat: implement multi-platform contest tracking with comprehensive notification system
- Implemented adapter pattern for platform abstraction
- Added support for 4 platforms: Codeforces, LeetCode, CodeChef, AtCoder
- Created unified ContestData format for cross-platform consistency
- Built platform registry with dependency injection for scalability
- Multi-channel support: Email, WhatsApp, Push notifications
- User preference-based notification delivery
- Contest reminder system with customizable timing
- Admin announcement and bulk email capabilities
- Notification history and retry mechanism
- Email templates with modern HTML design
- Refactored to adapter pattern following SOLID principles
- Implemented dependency injection throughout
- Created reusable base classes and interfaces
- Moved logger from core to common module
- Added role-based access control (RBAC)
- Enhanced security with public route decorator
- Complete CRUD operations for contests
- Advanced filtering: by platform, phase, difficulty, type
- Search functionality with pagination
- Contest statistics and analytics
- Automated contest synchronization (every 6 hours)
- Bulk operations support
- JWT-based authentication with refresh tokens
- Fixed refresh token bug (now correctly reuses refresh token)
- Role-based guards (Admin, User)
- Public route decorator for unprotected endpoints
- Enhanced user schema with notification preferences
- User activation/deactivation
- Profile management
- Role updates (Admin only)
- Notification channel preferences
- Custom notification timing (1-168 hours before contest)
- VitePress-based documentation site
- Comprehensive API documentation for all endpoints
- Backend architecture guides
- Platform adapter documentation
- Database schema documentation
- Security and deployment guides
- GitHub Pages deployment workflow
- PlatformsModule: Platform adapter registry and management
- NotificationsModule: Multi-channel notification system
- ContestSchedulerService: Automated contest sync and cleanup
- CodeforcesAdapter: REST API integration (enabled)
- LeetCodeAdapter: GraphQL API integration (enabled)
- CodeChefAdapter: REST API integration (enabled)
- AtCoderAdapter: Community API integration (enabled)
- Enhanced Contest schema with multi-platform support
- New Notification schema for tracking notification history
- Updated User schema with notification preferences
- EmailNotificationService: Nodemailer integration
- WhatsAppNotificationService: Twilio integration
- PushNotificationService: Web Push API integration
- AdminEmailService: Admin-specific email operations
- @nestjs/schedule: Cron job scheduling
- nodemailer: Email sending
- twilio: WhatsApp messaging
- web-push: Push notifications
- Deprecated alerts module (replaced by notifications)
- Old documentation structure (migrated to VitePress)
- Zod validation pipe (using class-validator)
- Removed /alerts endpoints (use /notifications instead)
- Changed contest sync from hourly to every 6 hours
- Updated user schema with new required fields
- Added comprehensive test specs for all new services
- Unit tests for adapters, guards, and decorators
- E2E test setup with UI test page1 parent 1fbed4f commit 5537157
File tree
201 files changed
+52773
-4386
lines changed- .github/workflows
- backend
- docs
- src
- alerts
- auth
- decorators
- guards
- strategies
- common
- decorators
- dto
- logger
- pipes
- config
- contests
- dto
- schemas
- core
- logger
- database
- integrations
- notifications
- platforms
- atcoder
- base
- codechef
- codeforces
- leetcode
- whatsapp
- notifications
- dto
- interfaces
- schemas
- services
- types
- users
- schemas
- test/ui
- docs
- .vitepress
- theme
- api
- auth
- contests
- notifications
- users
- backend
- adapters
- database
- deployment
- modules
- security
- guide
- public
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
201 files changed
+52773
-4386
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
0 commit comments