Replace Gorush with direct APNs/FCM integration

- Add direct APNs client using sideshow/apns2 for iOS push
- Add direct FCM client using legacy HTTP API for Android push
- Remove Gorush dependency (no external push server needed)
- Update all services/handlers to use new push.Client
- Update config for APNS_PRODUCTION flag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-29 12:04:31 -06:00
parent c4118c8186
commit a15e847098
15 changed files with 649 additions and 257 deletions

View File

@@ -19,11 +19,11 @@ import (
type AdminNotificationHandler struct {
db *gorm.DB
emailService *services.EmailService
pushClient *push.GorushClient
pushClient *push.Client
}
// NewAdminNotificationHandler creates a new admin notification handler
func NewAdminNotificationHandler(db *gorm.DB, emailService *services.EmailService, pushClient *push.GorushClient) *AdminNotificationHandler {
func NewAdminNotificationHandler(db *gorm.DB, emailService *services.EmailService, pushClient *push.Client) *AdminNotificationHandler {
return &AdminNotificationHandler{
db: db,
emailService: emailService,

View File

@@ -20,7 +20,7 @@ import (
// Dependencies holds optional services for admin routes
type Dependencies struct {
EmailService *services.EmailService
PushClient *push.GorushClient
PushClient *push.Client
}
// SetupRoutes configures all admin routes
@@ -114,7 +114,7 @@ func SetupRoutes(router *gin.Engine, db *gorm.DB, cfg *config.Config, deps *Depe
// Notification management
var emailService *services.EmailService
var pushClient *push.GorushClient
var pushClient *push.Client
if deps != nil {
emailService = deps.EmailService
pushClient = deps.PushClient