native-update 3.1.1 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/AI-INTEGRATION-GUIDE.md +98 -63
  2. package/Readme.md +89 -120
  3. package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +88 -12
  4. package/android/src/main/java/com/aoneahsan/nativeupdate/NativeUpdatePlugin.kt +45 -18
  5. package/cli/package.json +2 -2
  6. package/dist/esm/definitions.d.ts +8 -0
  7. package/dist/esm/plugin.js +16 -2
  8. package/dist/plugin.cjs.js +1 -1
  9. package/dist/plugin.esm.js +1 -1
  10. package/dist/plugin.js +2 -2
  11. package/docs/CHANGELOG.md +108 -0
  12. package/docs/KNOWN_LIMITATIONS.md +2 -2
  13. package/docs/MIGRATION.md +1 -1
  14. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +64 -8
  15. package/ios/Plugin/NativeUpdatePlugin.swift +39 -13
  16. package/package.json +8 -3
  17. package/docs/AGENTS.md +0 -47
  18. package/docs/APP_REVIEW_GUIDE.md +0 -768
  19. package/docs/BUNDLE_SIGNING.md +0 -277
  20. package/docs/CLAUDE.md +0 -110
  21. package/docs/COMPREHENSIVE_AUDIT_REPORT.md +0 -526
  22. package/docs/DEPLOY_NOTES.md +0 -117
  23. package/docs/EXAMPLE_APPS_SIMPLIFICATION_PLAN.md +0 -384
  24. package/docs/EXAMPLE_APPS_SIMPLIFICATION_TRACKER.md +0 -390
  25. package/docs/LIVE_UPDATES_GUIDE.md +0 -675
  26. package/docs/MANUAL-TASKS.md +0 -30
  27. package/docs/MARKETING_WEBSITE_TRACKER.md +0 -677
  28. package/docs/NATIVE_UPDATES_GUIDE.md +0 -695
  29. package/docs/PACKAGES.md +0 -167
  30. package/docs/PERFORMANCE.md +0 -110
  31. package/docs/PROJECT_COMPLETION_TRACKER.md +0 -411
  32. package/docs/QUICK_START.md +0 -595
  33. package/docs/README.md +0 -130
  34. package/docs/REMAINING_FEATURES.md +0 -192
  35. package/docs/ROADMAP.md +0 -295
  36. package/docs/SECURITY-IF-REPO-PUBLIC.md +0 -232
  37. package/docs/SECURITY.md +0 -356
  38. package/docs/TESTING_REQUIREMENTS.md +0 -201
  39. package/docs/ai-knowledge-base/00-project-profile.md +0 -38
  40. package/docs/ai-knowledge-base/01-features.md +0 -46
  41. package/docs/ai-knowledge-base/02-routes.md +0 -72
  42. package/docs/ai-knowledge-base/03-tech-stack.md +0 -57
  43. package/docs/ai-knowledge-base/README.md +0 -23
  44. package/docs/analytics-tracking.md +0 -37
  45. package/docs/api/API.md +0 -558
  46. package/docs/api/FEATURES.md +0 -414
  47. package/docs/api/app-review-api.md +0 -239
  48. package/docs/api/app-update-api.md +0 -154
  49. package/docs/api/background-update-api.md +0 -170
  50. package/docs/api/events-api.md +0 -323
  51. package/docs/api/live-update-api.md +0 -258
  52. package/docs/archive/MARKETING_WEBSITE_PLAN.md +0 -659
  53. package/docs/background-updates.md +0 -392
  54. package/docs/capacitor-official-plugins.md +0 -46
  55. package/docs/capawesome-plugins.md +0 -29
  56. package/docs/cli-reference.md +0 -321
  57. package/docs/deployment/HOSTINGER_DEPLOY.md +0 -370
  58. package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +0 -184
  59. package/docs/docs-site/plan.md +0 -201
  60. package/docs/docs-site/scope.md +0 -127
  61. package/docs/docs-site/tracker.json +0 -235
  62. package/docs/error-handling-tracking.md +0 -37
  63. package/docs/examples/advanced-scenarios.md +0 -394
  64. package/docs/examples/android-manifest-example.xml +0 -77
  65. package/docs/examples/basic-usage.md +0 -206
  66. package/docs/examples/node-express-backend-example.md +0 -28
  67. package/docs/examples/react-capacitor-example.md +0 -29
  68. package/docs/features/app-reviews.md +0 -975
  69. package/docs/features/app-updates.md +0 -785
  70. package/docs/features/e2e-full-verification/00-overview.md +0 -99
  71. package/docs/features/e2e-full-verification/00-tracker.json +0 -284
  72. package/docs/features/e2e-full-verification/phase01-backend-schema-fixes.md +0 -183
  73. package/docs/features/e2e-full-verification/phase02-test-auth.md +0 -176
  74. package/docs/features/e2e-full-verification/phase03-api-test-coverage.md +0 -63
  75. package/docs/features/e2e-full-verification/phase04-frontend-package-contract-audit.md +0 -73
  76. package/docs/features/e2e-full-verification/phase05-browser-e2e-matrix.md +0 -69
  77. package/docs/features/e2e-full-verification/phase06-deploy-prod-smoke.md +0 -51
  78. package/docs/features/e2e-full-verification/results/phase01-drift-report.md +0 -50
  79. package/docs/features/e2e-full-verification/results/phase03-coverage-matrix.md +0 -215
  80. package/docs/features/e2e-full-verification/results/phase04-frontend-contract.md +0 -139
  81. package/docs/features/e2e-full-verification/results/phase05-e2e-results.md +0 -99
  82. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-01-dashboard.png +0 -0
  83. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-02-signup.png +0 -0
  84. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-03-settings-persisted.png +0 -0
  85. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04a-app-created.png +0 -0
  86. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-04b-duplicate-bundle-422.png +0 -0
  87. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-05-plan-limit-403.png +0 -0
  88. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08a-upload-graceful-fail.png +0 -0
  89. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-08b-builds-list.png +0 -0
  90. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-10-rollout-25pct.png +0 -0
  91. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-11-analytics.png +0 -0
  92. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-12-drive-disconnected.png +0 -0
  93. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-13-pricing.png +0 -0
  94. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-14-isolation-403.png +0 -0
  95. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15a-admin-overview.png +0 -0
  96. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-15b-regular-user-admin-redirect.png +0 -0
  97. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-16a-delete-dialog.png +0 -0
  98. package/docs/features/e2e-full-verification/results/phase05-evidence/e2e-17-mobile-375.png +0 -0
  99. package/docs/features/e2e-full-verification/results/route-list.json +0 -1
  100. package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +0 -96
  101. package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +0 -504
  102. package/docs/features/laravel-nova-backend/progress-tracker.json +0 -184
  103. package/docs/features/live-updates.md +0 -642
  104. package/docs/features/queues-and-emails/00-overview.md +0 -41
  105. package/docs/features/queues-and-emails/00-tracker.json +0 -99
  106. package/docs/features/queues-and-emails/phase01-foundation.md +0 -15
  107. package/docs/features/queues-and-emails/phase02-queued-jobs.md +0 -19
  108. package/docs/features/queues-and-emails/phase03-transactional-emails.md +0 -16
  109. package/docs/features/queues-and-emails/phase04-quota-ops.md +0 -17
  110. package/docs/features/queues-and-emails/phase05-async-build-processing-DECISION.md +0 -16
  111. package/docs/features/queues-and-emails/phase06-verify-deploy.md +0 -17
  112. package/docs/getting-started/configuration.md +0 -469
  113. package/docs/getting-started/installation.md +0 -300
  114. package/docs/getting-started/quick-start.md +0 -430
  115. package/docs/guides/BACKEND_TEMPLATES_GUIDE.md +0 -183
  116. package/docs/guides/admin-panel.md +0 -268
  117. package/docs/guides/channel-management.md +0 -343
  118. package/docs/guides/dashboard-guide.md +0 -365
  119. package/docs/guides/deployment-guide.md +0 -335
  120. package/docs/guides/end-to-end-workflow.md +0 -491
  121. package/docs/guides/key-management.md +0 -284
  122. package/docs/guides/migration-from-codepush.md +0 -145
  123. package/docs/guides/security-best-practices.md +0 -1057
  124. package/docs/guides/testing-guide.md +0 -346
  125. package/docs/guides/troubleshooting.md +0 -482
  126. package/docs/package-audit.md +0 -41
  127. package/docs/plans/PLANNING_COMPLETE_SUMMARY.md +0 -361
  128. package/docs/plans/TASK_1_ANDROID_EXAMPLE_APP.md +0 -401
  129. package/docs/plans/TASK_2_API_ENDPOINTS.md +0 -856
  130. package/docs/plans/TASK_2_DASHBOARD_UI_UX.md +0 -820
  131. package/docs/plans/TASK_2_DATABASE_SCHEMA.md +0 -704
  132. package/docs/plans/TASK_2_GOOGLE_DRIVE_INTEGRATION.md +0 -646
  133. package/docs/plans/TASK_2_SAAS_ARCHITECTURE.md +0 -587
  134. package/docs/plans/TASK_2_USER_AUTHENTICATION.md +0 -600
  135. package/docs/play-store/ASO-METADATA.md +0 -5
  136. package/docs/play-store/DATA-SAFETY.md +0 -5
  137. package/docs/play-store/DECLARATIONS.md +0 -5
  138. package/docs/play-store/README.md +0 -27
  139. package/docs/play-store/RELEASE-NOTES.md +0 -99
  140. package/docs/play-store/RELEASE-STEPS.md +0 -6
  141. package/docs/play-store/STORE-LISTING.md +0 -7
  142. package/docs/play-store/SUBMISSION-CHECKLIST.md +0 -5
  143. package/docs/production-readiness.md +0 -475
  144. package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +0 -123
  145. package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +0 -227
  146. package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +0 -144
  147. package/docs/project-audit/2026-05-16/sessions/batch-01.md +0 -42
  148. package/docs/project-audit/2026-05-16/sessions/batch-02.md +0 -74
  149. package/docs/project-audit/2026-05-16/sessions/batch-03.md +0 -71
  150. package/docs/project-audit/2026-05-16/sessions/batch-04.md +0 -88
  151. package/docs/project-audit/2026-05-16/sessions/batch-05.md +0 -63
  152. package/docs/project-audit/2026-05-16/sessions/batch-06.md +0 -103
  153. package/docs/project-audit/2026-05-16/sessions/batch-07.md +0 -61
  154. package/docs/project-audit/2026-05-16/sessions/batch-08.md +0 -101
  155. package/docs/project-audit/2026-05-16/sessions/batch-09.md +0 -105
  156. package/docs/project-audit/2026-05-16/sessions/batch-10.md +0 -102
  157. package/docs/project-audit/AUDIT-HISTORY.md +0 -74
  158. package/docs/project-audit/BATCH-PLAN.md +0 -168
  159. package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +0 -73
  160. package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +0 -275
  161. package/docs/project-finalization/00-tracker.json +0 -60
  162. package/docs/project-knowledge-base/01-system-overview.md +0 -227
  163. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +0 -352
  164. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +0 -379
  165. package/docs/project-knowledge-base/04-data-models-integrations.md +0 -244
  166. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +0 -256
  167. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +0 -208
  168. package/docs/project-knowledge-base/README.md +0 -103
  169. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +0 -81
  170. package/docs/reports/AUDIT_SUMMARY_2025-12-26.md +0 -203
  171. package/docs/reports/CLAUDE-CODE-COMPLETION-PROMPT.md +0 -403
  172. package/docs/reports/CLAUDE_CODE_PROMPT.md +0 -29
  173. package/docs/reports/CODEBASE_STATUS_REPORT.md +0 -272
  174. package/docs/reports/COMPLETE_VERIFICATION.md +0 -106
  175. package/docs/reports/COMPREHENSIVE-PROJECT-AUDIT-2026-02-24.md +0 -747
  176. package/docs/reports/EVENT_FLOW_VERIFICATION.md +0 -80
  177. package/docs/reports/EXAMPLE_APPS_SIMPLIFICATION_COMPLETE.md +0 -369
  178. package/docs/reports/FINAL_STATUS.md +0 -122
  179. package/docs/reports/FINAL_VERIFICATION_CHECKLIST.md +0 -425
  180. package/docs/reports/MARKETING_WEBSITE_COMPLETE.md +0 -466
  181. package/docs/reports/PACKAGE_COMPLETENESS_REPORT.md +0 -130
  182. package/docs/reports/PRODUCTION_STATUS.md +0 -115
  183. package/docs/reports/PROJECT_RESTRUCTURE_2025-12-27.md +0 -287
  184. package/docs/reports/PROJECT_RESTRUCTURE_FINAL_SUMMARY.md +0 -464
  185. package/docs/reports/PUBLISHING_VERIFICATION.md +0 -144
  186. package/docs/reports/RELEASE_READY_SUMMARY.md +0 -99
  187. package/docs/reports/claude-completion.json +0 -241
  188. package/docs/rules-tracker.md +0 -102
  189. package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +0 -116
  190. package/docs/security/certificate-pinning.md +0 -122
  191. package/docs/seo-aeo-rules.json +0 -3043
  192. package/docs/social-media-marketing/README.md +0 -81
  193. package/docs/social-media-marketing/posts-batch-01.md +0 -613
  194. package/docs/social-media-marketing/posts-batch-02.md +0 -528
  195. package/docs/social-media-marketing/whatsapp-messages-batch-01.md +0 -458
  196. package/docs/social-media-marketing/whatsapp-status-batch-01.md +0 -355
  197. package/docs/tracking/IMPLEMENTATION_TRACKER.md +0 -303
  198. package/docs/tracking/capacitor-rollout-note-2026-03-01.md +0 -21
  199. package/docs/tracking/completion-tracker-2026-02-24.json +0 -174
  200. package/docs/tracking/finalization-2026-05-16-tracker.json +0 -346
  201. package/docs/tracking/full-audit-tracker.json +0 -121
  202. package/docs/tracking/production-readiness-audit-tracker.json +0 -429
  203. package/docs/tracking/seo-checklist-tracker.json +0 -333
