native-update 1.4.9 → 2.0.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 (71) hide show
  1. package/Readme.md +13 -1
  2. package/android/src/main/java/com/aoneahsan/nativeupdate/BackgroundUpdatePlugin.kt +15 -0
  3. package/android/src/main/java/com/aoneahsan/nativeupdate/BackgroundUpdateWorker.kt +23 -7
  4. package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +152 -4
  5. package/android/src/main/java/com/aoneahsan/nativeupdate/NativeUpdatePlugin.kt +14 -1
  6. package/android/src/main/java/com/aoneahsan/nativeupdate/NotificationActionReceiver.kt +10 -1
  7. package/android/src/main/java/com/aoneahsan/nativeupdate/SecurityManager.kt +18 -18
  8. package/cli/AGENTS.md +29 -0
  9. package/cli/CLAUDE.md +51 -0
  10. package/dist/esm/__tests__/security-enforcement.test.d.ts +1 -0
  11. package/dist/esm/__tests__/security-enforcement.test.js +95 -0
  12. package/dist/esm/__tests__/security-enforcement.test.js.map +1 -0
  13. package/dist/esm/core/config.d.ts +6 -15
  14. package/dist/esm/core/config.js +1 -4
  15. package/dist/esm/core/config.js.map +1 -1
  16. package/dist/esm/core/security.d.ts +11 -3
  17. package/dist/esm/core/security.js +19 -6
  18. package/dist/esm/core/security.js.map +1 -1
  19. package/dist/esm/definitions.d.ts +13 -29
  20. package/dist/esm/definitions.js.map +1 -1
  21. package/dist/esm/index.d.ts +0 -2
  22. package/dist/esm/index.js +0 -2
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/live-update/download-manager.d.ts +36 -5
  25. package/dist/esm/live-update/download-manager.js +61 -22
  26. package/dist/esm/live-update/download-manager.js.map +1 -1
  27. package/dist/esm/live-update/update-manager.d.ts +12 -1
  28. package/dist/esm/live-update/update-manager.js +38 -10
  29. package/dist/esm/live-update/update-manager.js.map +1 -1
  30. package/dist/esm/live-update/version-manager.d.ts +9 -0
  31. package/dist/esm/live-update/version-manager.js +40 -0
  32. package/dist/esm/live-update/version-manager.js.map +1 -1
  33. package/dist/esm/plugin.js +13 -46
  34. package/dist/esm/plugin.js.map +1 -1
  35. package/dist/esm/web.d.ts +18 -1
  36. package/dist/esm/web.js +69 -24
  37. package/dist/esm/web.js.map +1 -1
  38. package/dist/plugin.cjs.js +1 -1
  39. package/dist/plugin.cjs.js.map +1 -1
  40. package/dist/plugin.esm.js +1 -1
  41. package/dist/plugin.esm.js.map +1 -1
  42. package/dist/plugin.js +2 -2
  43. package/dist/plugin.js.map +1 -1
  44. package/docs/AGENTS.md +38 -0
  45. package/docs/CHANGELOG.md +151 -0
  46. package/docs/CLAUDE.md +101 -0
  47. package/docs/MIGRATION.md +87 -0
  48. package/docs/README.md +13 -2
  49. package/docs/deployment/HOSTINGER_DEPLOY.md +329 -0
  50. package/docs/features/laravel-nova-backend/ASSESSMENT-SUMMARY.md +96 -0
  51. package/docs/features/laravel-nova-backend/IMPLEMENTATION-PLAN.md +504 -0
  52. package/docs/features/laravel-nova-backend/credentials.ignore.md +34 -0
  53. package/docs/features/laravel-nova-backend/progress-tracker.json +184 -0
  54. package/docs/project-knowledge-base/01-system-overview.md +218 -0
  55. package/docs/project-knowledge-base/02-routes-pages-forms-users.md +346 -0
  56. package/docs/project-knowledge-base/03-tech-stack-modules-services.md +347 -0
  57. package/docs/project-knowledge-base/04-data-models-integrations.md +307 -0
  58. package/docs/project-knowledge-base/05-docs-corpus-inventory.md +193 -0
  59. package/docs/project-knowledge-base/06-operations-testing-legal-content.md +170 -0
  60. package/docs/project-knowledge-base/README.md +90 -0
  61. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-16.md +454 -0
  62. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-24.md +66 -0
  63. package/docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-25.md +67 -0
  64. package/docs/seo-aeo-rules.json +3043 -0
  65. package/docs/tracking/seo-checklist-tracker.json +333 -0
  66. package/ios/Plugin/BackgroundUpdate/BackgroundUpdatePlugin.swift +50 -6
  67. package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +238 -8
  68. package/ios/Plugin/NativeUpdatePlugin.swift +8 -0
  69. package/ios/Plugin/Security/SecurityManager.swift +13 -14
  70. package/package.json +30 -31
  71. package/docs/play-console-rejection-rules.json +0 -428
