native-update 2.0.0 → 3.1.0

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 (258) hide show
  1. package/Readme.md +28 -14
  2. package/android/manifest-additions.xml +28 -0
  3. package/android/src/main/AndroidManifest.xml +3 -7
  4. package/android/src/main/java/com/aoneahsan/nativeupdate/BackgroundNotificationManager.kt +21 -13
  5. package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +196 -29
  6. package/android/src/main/java/com/aoneahsan/nativeupdate/NativeUpdatePlugin.kt +21 -36
  7. package/cli/AGENTS.md +15 -1
  8. package/cli/CLAUDE.md +15 -1
  9. package/cli/commands/backend-create.js +56 -15
  10. package/cli/commands/bundle-create.js +39 -7
  11. package/cli/commands/monitor.js +72 -51
  12. package/cli/index.js +10 -24
  13. package/cli/package.json +11 -3
  14. package/dist/esm/app-review/app-review-manager.js +0 -1
  15. package/dist/esm/app-review/index.js +0 -1
  16. package/dist/esm/app-review/platform-review-handler.js +0 -1
  17. package/dist/esm/app-review/review-conditions-checker.js +0 -1
  18. package/dist/esm/app-review/review-rate-limiter.js +0 -1
  19. package/dist/esm/app-review/types.js +0 -1
  20. package/dist/esm/app-update/app-update-checker.js +0 -1
  21. package/dist/esm/app-update/app-update-installer.d.ts +1 -0
  22. package/dist/esm/app-update/app-update-installer.js +19 -8
  23. package/dist/esm/app-update/app-update-manager.js +0 -1
  24. package/dist/esm/app-update/app-update-notifier.js +0 -1
  25. package/dist/esm/app-update/index.js +0 -1
  26. package/dist/esm/app-update/platform-app-update.js +12 -3
  27. package/dist/esm/app-update/types.js +0 -1
  28. package/dist/esm/background-update/background-scheduler.js +0 -1
  29. package/dist/esm/background-update/index.js +0 -1
  30. package/dist/esm/background-update/notification-manager.js +0 -1
  31. package/dist/esm/config/support.js +0 -1
  32. package/dist/esm/core/analytics.d.ts +13 -0
  33. package/dist/esm/core/analytics.js +15 -1
  34. package/dist/esm/core/cache-manager.js +0 -1
  35. package/dist/esm/core/config.d.ts +0 -15
  36. package/dist/esm/core/config.js +0 -4
  37. package/dist/esm/core/errors.d.ts +1 -0
  38. package/dist/esm/core/errors.js +1 -1
  39. package/dist/esm/core/event-emitter.d.ts +0 -3
  40. package/dist/esm/core/event-emitter.js +8 -3
  41. package/dist/esm/core/logger.js +0 -1
  42. package/dist/esm/core/performance.js +0 -1
  43. package/dist/esm/core/plugin-manager.js +3 -1
  44. package/dist/esm/core/security.d.ts +11 -0
  45. package/dist/esm/core/security.js +27 -1
  46. package/dist/esm/definitions.d.ts +0 -11
  47. package/dist/esm/definitions.js +0 -1
  48. package/dist/esm/index.d.ts +3 -2
  49. package/dist/esm/index.js +3 -1
  50. package/dist/esm/live-update/bundle-manager.d.ts +8 -0
  51. package/dist/esm/live-update/bundle-manager.js +20 -1
  52. package/dist/esm/live-update/certificate-pinning.js +0 -1
  53. package/dist/esm/live-update/delta-processor.d.ts +1 -1
  54. package/dist/esm/live-update/delta-processor.js +3 -1
  55. package/dist/esm/live-update/download-manager.js +9 -2
  56. package/dist/esm/live-update/rollout-checker.d.ts +1 -1
  57. package/dist/esm/live-update/rollout-checker.js +5 -6
  58. package/dist/esm/live-update/update-manager.js +0 -1
  59. package/dist/esm/live-update/version-manager.d.ts +0 -12
  60. package/dist/esm/live-update/version-manager.js +0 -68
  61. package/dist/esm/plugin.js +69 -43
  62. package/dist/esm/security/crypto.js +11 -7
  63. package/dist/esm/security/validator.js +0 -1
  64. package/dist/esm/types/rollout.d.ts +85 -0
  65. package/dist/esm/types/rollout.js +25 -0
  66. package/dist/esm/web.d.ts +8 -0
  67. package/dist/esm/web.js +148 -54
  68. package/dist/plugin.cjs.js +1 -2
  69. package/dist/plugin.esm.js +1 -2
  70. package/dist/plugin.js +2 -3
  71. package/docs/CHANGELOG.md +124 -0
  72. package/docs/CLAUDE.md +1 -1
  73. package/docs/MANUAL-TASKS.md +17 -0
  74. package/docs/MARKETING_WEBSITE_TRACKER.md +18 -2
  75. package/docs/MIGRATION.md +83 -0
  76. package/docs/PACKAGES.md +167 -0
  77. package/docs/PERFORMANCE.md +110 -0
  78. package/docs/PROJECT_COMPLETION_TRACKER.md +4 -35
  79. package/docs/README.md +0 -1
  80. package/docs/REMAINING_FEATURES.md +123 -76
  81. package/docs/ROADMAP.md +200 -120
  82. package/docs/SECURITY-IF-REPO-PUBLIC.md +232 -0
  83. package/docs/TESTING_REQUIREMENTS.md +1 -112
  84. package/docs/ai-knowledge-base/00-project-profile.md +38 -0
  85. package/docs/ai-knowledge-base/01-features.md +46 -0
  86. package/docs/ai-knowledge-base/02-routes.md +72 -0
  87. package/docs/ai-knowledge-base/03-tech-stack.md +57 -0
  88. package/docs/ai-knowledge-base/README.md +23 -0
  89. package/docs/analytics-tracking.md +37 -0
  90. package/docs/capacitor-official-plugins.md +46 -0
  91. package/docs/capawesome-plugins.md +29 -0
  92. package/docs/deployment/HOSTINGER_DEPLOY.md +75 -34
  93. package/docs/deployment/PRODUCTION-DEPLOY-CHECKLIST.md +184 -0
  94. package/docs/docs-site/plan.md +201 -0
  95. package/docs/docs-site/scope.md +127 -0
  96. package/docs/docs-site/tracker.json +235 -0
  97. package/docs/error-handling-tracking.md +37 -0
  98. package/docs/guides/testing-guide.md +15 -41
  99. package/docs/package-audit.md +41 -0
  100. package/docs/play-store/ASO-METADATA.md +5 -0
  101. package/docs/play-store/DATA-SAFETY.md +5 -0
  102. package/docs/play-store/DECLARATIONS.md +5 -0
  103. package/docs/play-store/README.md +27 -0
  104. package/docs/play-store/RELEASE-NOTES.md +99 -0
  105. package/docs/play-store/RELEASE-STEPS.md +6 -0
  106. package/docs/play-store/STORE-LISTING.md +7 -0
  107. package/docs/play-store/SUBMISSION-CHECKLIST.md +5 -0
  108. package/docs/production-readiness.md +1 -1
  109. package/docs/project-audit/2026-05-16/00-FINALIZATION-PLAN.md +123 -0
  110. package/docs/project-audit/2026-05-16/01-BATCH-PLAN.md +227 -0
  111. package/docs/project-audit/2026-05-16/02-AUDIT-FINDINGS.md +144 -0
  112. package/docs/project-audit/2026-05-16/sessions/batch-01.md +42 -0
  113. package/docs/project-audit/2026-05-16/sessions/batch-02.md +74 -0
  114. package/docs/project-audit/2026-05-16/sessions/batch-03.md +71 -0
  115. package/docs/project-audit/2026-05-16/sessions/batch-04.md +88 -0
  116. package/docs/project-audit/2026-05-16/sessions/batch-05.md +63 -0
  117. package/docs/project-audit/2026-05-16/sessions/batch-06.md +103 -0
  118. package/docs/project-audit/2026-05-16/sessions/batch-07.md +61 -0
  119. package/docs/project-audit/2026-05-16/sessions/batch-08.md +101 -0
  120. package/docs/project-audit/2026-05-16/sessions/batch-09.md +105 -0
  121. package/docs/project-audit/2026-05-16/sessions/batch-10.md +102 -0
  122. package/docs/project-audit/AUDIT-HISTORY.md +74 -0
  123. package/docs/project-audit/BATCH-PLAN.md +168 -0
  124. package/docs/project-audit/MARKETING-WEBSITE-FINDINGS-2026-05-11.md +73 -0
  125. package/docs/project-audit/PRODUCTION-READINESS-AUDIT-2026-05-08.md +275 -0
  126. package/docs/project-finalization/00-tracker.json +60 -0
  127. package/docs/project-knowledge-base/01-system-overview.md +39 -30
  128. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +87 -81
  129. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +140 -108
  130. package/docs/project-knowledge-base/04-data-models-integrations.md +191 -254
  131. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +83 -20
  132. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +67 -29
  133. package/docs/project-knowledge-base/README.md +27 -14
  134. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-05-19.md +81 -0
  135. package/docs/rules-tracker.md +102 -0
  136. package/docs/security/PRE-LAUNCH-PENTEST-CHECKLIST.md +116 -0
  137. package/docs/social-media-marketing/README.md +81 -0
  138. package/docs/social-media-marketing/posts-batch-01.md +613 -0
  139. package/docs/social-media-marketing/posts-batch-02.md +528 -0
  140. package/docs/social-media-marketing/whatsapp-messages-batch-01.md +458 -0
  141. package/docs/social-media-marketing/whatsapp-status-batch-01.md +355 -0
  142. package/docs/tracking/finalization-2026-05-16-tracker.json +346 -0
  143. package/docs/tracking/full-audit-tracker.json +121 -0
  144. package/docs/tracking/production-readiness-audit-tracker.json +429 -0
  145. package/ios/Plugin/BackgroundUpdate/BackgroundUpdatePlugin.swift +16 -3
  146. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +71 -47
  147. package/ios/Plugin/NativeUpdatePlugin.swift +14 -9
  148. package/package.json +29 -29
  149. package/cli/node_modules/.yarn-integrity +0 -16
  150. package/cli/node_modules/commander/LICENSE +0 -22
  151. package/cli/node_modules/commander/Readme.md +0 -1148
  152. package/cli/node_modules/commander/esm.mjs +0 -16
  153. package/cli/node_modules/commander/index.js +0 -26
  154. package/cli/node_modules/commander/lib/argument.js +0 -145
  155. package/cli/node_modules/commander/lib/command.js +0 -2179
  156. package/cli/node_modules/commander/lib/error.js +0 -43
  157. package/cli/node_modules/commander/lib/help.js +0 -462
  158. package/cli/node_modules/commander/lib/option.js +0 -329
  159. package/cli/node_modules/commander/lib/suggestSimilar.js +0 -100
  160. package/cli/node_modules/commander/package-support.json +0 -16
  161. package/cli/node_modules/commander/package.json +0 -80
  162. package/cli/node_modules/commander/typings/esm.d.mts +0 -3
  163. package/cli/node_modules/commander/typings/index.d.ts +0 -884
  164. package/cli/yarn.lock +0 -8
  165. package/dist/esm/__tests__/bundle-manager.test.d.ts +0 -1
  166. package/dist/esm/__tests__/bundle-manager.test.js +0 -151
  167. package/dist/esm/__tests__/bundle-manager.test.js.map +0 -1
  168. package/dist/esm/__tests__/config.test.d.ts +0 -1
  169. package/dist/esm/__tests__/config.test.js +0 -70
  170. package/dist/esm/__tests__/config.test.js.map +0 -1
  171. package/dist/esm/__tests__/delta-processor.test.d.ts +0 -1
  172. package/dist/esm/__tests__/delta-processor.test.js +0 -77
  173. package/dist/esm/__tests__/delta-processor.test.js.map +0 -1
  174. package/dist/esm/__tests__/firestore-schema.test.d.ts +0 -1
  175. package/dist/esm/__tests__/firestore-schema.test.js +0 -74
  176. package/dist/esm/__tests__/firestore-schema.test.js.map +0 -1
  177. package/dist/esm/__tests__/integration.test.d.ts +0 -1
  178. package/dist/esm/__tests__/integration.test.js +0 -78
  179. package/dist/esm/__tests__/integration.test.js.map +0 -1
  180. package/dist/esm/__tests__/manifest-reader.test.d.ts +0 -1
  181. package/dist/esm/__tests__/manifest-reader.test.js +0 -271
  182. package/dist/esm/__tests__/manifest-reader.test.js.map +0 -1
  183. package/dist/esm/__tests__/rollout-checker.test.d.ts +0 -1
  184. package/dist/esm/__tests__/rollout-checker.test.js +0 -210
  185. package/dist/esm/__tests__/rollout-checker.test.js.map +0 -1
  186. package/dist/esm/__tests__/security-enforcement.test.d.ts +0 -1
  187. package/dist/esm/__tests__/security-enforcement.test.js +0 -95
  188. package/dist/esm/__tests__/security-enforcement.test.js.map +0 -1
  189. package/dist/esm/__tests__/security.test.d.ts +0 -1
  190. package/dist/esm/__tests__/security.test.js +0 -54
  191. package/dist/esm/__tests__/security.test.js.map +0 -1
  192. package/dist/esm/__tests__/version-manager.test.d.ts +0 -1
  193. package/dist/esm/__tests__/version-manager.test.js +0 -45
  194. package/dist/esm/__tests__/version-manager.test.js.map +0 -1
  195. package/dist/esm/app-review/app-review-manager.js.map +0 -1
  196. package/dist/esm/app-review/index.js.map +0 -1
  197. package/dist/esm/app-review/platform-review-handler.js.map +0 -1
  198. package/dist/esm/app-review/review-conditions-checker.js.map +0 -1
  199. package/dist/esm/app-review/review-rate-limiter.js.map +0 -1
  200. package/dist/esm/app-review/types.js.map +0 -1
  201. package/dist/esm/app-update/app-update-checker.js.map +0 -1
  202. package/dist/esm/app-update/app-update-installer.js.map +0 -1
  203. package/dist/esm/app-update/app-update-manager.js.map +0 -1
  204. package/dist/esm/app-update/app-update-notifier.js.map +0 -1
  205. package/dist/esm/app-update/index.js.map +0 -1
  206. package/dist/esm/app-update/platform-app-update.js.map +0 -1
  207. package/dist/esm/app-update/types.js.map +0 -1
  208. package/dist/esm/background-update/background-scheduler.js.map +0 -1
  209. package/dist/esm/background-update/index.js.map +0 -1
  210. package/dist/esm/background-update/notification-manager.js.map +0 -1
  211. package/dist/esm/config/support.js.map +0 -1
  212. package/dist/esm/core/analytics.js.map +0 -1
  213. package/dist/esm/core/cache-manager.js.map +0 -1
  214. package/dist/esm/core/config.js.map +0 -1
  215. package/dist/esm/core/errors.js.map +0 -1
  216. package/dist/esm/core/event-emitter.js.map +0 -1
  217. package/dist/esm/core/logger.js.map +0 -1
  218. package/dist/esm/core/performance.js.map +0 -1
  219. package/dist/esm/core/plugin-manager.js.map +0 -1
  220. package/dist/esm/core/security.js.map +0 -1
  221. package/dist/esm/definitions.js.map +0 -1
  222. package/dist/esm/firestore/firestore-client.d.ts +0 -109
  223. package/dist/esm/firestore/firestore-client.js +0 -264
  224. package/dist/esm/firestore/firestore-client.js.map +0 -1
  225. package/dist/esm/firestore/index.d.ts +0 -11
  226. package/dist/esm/firestore/index.js +0 -11
  227. package/dist/esm/firestore/index.js.map +0 -1
  228. package/dist/esm/firestore/manifest-reader.d.ts +0 -87
  229. package/dist/esm/firestore/manifest-reader.js +0 -294
  230. package/dist/esm/firestore/manifest-reader.js.map +0 -1
  231. package/dist/esm/firestore/schema.d.ts +0 -507
  232. package/dist/esm/firestore/schema.js +0 -73
  233. package/dist/esm/firestore/schema.js.map +0 -1
  234. package/dist/esm/index.js.map +0 -1
  235. package/dist/esm/live-update/bundle-manager.js.map +0 -1
  236. package/dist/esm/live-update/certificate-pinning.js.map +0 -1
  237. package/dist/esm/live-update/delta-processor.js.map +0 -1
  238. package/dist/esm/live-update/download-manager.js.map +0 -1
  239. package/dist/esm/live-update/rollout-checker.js.map +0 -1
  240. package/dist/esm/live-update/update-manager.js.map +0 -1
  241. package/dist/esm/live-update/version-manager.js.map +0 -1
  242. package/dist/esm/plugin.js.map +0 -1
  243. package/dist/esm/security/crypto.js.map +0 -1
  244. package/dist/esm/security/validator.js.map +0 -1
  245. package/dist/esm/web.js.map +0 -1
  246. package/dist/plugin.cjs.js.map +0 -1
  247. package/dist/plugin.esm.js.map +0 -1
  248. package/dist/plugin.js.map +0 -1
  249. package/docs/FIREBASE_INTEGRATION_TRACKER.md +0 -321
  250. package/docs/FIREBASE_QUERIES_AND_INDEXES_AUDIT.md +0 -221
  251. package/docs/examples/firebase-backend-example.md +0 -27
  252. package/docs/features/laravel-nova-backend/credentials.ignore.md +0 -34
  253. package/docs/guides/no-cost-backend-implementation-plan.md +0 -77
  254. package/docs/guides/no-cost-firestore-google-drive-backend.md +0 -60
  255. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-16.md +0 -454
  256. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-24.md +0 -66
  257. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-25.md +0 -67
  258. /package/docs/{MARKETING_WEBSITE_PLAN.md → archive/MARKETING_WEBSITE_PLAN.md} +0 -0