@@ -1,99 +0,0 @@
1
- {
2
- "$schema": "queues-and-emails-tracker",
3
- "description": "Resumable tracker for queue adoption + transactional email across the Laravel backend. The first phase/sub-task with status 'pending' or 'in_progress' is the next thing to work on.",
4
- "module": "queues-and-emails",
5
- "createdAt": "2026-07-13",
6
- "lastUpdated": "2026-07-13",
7
- "planFile": "/Users/pc/.claude/plans/queues-and-emails-native-update.md",
8
- "overview": "docs/features/queues-and-emails/00-overview.md",
9
- "modelWorkflow": "Fable 5 planned AND implemented (owner switched back to Fable and asked for everything now, 2026-07-13). Local implementation is COMPLETE; only the server deploy (phase06.5) remains.",
10
- "userDecisions": {
11
- "workerModel": "Scheduler-driven `queue:work --stop-when-empty --max-time=50` every minute via routes/console.php (withoutOverlapping(10) + runInBackground). SUPERSEDES the 2026-07-12 server-session advice to add a second cron — the queue:work hPanel cron must be DELETED; schedule:run is the only cron.",
12
- "queueCount": "ONE queue (default). No named queues.",
13
- "mailTransport": "FilesHub email API (owner directive 2026-07-13: FilesHub for email sending + file storage globally, unless another tool is named). Custom transport app/Mail/Transport/FilesHubTransport.php → POST /api/v1/emails/send, reusing FILESHUB_* keys; the API key needs the `email` permission (docs/MANUAL-TASKS.md row 10). MAIL_MAILER=log locally; array in tests. Prod stays on `log` (safe) until the key has the email permission. SUPERSEDES the earlier Hostinger-SMTP decision — no SMTP anywhere.",
14
- "updateCheckAnalytics": "STAYS dispatch()->afterResponse() — deliberately NOT moved to the queue (would add a jobs-table INSERT+DELETE per update check on the hottest path).",
15
- "asyncBuildProcessing": "IMPLEMENTED env-gated (owner asked for the plan 'as complete as possible' + all backend work done now): NATIVE_UPDATE_ASYNC_BUILD_PROCESSING, default FALSE (kill-switch). Sync path unchanged when off. Before enabling in prod: dashboard builds page should poll/refresh 'processing' status (it already displays + filters the status).",
16
- "tests": "No new test files (owner global rule). One existing test legitimately flipped: MeControllerTest's finding-#7 gap-pin now asserts the FIXED behavior (account deletion queues FilesHub cleanup for 'drive'-labeled rows)."
17
- },
18
- "knownRisks": [
19
- "Email quota: FilesHub allows ~450 mails/day per sending account (429 → queued retry with backoff); deliverability is FilesHub's concern (its own sending accounts), not this app's.",
20
- "PayPal is now ACK'd 200 immediately after signature verify — retries are ours (3 tries + backoff); queue:alert-failed daily mail is the safety net for exhausted retries.",
21
- "Zero-copy promotions share fileshub_public_id across build rows; deletion previously could destroy a shared object — Build::queueStoredFileDeletion now guards (latent prod bug, fixed in passing).",
22
- "withoutOverlapping uses the cache store for its mutex — prod CACHE_STORE=database (verified present).",
23
- "The scheduler cron on prod is still broken (hPanel arg-parsing, MANUAL-TASKS row 8) — until the owner fixes it, NOTHING scheduled runs on prod, including the queue worker."
24
- ],
25
- "phases": [
26
- {
27
- "id": "phase01",
28
- "title": "Queue + mail foundation (env contract, scheduler worker, BaseQueuedNotification)",
29
- "status": "complete",
30
- "completedAt": "2026-07-13",
31
- "subTasks": [
32
- { "id": "phase01.1", "title": "MAIL_* + mau_warning_ratio + async-flag env/config contract in .env + .env.example + config/native_update.php", "status": "complete", "awaitingUser": false },
33
- { "id": "phase01.2", "title": "Scheduler-driven queue worker + queue:prune-failed weekly + sanctum:prune-expired daily in routes/console.php", "status": "complete", "awaitingUser": false },
34
- { "id": "phase01.3", "title": "app/Notifications/BaseQueuedNotification.php abstract", "status": "complete", "awaitingUser": false }
35
- ]
36
- },
37
- {
38
- "id": "phase02",
39
- "title": "Queued jobs: PayPal webhook processing + FilesHub cleanup (incl. shared-object guard bugfix)",
40
- "status": "complete",
41
- "completedAt": "2026-07-13",
42
- "subTasks": [
43
- { "id": "phase02.1", "title": "ProcessPayPalWebhookJob (ShouldBeUnique on event id; handlers moved verbatim; ACTIVATED-unknown now throws to retry) + controller slims to verify→dispatch→200", "status": "complete", "awaitingUser": false },
44
- { "id": "phase02.2", "title": "DeleteFilesHubObjectsJob + Build::queueStoredFileDeletion() guard + User::deleteAllFiles() id-sweep dispatch + drop BuildController::destroy inline delete", "status": "complete", "awaitingUser": false }
45
- ]
46
- },
47
- {
48
- "id": "phase03",
49
- "title": "Transactional emails: welcome, admin new-user, subscription lifecycle, account suspension",
50
- "status": "complete",
51
- "completedAt": "2026-07-13",
52
- "subTasks": [
53
- { "id": "phase03.1", "title": "WelcomeNotification + AdminNewUserNotification wired on wasRecentlyCreated in OAuthController", "status": "complete", "awaitingUser": false },
54
- { "id": "phase03.2", "title": "SubscriptionEventNotification (single parameterized class) wired into all 5 webhook-job handlers", "status": "complete", "awaitingUser": false },
55
- { "id": "phase03.3", "title": "AccountSuspendedNotification via User::suspend() + AdminController false→true transition guard (copy verified honest: only dashboard sign-in is blocked while suspended)", "status": "complete", "awaitingUser": false }
56
- ]
57
- },
58
- {
59
- "id": "phase04",
60
- "title": "Quota monitoring + ops alerts",
61
- "status": "complete",
62
- "completedAt": "2026-07-13",
63
- "subTasks": [
64
- { "id": "phase04.1", "title": "users migration: mau_warning_notified_at + mau_exceeded_notified_at (nullable timestamps; verified on local MySQL 8.x strict) + casts", "status": "complete", "awaitingUser": false },
65
- { "id": "phase04.2", "title": "MauQuotaNotification + quota:check-mau command (chunkById, once-per-calendar-month per level, honest no-cutoff copy) + daily schedule", "status": "complete", "awaitingUser": false },
66
- { "id": "phase04.3", "title": "AdminFailedJobsNotification (deliberately NOT queued) + queue:alert-failed command + daily schedule", "status": "complete", "awaitingUser": false }
67
- ]
68
- },
69
- {
70
- "id": "phase05",
71
- "title": "Async build upload processing (env-gated, default OFF)",
72
- "status": "complete",
73
- "completedAt": "2026-07-13",
74
- "subTasks": [
75
- { "id": "phase05.1", "title": "Implemented per owner's 'as complete as possible' directive: BuildController::storeAsync (checksum in-request, bundle → storage/app/pending-builds, row status='processing', 202) + ProcessBuildUploadJob (sign → FilesHub upload → 'active'; failed() → status 'failed' + BuildProcessingFailedNotification + temp cleanup). Gate: NATIVE_UPDATE_ASYNC_BUILD_PROCESSING=false (kill-switch, sync path unchanged).", "status": "complete", "awaitingUser": false },
76
- { "id": "phase05.2", "title": "OWNER (later, optional): before flipping the flag ON in prod, add 'processing'-status polling/refresh to the website builds page", "status": "blocked", "awaitingUser": true }
77
- ]
78
- },
79
- {
80
- "id": "phase06",
81
- "title": "Verification, docs, deploy handoff",
82
- "status": "in_progress",
83
- "completedAt": null,
84
- "subTasks": [
85
- { "id": "phase06.1", "title": "Full gates: pint clean; php artisan test 248/248 green (sqlite); migration + both new commands verified on local MySQL 8.x; schedule:list shows 6 custom entries; end-to-end database-queue smoke (dispatch → jobs row → worker drain → mail in log, 0 failed)", "status": "complete", "awaitingUser": false },
86
- { "id": "phase06.2", "title": "docs/DEPLOY_NOTES.md: new 2026-07-13 pending item + 2026-07-10 cron item narrowed to ONE cron (queue:work cron DELETED)", "status": "complete", "awaitingUser": false },
87
- { "id": "phase06.3", "title": "docs/MANUAL-TASKS.md: row 8 updated (single cron) + row 10 added (create Hostinger mailbox, password → ~/.secrets, SPF/DKIM, confirm test mail)", "status": "complete", "awaitingUser": false },
88
- { "id": "phase06.4", "title": "Docs sync: backend/CLAUDE.md + backend/AGENTS.md 'Queues + outbound email' block, root CLAUDE.md/AGENTS.md pointer, tracker + memory updates, ONE commit + push", "status": "complete", "awaitingUser": false },
89
- { "id": "phase06.5", "title": "Server deploy + prod verification (server agent per DEPLOY_NOTES 2026-07-13 item; SMTP mailbox env is owner-provided — until then prod mail stays on the log driver)", "status": "blocked", "awaitingUser": true }
90
- ]
91
- }
92
- ],
93
- "runHistory": [
94
- { "date": "2026-07-13", "phase": "planning", "summary": "Fable 5: explored backend (no mail infra existed; webhook sync; FilesHub deletes fire-and-forget; afterResponse analytics kept), wrote full plan with code to ~/.claude/plans/queues-and-emails-native-update.md, scaffolded this tracker.", "commit": "47c20f8" },
95
- { "date": "2026-07-13", "phase": "phase01-phase06 (implementation)", "summary": "Fable 5 (owner directive: everything now): implemented all phases incl. env-gated async build processing. 2 jobs + 1 async-build job, 7 notification classes, 2 commands, 1 migration, 6 schedule entries. Gates: pint clean, 248/248 tests, MySQL parity, live database-queue smoke drained to the log mailer. Deploy handoff written; server deploy (06.5) remains.", "commit": "1938111" },
96
- { "date": "2026-07-13", "phase": "mail-transport swap", "summary": "Owner set the global FilesHub email+storage rule → replaced the Hostinger-SMTP plan with a custom FilesHubTransport (Mail::extend 'fileshub', POST /api/v1/emails/send, FILESHUB_* keys, email permission). SMTP env keys deleted; DEPLOY_NOTES/MANUAL-TASKS/docs updated; global rule recorded in ~/.claude/CLAUDE.md + AGENTS.md + rules/services-integrations.md.", "commit": "pending" }
97
- ],
98
- "resumeInstructions": "Local work COMPLETE. Remaining: (a) phase06.5 server deploy — server agent follows the 2026-07-13 item in docs/DEPLOY_NOTES.md; (b) owner creates the SMTP mailbox (docs/MANUAL-TASKS.md row 10) and fixes the hPanel cron (row 8); (c) optional phase05.2 dashboard polling before enabling async build processing."
99
- }
@@ -1,15 +0,0 @@
1
- # Phase 01 — Queue + mail foundation
2
-
3
- **Plan sections:** Tasks 1–3 in `/Users/pc/.claude/plans/queues-and-emails-native-update.md` (complete code there).
4
-
5
- Deliverables: MAIL_* + `mau_warning_ratio` env/config contract (`.env`, `.env.example`,
6
- `config/native_update.php`; local `.env` → `MAIL_MAILER=log` + `QUEUE_CONNECTION=sync`);
7
- scheduler-driven worker + `queue:prune-failed` weekly + `sanctum:prune-expired` daily in
8
- `routes/console.php`; `app/Notifications/BaseQueuedNotification.php`.
9
-
10
- **Gate:** `vendor/bin/pint --dirty` clean · `php artisan test` green · `php artisan schedule:list`
11
- shows the 3 new entries.
12
-
13
- | Date | Result | Notes |
14
- |---|---|---|
15
- | 2026-07-13 | ✅ complete | Implemented in main-context Fable session; gates green (pint, 248/248 tests) |
@@ -1,19 +0,0 @@
1
- # Phase 02 — Queued jobs: PayPal webhook + FilesHub cleanup
2
-
3
- **Plan sections:** Tasks 4–5 in `/Users/pc/.claude/plans/queues-and-emails-native-update.md` (complete code there).
4
-
5
- Deliverables: `app/Jobs/ProcessPayPalWebhookJob.php` (handlers moved verbatim from the controller;
6
- `ShouldBeUnique` on PayPal event id; ACTIVATED-unknown-subscription throws to retry — it races
7
- `SubscriptionController::activate()`); controller = verify sync → dispatch → 200.
8
- `app/Jobs/DeleteFilesHubObjectsJob.php` (5 tries, long backoff, 404=success);
9
- `Build::queueStoredFileDeletion()` with the shared-`fileshub_public_id` guard (fixes the latent
10
- promoted-build double-delete bug; keys on public-id presence, not the legacy `storage_provider`
11
- label); `User::deleteAllFiles()` → id sweep + chunked dispatch; `BuildController::destroy()` inline
12
- delete block removed.
13
-
14
- **Gate:** pint clean · `php artisan test` green (adapt PayPalWebhookTest/BuildControllerTest/
15
- MeControllerTest only where behavior legitimately changed — sync queue runs jobs inline).
16
-
17
- | Date | Result | Notes |
18
- |---|---|---|
19
- | 2026-07-13 | ✅ complete | Implemented in main-context Fable session; gates green (pint, 248/248 tests) |
@@ -1,16 +0,0 @@
1
- # Phase 03 — Transactional emails
2
-
3
- **Plan sections:** Tasks 6–8 in `/Users/pc/.claude/plans/queues-and-emails-native-update.md` (complete code + copy there).
4
-
5
- Deliverables: `WelcomeNotification` + `Admin/AdminNewUserNotification` on `wasRecentlyCreated` in
6
- `OAuthController` (TestAuthController untouched — E2E logins never mail);
7
- `SubscriptionEventNotification` (ONE parameterized class) wired into all 5 webhook-job handlers;
8
- `AccountSuspendedNotification` via `User::suspend()` + `AdminController` false→true suspension
9
- transition guard. Copy: short, kind, factual, no banned words; actions built from
10
- `config('native_update.frontend_url')`.
11
-
12
- **Gate:** pint clean · `php artisan test` green (mail runs on the `array` transport in tests).
13
-
14
- | Date | Result | Notes |
15
- |---|---|---|
16
- | 2026-07-13 | ✅ complete | Implemented in main-context Fable session; gates green (pint, 248/248 tests) |
@@ -1,17 +0,0 @@
1
- # Phase 04 — Quota monitoring + ops alerts
2
-
3
- **Plan sections:** Tasks 9–11 in `/Users/pc/.claude/plans/queues-and-emails-native-update.md` (complete code there).
4
-
5
- Deliverables: users migration `mau_warning_notified_at` + `mau_exceeded_notified_at` (nullable
6
- timestamps, casts added, NOT fillable, MySQL-strict safe); `MauQuotaNotification` +
7
- `quota:check-mau` command (chunkById(100), per-app `DeviceActivity::getMAU`, warn ≥80% / exceeded
8
- ≥100%, once per calendar month per level, honest no-cutoff copy) scheduled daily 06:00;
9
- `Admin/AdminFailedJobsNotification` (deliberately NOT queued) + `queue:alert-failed` command
10
- (notifyNow to ADMIN_EMAILS when failed_jobs > 0) scheduled daily 07:00.
11
-
12
- **Gate:** pint clean · `php artisan test` green · migration verified on local MySQL if available ·
13
- `php artisan schedule:list` shows 6 custom entries.
14
-
15
- | Date | Result | Notes |
16
- |---|---|---|
17
- | 2026-07-13 | ✅ complete | Implemented in main-context Fable session; gates green (pint, 248/248 tests) |
@@ -1,16 +0,0 @@
1
- # Phase 05 — OPTIONAL: async build upload processing (BLOCKED — owner decision)
2
-
3
- **Status: awaiting owner decision. Recommendation: SKIP until a real upload timeout is observed.**
4
-
5
- Today `BuildController::store()` hashes + signs + re-uploads to FilesHub in-request; it works in
6
- production. Risk it would address: PHP max_execution_time on very large bundles (shared hosting).
7
- The `builds.status` enum already has `uploading`/`processing`, so the async shape is known (see
8
- plan Phase 05): temp-store upload → row `status='processing'` → `ProcessBuildUploadJob` → active/
9
- failed + owner failure notification; website dashboard would need `processing`-status polling.
10
-
11
- If approved: Fable extends the plan FIRST (full task code), then Opus implements env-gated
12
- (`NATIVE_UPDATE_ASYNC_BUILD_PROCESSING`, default `false`). Do not start from this stub alone.
13
-
14
- | Date | Result | Notes |
15
- |---|---|---|
16
- | 2026-07-13 | ✅ implemented (env-gated, default OFF) | Owner directed full completion; flag stays false until dashboard adds processing-status polling (phase05.2, owner) |
@@ -1,17 +0,0 @@
1
- # Phase 06 — Verification, docs, deploy handoff
2
-
3
- **Plan section:** Task 12 in `/Users/pc/.claude/plans/queues-and-emails-native-update.md` (exact deploy-note text + verification commands there).
4
-
5
- Deliverables: full gates (pint, `php artisan test` sqlite + MySQL parity if available,
6
- `schedule:list`); `docs/DEPLOY_NOTES.md` pending item (migrate --force, MAIL_* server env +
7
- config:cache + FPM restart, **do NOT add the previously-suggested queue:work cron** — scheduler
8
- drives the worker, verify jobs table drains + one raw SMTP test mail); `docs/MANUAL-TASKS.md` rows
9
- (create Hostinger mailbox, password → `~/.secrets/native-update/` + INDEX, SPF/DKIM, confirm
10
- mail receipt); compact backend/root CLAUDE+AGENTS sync; tracker update; ONE commit + push.
11
-
12
- phase06.5 (server deploy + prod verification) is server-agent/owner-side — local agent marks it
13
- `awaitingUser` and stops there.
14
-
15
- | Date | Result | Notes |
16
- |---|---|---|
17
- | 2026-07-13 | ✅ local complete | Gates + queue smoke green; DEPLOY_NOTES + MANUAL-TASKS written; server deploy (06.5) pending |
@@ -1,469 +0,0 @@
1
- # Configuration Guide
2
-
3
- > **⚠️ Backend Server Required**
4
- >
5
- > All configuration options in this guide assume you have already built and deployed:
6
- > - A complete update server with all required API endpoints
7
- > - Bundle generation and signing infrastructure
8
- > - CDN or storage solution for bundle distribution
9
- > - Security infrastructure for signatures and certificates
10
- >
11
- > **Without these backend components, the plugin will not function regardless of configuration.**
12
-
13
- This guide covers all configuration options available in Capacitor Native Update. The plugin is highly configurable to meet various deployment scenarios and security requirements.
14
-
15
- ## Configuration Overview
16
-
17
- The plugin is configured using the `configure()` method with an `UpdateConfig` object:
18
-
19
- ```typescript
20
- await NativeUpdate.configure({
21
- liveUpdate: {
22
- /* Live update settings */
23
- },
24
- appUpdate: {
25
- /* App store update settings */
26
- },
27
- appReview: {
28
- /* Review request settings */
29
- },
30
- security: {
31
- /* Security settings */
32
- },
33
- });
34
- ```
35
-
36
- ## Live Update Configuration
37
-
38
- Configure how your app handles over-the-air updates.
39
-
40
- ### Basic Configuration
41
-
42
- ```typescript
43
- liveUpdate: {
44
- // Required: Your application identifier
45
- appId: 'com.yourcompany.app',
46
-
47
- // Required: Your update server URL
48
- serverUrl: 'https://updates.yourserver.com',
49
-
50
- // Update channel (default: 'production')
51
- channel: 'production',
52
-
53
- // Enable automatic update checks (default: true)
54
- autoUpdate: true,
55
-
56
- // Update strategy
57
- updateStrategy: 'IMMEDIATE' // or 'BACKGROUND' or 'MANUAL'
58
- }
59
- ```
60
-
61
- ### Advanced Configuration
62
-
63
- ```typescript
64
- liveUpdate: {
65
- appId: 'com.yourcompany.app',
66
- serverUrl: 'https://updates.yourserver.com',
67
- channel: 'production',
68
-
69
- // Security (see Key Management Guide for generating keys)
70
- // Generate keys: npx native-update keys generate --type rsa --size 4096
71
- publicKey: 'YOUR_RSA_PUBLIC_KEY', // Base64 encoded public key
72
- requireSignature: true,
73
- checksumAlgorithm: 'SHA-256', // or 'SHA-512'
74
-
75
- // Update behavior
76
- updateStrategy: 'BACKGROUND',
77
- mandatoryInstallMode: 'IMMEDIATE',
78
- optionalInstallMode: 'ON_NEXT_RESTART',
79
-
80
- // Update checks
81
- autoUpdate: true,
82
- checkInterval: 3600000, // Check every hour (in ms)
83
-
84
- // Restrictions
85
- allowEmulator: false, // Disable updates on emulators
86
- maxBundleSize: 50 * 1024 * 1024, // 50MB limit
87
-
88
- // Network
89
- allowedHosts: [
90
- 'updates.yourserver.com',
91
- 'cdn.yourserver.com'
92
- ],
93
-
94
- // Retry configuration
95
- maxRetries: 3,
96
- retryDelay: 1000, // 1 second
97
- timeout: 30000 // 30 seconds
98
- }
99
- ```
100
-
101
- ### Configuration Options Explained
102
-
103
- #### Update Strategies
104
-
105
- - **`IMMEDIATE`**: Downloads and installs updates immediately when found
106
- - **`BACKGROUND`**: Downloads in background, installs based on install mode
107
- - **`MANUAL`**: Full control - you decide when to download and install
108
-
109
- #### Install Modes
110
-
111
- - **`IMMEDIATE`**: Installs and restarts immediately
112
- - **`ON_NEXT_RESTART`**: Installs on next app restart
113
- - **`ON_NEXT_RESUME`**: Installs when app resumes from background
114
-
115
- #### Security Options
116
-
117
- - **`publicKey`**: RSA public key for signature verification
118
- - **`requireSignature`**: Enforce bundle signature validation
119
- - **`checksumAlgorithm`**: Hash algorithm for integrity checks
120
-
121
- ## App Update Configuration
122
-
123
- Configure native app store update behavior.
124
-
125
- ### Basic Configuration
126
-
127
- ```typescript
128
- appUpdate: {
129
- // Check for updates on app start
130
- checkOnAppStart: true,
131
-
132
- // Minimum required version
133
- minimumVersion: '2.0.0',
134
-
135
- // Update priority (0-5, where 5 is highest)
136
- updatePriority: 3
137
- }
138
- ```
139
-
140
- ### Advanced Configuration
141
-
142
- ```typescript
143
- appUpdate: {
144
- checkOnAppStart: true,
145
- minimumVersion: '2.0.0',
146
- updatePriority: 4,
147
-
148
- // Custom store URLs
149
- storeUrl: {
150
- android: 'https://play.google.com/store/apps/details?id=com.yourapp',
151
- ios: 'https://apps.apple.com/app/id123456789'
152
- },
153
-
154
- // Allow version downgrades (not recommended)
155
- allowDowngrade: false,
156
-
157
- // Force update if below minimum version
158
- forceUpdateBelow: '1.5.0',
159
-
160
- // Check interval for app updates (ms)
161
- checkInterval: 86400000 // Once per day
162
- }
163
- ```
164
-
165
- ### Update Priority Levels
166
-
167
- | Priority | Behavior |
168
- | -------- | --------------------------------------- |
169
- | 0-2 | Low - Optional update, can be dismissed |
170
- | 3 | Medium - Recommended update |
171
- | 4 | High - Strongly recommended |
172
- | 5 | Critical - Immediate update required |
173
-
174
- ## App Review Configuration
175
-
176
- Configure when and how to request user reviews.
177
-
178
- ### Basic Configuration
179
-
180
- ```typescript
181
- appReview: {
182
- // Days since install before first prompt
183
- minimumDaysSinceInstall: 7,
184
-
185
- // Days between review prompts
186
- minimumDaysSinceLastPrompt: 60,
187
-
188
- // App launches before eligible
189
- minimumLaunchCount: 3
190
- }
191
- ```
192
-
193
- ### Advanced Configuration
194
-
195
- ```typescript
196
- appReview: {
197
- minimumDaysSinceInstall: 7,
198
- minimumDaysSinceLastPrompt: 60,
199
- minimumLaunchCount: 5,
200
-
201
- // Significant events before eligible
202
- minimumSignificantEvents: 3,
203
-
204
- // Custom trigger events
205
- customTriggers: [
206
- 'purchase_completed',
207
- 'level_completed',
208
- 'task_finished'
209
- ],
210
-
211
- // Debug mode - bypass all restrictions
212
- debugMode: false,
213
-
214
- // Maximum prompts per version
215
- maxPromptsPerVersion: 2,
216
-
217
- // Require positive events
218
- requirePositiveEvents: true
219
- }
220
- ```
221
-
222
- ## Security Configuration
223
-
224
- Configure security features for all update operations.
225
-
226
- ### Comprehensive Security Setup
227
-
228
- ```typescript
229
- security: {
230
- // Force HTTPS for all URLs
231
- enforceHttps: true,
232
-
233
- // Certificate pinning
234
- certificatePinning: {
235
- enabled: true,
236
- certificates: [
237
- 'sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
238
- 'sha256/BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB='
239
- ],
240
- includeSubdomains: true,
241
- maxAge: 31536000 // 1 year
242
- },
243
-
244
- // Input validation
245
- validateInputs: true,
246
-
247
- // Secure storage for sensitive data
248
- secureStorage: true,
249
-
250
- // Security event logging
251
- logSecurityEvents: true,
252
-
253
- // Content Security Policy
254
- contentSecurityPolicy: {
255
- enabled: true,
256
- policy: "default-src 'self'; script-src 'self' 'unsafe-inline';"
257
- }
258
- }
259
- ```
260
-
261
- ## Environment-Specific Configuration
262
-
263
- ### Development Environment
264
-
265
- ```typescript
266
- const isDevelopment = process.env.NODE_ENV === 'development';
267
-
268
- await NativeUpdate.configure({
269
- liveUpdate: {
270
- appId: 'com.yourcompany.app.dev',
271
- serverUrl: isDevelopment
272
- ? 'http://localhost:3000'
273
- : 'https://updates.yourserver.com',
274
- channel: isDevelopment ? 'development' : 'production',
275
- allowEmulator: isDevelopment,
276
- requireSignature: !isDevelopment,
277
- },
278
- appReview: {
279
- debugMode: isDevelopment,
280
- },
281
- security: {
282
- enforceHttps: !isDevelopment,
283
- },
284
- });
285
- ```
286
-
287
- ### Multiple Environments
288
-
289
- ```typescript
290
- interface Environment {
291
- name: string;
292
- serverUrl: string;
293
- channel: string;
294
- publicKey?: string;
295
- }
296
-
297
- const environments: Record<string, Environment> = {
298
- development: {
299
- name: 'Development',
300
- serverUrl: 'http://localhost:3000',
301
- channel: 'development',
302
- },
303
- staging: {
304
- name: 'Staging',
305
- serverUrl: 'https://staging-updates.yourserver.com',
306
- channel: 'staging',
307
- publicKey: 'STAGING_PUBLIC_KEY',
308
- },
309
- production: {
310
- name: 'Production',
311
- serverUrl: 'https://updates.yourserver.com',
312
- channel: 'production',
313
- publicKey: 'PRODUCTION_PUBLIC_KEY',
314
- },
315
- };
316
-
317
- const currentEnv = environments[process.env.APP_ENV || 'production'];
318
-
319
- await NativeUpdate.configure({
320
- liveUpdate: {
321
- appId: 'com.yourcompany.app',
322
- serverUrl: currentEnv.serverUrl,
323
- channel: currentEnv.channel,
324
- publicKey: currentEnv.publicKey,
325
- requireSignature: !!currentEnv.publicKey,
326
- },
327
- });
328
- ```
329
-
330
- ## Dynamic Configuration
331
-
332
- ### Runtime Configuration Updates
333
-
334
- ```typescript
335
- // Change update channel
336
- await NativeUpdate.setChannel('beta');
337
-
338
- // Change server URL
339
- await NativeUpdate.setUpdateUrl('https://new-server.com');
340
-
341
- // Update security settings
342
- await NativeUpdate.updateConfig({
343
- enforceHttps: true,
344
- requireSignature: true,
345
- });
346
- ```
347
-
348
- ### Configuration from Remote Source
349
-
350
- ```typescript
351
- async function loadRemoteConfig() {
352
- try {
353
- // Fetch configuration from your backend
354
- const response = await fetch('https://api.yourserver.com/app-config');
355
- const remoteConfig = await response.json();
356
-
357
- // Apply remote configuration
358
- await NativeUpdate.configure({
359
- liveUpdate: {
360
- appId: remoteConfig.appId,
361
- serverUrl: remoteConfig.updateServer,
362
- channel: remoteConfig.channel,
363
- updateStrategy: remoteConfig.updateStrategy,
364
- publicKey: remoteConfig.publicKey,
365
- },
366
- appUpdate: {
367
- minimumVersion: remoteConfig.minimumVersion,
368
- updatePriority: remoteConfig.updatePriority,
369
- },
370
- });
371
- } catch (error) {
372
- // Fall back to default configuration
373
- console.error('Failed to load remote config:', error);
374
- await loadDefaultConfig();
375
- }
376
- }
377
- ```
378
-
379
- ## Configuration Best Practices
380
-
381
- ### 1. Security First
382
-
383
- Always enable security features in production:
384
-
385
- ```typescript
386
- // Production security configuration
387
- const productionConfig = {
388
- liveUpdate: {
389
- requireSignature: true,
390
- checksumAlgorithm: 'SHA-512',
391
- publicKey: process.env.UPDATE_PUBLIC_KEY,
392
- },
393
- security: {
394
- enforceHttps: true,
395
- certificatePinning: { enabled: true },
396
- validateInputs: true,
397
- secureStorage: true,
398
- },
399
- };
400
- ```
401
-
402
- ### 2. Progressive Rollout
403
-
404
- Use channels for staged deployments:
405
-
406
- ```typescript
407
- // Rollout stages
408
- const rolloutConfig = {
409
- liveUpdate: {
410
- channel: getUserRolloutChannel(), // 'alpha', 'beta', 'production'
411
- updateStrategy: isEarlyAdopter() ? 'IMMEDIATE' : 'BACKGROUND',
412
- },
413
- };
414
- ```
415
-
416
- ### 3. Error Recovery
417
-
418
- Configure retry and fallback behavior:
419
-
420
- ```typescript
421
- const resilientConfig = {
422
- liveUpdate: {
423
- maxRetries: 3,
424
- retryDelay: 2000,
425
- timeout: 30000,
426
- fallbackUrl: 'https://backup-updates.yourserver.com',
427
- },
428
- };
429
- ```
430
-
431
- ### 4. Performance Optimization
432
-
433
- Configure for optimal performance:
434
-
435
- ```typescript
436
- const performanceConfig = {
437
- liveUpdate: {
438
- updateStrategy: 'BACKGROUND',
439
- checkInterval: 3600000, // Check hourly
440
- maxBundleSize: 20 * 1024 * 1024, // 20MB limit
441
- installMode: 'ON_NEXT_RESTART', // Non-disruptive
442
- },
443
- };
444
- ```
445
-
446
- ## Validation
447
-
448
- The plugin validates all configuration options and will throw descriptive errors for invalid configurations:
449
-
450
- ```typescript
451
- try {
452
- await NativeUpdate.configure(config);
453
- } catch (error) {
454
- if (error.code === 'INVALID_CONFIG') {
455
- console.error('Configuration error:', error.message);
456
- // Handle specific configuration errors
457
- }
458
- }
459
- ```
460
-
461
- ## Next Steps
462
-
463
- - Implement [Security Best Practices](https://nativeupdate.aoneahsan.com/docs/guides/security-best-practices)
464
- - Set up your update server (see backend-template folder)
465
- - Explore [Advanced Features](https://nativeupdate.aoneahsan.com/docs/features/live-updates)
466
-
467
- ---
468
-
469
- Made with ❤️ by Ahsan Mahmood