@@ -0,0 +1,307 @@
1
+ # Native Update Data Models and Integrations
2
+
3
+ ## Metadata
4
+
5
+ - **Reference Date:** 2026-03-16
6
+ - **Last Updated:** 2026-03-16
7
+
8
+ ## Main Integration Surfaces
9
+
10
+ - Firebase Authentication
11
+ - Firestore
12
+ - Google Identity Services
13
+ - Google Drive API
14
+ - Capacitor runtime APIs
15
+ - Android native APIs / Play-related update capabilities
16
+ - iOS native APIs / StoreKit-related review and update capabilities
17
+
18
+ ## Authentication Model
19
+
20
+ ### Sign-In Method
21
+
22
+ - Primary auth flow is Google sign-in via Firebase popup
23
+ - user records are created on first login
24
+ - admin privilege is stored in Firestore and seeded from owner email logic
25
+
26
+ ### User Document (`users/{uid}`)
27
+
28
+ Key fields visible in types and auth flow:
29
+
30
+ - `uid`
31
+ - `email`
32
+ - `displayName`
33
+ - `photoURL`
34
+ - `provider`
35
+ - `emailVerified`
36
+ - `createdAt`
37
+ - `lastLogin`
38
+ - `driveConnected`
39
+ - `driveEmail`
40
+ - `driveConnectedAt`
41
+ - `plan`
42
+ - `planStartDate`
43
+ - `planEndDate`
44
+ - `appsCount`
45
+ - `buildsCount`
46
+ - `storageUsed`
47
+ - `preferences`
48
+ - `isAdmin`
49
+ - `updatedAt`
50
+
51
+ ### User Preferences
52
+
53
+ - `emailNotifications`
54
+ - `updateNotifications`
55
+ - `theme`
56
+ - `language`
57
+
58
+ ## App Model
59
+
60
+ ### App Document (`apps/{appId}`)
61
+
62
+ - `userId`
63
+ - `name`
64
+ - `packageId`
65
+ - `icon`
66
+ - `description`
67
+ - `platforms`
68
+ - `channels`
69
+ - `apiKey`
70
+ - `totalBuilds`
71
+ - `activeUsers`
72
+ - `lastBuildDate`
73
+ - `createdAt`
74
+ - `updatedAt`
75
+
76
+ ### Channel Config
77
+
78
+ Per channel:
79
+
80
+ - `enabled`
81
+ - `autoUpdate`
82
+ - `updateStrategy`
83
+ - `requireUserConsent`
84
+ - `minVersion`
85
+
86
+ Default observed behavior:
87
+
88
+ - production enabled
89
+ - staging enabled
90
+ - development enabled and auto-update true
91
+
92
+ ## API Key Model
93
+
94
+ ### API Key Document (`apiKeys/{apiKey}`)
95
+
96
+ Used so mobile apps can query manifests using an API key rather than dashboard auth. Observed fields include:
97
+
98
+ - `appId`
99
+ - `packageId`
100
+ - `userId`
101
+ - `createdAt`
102
+
103
+ There is also an app-facing manifests subcollection under this API key path.
104
+
105
+ ## Build Model
106
+
107
+ ### Build Document (`builds/{buildId}`)
108
+
109
+ Observed/typed fields include:
110
+
111
+ - `id`
112
+ - `userId`
113
+ - `appId`
114
+ - `version`
115
+ - `buildNumber`
116
+ - `channel`
117
+ - `platform`
118
+ - `fileName`
119
+ - `fileSize`
120
+ - `mimeType`
121
+ - `checksum`
122
+ - `signature`
123
+ - `driveFileId`
124
+ - `driveFileUrl`
125
+ - `driveFolderId`
126
+ - `fileManifest`
127
+ - `manifestDriveId`
128
+ - `releaseNotes`
129
+ - `releaseType`
130
+ - `isPreRelease`
131
+ - `minNativeVersion`
132
+ - `uploadedAt`
133
+ - `uploadedBy`
134
+ - `uploadDuration`
135
+ - `status`
136
+ - `processingSteps`
137
+ - `analytics`
138
+ - `updatedAt`
139
+
140
+ ### Build Status Values
141
+
142
+ - `uploading`
143
+ - `processing`
144
+ - `active`
145
+ - `archived`
146
+ - `failed`
147
+
148
+ ## Manifest Model
149
+
150
+ ### Manifest Document (`manifests/{appId}_{channel}`)
151
+
152
+ This is the primary document used for update checks.
153
+
154
+ Fields:
155
+
156
+ - `appId`
157
+ - `channel`
158
+ - `current`
159
+ - `deltas`
160
+ - `rollout`
161
+ - `previousVersions`
162
+ - `updatedAt`
163
+ - `updatedBy`
164
+
165
+ ### Current Version Block
166
+
167
+ - `version`
168
+ - `bundleId`
169
+ - `bundleUrl`
170
+ - `manifestUrl`
171
+ - `checksum`
172
+ - `signature`
173
+ - `size`
174
+ - `releaseNotes`
175
+ - `releaseDate`
176
+ - `mandatory`
177
+ - `minNativeVersion`
178
+
179
+ ### Rollout Config
180
+
181
+ - `enabled`
182
+ - `percentage`
183
+ - `startTime`
184
+ - `endTime`
185
+ - optional `targetSegments`
186
+ - optional `schedule`
187
+
188
+ ### Rollout Schedule
189
+
190
+ - `immediate`
191
+ - `gradual`
192
+ - `scheduled`
193
+
194
+ ## Delta Model
195
+
196
+ ### Delta Document
197
+
198
+ Used for pre-computed patch information:
199
+
200
+ - `appId`
201
+ - `fromVersion`
202
+ - `toVersion`
203
+ - `channel`
204
+ - `patchDriveId`
205
+ - `patchUrl`
206
+ - `patchSize`
207
+ - `patchChecksum`
208
+ - `sourceChecksum`
209
+ - `targetChecksum`
210
+ - `generatedAt`
211
+ - `generationDuration`
212
+ - `algorithm`
213
+ - `compressionRatio`
214
+ - `status`
215
+
216
+ ## Analytics Model
217
+
218
+ ### Analytics Batch Document (`analytics_batch/{batchId}`)
219
+
220
+ - `appId`
221
+ - `channel`
222
+ - `windowStart`
223
+ - `windowEnd`
224
+ - `events`
225
+ - `versionStats`
226
+ - `platformStats`
227
+ - `errorSamples`
228
+ - `createdAt`
229
+
230
+ ### Events Aggregated
231
+
232
+ - update checks
233
+ - downloads
234
+ - installs
235
+ - rollbacks
236
+ - errors
237
+
238
+ ## Drive Token Model
239
+
240
+ ### Drive Token Document (`drive_tokens/{userId}`)
241
+
242
+ Observed fields include:
243
+
244
+ - `userId`
245
+ - `accessToken`
246
+ - `refreshToken`
247
+ - `tokenType`
248
+ - `scope`
249
+ - `expiresAt`
250
+ - Google account metadata such as email/name/picture/id/locale
251
+ - `encryptionMethod`
252
+ - `iv`
253
+ - `authTag`
254
+ - `createdAt`
255
+ - `updatedAt`
256
+
257
+ ## Google Drive Integration Flow
258
+
259
+ ### Connect Flow
260
+
261
+ 1. Load Google Identity Services script
262
+ 2. Request Drive and profile scopes
263
+ 3. Exchange response into usable access token
264
+ 4. Fetch Google user profile info
265
+ 5. Store token metadata in Firestore
266
+ 6. Update `users/{uid}` Drive connection fields
267
+
268
+ ### Upload Flow
269
+
270
+ 1. User selects ZIP
271
+ 2. Validate file
272
+ 3. Calculate SHA-256 checksum
273
+ 4. Generate file manifest from ZIP contents
274
+ 5. Upload ZIP to Drive
275
+ 6. Upload manifest JSON to Drive
276
+ 7. Make Drive files publicly retrievable as needed
277
+ 8. Write build record in Firestore
278
+ 9. Update channel manifest document
279
+
280
+ ## No-Cost Backend Operating Model
281
+
282
+ The intended website publishing model is:
283
+
284
+ - browser-based uploads
285
+ - Google Drive for bundle storage
286
+ - Firestore for metadata and app-facing manifests
287
+ - no paid compute required for core publish/check/download flow
288
+
289
+ This is a central strategic assumption in the repo’s website guidance.
290
+
291
+ ## App-Facing Manifest Paths Mentioned In CLAUDE Guidance
292
+
293
+ - `/apiKeys/{apiKey}/manifests/{channel}`
294
+ - `/manifests/{appId}_{channel}`
295
+
296
+ ## Security-Relevant Data Points
297
+
298
+ - checksums are stored and used for validation
299
+ - signature support exists
300
+ - manifest and build docs carry release metadata
301
+ - bundle file manifests support file-level integrity and delta logic
302
+
303
+ ## Data Ownership Notes
304
+
305
+ - The website messaging emphasizes that user build files are stored in the user’s Google Drive
306
+ - user account data and release metadata live in Firebase/Firestore
307
+ - deletion/account settings pages document data handling expectations for legal/compliance messaging
@@ -0,0 +1,193 @@
1
+ # Native Update Docs Corpus Inventory
2
+
3
+ ## Metadata
4
+
5
+ - **Reference Date:** 2026-03-16
6
+ - **Last Updated:** 2026-03-16
7
+ - **Goal:** Enumerate the current `/docs` folder so AI tools know what documentation already exists before planning, writing, or duplicating work
8
+
9
+ ## Coverage Note
10
+
11
+ This file inventories the docs currently present in `/docs`. It is a high-context index, not a replacement for reading the source documents when exact wording or implementation detail is needed.
12
+
13
+ ## Root-Level Docs
14
+
15
+ | Path | Purpose / Notes |
16
+ |------|------------------|
17
+ | `docs/README.md` | Main docs landing page and public docs overview |
18
+ | `docs/APP_REVIEW_GUIDE.md` | Review-related guide content |
19
+ | `docs/BUNDLE_SIGNING.md` | Signing workflow and bundle security guidance |
20
+ | `docs/CHANGELOG.md` | Project change history |
21
+ | `docs/COMPREHENSIVE_AUDIT_REPORT.md` | Broad audit/reporting artifact |
22
+ | `docs/EXAMPLE_APPS_SIMPLIFICATION_PLAN.md` | Plan for simplifying example apps |
23
+ | `docs/EXAMPLE_APPS_SIMPLIFICATION_TRACKER.md` | Tracking file for example-app simplification |
24
+ | `docs/FIREBASE_INTEGRATION_TRACKER.md` | Firebase integration tracking/status notes |
25
+ | `docs/FIREBASE_QUERIES_AND_INDEXES_AUDIT.md` | Firestore query/index audit reference |
26
+ | `docs/KNOWN_LIMITATIONS.md` | Explicit limitations and caveats |
27
+ | `docs/LIVE_UPDATES_GUIDE.md` | OTA/live update guidance |
28
+ | `docs/MARKETING_WEBSITE_PLAN.md` | Marketing website planning document |
29
+ | `docs/MARKETING_WEBSITE_TRACKER.md` | Marketing website progress tracker |
30
+ | `docs/MIGRATION.md` | Migration information |
31
+ | `docs/NATIVE_UPDATES_GUIDE.md` | Native app update guidance |
32
+ | `docs/PROJECT_COMPLETION_TRACKER.md` | Completion/progress tracker |
33
+ | `docs/QUICK_START.md` | Fast-start implementation guidance |
34
+ | `docs/REMAINING_FEATURES.md` | Remaining or planned feature notes |
35
+ | `docs/ROADMAP.md` | Roadmap/status file |
36
+ | `docs/SECURITY.md` | High-level security documentation |
37
+ | `docs/TESTING_REQUIREMENTS.md` | Testing expectations and requirements |
38
+ | `docs/background-updates.md` | Background update feature guide |
39
+ | `docs/cli-reference.md` | CLI usage reference |
40
+ | `docs/play-console-rejection-rules.json` | Policy/rules reference JSON |
41
+ | `docs/production-readiness.md` | Production readiness checklist/context |
42
+ | `docs/server-requirements.md` | Backend/server requirement notes |
43
+
44
+ ## API Docs
45
+
46
+ | Path | Purpose / Notes |
47
+ |------|------------------|
48
+ | `docs/api/API.md` | Top-level API overview |
49
+ | `docs/api/FEATURES.md` | Feature-oriented API/behavior summary |
50
+ | `docs/api/app-review-api.md` | App review API surface |
51
+ | `docs/api/app-update-api.md` | App update API surface |
52
+ | `docs/api/background-update-api.md` | Background update API surface |
53
+ | `docs/api/events-api.md` | Event listener and event model reference |
54
+ | `docs/api/live-update-api.md` | OTA/live update API reference |
55
+
56
+ ## Getting Started Docs
57
+
58
+ | Path | Purpose / Notes |
59
+ |------|------------------|
60
+ | `docs/getting-started/configuration.md` | Config options and setup details |
61
+ | `docs/getting-started/installation.md` | Installation steps |
62
+ | `docs/getting-started/quick-start.md` | Quick implementation guide |
63
+
64
+ ## Feature Docs
65
+
66
+ | Path | Purpose / Notes |
67
+ |------|------------------|
68
+ | `docs/features/app-reviews.md` | In-app review feature details |
69
+ | `docs/features/app-updates.md` | Native app update feature details |
70
+ | `docs/features/live-updates.md` | OTA/live update feature details |
71
+
72
+ ## Guide Docs
73
+
74
+ | Path | Purpose / Notes |
75
+ |------|------------------|
76
+ | `docs/guides/BACKEND_TEMPLATES_GUIDE.md` | How backend templates are intended to be used |
77
+ | `docs/guides/admin-panel.md` | Admin panel/dashboard usage |
78
+ | `docs/guides/channel-management.md` | Channel setup and usage |
79
+ | `docs/guides/dashboard-guide.md` | Dashboard usage guide |
80
+ | `docs/guides/deployment-guide.md` | Deployment guidance |
81
+ | `docs/guides/end-to-end-workflow.md` | Full workflow from setup to production |
82
+ | `docs/guides/key-management.md` | Key generation and management |
83
+ | `docs/guides/migration-from-codepush.md` | CodePush migration guide |
84
+ | `docs/guides/no-cost-backend-implementation-plan.md` | Planning file for no-cost backend path |
85
+ | `docs/guides/no-cost-firestore-google-drive-backend.md` | Key recommended backend architecture guide |
86
+ | `docs/guides/security-best-practices.md` | Secure update implementation guidance |
87
+ | `docs/guides/testing-guide.md` | Testing procedures and expectations |
88
+ | `docs/guides/troubleshooting.md` | Troubleshooting and issue resolution guide |
89
+
90
+ ## Examples Docs
91
+
92
+ | Path | Purpose / Notes |
93
+ |------|------------------|
94
+ | `docs/examples/advanced-scenarios.md` | More advanced use cases and patterns |
95
+ | `docs/examples/android-manifest-example.xml` | Android manifest example |
96
+ | `docs/examples/basic-usage.md` | Basic implementation examples |
97
+ | `docs/examples/firebase-backend-example.md` | Firebase backend example |
98
+ | `docs/examples/node-express-backend-example.md` | Node/Express backend example |
99
+ | `docs/examples/react-capacitor-example.md` | React + Capacitor frontend example |
100
+
101
+ ## Plans
102
+
103
+ | Path | Purpose / Notes |
104
+ |------|------------------|
105
+ | `docs/plans/PLANNING_COMPLETE_SUMMARY.md` | Summary of planning phase |
106
+ | `docs/plans/TASK_1_ANDROID_EXAMPLE_APP.md` | Android example-app planning task |
107
+ | `docs/plans/TASK_2_API_ENDPOINTS.md` | API endpoint planning |
108
+ | `docs/plans/TASK_2_DASHBOARD_UI_UX.md` | Dashboard UX planning |
109
+ | `docs/plans/TASK_2_DATABASE_SCHEMA.md` | Database schema planning |
110
+ | `docs/plans/TASK_2_GOOGLE_DRIVE_INTEGRATION.md` | Drive integration planning |
111
+ | `docs/plans/TASK_2_SAAS_ARCHITECTURE.md` | SaaS architecture planning |
112
+ | `docs/plans/TASK_2_USER_AUTHENTICATION.md` | Auth planning |
113
+
114
+ ## Reports
115
+
116
+ | Path | Purpose / Notes |
117
+ |------|------------------|
118
+ | `docs/reports/AUDIT_SUMMARY_2025-12-26.md` | Historical audit summary |
119
+ | `docs/reports/CLAUDE-CODE-COMPLETION-PROMPT.md` | Internal prompt/report artifact |
120
+ | `docs/reports/CLAUDE_CODE_PROMPT.md` | Internal prompt/report artifact |
121
+ | `docs/reports/CODEBASE_STATUS_REPORT.md` | Codebase status report |
122
+ | `docs/reports/COMPLETE_VERIFICATION.md` | Verification report |
123
+ | `docs/reports/COMPREHENSIVE-PROJECT-AUDIT-2026-02-24.md` | Detailed later audit report |
124
+ | `docs/reports/EVENT_FLOW_VERIFICATION.md` | Event flow verification notes |
125
+ | `docs/reports/EXAMPLE_APPS_SIMPLIFICATION_COMPLETE.md` | Completion note for example-app simplification |
126
+ | `docs/reports/FINAL_STATUS.md` | Status summary |
127
+ | `docs/reports/FINAL_VERIFICATION_CHECKLIST.md` | Release/readiness checklist |
128
+ | `docs/reports/MARKETING_WEBSITE_COMPLETE.md` | Website completion report |
129
+ | `docs/reports/PACKAGE_COMPLETENESS_REPORT.md` | Package completeness analysis |
130
+ | `docs/reports/PRODUCTION_STATUS.md` | Historical production-status report; contains older readiness framing |
131
+ | `docs/reports/PROJECT_RESTRUCTURE_2025-12-27.md` | Restructure report |
132
+ | `docs/reports/PROJECT_RESTRUCTURE_FINAL_SUMMARY.md` | Final restructure summary |
133
+ | `docs/reports/PUBLISHING_VERIFICATION.md` | Publishing/release verification |
134
+ | `docs/reports/RELEASE_READY_SUMMARY.md` | Release readiness summary |
135
+ | `docs/reports/claude-completion.json` | JSON status/report artifact |
136
+
137
+ ## Security Subfolder
138
+
139
+ | Path | Purpose / Notes |
140
+ |------|------------------|
141
+ | `docs/security/certificate-pinning.md` | Certificate pinning details |
142
+
143
+ ## Tracking Subfolder
144
+
145
+ | Path | Purpose / Notes |
146
+ |------|------------------|
147
+ | `docs/tracking/IMPLEMENTATION_TRACKER.md` | Implementation tracking |
148
+ | `docs/tracking/capacitor-rollout-note-2026-03-01.md` | Rollout note / dated tracking artifact |
149
+ | `docs/tracking/completion-tracker-2026-02-24.json` | JSON completion tracker |
150
+
151
+ ## Existing Project Profile and AI-Oriented Docs
152
+
153
+ | Path | Purpose / Notes |
154
+ |------|------------------|
155
+ | `docs/project-profiles/native-update-capacitor-update-platform-project-profile-last-updated-2026-03-16.md` | Portfolio/resume/social-facing project profile |
156
+
157
+ ## How AI Should Use The Docs Corpus
158
+
159
+ ### For Implementation
160
+
161
+ - Start with `docs/getting-started/*`, `docs/api/*`, `docs/features/*`, and `docs/guides/*`
162
+
163
+ ### For Product Positioning
164
+
165
+ - Use `docs/README.md`, feature docs, dashboard guides, website pages, and the project profile
166
+
167
+ ### For Architecture or Backend Planning
168
+
169
+ - Use no-cost backend guides, schema planning docs, API endpoint plans, Firestore audit docs, and website config pages
170
+
171
+ ### For Testing
172
+
173
+ - Use `docs/TESTING_REQUIREMENTS.md`, testing guide, verification reports, and test files in source
174
+
175
+ ### For Historical Context
176
+
177
+ - Use `docs/plans/*`, `docs/reports/*`, and tracking files
178
+
179
+ ### For Legal / Compliance / Security
180
+
181
+ - Use `docs/SECURITY.md`, security-best-practices guide, certificate pinning doc, website legal pages, and production-readiness docs
182
+
183
+ ## Important Interpretation Rule
184
+
185
+ The `/docs` folder mixes:
186
+
187
+ - user-facing docs
188
+ - implementation docs
189
+ - planning artifacts
190
+ - historical reports
191
+ - status snapshots
192
+
193
+ AI tools should not treat all documents as equally current. For current technical truth, validate against source code and the most recent files.
@@ -0,0 +1,170 @@
1
+ # Native Update Operations, Testing, Legal, and Content Context
2
+
3
+ ## Metadata
4
+
5
+ - **Reference Date:** 2026-03-16
6
+ - **Last Updated:** 2026-03-16
7
+
8
+ ## Operations Context
9
+
10
+ ### Release and Delivery Model
11
+
12
+ - Plugin code ships via npm as `native-update`
13
+ - Dashboard supports browser-driven ZIP upload workflows
14
+ - Google Drive stores release bundles and manifest JSON files in the recommended no-cost path
15
+ - Firestore stores manifest metadata, rollout settings, app records, and analytics batches
16
+
17
+ ### Channel Model
18
+
19
+ - production
20
+ - staging
21
+ - development
22
+
23
+ Observed product messaging and docs position these as the primary update channels.
24
+
25
+ ### Rollout Model
26
+
27
+ - percentage-based rollout
28
+ - pause/resume support
29
+ - gradual or scheduled rollout concepts in schema/docs
30
+ - rollout configuration stored in manifest docs
31
+
32
+ ## Testing Context
33
+
34
+ ### Test Layers Present In Repo
35
+
36
+ - TypeScript unit and integration tests under `src/__tests__/`
37
+ - iOS XCTest files under `ios/Tests/NativeUpdateTests/`
38
+ - Android JUnit/Kotlin tests under `android/src/test/java/com/aoneahsan/nativeupdate/`
39
+ - E2E tests under `e2e/specs/`
40
+
41
+ ### E2E Areas Mentioned
42
+
43
+ - OTA update lifecycle
44
+ - error handling
45
+ - download progress
46
+ - channel switching
47
+
48
+ ### Testing Documentation Present
49
+
50
+ - `docs/TESTING_REQUIREMENTS.md`
51
+ - `docs/guides/testing-guide.md`
52
+ - verification and audit reports under `docs/reports/`
53
+
54
+ ## Security Context
55
+
56
+ ### Security Themes Repeated Across Repo
57
+
58
+ - checksum validation
59
+ - signing and verification
60
+ - HTTPS enforcement
61
+ - certificate pinning support
62
+ - manifest/file integrity
63
+ - secure update delivery
64
+
65
+ ### Security Docs Present
66
+
67
+ - `docs/SECURITY.md`
68
+ - `docs/BUNDLE_SIGNING.md`
69
+ - `docs/security/certificate-pinning.md`
70
+ - `docs/guides/security-best-practices.md`
71
+ - SecurityPage on website
72
+
73
+ ## Legal and Compliance Surfaces
74
+
75
+ ### Website Legal Pages
76
+
77
+ - `/privacy`
78
+ - `/terms`
79
+ - `/cookies`
80
+ - `/data-deletion`
81
+ - `/security`
82
+ - `/contact`
83
+
84
+ These pages are explicitly called out in `website/CLAUDE.md` as important and app-store-relevant.
85
+
86
+ ### Legal Messaging Themes In Website
87
+
88
+ - privacy handling
89
+ - no third-party analytics tracking emphasis in some legal copy
90
+ - account deletion path
91
+ - support/contact identity
92
+ - security positioning
93
+ - ownership/control messaging around Google Drive files
94
+
95
+ ## Content and SEO Context
96
+
97
+ ### Built-In Public Content Surfaces
98
+
99
+ - Home page
100
+ - Features page
101
+ - About page
102
+ - Docs page
103
+ - Examples page
104
+ - Feed page
105
+ - Sitemap page
106
+ - Contact page
107
+
108
+ ### Social/Portfolio Context Already Added
109
+
110
+ - Project profile exists under `docs/project-profiles/`
111
+ - this knowledge base should support future content generation with technical accuracy
112
+
113
+ ### Best Content Angles
114
+
115
+ - open-source Capacitor infrastructure
116
+ - OTA update engineering
117
+ - secure mobile release workflows
118
+ - dashboard and release-ops UX
119
+ - no-cost backend architecture with Firestore + Google Drive
120
+ - cross-platform engineering across TypeScript, Swift, Kotlin, and React
121
+ - AI-ready docs and developer enablement
122
+
123
+ ## Planning and Decision-Making Rules For AI
124
+
125
+ - Do not invent user counts, stars, revenue, or adoption metrics.
126
+ - Prefer current source code and route definitions over older historical reports.
127
+ - Treat roadmap items as future-facing unless code confirms they are already shipped.
128
+ - When recommending changes for the website, consider sitemap/feed/legal page maintenance.
129
+ - When recommending backend changes for the website, preserve the no-cost Firestore + Google Drive path unless a stronger requirement forces a different architecture.
130
+
131
+ ## Known Constraints and Notes
132
+
133
+ - The repo contains both current and historical status documents.
134
+ - Some legacy docs describe earlier incomplete states.
135
+ - Route guards reference `/verify-email`, but that route is not visible in the current router file; this is a project-context note worth re-checking before auth-related changes.
136
+ - The dashboard is optimized for authenticated operators, not end users.
137
+ - Admin access is currently determined through Firestore `isAdmin` state.
138
+
139
+ ## AI Usage Recommendations By Category
140
+
141
+ ### For Development
142
+
143
+ - Use this knowledge base first
144
+ - then inspect source modules and exact docs files tied to the feature
145
+
146
+ ### For Testing
147
+
148
+ - map the feature to its page/module/native component
149
+ - use testing docs plus test files to derive coverage strategy
150
+
151
+ ### For Legal or Policy Work
152
+
153
+ - review legal pages and security/privacy docs together
154
+ - do not rely only on marketing copy
155
+
156
+ ### For Marketing or Social Content
157
+
158
+ - use product profile + this knowledge base + current website messaging
159
+ - avoid unsupported performance or adoption claims
160
+
161
+ ### For Planning
162
+
163
+ - check roadmap, remaining-features docs, plans, and code reality together
164
+
165
+ ## Maintenance Rule For This Knowledge Base
166
+
167
+ - Update this folder every 2 weeks while the project is active
168
+ - Update sooner when routes, forms, data models, docs, modules, legal pages, or backend assumptions change
169
+ - Keep `Reference Date` and `Last Updated` current in each file
170
+ - Keep this folder aligned with actual repo state, not just historical docs