@@ -6,10 +6,8 @@ This document outlines the testing requirements for the native-update plugin.
6
6
 
7
7
  - **Plugin testing**: Handled in actual/live applications using the plugin
8
8
  - **Example apps**: Demonstrate functionality for manual testing
9
- - **Unit tests (TypeScript)**: ✅ Implemented in `/src/__tests__/`
10
9
  - **iOS Native Tests (XCTest)**: ✅ Implemented in `/ios/Tests/NativeUpdateTests/`
11
10
  - **Android Native Tests (JUnit/Kotlin)**: ✅ Implemented in `/android/src/test/`
12
- - **E2E Tests (Detox)**: ✅ Implemented in `/e2e/`
13
11
 
14
12
  ---
15
13
 
@@ -162,107 +160,6 @@ testImplementation 'org.robolectric:robolectric:4.11.1'
162
160
 
163
161
  ---
164
162
 
165
- ## End-to-End Tests (Detox) ✅ IMPLEMENTED
166
-
167
- The E2E tests are implemented in `/e2e/` using Detox framework.
168
-
169
- ### Framework
170
- - **Detox** for React Native + Capacitor apps
171
-
172
- ### Test Coverage
173
-
174
- | Spec File | Tests | Status |
175
- |-----------|-------|--------|
176
- | `ota-update.e2e.spec.js` | 5 tests | ✅ |
177
- | `download-progress.e2e.spec.js` | 5 tests | ✅ |
178
- | `channel-switching.e2e.spec.js` | 5 tests | ✅ |
179
- | `error-handling.e2e.spec.js` | 4 tests | ✅ |
180
- | **Total** | **19 tests** | ✅ |
181
-
182
- ### Running E2E Tests
183
-
184
- ```bash
185
- cd e2e
186
- yarn install
187
- yarn build:android # or yarn build:ios
188
- yarn test:android # or yarn test:ios
189
- ```
190
-
191
- ### Mock Server
192
-
193
- Start the mock update server for E2E tests:
194
- ```bash
195
- yarn start-mock-server
196
- ```
197
-
198
- ### Test Scenarios
199
-
200
- #### OTA Update Flow
201
- ```
202
- 1. App starts with version 1.0.0
203
- 2. Server has version 1.1.0 available
204
- 3. App checks for update → receives update info
205
- 4. App downloads bundle → shows progress
206
- 5. App applies update → restarts
207
- 6. App shows version 1.1.0
208
- ```
209
-
210
- #### Rollback Flow
211
- ```
212
- 1. App has version 1.1.0 applied
213
- 2. New update 1.2.0 has critical bug
214
- 3. App applies 1.2.0 → crashes on start
215
- 4. App automatically rolls back to 1.1.0
216
- 5. App reports rollback to server
217
- ```
218
-
219
- #### Native Update Flow
220
- ```
221
- 1. App version 1.0.0 installed from store
222
- 2. Store has version 2.0.0 (native update required)
223
- 3. App detects native update available
224
- 4. User shown update prompt
225
- 5. User redirected to app store
226
- ```
227
-
228
- #### Channel Switching
229
- ```
230
- 1. App configured for 'production' channel
231
- 2. Developer switches to 'staging' channel
232
- 3. App receives staging bundle
233
- 4. App applies staging updates
234
- ```
235
-
236
- ### E2E Test File Structure
237
- ```
238
- e2e/
239
- ├── specs/
240
- │ ├── ota-update.spec.js
241
- │ ├── rollback.spec.js
242
- │ ├── native-update.spec.js
243
- │ └── channel-switching.spec.js
244
- ├── helpers/
245
- │ └── server-mock.js
246
- └── setup.js
247
- ```
248
-
249
- ---
250
-
251
- ## Test Server for E2E
252
-
253
- A mock update server should provide:
254
-
255
- ```javascript
256
- // Mock endpoints
257
- GET /api/updates/check?appId=xxx&version=1.0.0&channel=production
258
- POST /api/updates/download/:bundleId
259
- POST /api/updates/report
260
- ```
261
-
262
- The CLI already provides `npx native-update server start` for local testing.
263
-
264
- ---
265
-
266
163
  ## Security Testing Checklist
