Security: - Replace all binding: tags with validate: + c.Validate() in admin handlers - Add rate limiting to auth endpoints (login, register, password reset) - Add security headers (HSTS, XSS protection, nosniff, frame options) - Wire Google Pub/Sub token verification into webhook handler - Replace ParseUnverified with proper OIDC/JWKS key verification - Verify inner Apple JWS signatures in webhook handler - Add io.LimitReader (1MB) to all webhook body reads - Add ownership verification to file deletion - Move hardcoded admin credentials to env vars - Add uniqueIndex to User.Email - Hide ConfirmationCode from JSON serialization - Mask confirmation codes in admin responses - Use http.DetectContentType for upload validation - Fix path traversal in storage service - Replace os.Getenv with Viper in stripe service - Sanitize Redis URLs before logging - Separate DEBUG_FIXED_CODES from DEBUG flag - Reject weak SECRET_KEY in production - Add host check on /_next/* proxy routes - Use explicit localhost CORS origins in debug mode - Replace err.Error() with generic messages in all admin error responses Critical fixes: - Rewrite FCM to HTTP v1 API with OAuth 2.0 service account auth - Fix user_customuser -> auth_user table names in raw SQL - Fix dashboard verified query to use UserProfile model - Add escapeLikeWildcards() to prevent SQL wildcard injection Bug fixes: - Add bounds checks for days/expiring_soon query params (1-3650) - Add receipt_data/transaction_id empty-check to RestoreSubscription - Change Active bool -> *bool in device handler - Check all unchecked GORM/FindByIDWithProfile errors - Add validation for notification hour fields (0-23) - Add max=10000 validation on task description updates Transactions & data integrity: - Wrap registration flow in transaction - Wrap QuickComplete in transaction - Move image creation inside completion transaction - Wrap SetSpecialties in transaction - Wrap GetOrCreateToken in transaction - Wrap completion+image deletion in transaction Performance: - Batch completion summaries (2 queries vs 2N) - Reuse single http.Client in IAP validation - Cache dashboard counts (30s TTL) - Batch COUNT queries in admin user list - Add Limit(500) to document queries - Add reminder_stage+due_date filters to reminder queries - Parse AllowedTypes once at init - In-memory user cache in auth middleware (30s TTL) - Timezone change detection cache - Optimize P95 with per-endpoint sorted buffers - Replace crypto/md5 with hash/fnv for ETags Code quality: - Add sync.Once to all monitoring Stop()/Close() methods - Replace 8 fmt.Printf with zerolog in auth service - Log previously discarded errors - Standardize delete response shapes - Route hardcoded English through i18n - Remove FileURL from DocumentResponse (keep MediaURL only) - Thread user timezone through kanban board responses - Initialize empty slices to prevent null JSON - Extract shared field map for task Update/UpdateTx - Delete unused SoftDeleteModel, min(), formatCron, legacy handlers Worker & jobs: - Wire Asynq email infrastructure into worker - Register HandleReminderLogCleanup with daily 3AM cron - Use per-user timezone in HandleSmartReminder - Replace direct DB queries with repository calls - Delete legacy reminder handlers (~200 lines) - Delete unused task type constants Dependencies: - Replace archived jung-kurt/gofpdf with go-pdf/fpdf - Replace unmaintained gomail.v2 with wneessen/go-mail - Add TODO for Echo jwt v3 transitive dep removal Test infrastructure: - Fix MakeRequest/SeedLookupData error handling - Replace os.Exit(0) with t.Skip() in scope/consistency tests - Add 11 new FCM v1 tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
200 lines
10 KiB
JSON
200 lines
10 KiB
JSON
{
|
|
"error.invalid_request_body": "Invalid request body",
|
|
"error.invalid_credentials": "Invalid credentials",
|
|
"error.account_inactive": "Account is inactive",
|
|
"error.username_taken": "Username already taken",
|
|
"error.email_taken": "Email already registered",
|
|
"error.email_already_taken": "Email already taken",
|
|
"error.registration_failed": "Registration failed",
|
|
"error.not_authenticated": "Not authenticated",
|
|
"error.invalid_token": "Invalid token",
|
|
"error.failed_to_get_user": "Failed to get user",
|
|
"error.failed_to_update_profile": "Failed to update profile",
|
|
"error.invalid_verification_code": "Invalid verification code",
|
|
"error.verification_code_expired": "Verification code has expired",
|
|
"error.email_already_verified": "Email already verified",
|
|
"error.verification_failed": "Verification failed",
|
|
"error.failed_to_resend_verification": "Failed to resend verification",
|
|
"error.rate_limit_exceeded": "Too many password reset requests. Please try again later.",
|
|
"error.too_many_attempts": "Too many attempts. Please request a new code.",
|
|
"error.invalid_reset_token": "Invalid or expired reset token",
|
|
"error.password_reset_failed": "Password reset failed",
|
|
"error.apple_signin_not_configured": "Apple Sign In is not configured",
|
|
"error.apple_signin_failed": "Apple Sign In failed",
|
|
"error.invalid_apple_token": "Invalid Apple identity token",
|
|
"error.google_signin_not_configured": "Google Sign In is not configured",
|
|
"error.google_signin_failed": "Google Sign In failed",
|
|
"error.invalid_google_token": "Invalid Google identity token",
|
|
|
|
"error.invalid_task_id": "Invalid task ID",
|
|
"error.invalid_residence_id": "Invalid residence ID",
|
|
"error.invalid_contractor_id": "Invalid contractor ID",
|
|
"error.invalid_document_id": "Invalid document ID",
|
|
"error.invalid_completion_id": "Invalid completion ID",
|
|
"error.invalid_user_id": "Invalid user ID",
|
|
"error.invalid_notification_id": "Invalid notification ID",
|
|
"error.invalid_device_id": "Invalid device ID",
|
|
|
|
"error.task_not_found": "Task not found",
|
|
"error.residence_not_found": "Residence not found",
|
|
"error.contractor_not_found": "Contractor not found",
|
|
"error.document_not_found": "Document not found",
|
|
"error.completion_not_found": "Task completion not found",
|
|
"error.user_not_found": "User not found",
|
|
"error.share_code_invalid": "Invalid share code",
|
|
"error.share_code_expired": "Share code has expired",
|
|
|
|
"error.task_access_denied": "You don't have access to this task",
|
|
"error.residence_access_denied": "You don't have access to this property",
|
|
"error.contractor_access_denied": "You don't have access to this contractor",
|
|
"error.document_access_denied": "You don't have access to this document",
|
|
"error.not_residence_owner": "Only the property owner can perform this action",
|
|
"error.cannot_remove_owner": "Cannot remove the property owner",
|
|
"error.user_already_member": "User is already a member of this property",
|
|
"error.properties_limit_reached": "You have reached the maximum number of properties for your subscription",
|
|
|
|
"error.task_already_cancelled": "Task is already cancelled",
|
|
"error.task_already_archived": "Task is already archived",
|
|
|
|
"error.failed_to_parse_form": "Failed to parse multipart form",
|
|
"error.task_id_required": "task_id is required",
|
|
"error.invalid_task_id_value": "Invalid task_id",
|
|
"error.failed_to_upload_image": "Failed to upload image",
|
|
"error.residence_id_required": "residence_id is required",
|
|
"error.invalid_residence_id_value": "Invalid residence_id",
|
|
"error.title_required": "title is required",
|
|
"error.failed_to_upload_file": "Failed to upload file",
|
|
|
|
"message.logged_out": "Logged out successfully",
|
|
"message.email_verified": "Email verified successfully",
|
|
"message.verification_email_sent": "Verification email sent",
|
|
"message.password_reset_email_sent": "If an account with that email exists, a password reset code has been sent.",
|
|
"message.reset_code_verified": "Code verified successfully",
|
|
"message.password_reset_success": "Password reset successfully. Please log in with your new password.",
|
|
|
|
"message.task_deleted": "Task deleted successfully",
|
|
"message.task_in_progress": "Task marked as in progress",
|
|
"message.task_cancelled": "Task cancelled",
|
|
"message.task_uncancelled": "Task uncancelled",
|
|
"message.task_archived": "Task archived",
|
|
"message.task_unarchived": "Task unarchived",
|
|
"message.completion_deleted": "Completion deleted successfully",
|
|
|
|
"message.residence_deleted": "Residence deleted successfully",
|
|
"message.user_removed": "User removed from residence",
|
|
"message.tasks_report_generated": "Tasks report generated successfully",
|
|
"message.tasks_report_sent": "Tasks report generated and sent to {{.Email}}",
|
|
"message.tasks_report_email_failed": "Tasks report generated but email could not be sent",
|
|
|
|
"message.contractor_deleted": "Contractor deleted successfully",
|
|
|
|
"message.document_deleted": "Document deleted successfully",
|
|
"message.document_activated": "Document activated",
|
|
"message.document_deactivated": "Document deactivated",
|
|
|
|
"message.notification_marked_read": "Notification marked as read",
|
|
"message.all_notifications_marked_read": "All notifications marked as read",
|
|
"message.device_removed": "Device removed",
|
|
|
|
"message.subscription_upgraded": "Subscription upgraded successfully",
|
|
"message.subscription_cancelled": "Subscription cancelled. You will retain Pro benefits until the end of your billing period.",
|
|
"message.subscription_restored": "Subscription restored successfully",
|
|
|
|
"message.file_deleted": "File deleted successfully",
|
|
"message.static_data_refreshed": "Static data refreshed",
|
|
|
|
"error.notification_not_found": "Notification not found",
|
|
"error.invalid_platform": "Invalid platform",
|
|
|
|
"error.upgrade_trigger_not_found": "Upgrade trigger not found",
|
|
"error.receipt_data_required": "receipt_data is required for iOS",
|
|
"error.purchase_token_required": "purchase_token is required for Android",
|
|
|
|
"error.no_file_provided": "No file provided",
|
|
"error.url_required": "File URL is required",
|
|
"error.file_access_denied": "You don't have access to this file",
|
|
"error.days_out_of_range": "Days parameter must be between 1 and 3650",
|
|
"error.platform_required": "Platform is required (ios or android)",
|
|
"error.registration_id_required": "Registration ID is required",
|
|
|
|
"error.failed_to_fetch_residence_types": "Failed to fetch residence types",
|
|
"error.failed_to_fetch_task_categories": "Failed to fetch task categories",
|
|
"error.failed_to_fetch_task_priorities": "Failed to fetch task priorities",
|
|
"error.failed_to_fetch_task_frequencies": "Failed to fetch task frequencies",
|
|
"error.failed_to_fetch_task_statuses": "Failed to fetch task statuses",
|
|
"error.failed_to_fetch_contractor_specialties": "Failed to fetch contractor specialties",
|
|
"error.failed_to_fetch_templates": "Failed to fetch task templates",
|
|
"error.failed_to_search_templates": "Failed to search task templates",
|
|
"error.template_not_found": "Task template not found",
|
|
|
|
"push.task_due_soon.title": "Task Due Soon",
|
|
"push.task_due_soon.body": "{{.TaskTitle}} is due {{.DueDate}}",
|
|
"push.task_overdue.title": "Overdue Task",
|
|
"push.task_overdue.body": "{{.TaskTitle}} is overdue",
|
|
"push.task_completed.title": "Task Completed",
|
|
"push.task_completed.body": "{{.UserName}} completed {{.TaskTitle}}",
|
|
"push.task_assigned.title": "New Task Assigned",
|
|
"push.task_assigned.body": "You have been assigned to {{.TaskTitle}}",
|
|
"push.residence_shared.title": "Property Shared",
|
|
"push.residence_shared.body": "{{.UserName}} shared {{.ResidenceName}} with you",
|
|
|
|
"email.welcome.subject": "Welcome to honeyDue!",
|
|
"email.verification.subject": "Verify Your Email",
|
|
"email.password_reset.subject": "Password Reset Code",
|
|
"email.tasks_report.subject": "Tasks Report for {{.ResidenceName}}",
|
|
|
|
"lookup.residence_type.house": "House",
|
|
"lookup.residence_type.apartment": "Apartment",
|
|
"lookup.residence_type.condo": "Condo",
|
|
"lookup.residence_type.townhouse": "Townhouse",
|
|
"lookup.residence_type.mobile_home": "Mobile Home",
|
|
"lookup.residence_type.other": "Other",
|
|
|
|
"lookup.task_category.plumbing": "Plumbing",
|
|
"lookup.task_category.electrical": "Electrical",
|
|
"lookup.task_category.hvac": "HVAC",
|
|
"lookup.task_category.appliances": "Appliances",
|
|
"lookup.task_category.exterior": "Exterior",
|
|
"lookup.task_category.interior": "Interior",
|
|
"lookup.task_category.landscaping": "Landscaping",
|
|
"lookup.task_category.safety": "Safety",
|
|
"lookup.task_category.cleaning": "Cleaning",
|
|
"lookup.task_category.pest_control": "Pest Control",
|
|
"lookup.task_category.seasonal": "Seasonal",
|
|
"lookup.task_category.other": "Other",
|
|
|
|
"lookup.task_priority.low": "Low",
|
|
"lookup.task_priority.medium": "Medium",
|
|
"lookup.task_priority.high": "High",
|
|
"lookup.task_priority.urgent": "Urgent",
|
|
|
|
"lookup.task_status.pending": "Pending",
|
|
"lookup.task_status.in_progress": "In Progress",
|
|
"lookup.task_status.completed": "Completed",
|
|
"lookup.task_status.cancelled": "Cancelled",
|
|
"lookup.task_status.archived": "Archived",
|
|
|
|
"lookup.task_frequency.once": "Once",
|
|
"lookup.task_frequency.daily": "Daily",
|
|
"lookup.task_frequency.weekly": "Weekly",
|
|
"lookup.task_frequency.biweekly": "Every 2 Weeks",
|
|
"lookup.task_frequency.monthly": "Monthly",
|
|
"lookup.task_frequency.quarterly": "Quarterly",
|
|
"lookup.task_frequency.semiannually": "Every 6 Months",
|
|
"lookup.task_frequency.annually": "Annually",
|
|
|
|
"lookup.contractor_specialty.plumber": "Plumber",
|
|
"lookup.contractor_specialty.electrician": "Electrician",
|
|
"lookup.contractor_specialty.hvac_technician": "HVAC Technician",
|
|
"lookup.contractor_specialty.handyman": "Handyman",
|
|
"lookup.contractor_specialty.landscaper": "Landscaper",
|
|
"lookup.contractor_specialty.roofer": "Roofer",
|
|
"lookup.contractor_specialty.painter": "Painter",
|
|
"lookup.contractor_specialty.carpenter": "Carpenter",
|
|
"lookup.contractor_specialty.pest_control": "Pest Control",
|
|
"lookup.contractor_specialty.cleaning": "Cleaning",
|
|
"lookup.contractor_specialty.pool_service": "Pool Service",
|
|
"lookup.contractor_specialty.general_contractor": "General Contractor",
|
|
"lookup.contractor_specialty.other": "Other"
|
|
}
|