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,184 +0,0 @@
1
- # Production Deployment Checklist — Native Update Backend (Laravel 13 + Nova 5)
2
-
3
- **Last updated:** 2026-07-02
4
- **Scope:** `backend/` only. The plugin (`/`) and website (`website/`) ship via npm/Firebase Hosting respectively and have their own pipelines.
5
- **Companion:** `docs/deployment/HOSTINGER_DEPLOY.md` (host-specific steps for Hostinger).
6
-
7
- This checklist is the source of truth for "is this deploy safe to ship?". Run through it on every release until automation in `.github/workflows/release.yml` (Batch 8) replaces the manual gates.
8
-
9
- > **v3.1.0 deploy notes:** (1) Requires **PHP ≥ 8.3** (Laravel 13). (2) Runs one new migration
10
- > `2026_07_02_000001_extend_builds_channel_index` (additive covering index — safe live). (3) The
11
- > latest-build cache (`App::getLatestBuildForChannel`, 45s TTL) works with any `CACHE_STORE` incl.
12
- > `database`/`file`. (4) The update-check device/analytics writes use `dispatch(...)->afterResponse()`
13
- > — in-process, **no queue worker required**. (5) `analytics:cleanup` now prunes `analytics_events`
14
- > too, so the scheduler cron (§5) is **required**, not optional.
15
-
16
- ---
17
-
18
- ## 0 · Pre-flight (local machine, before pushing the deploy zip)
19
-
20
- - [ ] `git status` is clean on the branch you're shipping from.
21
- - [ ] `git pull --rebase` against the deploy branch — no unmerged remote work.
22
- - [ ] `composer install --no-interaction` succeeds.
23
- - [ ] `php artisan test` is **green** (all Feature + Unit tests pass).
24
- - [ ] `php artisan route:list --except-vendor` shows the routes you expect (no accidental new public routes).
25
- - [ ] `php -l app/` and `php -l routes/` report no syntax errors.
26
-
27
- ---
28
-
29
- ## 1 · `.env` for production (NOT committed; copied to server)
30
-
31
- The committed `.env.example` has `[REQUIRED]` tags on every var. On the server, populate a real `.env` with the production values. Verify each of these is set correctly:
32
-
33
- - [ ] `APP_ENV=production`
34
- - [ ] `APP_DEBUG=false` — **never** `true` in production (leaks stack traces, env, DB creds).
35
- - [ ] `APP_KEY` — generated once via `php artisan key:generate` on the server (or copied from a sealed vault). Never re-rotate without re-encrypting cookies/sessions.
36
- - [ ] `APP_URL=https://nativeupdatebe.aoneahsan.com`
37
- - [ ] `LOG_CHANNEL=daily`, `LOG_LEVEL=warning` (or `error`) — `debug` floods disk and leaks request shapes.
38
- - [ ] `CORS_ALLOWED_ORIGINS=https://nativeupdate.aoneahsan.com[,...]` — explicit list, no wildcards.
39
- - [ ] DB creds (`DB_HOST`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`) — production DB, not staging.
40
- - [ ] FilesHub: `FILESHUB_API_KEY`, `FILESHUB_BASE_URL`, `FILESHUB_APP_ID=native-update`.
41
- - [ ] Sanctum: `SANCTUM_TOKEN_EXPIRATION=10080` (minutes — 7 days; tune for security/UX trade-off).
42
- - [ ] Google OAuth (Socialite sign-in + Drive picker): `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_REDIRECT_URI=${APP_URL}/api/auth/google/callback`, `GOOGLE_DRIVE_REDIRECT_URI=${APP_URL}/api/dashboard/google-drive/callback`. Both redirect URIs must be registered in Google Cloud Console for the OAuth client.
43
- - [ ] PayPal: `PAYPAL_MODE=live`, `PAYPAL_LIVE_*` filled, `PAYPAL_PLAN_PRO`, `PAYPAL_PLAN_ENTERPRISE`, `PAYPAL_WEBHOOK_ID`.
44
- - [ ] RBAC bootstrap: `ADMIN_EMAILS=ahsan@…[,…]` — first sign-in by any of these emails auto-assigns `super-admin` via spatie/laravel-permission.
45
- - [ ] Cache + queue: `CACHE_STORE=redis` (recommended for prod), `QUEUE_CONNECTION=redis` if Redis is available. Keep `database` only on tiny single-server deploys, and ensure `queue:work` is daemonized (see step 4).
46
- - [ ] File permissions on `.env`: `chmod 640` and owner = web user. NEVER world-readable.
47
-
48
- ---
49
-
50
- ## 2 · Deploy artifact (zip)
51
-
52
- The `backend/CLAUDE.md` "Production Deployment Zip Standard" section is the canonical zip recipe. Quick version:
53
-
54
- ```bash
55
- cd backend
56
- php artisan optimize:clear
57
- composer install --no-dev --optimize-autoloader --classmap-authoritative
58
- npm ci && npm run build # builds Vite assets if Nova-themed
59
- # zip into ../production-deploy/backend-production-YYYYMMDD-HHMMSS.zip
60
- ```
61
-
62
- After zipping:
63
- ```bash
64
- composer install # restore dev deps locally so tests still work
65
- ```
66
-
67
- - [ ] Zip excludes `tests/`, `node_modules/`, `.git/`, `*.sqlite`, `storage/logs/*.log`, `storage/framework/{cache/data,sessions,views}/*`.
68
- - [ ] Zip includes `vendor/` (production-only), built `public/build/` Vite assets, `composer.lock`, `package-lock.json`.
69
-
70
- ---
71
-
72
- ## 3 · On-server deploy (after upload + extract)
73
-
74
- Run these in order on the server, as the web user:
75
-
76
- ```bash
77
- # 1. Install production deps if you didn't ship vendor/
78
- composer install --no-dev --optimize-autoloader
79
-
80
- # 2. Build front-end assets if not pre-built (yarn, not npm; usually pre-built in the zip)
81
- yarn install && yarn build
82
-
83
- # 3. Run migrations against production DB (forced — no prompt)
84
- php artisan migrate --force
85
-
86
- # 4. Symlink storage if first deploy
87
- php artisan storage:link
88
-
89
- # 5. Cache config + routes + views (don't skip — speeds boot 5–10x)
90
- php artisan config:cache
91
- php artisan route:cache
92
- php artisan view:cache
93
-
94
- # 6. Refresh permissions on storage + bootstrap/cache
95
- chown -R www-data:www-data storage bootstrap/cache
96
- chmod -R u+rwX,g+rX,o-rwx storage bootstrap/cache
97
- ```
98
-
99
- - [ ] `php artisan about` reports `APP_DEBUG=false`, correct DB, correct queue/cache drivers.
100
- - [ ] `php artisan health-check` (or hit `/up`) returns 200.
101
- - [ ] Curl an API endpoint with a known-bad token — expect `401`, not a stack trace.
102
-
103
- ---
104
-
105
- ## 4 · Long-running processes (must be daemonized)
106
-
107
- `QUEUE_CONNECTION=database` (or `redis`) means jobs only run when a worker is alive. Without this, PayPal webhook handling, future analytics rollups, etc. will pile up silently.
108
-
109
- - [ ] systemd unit OR supervisor entry that runs `php artisan queue:work --tries=3 --max-time=3600` on boot.
110
- - [ ] Worker auto-restarts on failure.
111
- - [ ] Worker reload on deploy: `php artisan queue:restart` is run at end of step 3.
112
- - [ ] Log rotation configured for `storage/logs/laravel-*.log` (Laravel's `daily` channel rotates by date but doesn't prune).
113
-
114
- If using Horizon (Redis):
115
- - [ ] `horizon` service is up.
116
- - [ ] `/horizon` route is admin-gated (NOT publicly accessible).
117
-
118
- ---
119
-
120
- ## 5 · Scheduler cron (if using `app/Console/Kernel.php` schedule)
121
-
122
- Every Laravel project that uses `Schedule::command(...)` needs:
123
-
124
- ```cron
125
- * * * * * cd /var/www/nativeupdatebe && php artisan schedule:run >> /dev/null 2>&1
126
- ```
127
-
128
- - [ ] Cron entry exists for the web user.
129
- - [ ] `php artisan schedule:list` shows the expected scheduled jobs.
130
-
131
- ---
132
-
133
- ## 6 · Security gates
134
-
135
- - [ ] HTTPS is forced at the web-server level (nginx 301 from `:80`, or Cloudflare full-strict).
136
- - [ ] HSTS header is set with `max-age=31536000; includeSubDomains; preload`.
137
- - [ ] `/.env`, `/storage/`, `/.git/`, `/composer.json` return 404 over HTTP (not the file). Test with `curl -I`.
138
- - [ ] `/nova` is reachable but rejects non-super-admin users (test with a `user`-role account → redirect / 403).
139
- - [ ] `/horizon` (if used) is admin-gated.
140
- - [ ] PayPal webhook (`/api/webhooks/paypal`) verifies signatures — test by POSTing junk; expect 401.
141
- - [ ] Rate-limit on `/api/v1/updates/check` (configured via `throttle:` middleware) — verify by sending 60+ requests; expect 429.
142
- - [ ] CORS preflight: `curl -X OPTIONS -H "Origin: https://evil.example" https://nativeupdatebe.aoneahsan.com/api/v1/updates/check` returns no `Access-Control-Allow-Origin` for the bogus origin (config/cors.php uses an explicit allowlist).
143
- - [ ] RBAC bootstrap: every email listed in `ADMIN_EMAILS` will auto-receive the `super-admin` role on first sign-in. Verify the list matches the product stance (invite-only via `ADMIN_EMAILS` + manual `php artisan native-update:role-assign` for adds; open signup = leave `ADMIN_EMAILS` empty so everyone joins as `user`).
144
-
145
- ---
146
-
147
- ## 7 · Post-deploy smoke
148
-
149
- - [ ] Sign in via Google OAuth on the website dashboard — token issued, Nova accessible for any `super-admin`.
150
- - [ ] Create an App in the dashboard — row appears in DB.
151
- - [ ] Generate an API key — works.
152
- - [ ] Hit `/api/v1/updates/check` from a real device or curl with a valid `X-API-Key` and `X-Device-ID` — returns 200 + manifest.
153
- - [ ] Trigger a PayPal sandbox subscription end-to-end (in sandbox mode) and verify the webhook lands as a row update.
154
- - [ ] Tail `storage/logs/laravel-$(date +%F).log` for 5 minutes — no `error`/`emergency` lines.
155
-
156
- ---
157
-
158
- ## 8 · Rollback plan
159
-
160
- - [ ] Previous deploy's zip is preserved in `production-deploy/` (immutable artifact name).
161
- - [ ] DB migrations were reversible OR a snapshot was taken pre-migration.
162
- - [ ] Rollback procedure is one of: `(a)` swap symlinks back to the prior release dir, `(b)` re-extract the prior zip.
163
- - [ ] `queue:restart` is run after rollback so workers pick up the prior code path.
164
-
165
- ---
166
-
167
- ## 9 · Sign-off
168
-
169
- | Field | Value |
170
- |---|---|
171
- | Release tag | _e.g. `backend-v1.4.0`_ |
172
- | Deployed at | _UTC timestamp_ |
173
- | Deployed by | _name + git commit SHA_ |
174
- | Database snapshot | _path / id_ |
175
- | Smoke-test result | _link to log_ |
176
- | Approver | _name_ |
177
-
178
- Append this row to `docs/deployment/DEPLOY-LOG.md` after each deploy.
179
-
180
- ---
181
-
182
- ## Future automation (Batch 8)
183
-
184
- This manual checklist will be reduced once `.github/workflows/release.yml` automates: artifact build, test gate, deployment-zip creation, and tag-pinned publish. Items in §1 (env), §6 (security gates), and §7 (post-deploy smoke) will remain manual because they touch live secrets and live traffic.
@@ -1,201 +0,0 @@
1
- # Documentation Site — Batch Plan
2
-
3
- **Goal**: Ship a complete, public, SEO-ready Docusaurus documentation site for `native-update` v3.x in 10 batches. Each batch = one prompt = one commit per affected repo. Resumable via `tracker.json`.
4
-
5
- **Two repos affected**:
6
- 1. `native-update/` (this repo) — owns the plan + tracker. Single planning commit per batch.
7
- 2. `native-update-docs/` (sibling, separate public GitHub repo) — owns the actual docs site. One commit per batch in this repo.
8
-
9
- **Cooldown after final batch**: 7 days. After all 10 batches complete, this prompt becomes a no-op until 7 days have passed (matches the project-wide `production-readiness-audit-tracker.json` pattern).
10
-
11
- ---
12
-
13
- ## Skill bindings (apply per batch where listed)
14
-
15
- | Domain | Skill |
16
- |---|---|
17
- | Diátaxis info architecture | `documentation-writer` |
18
- | Technical writing voice | `technical-writing` |
19
- | AI-citable structure | `ai-seo` |
20
- | Marketing landing copy | `copywriting` |
21
- | Broad SEO + GSC | `seo` |
22
- | Firebase Hosting setup | `firebase-hosting-basics` |
23
- | Firebase config/CLI | `firebase-basics` |
24
-
25
- Invoke matching skills BEFORE the first Edit/Write of each batch.
26
-
27
- ---
28
-
29
- ## Batch 1 — Foundation & first pages ✅ (this batch)
30
-
31
- **Skills**: `documentation-writer`, `ai-seo`, `copywriting`
32
-
33
- **In `native-update`**:
34
- - `docs/docs-site/scope.md` — what we document, locked
35
- - `docs/docs-site/plan.md` — this file
36
- - `docs/docs-site/tracker.json` — JSON status, resumable
37
- - Update root `CLAUDE.md` + `AGENTS.md` with a "Docs Site" record pointing at the tracker
38
-
39
- **In `native-update-docs/` (new sibling)**:
40
- - Init: `package.json`, `tsconfig.json`, `.gitignore`, `.editorconfig`
41
- - `docusaurus.config.ts` — brand metadata, SEO defaults, OG image, Ahsan author footer
42
- - `sidebars.ts` — full target structure (placeholders for sections written in later batches)
43
- - `src/css/custom.css` — brand color palette + dark-mode tuning
44
- - `src/pages/index.tsx` — homepage (hero + features + CTA)
45
- - `static/img/logo.svg`, `static/img/favicon.svg`, `static/img/social-card.svg`
46
- - `static/robots.txt` (skeleton — full allow-list ships in Batch 10)
47
- - `docs/intro.md` — "What is native-update?" (definition-first, 600+ words)
48
- - `docs/getting-started/installation.md` — install steps, peer-dep note, platform setup quick reference
49
- - `docs/getting-started/quick-start.md` — 5-minute first OTA update tutorial
50
- - `docs/about-the-author.md` — Ahsan Mahmood credits page (links, contact)
51
- - `README.md`, `CLAUDE.md`, `AGENTS.md` — repo metadata + freshness rules
52
- - `yarn install`, `git init`, first commit
53
- - `~/.dev-ports.json` — register port 5960
54
-
55
- **Verification**: `yarn build` (in sibling) exits 0; `yarn typecheck` (if available) exits 0; tracker updated.
56
-
57
- ---
58
-
59
- ## Batch 2 — SDK Reference: Live Update (OTA)
60
-
61
- **Skills**: `documentation-writer`, `ai-seo`
62
-
63
- Write `docs/reference/sdk/live-update/`:
64
- - `overview.md` — what live-update does, when to use it
65
- - `methods.md` — all 20 methods grouped (lifecycle, channels, downloads, validation, cancellation), each with TypeScript signature + parameters table + return type + example + errors thrown
66
- - `types.md` — `BundleInfo`, `SyncOptions`, `SyncResult`, `DownloadOptions`, `LatestVersion`, `DeleteOptions`, `ValidateOptions`, `ValidationResult`, `CheckForUpdateResult`, `DownloadUpdateOptions`
67
- - `enums.md` — `UpdateStrategy`, `UpdateMode`, `BundleStatus`, `SyncStatus`
68
- - `events.md` — `downloadProgress`, `updateStateChanged`
69
- - `config.md` — `LiveUpdateConfig` field-by-field
70
-
71
- Estimated: 8–10 pages, ~6,000 words total.
72
-
73
- ---
74
-
75
- ## Batch 3 — SDK Reference: App Update + App Review
76
-
77
- **Skills**: `documentation-writer`, `ai-seo`
78
-
79
- Write `docs/reference/sdk/app-update/` (5 methods, AppUpdateInfo, OpenAppStoreOptions, InstallStatus enum, 6 events) and `docs/reference/sdk/app-review/` (2 methods, AppReviewConfig, ReviewResult, CanRequestReviewResult, throttling rules).
80
-
81
- Estimated: 7–8 pages.
82
-
83
- ---
84
-
85
- ## Batch 4 — SDK Reference: Background Updates + Security + Core
86
-
87
- **Skills**: `documentation-writer`, `ai-seo`
88
-
89
- Write `docs/reference/sdk/background-update/` (8 methods, BackgroundUpdateConfig, NotificationPreferences, 2 events, BackgroundUpdateType + NotificationPriority enums), `docs/reference/sdk/security/` (getSecurityInfo, SecurityConfig, ChecksumAlgorithm, CertificatePinning, UpdateErrorCode 20+ codes), `docs/reference/sdk/core/` (initialize/isInitialized/reset/cleanup/configure + PluginInitConfig).
90
-
91
- Estimated: 9–11 pages.
92
-
93
- ---
94
-
95
- ## Batch 5 — CLI Reference
96
-
97
- **Skills**: `documentation-writer`, `technical-writing`
98
-
99
- Write `docs/reference/cli/`:
100
- - `overview.md` — install, global flags, exit codes
101
- - `init.md`, `keys-generate.md`, `bundle-create.md`, `bundle-sign.md`, `bundle-verify.md`, `server-start.md`, `monitor.md`, `backend-create.md`
102
-
103
- Each command page: synopsis, flags table, examples, common errors.
104
-
105
- Estimated: 9 pages.
106
-
107
- ---
108
-
109
- ## Batch 6 — Backend setup guides
110
-
111
- **Skills**: `documentation-writer`, `technical-writing`
112
-
113
- Write `docs/backend/`:
114
- - `overview.md` — when to self-host, hosted SaaS comparison
115
- - `laravel-nova-self-host.md` — full setup (env, migrations, queues, signing keys, Nova auth, Firebase token verification)
116
- - `node-express-minimal.md` — based on `example-apps/node-express`
117
- - `api-contract.md` — every public endpoint, request/response shape, signing
118
- - `nova-admin-overview.md` — what each Nova resource manages
119
-
120
- Estimated: 5 pages, dense.
121
-
122
- ---
123
-
124
- ## Batch 7 — Platform guides
125
-
126
- **Skills**: `documentation-writer`, `technical-writing`
127
-
128
- Write `docs/platforms/`:
129
- - `android.md` — manifest additions, permissions, ProGuard rules, WorkManager constraints, signing setup
130
- - `ios.md` — Info.plist keys, capabilities, background modes, App Store Review setup
131
- - `web.md` — browser dev fallback, limitations, when to use
132
-
133
- Estimated: 3 long pages (~2,000 words each).
134
-
135
- ---
136
-
137
- ## Batch 8 — Tutorials & how-to guides
138
-
139
- **Skills**: `documentation-writer`, `ai-seo`, `copywriting`
140
-
141
- Write `docs/tutorials/` and `docs/how-to/`:
142
- - Tutorial: end-to-end first OTA update (install → keypair → bundle → sign → upload → device verifies → applies)
143
- - Tutorial: backend-first walkthrough (Laravel install → first app → first build → first device check)
144
- - How-to: manage release channels (production/staging/beta)
145
- - How-to: rotate signing keys without breaking active bundles
146
- - How-to: roll back a bad bundle
147
- - How-to: migrate from CodePush
148
- - How-to: integrate with CI/CD (GitHub Actions example)
149
- - How-to: test bundles in development
150
-
151
- Estimated: 8 pages.
152
-
153
- ---
154
-
155
- ## Batch 9 — Concepts & explanations
156
-
157
- **Skills**: `documentation-writer`, `ai-seo`
158
-
159
- Write `docs/concepts/`:
160
- - `how-ota-updates-work.md`
161
- - `bundle-integrity-and-signing.md`
162
- - `update-strategies-compared.md` (immediate vs background vs manual)
163
- - `architecture.md` (with mermaid diagrams)
164
- - `security-model.md`
165
- - `error-handling-philosophy.md`
166
-
167
- Estimated: 6 pages, deeper writing.
168
-
169
- ---
170
-
171
- ## Batch 10 — SEO + Firebase deploy + GitHub publish
172
-
173
- **Skills**: `seo`, `ai-seo`, `firebase-hosting-basics`, `firebase-basics`
174
-
175
- - Per-page meta head injection (canonical, OG, Twitter Card) via `docusaurus.config.ts`
176
- - `static/robots.txt` final form (full AI-bot allow list)
177
- - `static/llms.txt` + `static/llms-full.txt`
178
- - `static/humans.txt`, `static/.well-known/security.txt`
179
- - `static/sitemap-index.json`
180
- - JSON-LD injection per page (TechArticle + FAQPage where applicable)
181
- - `firebase.json`, `.firebaserc`, hosting config
182
- - GitHub Actions workflow: build + deploy on push to `main`
183
- - README publish instructions (GH + Firebase + Search Console + Bing Webmaster)
184
- - Update tracker `last_run.completed_at` and `next_allowed_run_after` (today + 7 days)
185
- - Final commit in both repos
186
-
187
- Estimated: 1 dense pass.
188
-
189
- ---
190
-
191
- ## Resumability protocol (for future runs of this prompt)
192
-
193
- When this prompt is re-run:
194
-
195
- 1. Read `docs/docs-site/tracker.json`.
196
- 2. If `last_run.status == "complete"` AND today < `last_run.next_allowed_run_after` → SKIP. Tell the user "Docs site is complete; next allowed run after `<date>`. Use the docs site or open an issue if anything is missing."
197
- 3. If `last_run.status == "in_progress"` → find the lowest-indexed batch with `status != "completed"` in `batches[]` and resume there. Do NOT redo earlier batches.
198
- 4. After completing each batch: append a row to `batches[]`, update `current_batch` and `progress_pct`. ONE commit per batch in each affected repo.
199
- 5. After Batch 10: set `last_run.status = "complete"`, `last_run.completed_at = today`, `last_run.next_allowed_run_after = today + 7 days`.
200
-
201
- **Override conditions** (run a fix-only batch even within cooldown): explicit user bypass; broken `yarn build` in sibling repo; production incident; published page returns 404 or 5xx; Lighthouse SEO drops below 95.
@@ -1,127 +0,0 @@
1
- # Documentation Site — Scope
2
-
3
- **Project**: Public Docusaurus documentation site for the `native-update` Capacitor plugin.
4
- **Repo location**: `/home/ahsan/Documents/01-code/projects/native-update-docs/` (sibling, separate public GitHub repo)
5
- **Hosting**: Dedicated Firebase project (TBD in Batch 10)
6
- **Versioning**: Single version — latest only (no version dropdown for v1)
7
- **Theme**: Default Docusaurus `classic` preset + brand colors + logo + dark mode
8
- **Author credit**: Ahsan Mahmood (aoneahsan@gmail.com, https://aoneahsan.com, https://linkedin.com/in/aoneahsan) — surfaced on every page footer + about/credits page + JSON-LD `author`
9
-
10
- ## Reference date
11
-
12
- **Scope locked**: 2026-05-10
13
- **Source of truth**: `native-update` plugin v3.0.0 (`package.json`)
14
-
15
- ---
16
-
17
- ## What we're documenting (surface area)
18
-
19
- ### 1. Plugin SDK — TypeScript API (`src/`)
20
-
21
- **~30 public methods**, **~50 types/interfaces**, **11 events**, **10 enums**, split across 6 feature areas:
22
-
23
- | Area | Methods | Notes |
24
- |---|---|---|
25
- | Live Update (OTA) | 20 — `sync`, `download`, `set`, `reload`, `reset`, `current`, `list`, `delete`, `notifyAppReady`, `getLatest`, `setChannel`, `setUpdateUrl`, `validateUpdate`, `checkForUpdate`, `downloadUpdate`, `applyUpdate`, `cancelDownload`, `cancelAllDownloads`, `isDownloading`, `getActiveDownloadCount` | Largest feature surface. Bundle lifecycle, channels, signing, rollback. |
26
- | App Update (in-app, store-driven) | 5 — `getAppUpdateInfo`, `performImmediateUpdate`, `startFlexibleUpdate`, `completeFlexibleUpdate`, `openAppStore` | Wraps Play In-App Updates and iOS App Store check. |
27
- | App Review | 2 — `requestReview`, `canRequestReview` | Wraps Play In-App Review and SKStoreReviewController. |
28
- | Background Update | 8 — `enableBackgroundUpdates`, `disableBackgroundUpdates`, `getBackgroundUpdateStatus`, `scheduleBackgroundCheck`, `triggerBackgroundCheck`, `setNotificationPreferences`, `getNotificationPermissions`, `requestNotificationPermissions` | Battery-aware, network-aware silent updates. |
29
- | Security | 1 — `getSecurityInfo` (+ ChecksumAlgorithm enum, certificate pinning config, 20+ error codes) | Bundle integrity, signing, HTTPS enforcement. |
30
- | Core | 5 — `initialize`, `isInitialized`, `reset`, `cleanup`, `configure` | Plugin lifecycle. |
31
-
32
- **Events** (via `addListener()`): `downloadProgress`, `updateStateChanged`, `backgroundUpdateProgress`, `backgroundUpdateNotification`, `appUpdateStateChanged`, `appUpdateProgress`, `appUpdateAvailable`, `appUpdateReady`, `appUpdateFailed`, `appUpdateNotificationClicked`, `appUpdateInstallClicked`.
33
-
34
- **Power-user exports** (`src/index.ts`): `ConfigManager`, `Logger`, `SecurityValidator`, `PluginManager`, `CacheManager`, `BundleManager`, `DownloadManager`, `VersionManager`, `UpdateManager`, error classes (`NativeUpdateError`, `ConfigurationError`, `DownloadError`, `ValidationError`, `StorageError`, `UpdateErrorClass`), rollout/device-info types.
35
-
36
- ### 2. CLI (`cli/commands/`) — 8 commands
37
-
38
- | Command | Purpose |
39
- |---|---|
40
- | `init` | Scaffold native-update into an existing Capacitor project |
41
- | `keys generate` | Generate RSA/ECDSA keypair for bundle signing |
42
- | `bundle create` | Build a ZIP bundle from a built app dir (excludes node_modules, .git, .env) |
43
- | `bundle sign` | Sign bundle with private key (SHA-256/512 + RSA/ECDSA) |
44
- | `bundle verify` | Verify bundle signature with public key |
45
- | `server start` | Start a local Express dev server for testing updates |
46
- | `monitor` | Poll an update server and print available updates |
47
- | `backend create` | Scaffold a Laravel + Nova backend (with greppable `TODO[SCAFFOLD-IMPLEMENT-BEFORE-DEPLOY]` markers) |
48
-
49
- ### 3. Backend (`backend/` — Laravel 11 + Nova 5)
50
-
51
- **API routes** (top-level groups):
52
- - `/health` — liveness check
53
- - `/v1/updates/check` — update check (public, signed)
54
- - `/v1/analytics/{mau,download,install}` — anonymous usage telemetry
55
- - `/v1/bundles/{build}/download` — bundle download (signed URL)
56
- - `/dashboard/*` — admin panel (Firebase token required) — apps, builds, api-keys, signing-keys, stats, license management
57
- - `/admin/*` — internal admin
58
- - `/webhooks/paypal` — PayPal subscription webhook
59
-
60
- **Nova resources** (22): App, User, Build, ApiKey, SigningKey, BuildChannel, BuildStatusFilter, UserStatusFilter, UserPlanFilter, ApiKeyStatusFilter, SigningKeyStatusFilter, ArchiveBuild, ActivateBuild, AssignLicense, DeprecateApiKey, RevokeApiKey, RevokeSigningKey, RotateSigningKey, SetCustomLimits, SuspendUser, UnsuspendUser, Resource (base).
61
-
62
- ### 4. Platform-native implementations
63
-
64
- - **Android** — 10 Kotlin files at `android/src/main/java/com/aoneahsan/nativeupdate/` (NativeUpdatePlugin, LiveUpdatePlugin, AppUpdatePlugin, AppReviewPlugin, BackgroundUpdatePlugin, SecurityManager, BackgroundUpdateWorker, BackgroundUpdateManager, BackgroundNotificationManager, NotificationActionReceiver). Manifest additions documented in `android/manifest-additions.xml`.
65
- - **iOS** — 8 Swift files at `ios/Plugin/` (NativeUpdatePlugin, LiveUpdatePlugin, AppUpdatePlugin, AppReviewPlugin, BackgroundUpdatePlugin, SecurityManager, BackgroundNotificationManager, WebViewConfiguration). Pod published as `NativeUpdate.podspec`.
66
- - **Web** — `src/web.ts` (browser fallback for development).
67
-
68
- ### 5. Example apps (`example-apps/`)
69
-
70
- | App | Stack | Demonstrates |
71
- |---|---|---|
72
- | `react-capacitor` | React + Vite + Capacitor 8 | Mobile OTA bundle workflow end-to-end |
73
- | `node-express` | Node.js + Express | Minimal HTTP backend (`/api/updates/check`, `/api/bundles/upload`, bundle serving) |
74
-
75
- ---
76
-
77
- ## What we're NOT documenting in v1
78
-
79
- - The hosted SaaS dashboard (https://nativeupdate.aoneahsan.com) — that's a marketing surface owned by `website/`, not the SDK docs.
80
- - Internal Nova action implementation details — Nova is the user-facing surface; how each action is coded is implementation detail.
81
- - Backend Laravel class internals beyond config + endpoints + setup — the backend is "reference implementation", not a teaching project.
82
- - v1 / v2 history — single-version site, v3.x only. Migration documented in one page; older API never re-documented.
83
-
84
- ---
85
-
86
- ## Information architecture (Diátaxis-aligned)
87
-
88
- | Quadrant | Section | Content |
89
- |---|---|---|
90
- | Tutorials (learning) | `tutorials/` | End-to-end first-update walkthrough; backend-first walkthrough |
91
- | How-to guides (problems) | `how-to/` | Channel management; key rotation; rollback; CodePush migration; testing strategy; CI/CD pipelines |
92
- | Reference (information) | `reference/sdk/`, `reference/cli/`, `reference/backend-api/` | Every method, type, event, command, endpoint |
93
- | Explanation (understanding) | `concepts/` | How OTA updates work; bundle integrity; update strategies compared; architecture; security model |
94
-
95
- Plus three top-level sections: `getting-started/` (intro, installation, quick start, configuration), `platforms/` (Android, iOS, Web specifics), `backend/` (Laravel self-host + Node-Express minimal).
96
-
97
- ---
98
-
99
- ## SEO / AEO targets
100
-
101
- - **AI bots allowed in robots.txt** (GPTBot, ChatGPT-User, ClaudeBot, anthropic-ai, PerplexityBot, Google-Extended, CCBot, Applebot, Bingbot)
102
- - `llms.txt` + `llms-full.txt` at site root
103
- - Per-page JSON-LD: `WebSite`, `Organization`, `BreadcrumbList`, `TechArticle` (with `author`), `FAQPage` (where applicable), `HowTo` (tutorials)
104
- - Sitemap auto-generated by `@docusaurus/plugin-sitemap`
105
- - Open Graph + Twitter Card per page (Docusaurus config)
106
- - Public GitHub repo (boosts crawl discoverability per the `seo-aeo-ranking.md` Wikipedia/GitHub presence rule)
107
-
108
- ---
109
-
110
- ## Author credits surfacing
111
-
112
- Required everywhere a reader sees brand:
113
- - Footer: "Built by [Ahsan Mahmood](https://aoneahsan.com)" with linkedin.com/in/aoneahsan, GitHub, npm links
114
- - About / Credits page (`docs/about-the-author.md`)
115
- - JSON-LD `author` on every TechArticle
116
- - `package.json` author + `meta.author` Docusaurus tag
117
- - README footer
118
- - Hosted site footer
119
-
120
- ---
121
-
122
- ## Out-of-scope items the user has signalled future interest in
123
-
124
- - Custom theme matching `website/` design system (deferred — chose default + brand colors for v1)
125
- - Versioning (deferred until v4 ships)
126
- - Internationalisation (no signal yet)
127
- - Custom search beyond Docusaurus default — Algolia DocSearch can be added later