267
164
 
268
165
  - [ ] Test with malformed bundle files (corrupted ZIP)
@@ -282,26 +179,18 @@ All test categories have been implemented as of 2026-01-16:
282
179
 
283
180
  | Category | Location | Tests | Status |
284
181
  |----------|----------|-------|--------|
285
- | TypeScript Unit Tests | `/src/__tests__/` | 9 test files | ✅ Complete |
286
182
  | iOS Native Tests | `/ios/Tests/NativeUpdateTests/` | 5 test files, 32 tests | ✅ Complete |
287
183
  | Android Native Tests | `/android/src/test/.../nativeupdate/` | 6 test files, 40 tests | ✅ Complete |
288
- | E2E Tests | `/e2e/specs/` | 4 spec files, 19 tests | ✅ Complete |
289
- | **Total** | | **~100 tests** | ✅ Complete |
184
+ | **Total** | | **72 tests** | ✅ Complete |
290
185
 
291
186
  ## Running All Tests
292
187
 
293
188
  ```bash
294
- # TypeScript Unit Tests
295
- yarn test
296
-
297
189
  # iOS Native Tests
298
190
  cd ios && xcodebuild test -scheme NativeUpdate -destination 'platform=iOS Simulator,name=iPhone 15'
299
191
 
300
192
  # Android Native Tests
301
193
  cd android && ./gradlew test
302
-
303
- # E2E Tests
304
- cd e2e && yarn install && yarn test:android # or yarn test:ios
305
194
  ```
306
195
 
307
196
  ## Additional Testing
@@ -0,0 +1,38 @@
1
+ # Native Update — Project Profile
2
+
3
+ **Last Updated:** 2026-04-25
4
+
5
+ ## What this is
6
+
7
+ Native Update is a Capacitor plugin that delivers three update flows for hybrid mobile apps in a single API surface:
8
+
9
+ 1. **Live (OTA) updates** — push JavaScript/CSS/HTML bundles to a running app without going through the app store. Bundle is downloaded, verified by checksum + signature, applied on next launch.
10
+ 2. **Native app updates** — prompt users to update through Google Play / Apple App Store when a new native binary is available. Uses platform-native dialogs (Play Core In-App Update on Android, App Store deep-link on iOS).
11
+ 3. **In-app reviews** — request a Play Store / App Store review at the right moment using each platform's native review UI.
12
+
13
+ ## Why this exists
14
+
15
+ Building Capacitor apps that ship updates quickly is hard. Apple and Google review processes take days. For non-native bundles (the JS/CSS that ships with most Capacitor apps), there's no reason to wait — the changes don't touch native code. Native Update lets developers ship hot fixes and small features in minutes via OTA, while still using the official app-store rails for native binary updates and review requests. The plugin exists to remove that friction without forcing developers to build their own bundle pipeline, signing flow, and rollback mechanism.
16
+
17
+ ## Distribution
18
+
19
+ - **npm:** `native-update` (current version 2.0.0)
20
+ - **Source:** https://github.com/aoneahsan/native-update (MIT)
21
+ - **Marketing site + dashboard:** https://nativeupdate.aoneahsan.com
22
+ - **Docs:** Surfaced at the marketing site under `/docs/...` and in `/docs` of this repo
23
+
24
+ ## Audience
25
+
26
+ Capacitor app developers and small-to-mid-size product teams who:
27
+ - Ship hybrid mobile apps (React/Vue/Angular + Capacitor)
28
+ - Need rapid iteration without app-store review delays for non-native fixes
29
+ - Want a self-hostable update server (Firestore / Node / Laravel templates included) to keep costs low and data sovereign
30
+ - Want native review prompts and store-update prompts working out of the box
31
+
32
+ ## Core value props
33
+
34
+ - One package for three flows (OTA + native update + review)
35
+ - Multiple backend templates (Firestore, Node + Express, Laravel + Nova) — pick what fits your stack
36
+ - Channel-based rollouts (alpha, beta, production) with percentage rollout support
37
+ - Bundle integrity (SHA-256 checksum + signature verification)
38
+ - Background download + apply-on-restart for low-friction updates
@@ -0,0 +1,46 @@
1
+ # Native Update — Feature Inventory
2
+
3
+ **Last Updated:** 2026-04-25
4
+
5
+ ## Live updates (OTA)
6
+
7
+ - Channel-based bundle delivery (`alpha`, `beta`, `production` by default; custom channels supported)
8
+ - Manifest-driven version pinning per channel
9
+ - SHA-256 checksum verification on every download
10
+ - RSA signature verification with developer-provided public key (optional but recommended)
11
+ - Background download with progress events
12
+ - Apply-on-restart strategy (no mid-session bundle swap)
13
+ - Rollback to last-known-good bundle on integrity failure
14
+ - Forced vs optional updates (manifest flag)
15
+ - Percentage rollouts (manifest field), client-side gated by stable hash of `installId`
16
+ - Minimum native version constraint (don't deliver a bundle that requires a newer native binary)
17
+
18
+ ## Native app updates
19
+
20
+ - Android: Google Play Core In-App Update (immediate + flexible flows)
21
+ - iOS: App Store version check via app-store API + deep link to update
22
+ - Manifest-driven minimum version (force-update threshold)
23
+ - Optional update prompt copy override per app
24
+
25
+ ## In-app reviews
26
+
27
+ - Android: Play In-App Review API
28
+ - iOS: `SKStoreReviewController` (StoreKit)
29
+ - Throttling guard so the prompt doesn't fire too often per user
30
+
31
+ ## Backend templates
32
+
33
+ Three reference backends ship with the plugin so users can pick one:
34
+
35
+ - **Firestore-only** (`example-apps/firebase-backend`) — zero-cost on Firestore free tier; manifest stored as a Firestore document; bundles uploaded to user-controlled storage (e.g., the developer's Google Drive).
36
+ - **Node + Express** (`example-apps/node-express`) — vanilla Node REST server with on-disk bundles; good for self-hosted setups.
37
+ - **Laravel + Nova** (`backend/`) — full SaaS-grade backend with admin UI, multi-tenant API keys, channel management, rollout controls, signed download URLs.
38
+
39
+ ## CLI tool
40
+
41
+ The `native-update` CLI (`cli/index.js`) helps with:
42
+ - Creating bundle ZIPs from a built web app
43
+ - Signing bundles with the developer's private key
44
+ - Computing checksums
45
+ - Uploading to one of the supported backends
46
+ - Rolling back a published manifest entry
@@ -0,0 +1,72 @@
1
+ # Native Update Website — Route Map
2
+
3
+ **Last Updated:** 2026-04-25
4
+
5
+ This is the public-facing marketing site + authenticated dashboard at https://nativeupdate.aoneahsan.com.
6
+
7
+ ## Marketing routes (public, indexed)
8
+
9
+ | Path | Page | Purpose |
10
+ |---|---|---|
11
+ | `/` | HomePage | Hero, value props, social proof, CTA |
12
+ | `/features` | FeaturesPage | OTA, native update, in-app review feature deep dives |
13
+ | `/pricing` | PricingPage | Self-host (free) and SaaS tier copy |
14
+ | `/docs` | DocsPage | Docs landing — links to package docs tree |
15
+ | `/docs/*` | DocsMarkdownPage | Markdown-rendered package docs (mirrored from repo `docs/`) |
16
+ | `/about` | AboutPage | Project background and ethos |
17
+ | `/contact` | ContactPage | Developer contact info, support email |
18
+ | `/sitemap` | SitemapPage | Human-readable sitemap with category cards + fuzzy search |
19
+ | `/feed` | FeedPage | Public content/changelog feed |
20
+ | `/permissions` | PermissionsPage | Permission disclosures for app stores |
21
+
22
+ ## Legal / info routes (public, indexed)
23
+
24
+ | Path | Page | Purpose |
25
+ |---|---|---|
26
+ | `/privacy` | PrivacyPage | GDPR/CCPA privacy policy |
27
+ | `/terms` | TermsPage | Terms of service |
28
+ | `/security` | SecurityPage | Data security disclosures |
29
+ | `/cookies` | CookiePolicyPage | Cookie usage |
30
+ | `/data-deletion` | DataDeletionPage | Account/data deletion (Play / App Store requirement) |
31
+
32
+ ## Auth routes (public, NOINDEX)
33
+
34
+ | Path | Page | Purpose |
35
+ |---|---|---|
36
+ | `/login` | LoginPage | Google sign-in only |
37
+ | `/signup` | SignupPage | Same Google flow, separate landing |
38
+
39
+ ## Dashboard routes (authenticated, NOINDEX)
40
+
41
+ | Path | Page | Purpose |
42
+ |---|---|---|
43
+ | `/dashboard` | DashboardOverview | Workspace overview |
44
+ | `/dashboard/apps` | AppsPage | Manage apps |
45
+ | `/dashboard/apps/:id` | AppDetailPage | Single app view |
46
+ | `/dashboard/builds` | BuildsPage | Build/bundle history |
47
+ | `/dashboard/builds/:id` | BuildDetailPage | Single bundle |
48
+ | `/dashboard/upload` | UploadPage | Upload a new bundle |
49
+ | `/dashboard/google-drive` | GoogleDrivePage | Google Drive connection |
50
+ | `/dashboard/config` | ConfigPage | Per-app config |
51
+ | `/dashboard/settings` | SettingsPage | Account settings |
52
+ | `/dashboard/rollouts` | RolloutsPage | Channel/rollout controls |
53
+ | `/dashboard/analytics` | AnalyticsPage | Update delivery metrics |
54
+
55
+ ## Admin routes (super-admin only, NOINDEX)
56
+
57
+ | Path | Page | Purpose |
58
+ |---|---|---|
59
+ | `/admin` | AdminOverview | Admin landing |
60
+ | `/admin/users` | AdminUsersPage | User management |
61
+ | `/admin/apps` | AdminAppsPage | All apps across users |
62
+ | `/admin/builds` | AdminBuildsPage | All builds |
63
+
64
+ ## Catch-all
65
+
66
+ | Path | Page | Purpose |
67
+ |---|---|---|
68
+ | `*` | NotFoundPage | Branded 404 with home + back CTAs |
69
+
70
+ ## Discovery files (public, served at root by Vite)
71
+
72
+ `/robots.txt`, `/sitemap.xml`, `/feed.xml`, `/llms.txt`, `/llms-full.txt`, `/ai.txt`, `/humans.txt`, `/.well-known/security.txt`, `/manifest.json`, `/og-image.svg`.
@@ -0,0 +1,57 @@
1
+ # Native Update — Tech Stack
2
+
3
+ **Last Updated:** 2026-04-25
4
+
5
+ ## Plugin (root)
6
+
7
+ - TypeScript 5+
8
+ - Rollup (ESM + CJS dual build, `dist/`)
9
+ - ESLint flat config (`@typescript-eslint`)
10
+ - Capacitor 8 plugin API
11
+ - Native: Kotlin (Android), Swift (iOS)
12
+
13
+ ## Marketing site + dashboard (`website/`)
14
+
15
+ - React 19 + TypeScript
16
+ - Vite 8
17
+ - Tailwind CSS v4
18
+ - Radix UI primitives (`@radix-ui/react-*`)
19
+ - `lucide-react` icons
20
+ - `framer-motion` for marketing-page animations
21
+ - React Router 7
22
+ - Firebase Auth (Google popup) + Firestore + Firebase Analytics
23
+ - Google Drive API (browser-side OAuth) for bundle storage
24
+ - `react-hook-form` + `zod` + `@hookform/resolvers` for all forms
25
+ - `zustand` for cross-component state
26
+ - `d3` for analytics charts
27
+ - `jszip` for bundle ZIP authoring
28
+ - `react-markdown` + `remark-gfm` for in-site markdown rendering
29
+ - Capacitor 8 for hybrid mobile distribution of the dashboard
30
+ - Capawesome `app-shortcuts` plugin
31
+
32
+ ## CLI (`cli/`)
33
+
34
+ - Node 18+
35
+ - `commander` for CLI surface
36
+ - `chalk`, `ora` for terminal UX
37
+ - `axios` for HTTP
38
+ - `archiver` for ZIP generation
39
+
40
+ ## Backend templates
41
+
42
+ - Firestore-only template — pure browser → Firestore writes
43
+ - Node + Express — vanilla REST server
44
+ - Laravel 11 + Nova 5 — full SaaS backend
45
+
46
+ ## Infra
47
+
48
+ - Firebase Hosting (website + dashboard)
49
+ - Firestore for manifest metadata
50
+ - Google Drive (user-owned) for bundle ZIP storage
51
+ - GitHub for source + issues
52
+ - npm registry for plugin distribution
53
+
54
+ ## Build outputs
55
+
56
+ - Plugin: `dist/esm/`, `dist/plugin.cjs.js`, `dist/plugin.js`, `dist/plugin.esm.js`
57
+ - Website: `website/dist/` (per-route static HTML prerendered for SEO)
@@ -0,0 +1,23 @@
1
+ # AI Knowledge Base
2
+
3
+ Comprehensive project documentation for AI tools and onboarding contributors. Maintained per R-016 — review every 14 days.
4
+
5
+ | File | Topic |
6
+ |---|---|
7
+ | `00-project-profile.md` | What Native Update is, why it exists, audience, value props |
8
+ | `01-features.md` | Feature inventory: live updates, native updates, in-app reviews, backends, CLI |
9
+ | `02-routes.md` | Marketing site + dashboard route map |
10
+ | `03-tech-stack.md` | Languages, frameworks, libs, infra |
11
+
12
+ ## When to update
13
+
14
+ - Significant feature addition or removal
15
+ - Route added or removed (always sync `02-routes.md` with `website/src/router.tsx`)
16
+ - Tech stack change (library replaced, major version bump)
17
+ - Distribution change (npm publish, hosting move)
18
+
19
+ ## Update procedure
20
+
21
+ 1. Edit the relevant file directly
22
+ 2. Bump the `Last Updated` date at the top
23
+ 3. Update `docs/rules-tracker.md` R-016 row date
@@ -0,0 +1,37 @@
1
+ # Analytics Tracking (R-024)
2
+
3
+ This registry lists every meaningful user action and where it is tracked.
4
+
5
+ **Service:** `website/src/lib/analytics.ts`
6
+ **Destinations:** Firebase Analytics (always on if Firebase config present) + Microsoft Clarity / Amplitude (off until their env keys are set)
7
+
8
+ **Last audited:** 2026-04-25
9
+
10
+ ## Event vocabulary
11
+
12
+ | Event name | Where fired | Params |
13
+ |---|---|---|
14
+ | `page_view` | `usePageSEO` hook on every public page mount | `page_path`, `page_title` |
15
+ | `click` | High-intent CTAs in `Header`, `HomePage`, marketing CTAs | `element_name`, `location` |
16
+ | `form_submit` | UploadPage, SettingsPage, AppsPage, ContactPage | `form_name`, `success` |
17
+ | `external_link_click` | Footer social links, npm link, GitHub link | `url`, `link_text` |
18
+ | `download` | Bundle/manifest exports, sample-app download | `file_name`, `file_type` |
19
+ | `error` | `trackErrorEvent` for non-fatal flows | `error_message`, `error_location` |
20
+ | `app_error` | `trackError` from `errorTracking.ts` | `name`, `message`, plus context |
21
+
22
+ ## Wiring guidance
23
+
24
+ ```ts
25
+ import { trackEvent, trackClick, trackFormSubmit } from '@/lib/analytics';
26
+
27
+ trackEvent('upload_started', { app_id, channel });
28
+ trackClick('cta_view_pricing', 'home_hero');
29
+ trackFormSubmit('contact_form', true);
30
+ ```
31
+
32
+ ## Env keys
33
+
34
+ - `VITE_CLARITY_PROJECT_ID` — when set, calls `window.clarity('event', ...)` if the Clarity script is loaded
35
+ - `VITE_AMPLITUDE_API_KEY` — when set, calls `window.amplitude.track(...)` if the Amplitude SDK is loaded
36
+
37
+ When neither is set, the dual-write is a silent no-op — Firebase Analytics still receives the event so the dashboard does not go blind.
@@ -0,0 +1,46 @@
1
+ # Capacitor Official Plugins (R-035)
2
+
3
+ Status of official `@capacitor/*` plugins in the `website/` app (the only Capacitor consumer in this monorepo besides example-apps).
4
+
5
+ **Last verified:** 2026-04-25
6
+
7
+ ## Installed
8
+
9
+ | Plugin | Status | Notes |
10
+ |---|---|---|
11
+ | `@capacitor/android` | ✅ | Platform |
12
+ | `@capacitor/ios` | ✅ | Platform |
13
+ | `@capacitor/core` | ✅ | Required |
14
+ | `@capacitor/cli` | ✅ | DevDep — sync/open commands |
15
+ | `@capacitor/motion` | ✅ | Used for parallax-style marketing-page interactions |
16
+ | `@capacitor/preferences` | ✅ | Used in place of localStorage where needed |
17
+ | `@capacitor/privacy-screen` | ✅ | Hides sensitive content during app switcher |
18
+
19
+ ## Deliberately not installed
20
+
21
+ The website is a marketing site + dashboard. Many plugins from the global rule list don't apply:
22
+
23
+ | Plugin | Reason for skip |
24
+ |---|---|
25
+ | `@capacitor/app-launcher` | No deep-linking to other apps |
26
+ | `@capacitor/app` | Available implicitly; can be added when an explicit lifecycle handler is needed |
27
+ | `@capacitor/barcode-scanner` | No scanner UX |
28
+ | `@capacitor/browser` | All external links go through anchor `target="_blank"` — works in webview |
29
+ | `@capacitor/camera` | No camera feature |
30
+ | `@capacitor/clipboard` | Use `navigator.clipboard.writeText` (works on web + capacitor) |
31
+ | `@capacitor/device` | Add only if device-specific UX is required |
32
+ | `@capacitor/dialog` | Native confirms not needed; we use Radix dialogs |
33
+ | `@capacitor/geolocation` | No geo feature |
34
+ | `@capacitor/haptics` | Add when there's a flow that warrants haptic feedback (e.g. successful upload) |
35
+ | `@capacitor/network` | Add when offline state UX is implemented |
36
+ | `@capacitor/screen-orientation` | Web app, no orientation lock needed |
37
+ | `@capacitor/share` | `navigator.share` works; add native plugin if mobile share sheet is required |
38
+ | `@capacitor/splash-screen` | Configured via Capacitor config plugin block; no extra package needed |
39
+ | `@capacitor/toast` | We use Radix-based in-app toasts (`src/lib/toast.ts`) |
40
+
41
+ ## Adding a new plugin (procedure)
42
+
43
+ 1. Add to `website/package.json` (`yarn add @capacitor/<plugin>`).
44
+ 2. Run `yarn cap:sync` to wire native code into Android + iOS.
45
+ 3. Update this registry's "Installed" table.
46
+ 4. If the plugin needs runtime permissions (camera, geolocation, contacts, etc.), update the merged manifest, privacy policy, data-safety form, and per the global rules — declare the permission AT REQUEST TIME, not at app launch.
@@ -0,0 +1,29 @@
1
+ # Capawesome Plugins (R-036)
2
+
3
+ Status of `@capawesome/*` plugins in the `website/` Capacitor app.
4
+
5
+ **Last verified:** 2026-04-25
6
+
7
+ ## Installed
8
+
9
+ | Plugin | Status | Notes |
10
+ |---|---|---|
11
+ | `@capawesome/capacitor-app-shortcuts` | ✅ | Long-press app icon shortcuts (e.g., "Upload bundle") |
12
+
13
+ ## Pending — required before any Play Store / App Store submission
14
+
15
+ Per the global R-036 rule, these are recommended for hybrid apps targeting current Android + iOS versions. The website is not yet submitted to either store; once a store submission is planned, install and wire the items below.
16
+
17
+ | Plugin | When to add | Why |
18
+ |---|---|---|
19
+ | `@capawesome/capacitor-android-edge-to-edge-support` | Before Play Store submission | Android 15 mandates edge-to-edge layouts. |
20
+ | `@capawesome/capacitor-app-update` | Before stores | In-app prompt when a newer native binary exists. |
21
+ | `@capawesome/capacitor-app-review` | Before stores | Native review prompt at high-engagement moments. |
22
+ | `@capawesome/capacitor-badge` | Optional | Icon badge count — only useful with notifications. |
23
+
24
+ ## Adding procedure
25
+
26
+ 1. `yarn add @capawesome/<plugin>` in `website/`.
27
+ 2. `yarn cap:sync` to wire Android + iOS.
28
+ 3. Configure as documented at https://capawesome.io/plugins/ — most need an Android `MainActivity` registration line (auto-handled by `cap sync` for current Capacitor versions).
29
+ 4. Update this registry.