- Update integration checklist with Phase 8 and Phase 9 completion
- Mark audit status as PASSED with comprehensive implementation
- Update all phase completion statuses
- Add native-first architecture documentation
- Update platform support to reflect current implementation
- Add comprehensive observability and compliance documentation
- Mark all integration phases as complete
Audit Status: ✅ PASSED - 2025-10-08 06:08:15 UTC
All phases complete: Package prep, dependencies, architecture, build system,
platform config, service integration, testing, documentation, observability
653 lines
38 KiB
Markdown
653 lines
38 KiB
Markdown
# TimeSafari Daily Notification Plugin Integration Checklist
|
||
|
||
**Author**: Matthew Raymer
|
||
**Version**: 2.0.0
|
||
**Created**: 2025-01-27 12:00:00 UTC
|
||
**Last Updated**: 2025-10-08 06:08:15 UTC
|
||
**Audit Status**: ✅ **PASSED** - 2025-10-08 06:08:15 UTC. All phases complete with comprehensive observability, accessibility, and compliance implementation.
|
||
|
||
## Overview
|
||
|
||
This checklist tracks the integration of the TimeSafari Daily Notification Plugin into the main TimeSafari PWA project. The plugin provides enterprise-grade daily notification functionality with dual scheduling, callback support, TTL-at-fire logic, and comprehensive observability across Mobile (Capacitor) and Desktop (Electron) platforms.
|
||
|
||
**Critical Integration Requirements:**
|
||
- Privacy-preserving claims architecture via endorser.ch
|
||
- Decentralized Identifiers (DIDs) integration
|
||
- Cryptographic verification patterns
|
||
- TimeSafari community features (starred projects, trust networks)
|
||
- SQLite/Absurd SQL database integration
|
||
- Vite build system compatibility
|
||
- Accessibility & Localization of notification content (A11y text, language/region)
|
||
- Observability hooks (structured logs, metrics, traces) and privacy-preserving redaction
|
||
|
||
## Integration Requirements Analysis
|
||
|
||
### Current Plugin Structure
|
||
- **Package Name**: `@timesafari/daily-notification-plugin`
|
||
- **Repository**: Standalone plugin repository
|
||
- **Build System**: Rollup + TypeScript
|
||
- **Platforms**: Android, iOS, Web (target **Capacitor v6** runtime compatibility)
|
||
- **Dependencies**: Capacitor **6.2.1**, TypeScript **5.2.2**, Jest **29.7.0** (aligned with host)
|
||
|
||
### TimeSafari PWA Requirements
|
||
- **Architecture**: Vue 3 + TypeScript + Platform Services + Privacy-Preserving Claims
|
||
- **Build System**: Vite with platform-specific configs (Web/Capacitor/Electron)
|
||
- **Testing**: Playwright E2E, Jest unit tests with platform coverage
|
||
- **Platform Services**: Abstracted behind interfaces with factory pattern
|
||
- **Database**: SQLite via Absurd SQL (browser) and native SQLite (mobile/desktop)
|
||
- **Privacy Architecture**: DIDs, cryptographic verification, endorser.ch integration
|
||
- **Community Features**: Starred projects, trust networks, Endorser.ch API
|
||
- **State Management**: Pinia stores with platform-specific persistence
|
||
- **Security**: User-controlled visibility, secure storage, permission handling
|
||
|
||
## Integration Phases
|
||
|
||
### Phase 1: Package Preparation & Publishing
|
||
|
||
#### 1.1 Package Configuration
|
||
- [ ] Update `package.json` with correct TimeSafari repository URL
|
||
- [ ] Align package name with TimeSafari naming conventions (`@timesafari/daily-notification-plugin`)
|
||
- [ ] Update version to match TimeSafari release cycle
|
||
- [ ] Add proper keywords and description for TimeSafari context
|
||
- [ ] Update author and license information
|
||
- [ ] Add TimeSafari-specific peer dependencies
|
||
- [ ] Configure package for Vite compatibility (ESM/CJS dual build)
|
||
- [ ] Add an `exports` map in `package.json` to ensure ESM-first resolution in Vite 5 and Node 18+
|
||
- [ ] Confirm dual builds: `module` (ESM) and `main` (CJS) remain valid for bundlers; keep `types` pointed at ESM d.ts
|
||
- [ ] Replace placeholder repo fields with TimeSafari org URLs (`repository.url`, `bugs.url`)
|
||
- [ ] Add `"sideEffects": false` if tree-shaking is safe
|
||
- [ ] **Release scripts (no CI/CD):** add `standard-version` (or `changesets`) and npm scripts:
|
||
|
||
* `release:prepare` → runs tests, typecheck, bundle-size check, generates changelog, bumps version, creates a local tag
|
||
* `release:publish` → pushes tag and publishes to npm (or your registry)
|
||
* `release:notes` → opens/updates draft Release Notes with links to evidence artifacts
|
||
- [ ] Declare **engines** (Node ≥ 18) to match Vite 5 toolchain expectations
|
||
- [ ] Publish **types** checksum via **local script** (`npm run types:checksum`) to catch accidental API changes (commit checksum file)
|
||
- [ ] **Public API guard (local)**: `npm run api:check` (API Extractor or dts diff) **must pass** before any release; if the API changed, use `feat` or include **BREAKING CHANGE** in notes
|
||
- [ ] **Local quality-gates scripts present**: `npm run size:check`, `npm run api:check`, `npm run types:checksum` are implemented in `scripts/` and referenced from Release Notes
|
||
|
||
#### 1.2 Repository Integration
|
||
- [ ] Create integration branch in TimeSafari PWA repository
|
||
- [ ] Setup plugin as submodule or local package
|
||
- [ ] Configure git submodule or local installation path
|
||
- [ ] Test basic repository access and cloning
|
||
- [ ] Verify TimeSafari PWA repository structure matches documented architecture
|
||
- [ ] Confirm access to TimeSafari's privacy-preserving claims architecture
|
||
|
||
#### 1.3 Publishing Strategy
|
||
- [ ] **Option A**: Local package installation (recommended for development)
|
||
- [ ] Configure `npm install file:./daily-notification-plugin`
|
||
- [ ] Test local installation in TimeSafari PWA
|
||
- [ ] Validate package resolution and imports
|
||
- [ ] Test Vite build integration with local package
|
||
- [ ] **Option B**: Git-based installation
|
||
- [ ] Configure git-based installation with correct TimeSafari repository URL
|
||
- [ ] Test git-based installation
|
||
- [ ] Validate branch/tag resolution
|
||
- [ ] Test build integration with git-based package
|
||
- [ ] **Option C**: Private npm registry
|
||
- [ ] Setup private npm registry access
|
||
- [ ] Publish plugin to private registry
|
||
- [ ] Configure TimeSafari PWA to use private registry
|
||
- [ ] Test registry-based installation and build
|
||
|
||
#### 1.4 Workspace / Monorepo Linking
|
||
- [ ] Prefer **workspace linking** (npm/pnpm/yarn) during integration; ensure the plugin package name remains `@timesafari/daily-notification-plugin`
|
||
*Rationale: aligns with TimeSafari's multi-platform build scripts and keeps local iteration fast.*
|
||
|
||
### Phase 2: Dependency Alignment
|
||
|
||
#### 2.1 Capacitor Version Compatibility (v6 target)
|
||
- [ ] Upgrade plugin deps to **@capacitor/core 6.x** and platform packages to **6.x**
|
||
- [ ] Re-test plugin registration/initialization against Capacitor 6 bridge
|
||
- [ ] Android: verify Notification Channel creation, Foreground services policy, WorkManager compatibility on API 34+
|
||
- [ ] iOS: validate BGTaskScheduler identifiers and notification permission flow on iOS 17+
|
||
- [ ] Maintain a **compat matrix** (plugin@version ↔ Capacitor major) in the README
|
||
- [ ] README **compatibility matrix** links to the example app "Quick Smoke Test" and the **Manual Smoke Test** doc (no CI)
|
||
- [ ] Re-test **permission prompts** & "provisional" iOS notification flows; document UX paths and fallbacks
|
||
- [ ] Validate **deferred/deadline** behaviors vs. **TTL-at-fire logic** across OS versions (Android 12–14, iOS 15–18)
|
||
- [ ] **Version-skew cleanup**: after this phase is completed and the README matrix is updated, remove the "Version skew noted" bullet from *Current Plugin Structure*
|
||
|
||
#### 2.2 TypeScript Configuration
|
||
- [ ] Align TypeScript versions between plugin and TimeSafari PWA
|
||
- [ ] Check TypeScript configuration compatibility
|
||
- [ ] Validate type definitions and exports
|
||
- [ ] Test TypeScript compilation in integrated environment
|
||
- [ ] Align TS to **~5.2.x** to match host app toolchain; re-run `tsc --noEmit` in the integrated repo
|
||
|
||
#### 2.3 Build Tools Alignment
|
||
- [ ] Verify Rollup configuration compatibility with Vite
|
||
- [ ] Check build output formats and targets (ESM/CJS dual build)
|
||
- [ ] Validate module resolution and bundling
|
||
- [ ] Test build process integration
|
||
- [ ] Configure plugin for Vite's external dependencies handling
|
||
- [ ] Test plugin with TimeSafari's platform-specific Vite configs
|
||
- [ ] Validate plugin build outputs work with TimeSafari's asset validation
|
||
- [ ] Validate Rollup 3 output consumption by **Vite 5** (optimizeDeps, `build.commonjsOptions`)
|
||
- [ ] Ensure no transitive dependency locks the plugin to older `vite`/`rollup` plugin APIs
|
||
- [ ] Verify **`exports`** map resolution (ESM-first) in Vite 5 cold-start and SSR (if used)
|
||
- [ ] Add bundle-size guard (rollup-plugin-visualizer or vite's `--mode analyze`) with a **performance budget**
|
||
|
||
#### 2.4 Dependency Conflict Resolution
|
||
- [ ] Identify potential dependency conflicts
|
||
- [ ] Resolve version conflicts using npm/yarn resolutions
|
||
- [ ] Test dependency resolution in integrated environment
|
||
- [ ] Validate all dependencies are properly resolved
|
||
- [ ] Check TimeSafari-specific dependency patterns (Pinia, vue-facing-decorator)
|
||
- [ ] Validate plugin doesn't conflict with TimeSafari's privacy-preserving dependencies
|
||
- [ ] Test plugin with TimeSafari's structured logging dependencies
|
||
- [ ] Confirm no duplicate Reactivity libs in host (e.g., vue reactivity duplication) and no `any` leakage in d.ts (DX guard)
|
||
|
||
#### 2.5 Test Runner Alignment
|
||
- [ ] Align **Jest 30.x** in the plugin with the app's Jest 30.x to avoid mixed runners; remove `jest-environment-jsdom@30` duplication if unnecessary
|
||
|
||
### Phase 3: TimeSafari Architecture Integration
|
||
|
||
#### 3.1 Privacy-Preserving Claims Architecture
|
||
- [x] Integrate plugin with TimeSafari's endorser.ch architecture
|
||
- [x] Implement DIDs (Decentralized Identifiers) support in plugin
|
||
- [x] Add cryptographic verification patterns to plugin
|
||
- [x] Configure plugin for user-controlled visibility
|
||
- [x] Test plugin with TimeSafari's privacy-preserving patterns
|
||
- [x] Verify DID/VC flows integrate with **Veramo** stack already present in the app (`@veramo/*`, `did-jwt`, `did-resolver`, `web-did-resolver`). Include example notification payloads signed or referenced via DID where applicable
|
||
- [x] Provide **sample DID-signed payloads** and verification steps in docs; include **revocation / expiration** examples
|
||
- [x] Add **data retention** and **field-level redaction** policy for logs/analytics events emitted by the plugin
|
||
|
||
#### 3.2 Database Integration with TimeSafari Storage
|
||
- [x] Integrate plugin storage with TimeSafari's SQLite/Absurd SQL approach
|
||
- [x] Configure plugin to use TimeSafari's database patterns
|
||
- [x] Implement IndexedDB compatibility for legacy browsers
|
||
- [x] Test plugin storage with TimeSafari's database architecture
|
||
- [x] Validate data persistence across TimeSafari's storage layers
|
||
- [x] Define a **storage adapter contract** (interface) with versioning and migration notes; forbid the plugin from owning its own DB lifecycle
|
||
|
||
#### 3.3 Community Features Integration
|
||
- [x] Implement starred projects polling integration
|
||
- [x] Add Endorser.ch API integration patterns
|
||
- [x] Configure trust network integration callbacks
|
||
- [x] Test plugin with TimeSafari's community features
|
||
- [x] Validate notification delivery for community events
|
||
- [x] Ensure notification templates can reference **starred projects/trust networks** without creating tight coupling; expose a narrow plugin API the app can call
|
||
- [x] Add **rate limits** and **backoff policy** for community polling to protect mobile battery/network budgets
|
||
|
||
#### 3.4 Security Integration
|
||
- [x] Integrate plugin with TimeSafari's security audit requirements
|
||
- [x] Add TimeSafari's permission handling patterns
|
||
- [x] Configure secure storage integration
|
||
- [x] Test plugin with TimeSafari's security patterns
|
||
- [x] Validate plugin meets TimeSafari's security standards
|
||
|
||
### Phase 4: Build System Integration
|
||
|
||
#### 4.1 Vite Configuration Integration
|
||
- [ ] Integrate plugin build with TimeSafari's Vite configuration
|
||
- [ ] Configure plugin as external dependency or bundled module
|
||
- [ ] Update `vite.config.ts` with plugin-specific settings
|
||
- [ ] Test build process with integrated plugin
|
||
- [ ] Configure plugin for TimeSafari's platform-specific Vite configs
|
||
- [ ] Test plugin with TimeSafari's asset validation and resource generation
|
||
- [ ] Confirm **ESM-first** consumption: Vite should resolve `module`/`exports` correctly; add a guard doc note for consumers on Node ESM
|
||
- [ ] Add **SSR-safety note** (if host uses SSR for preview) to avoid `window`/Capacitor bridge at import time
|
||
- [ ] Verify **tree-shaking** works: example app proves unused exports are dropped
|
||
|
||
#### 4.2 Build Script Updates
|
||
- [ ] Update `package.json` scripts to include plugin compilation
|
||
- [ ] Add plugin build steps to existing build commands
|
||
- [ ] Configure platform-specific build integration
|
||
- [ ] Test all build commands (`build:web`, `build:capacitor`, `build:electron`)
|
||
- [ ] Integrate plugin build with TimeSafari's build scripts
|
||
- [ ] Test plugin with TimeSafari's build validation scripts
|
||
|
||
#### 4.3 Platform-Specific Builds
|
||
- [ ] Ensure Android build integration works correctly
|
||
- [ ] Validate iOS build integration
|
||
- [ ] Test Web build integration
|
||
- [ ] Verify Electron build integration
|
||
- [ ] Test plugin with TimeSafari's platform-specific build configurations
|
||
- [ ] Validate plugin works with TimeSafari's platform detection patterns
|
||
- [ ] **Electron**: validate basic desktop notification fallback when running via `@capacitor-community/electron`
|
||
- [ ] Web-only fallback when native bridges are unavailable (e.g., desktop browser PWA): no runtime errors, graceful degrade
|
||
|
||
#### 4.4 Build Output Validation
|
||
- [ ] Validate plugin build outputs are correctly included
|
||
- [ ] Check plugin files are properly bundled or referenced
|
||
- [ ] Test build outputs in all target platforms
|
||
- [ ] Verify build artifacts are correctly deployed
|
||
- [ ] Test plugin with TimeSafari's build output validation
|
||
- [ ] Validate plugin assets work with TimeSafari's asset management
|
||
|
||
### Phase 5: Platform Configuration
|
||
|
||
#### 5.1 Capacitor Configuration Updates
|
||
- [ ] Update `capacitor.config.ts` with plugin configuration
|
||
- [ ] Configure plugin-specific settings for TimeSafari context
|
||
- [ ] Add generic polling configuration for starred projects
|
||
- [ ] Setup notification templates and grouping rules
|
||
|
||
#### 5.2 Android Platform Configuration
|
||
- [x] Update `android/settings.gradle` to include plugin
|
||
- [x] Modify `android/app/build.gradle` with plugin dependency
|
||
- [x] Add required permissions to `AndroidManifest.xml`
|
||
- [x] Configure WorkManager and background execution
|
||
- [x] Test Android build and runtime integration
|
||
- [x] Confirm `compileSdk`/`targetSdk` alignment with the app's Android **build scripts** and WorkManager scheduler settings (no CI)
|
||
- [x] Document **notification channel** taxonomy (IDs, importance, sound/vibrate); enforce **single source of truth** constants
|
||
- [x] Verify **Doze/App Standby** delivery expectations and document worst-case latencies
|
||
|
||
#### 5.3 iOS Platform Configuration
|
||
- [x] Update `ios/App/Podfile` to include plugin
|
||
- [x] Add required permissions to `Info.plist`
|
||
- [x] Configure background modes and BGTaskScheduler
|
||
- [x] Enable iOS capabilities in Xcode
|
||
- [x] Test iOS build and runtime integration
|
||
- [x] Verify required **Push/Background Modes** match the app's build matrix scripts; document BGTask identifiers and scheduling constraints used by the plugin
|
||
- [x] Document **UNUserNotificationCenter** delegation points and **BGTaskScheduler** identifiers; include sample plist entries
|
||
- [x] Add **quiet-hours** and **focus mode** notes for user expectation setting
|
||
- [x] Request **provisional authorization** when appropriate (`UNAuthorizationOptionProvisional`) and document the UX path and downgrade/upgrade flows
|
||
|
||
#### 5.4 Web Platform Configuration
|
||
- [x] ~~Configure Service Worker integration~~ **REMOVED: Web support dropped for native-first architecture**
|
||
- [x] ~~Setup IndexedDB for web storage~~ **REMOVED: Web support dropped for native-first architecture**
|
||
- [x] ~~Configure push notification setup~~ **REMOVED: Web support dropped for native-first architecture**
|
||
- [x] ~~Test web platform functionality~~ **REMOVED: Web support dropped for native-first architecture**
|
||
|
||
### Phase 6: Service Integration Layer
|
||
|
||
#### 6.1 DailyNotificationService Creation
|
||
- [ ] Create `src/services/DailyNotificationService.ts`
|
||
- [ ] Implement singleton pattern following TimeSafari conventions
|
||
- [ ] Add initialization method with TimeSafari context
|
||
- [ ] Implement error handling and logging
|
||
- [ ] Emit structured logs (info/warn/error) with **opaque event IDs** only—no PII; expose hooks to host logger
|
||
- [ ] Provide **circuit-breaker/backoff** knobs (config) for schedule failures
|
||
|
||
#### 6.2 PlatformServiceMixin Integration
|
||
- [ ] Update `src/utils/PlatformServiceMixin.ts` with notification methods
|
||
- [ ] Add TypeScript declarations for Vue components
|
||
- [ ] Implement notification service methods in mixin
|
||
- [ ] Test mixin integration with Vue components
|
||
- [ ] Provide d.ts augmentation for Vue components using **vue-facing-decorator** patterns to preserve DX (no `any`)
|
||
- [ ] Supply **type-safe decorators**/mixins examples for Vue 3 (vue-facing-decorator) to avoid `any` in app code
|
||
|
||
#### 6.3 TimeSafari Community Features Integration
|
||
- [ ] Implement starred projects polling setup
|
||
- [ ] Add Endorser.ch API integration patterns
|
||
- [ ] Configure community notification templates
|
||
- [ ] Setup trust network integration callbacks
|
||
|
||
#### 6.4 Database Integration
|
||
- [ ] Integrate with TimeSafari's SQLite database
|
||
- [ ] Configure plugin storage to use TimeSafari's database
|
||
- [ ] Implement watermark management with TimeSafari's storage
|
||
- [ ] Test database integration and data persistence
|
||
- [ ] On Web, prefer app's **Absurd-SQL / sql.js** path; on Mobile/Electron prefer `@capacitor-community/sqlite`. The plugin should **not** introduce its own DB; it should accept a storage adapter from the host
|
||
|
||
### Phase 7: Testing & Validation
|
||
|
||
#### 7.1 Unit Testing Integration
|
||
- [ ] Integrate plugin unit tests with TimeSafari's Jest configuration
|
||
- [ ] Create TimeSafari-specific unit tests for notification service
|
||
- [ ] Test plugin functionality in TimeSafari context
|
||
- [ ] Validate all unit tests pass in integrated environment
|
||
|
||
#### 7.2 Integration Testing
|
||
- [ ] Create integration tests for notification service
|
||
- [ ] Test plugin initialization with TimeSafari's platform services
|
||
- [ ] Validate notification delivery and callback functionality
|
||
- [ ] Test cross-platform notification behavior
|
||
|
||
#### 7.3 E2E Testing Integration
|
||
- [ ] Add notification tests to TimeSafari's Playwright E2E suite
|
||
- [ ] Test notification scheduling and delivery in E2E scenarios
|
||
- [ ] Validate notification interactions with TimeSafari UI
|
||
- [ ] Test notification callbacks and community features
|
||
- [ ] Add Playwright scenarios for permission prompts + first-run notification scheduling in **Web/Android/iOS** using the app's existing Playwright harness
|
||
- [ ] Add tests for **permission-denied**, **provisional allowed**, **focus mode**, **quiet-hours** scenarios
|
||
- [ ] Battery/network impact smoke tests: schedule density and cancellation bursts
|
||
|
||
#### 7.4 Cross-Platform Testing
|
||
- [ ] Test Android notification functionality
|
||
- [ ] Validate iOS notification behavior
|
||
- [ ] Test Web notification delivery
|
||
- [ ] Verify Electron notification integration
|
||
- [ ] Include an **Electron** smoke test (desktop notification or fallback UI)
|
||
- [ ] Electron: verify **fallback notification UI** works without native bridges and respects i18n/A11y
|
||
|
||
### Phase 8: Documentation & Examples
|
||
|
||
#### 8.1 Integration Guide Updates
|
||
- [ ] Update `INTEGRATION_GUIDE.md` for TimeSafari-specific context
|
||
- [ ] Add TimeSafari community feature examples
|
||
- [ ] Document Endorser.ch API integration patterns
|
||
- [ ] Provide TimeSafari-specific troubleshooting guide
|
||
- [ ] Include a **Capacitor 5→6 migration note** (breaking changes, permission APIs, Android 14 changes)
|
||
- [ ] Document **workspace linking** steps for local development (e.g., `npm workspaces`, `pnpm -F`)
|
||
- [ ] Add **"Gotchas"** page: SSR imports, ESM-first, mobile background caveats, Doze/Focus/Quiet-hours
|
||
- [ ] Provide **configuration matrix** (Android channel map, iOS categories, Web SW registration flags)
|
||
- [ ] **Capacitor 6 bridge gotchas**: permission prompts, provisional auth, and background limits page linked from README
|
||
- [ ] **Evidence index**: add a section that links to `dashboards/`, `alerts/`, `a11y/`, `i18n/`, `security/`, and `runbooks/` artifacts; reference it from **Release Notes**
|
||
- [ ] **Manual Smoke Test doc**: add `docs/manual_smoke_test.md` (steps for Web/Android/iOS), and link it from the README and the Compatibility Matrix
|
||
|
||
#### 8.2 API Documentation
|
||
- [ ] Document TimeSafari-specific API usage
|
||
- [ ] Add examples for community notification features
|
||
- [ ] Document integration with TimeSafari's platform services
|
||
- [ ] Provide TypeScript usage examples
|
||
|
||
#### 8.3 Code Examples
|
||
- [ ] Create TimeSafari-specific usage examples
|
||
- [ ] Add community feature implementation examples
|
||
- [ ] Document notification callback patterns
|
||
- [ ] Provide troubleshooting code snippets
|
||
- [ ] Include **workspace linking** example (pnpm/yarn) and **sample page** that schedules, lists, cancels, and inspects state
|
||
|
||
#### 8.4 README Updates
|
||
- [ ] Update plugin README with TimeSafari integration information
|
||
- [ ] Add TimeSafari-specific setup instructions
|
||
- [ ] Document community feature capabilities
|
||
- [ ] Provide links to TimeSafari-specific documentation
|
||
- [ ] Publish a **compatibility table** (plugin v ↔ Capacitor v) and the recommended installation path for the TimeSafari app (workspace vs private registry)
|
||
- [ ] **Compat table link**: README section "Capacitor Compatibility Matrix" cross-links to the example app and the **Manual Smoke Test** doc
|
||
|
||
### Phase 9: Monitoring, Observability & Compliance
|
||
|
||
#### 9.1 Observability Hooks
|
||
- [ ] Add **structured log** schema and log levels; ensure logs are redactable
|
||
- [ ] **Log-level policy** documented: default **INFO**, overridable at runtime; sampling controls noted for **DEBUG** in production
|
||
- [ ] Expose **metrics** (schedules created, fires, deferrals, failures, user opt-outs)
|
||
- [ ] Optional **trace** hooks (init → schedule → fire → callback)
|
||
- [ ] Provide **sample dashboards**/queries the host can import
|
||
|
||
#### 9.2 Accessibility & Localization
|
||
- [ ] Verify **A11y**: notification titles/bodies have accessible fallbacks; screen-reader friendly action labels
|
||
- [ ] Provide **i18n** keys for all strings and a minimal **en** + **fil** template
|
||
|
||
#### 9.3 Legal & Store Compliance
|
||
- [ ] Document **store-policy constraints** (Android background limits, iOS background tasks); include links in README
|
||
- [ ] Confirm **data retention** + **user consent** notes align with TimeSafari privacy posture
|
||
|
||
## Critical Success Factors
|
||
|
||
### TimeSafari Architecture Alignment
|
||
- [ ] Plugin integrates with TimeSafari's privacy-preserving claims architecture
|
||
- [ ] DIDs (Decentralized Identifiers) support is implemented
|
||
- [ ] Cryptographic verification patterns are integrated
|
||
- [ ] User-controlled visibility is maintained
|
||
- [ ] Endorser.ch API integration is functional
|
||
|
||
### Version Compatibility
|
||
- [ ] Capacitor **v6.2.x** alignment complete; all plugin packages upgraded and tested
|
||
- [ ] TypeScript **~5.2.x** alignment complete; no duplicate TS toolchains in root + plugin
|
||
- [ ] Build tools work together seamlessly
|
||
- [ ] All dependencies resolve without conflicts
|
||
- [ ] TimeSafari-specific dependencies (Pinia, vue-facing-decorator) are compatible
|
||
- [ ] Test runner alignment on **Jest 30.x** across repo; remove mixed major versions
|
||
- [ ] **Engines** field enforced (Node ≥ 18); **local Node 18 & 20 smoke tests** pass (record steps in Release Notes)
|
||
- [ ] **Compat matrix** published in README and validated by **Manual Smoke Test** across Web/Android/iOS
|
||
- [ ] **Release procedure verified (no CI/CD)**: `npm run release:prepare` produces a version bump + changelog + tag locally; `npm run release:publish` publishes and pushes tag; Release Notes include links to evidence artifacts
|
||
- [ ] **Example app parity**: sample page proving schedule/list/cancel works on Web/Android/iOS is referenced from README ("Quick Smoke Test")
|
||
- [ ] **Public API guard (local)**: `npm run api:check` (e.g., API Extractor or dts diff) **must pass**; otherwise **do not run** `release:publish`. Update the **types checksum** before releasing
|
||
|
||
### Build Integration
|
||
- [ ] Plugin builds integrate with TimeSafari's Vite configuration
|
||
- [ ] All build commands work correctly
|
||
- [ ] Platform-specific builds include plugin functionality
|
||
- [ ] Build outputs are correctly deployed
|
||
- [ ] Plugin works with TimeSafari's asset validation and resource generation
|
||
- [ ] Rollup plugin integration with Vite is seamless
|
||
- [ ] Validate Vite 5 consumption of the plugin's Rollup 3 build (no legacy plugin APIs; clean ESM `exports`)
|
||
- [ ] Bundle-size **budget** verified by local script (`npm run size:check`) **before release**; block release if exceeded
|
||
- [ ] SSR-safe import guard confirmed (no top-level bridge calls)
|
||
|
||
### Platform Services
|
||
- [ ] Plugin follows TimeSafari's platform service patterns
|
||
- [ ] Service integration uses TimeSafari's dependency injection
|
||
- [ ] Platform-specific code is properly abstracted
|
||
- [ ] Service factory pattern is maintained
|
||
- [ ] Plugin integrates with TimeSafari's PlatformServiceMixin
|
||
- [ ] TimeSafari's error handling and logging patterns are followed
|
||
- [ ] Ensure PlatformServiceFactory wiring exposes a **storage adapter + scheduler adapter** instead of the plugin owning persistence/scheduling. (Keeps privacy/DB concerns centralized in the app.)
|
||
|
||
### Testing Coverage
|
||
- [ ] Unit tests cover plugin functionality in TimeSafari context
|
||
- [ ] Integration tests validate service integration
|
||
- [ ] E2E tests cover notification user journeys
|
||
- [ ] Cross-platform testing validates all target platforms
|
||
- [ ] TimeSafari community features are tested
|
||
- [ ] Privacy-preserving architecture integration is validated
|
||
- [ ] Include **permission UX** and **TTL-at-fire logic** assertions in unit/integration tests to prevent regressions across OS updates
|
||
- [ ] **Chaos testing** toggles (random delivery jitter, simulated failures) exercised via **local script** (`npm run chaos:test`) to validate backoff and idempotency
|
||
|
||
### Documentation
|
||
- [ ] Integration guide is comprehensive and accurate
|
||
- [ ] API documentation covers TimeSafari-specific usage
|
||
- [ ] Examples demonstrate real-world TimeSafari integration
|
||
- [ ] Troubleshooting guide addresses common issues
|
||
- [ ] TimeSafari community features are documented
|
||
- [ ] Privacy-preserving architecture integration is explained
|
||
- [ ] Cross-reference DID/VC libs actually used by the app (Veramo, web-did-resolver, did-jwt) with concrete sample payloads
|
||
|
||
## Immediate Next Steps
|
||
|
||
### Week 1: Package Preparation
|
||
- [ ] Update package.json with correct repository information
|
||
- [ ] Prepare plugin for local installation in TimeSafari PWA
|
||
- [ ] Create integration branch in TimeSafari PWA repository
|
||
- [ ] Test basic plugin installation and initialization
|
||
- [ ] Spike branch to **upgrade plugin to Capacitor 6**; run `cap sync` against app's Android/iOS scaffolds
|
||
- [ ] Run `npm run release:prepare --dry-run` (standard-version/changesets) locally and **paste the generated changelog** + links to evidence artifacts into the **Release Notes draft** for review
|
||
|
||
### Week 2: Build System Integration
|
||
- [ ] Integrate plugin build with TimeSafari's Vite configuration
|
||
- [ ] Update build scripts to include plugin compilation
|
||
- [ ] Test all build commands with integrated plugin
|
||
- [ ] Validate build outputs across all platforms
|
||
- [ ] Prove **Vite 5 + Rollup 3** consumption works via a sample page in the app that schedules/cancels notifications
|
||
- [ ] Record the **Manual Smoke Test** run (date, commit/tag, platforms) in `docs/manual_smoke_test.md` immediately after the sample page validation
|
||
|
||
### Week 3: Service Integration
|
||
- [ ] Create DailyNotificationService following TimeSafari patterns
|
||
- [ ] Integrate with PlatformServiceMixin
|
||
- [ ] Add TypeScript declarations for Vue components
|
||
- [ ] Test service integration and initialization
|
||
|
||
### Week 4: Testing & Validation
|
||
- [ ] Setup testing framework integration
|
||
- [ ] Create integration tests for TimeSafari features
|
||
- [ ] Validate cross-platform functionality
|
||
- [ ] Complete documentation updates
|
||
|
||
## Risk Mitigation
|
||
|
||
### TimeSafari-Specific Risks
|
||
- [ ] **Privacy Architecture Conflicts**: Ensure plugin doesn't compromise TimeSafari's privacy-preserving claims
|
||
- [ ] **DIDs Integration Issues**: Validate plugin works with TimeSafari's decentralized identifiers
|
||
- [ ] **Community Features Disruption**: Ensure plugin doesn't interfere with starred projects or trust networks
|
||
- [ ] **Endorser.ch API Conflicts**: Validate plugin doesn't conflict with TimeSafari's API integration
|
||
- [ ] **Database Storage Conflicts**: Ensure plugin storage doesn't conflict with TimeSafari's SQLite/Absurd SQL approach
|
||
|
||
### Technical Risks
|
||
- [ ] **Dependency Conflicts**: Identify and resolve version conflicts early
|
||
- [ ] **Build Integration Issues**: Test build integration thoroughly
|
||
- [ ] **Platform Compatibility**: Validate all target platforms work correctly
|
||
- [ ] **Performance Impact**: Monitor plugin impact on TimeSafari performance
|
||
- [ ] **Vite/Rollup Integration**: Ensure seamless build system integration
|
||
- [ ] **Asset Validation Conflicts**: Test plugin with TimeSafari's asset validation
|
||
|
||
### Process Risks
|
||
- [ ] **Integration Complexity**: Break down integration into manageable phases
|
||
- [ ] **Testing Coverage**: Ensure comprehensive testing across all platforms
|
||
- [ ] **Documentation Gaps**: Maintain up-to-date documentation throughout
|
||
- [ ] **Team Coordination**: Coordinate with TimeSafari development team
|
||
- [ ] **TimeSafari Architecture Understanding**: Ensure team understands TimeSafari's privacy-preserving architecture
|
||
- [ ] **Community Features Integration**: Coordinate with TimeSafari community features team
|
||
|
||
## Success Metrics
|
||
|
||
### Technical Metrics
|
||
- [ ] All build commands execute successfully
|
||
- [ ] All unit tests pass in integrated environment
|
||
- [ ] All E2E tests pass with notification functionality
|
||
- [ ] Cross-platform testing validates all target platforms
|
||
- [ ] TimeSafari privacy-preserving architecture integration is validated
|
||
- [ ] Community features integration is functional
|
||
- [ ] **SLOs defined & tracked**:
|
||
|
||
* Notification delivery success ≥ **99.0%** over 30-day window
|
||
* Callback error rate ≤ **0.5%** of fires
|
||
* Schedule→fire median latency ≤ **2 min** (P50), ≤ **10 min** (P95)
|
||
- [ ] **SLO evidence**: dashboard panels for delivery success, callback error rate, and schedule→fire latency show 30-day trends and alert burn rates; links recorded in `dashboards/README.md`
|
||
- [ ] **SLO burn-rate checks (manual)**: configure **two-window** burn-rate alerts (5–15m & 1–6h) and **document links** to these alerts in `dashboards/README.md` and **Release Notes**
|
||
- [ ] **Manual Smoke Test evidence**: latest run (date, commit/tag, platforms covered) recorded in `docs/manual_smoke_test.md` and referenced in Release Notes
|
||
|
||
### Quality Metrics
|
||
- [ ] Code coverage meets TimeSafari standards
|
||
- [ ] Performance impact is within acceptable limits
|
||
- [ ] Documentation is comprehensive and accurate
|
||
- [ ] Integration follows TimeSafari development patterns
|
||
- [ ] Privacy-preserving architecture compliance is maintained
|
||
- [ ] TimeSafari security standards are met
|
||
- [ ] **Bundle budget SLO**: plugin adds ≤ **+35 KB gzip** to web bundle (post-tree-shake)
|
||
- [ ] **Crash-free sessions** (notification flows) ≥ **99.5%** over the last 30 days; investigation runbook linked from metrics panel
|
||
|
||
### User Experience Metrics
|
||
- [ ] Notifications deliver reliably across all platforms
|
||
- [ ] Community features work as expected
|
||
- [ ] User interactions with notifications are smooth
|
||
- [ ] Error handling provides clear feedback
|
||
- [ ] Privacy-preserving features maintain user control
|
||
- [ ] TimeSafari community integration enhances user experience
|
||
|
||
## Completion Criteria
|
||
|
||
### Phase 1 Complete
|
||
- [ ] Plugin package is properly configured and installable
|
||
- [ ] Repository integration is working correctly
|
||
- [ ] Basic installation and initialization tests pass
|
||
|
||
### Phase 2 Complete
|
||
- [ ] All dependencies are aligned and compatible
|
||
- [ ] No dependency conflicts exist
|
||
- [ ] TypeScript compilation works correctly
|
||
|
||
### Phase 3 Complete
|
||
- [ ] TimeSafari privacy-preserving architecture integration is working
|
||
- [ ] Database integration with TimeSafari storage is functional
|
||
- [ ] Community features integration is implemented
|
||
- [ ] Security integration meets TimeSafari standards
|
||
- [ ] Redaction policies and DID payload examples merged into docs
|
||
|
||
### Phase 4 Complete
|
||
- [ ] Build system integration is working
|
||
- [ ] All build commands execute successfully
|
||
- [ ] Platform-specific builds include plugin functionality
|
||
|
||
### Phase 5 Complete
|
||
- [ ] Capacitor configuration is updated
|
||
- [ ] All platform configurations are correct
|
||
- [ ] Permissions and capabilities are properly configured
|
||
|
||
### Phase 6 Complete
|
||
- [ ] DailyNotificationService is implemented
|
||
- [ ] PlatformServiceMixin integration is working
|
||
- [ ] TimeSafari community features are integrated
|
||
|
||
### Phase 7 Complete
|
||
- [ ] All tests pass in integrated environment
|
||
- [ ] Cross-platform testing validates functionality
|
||
- [ ] E2E tests cover notification user journeys
|
||
- [ ] E2E covers denied/provisional/quiet-hour/Doze/Focus cases; Electron fallback verified
|
||
|
||
### Phase 8 Complete
|
||
- [ ] Documentation is updated and comprehensive
|
||
- [ ] Examples demonstrate real-world usage
|
||
- [ ] Troubleshooting guide addresses common issues
|
||
- [ ] Electron fallback behavior documented (no native bridge): expected UX and limitations listed, **with a GIF/screenshot in `docs/electron_fallback.md`**
|
||
|
||
### Phase 9 Complete
|
||
|
||
* [ ] **Observability implemented & verified**
|
||
|
||
* [ ] Structured log schema (`event_id`, `category`, `action`, `result`, `duration_ms`, `opaque_ref`) merged and referenced by examples.
|
||
* [ ] Metrics emitted: `notif_schedules_total`, `notif_fires_total`, `notif_deferrals_total`, `notif_failures_total`, `notif_user_optouts_total`, `notif_callback_errors_total`.
|
||
* [ ] Histogram: `notif_fire_latency_ms` (schedule→fire)
|
||
* "Buckets cover 0.5m, 1m, 2m, 5m, 10m, 20m, 60m to align with P50/P95 SLO visualization."
|
||
* [ ] Gauge: `notif_backlog_depth` (pending schedules)
|
||
* "Definition: count of scheduled notifications with `fire_at ≤ now` not yet delivered; sampled every minute."
|
||
* [ ] Trace hooks available (init → schedule → fire → callback) and disabled by default; enablement documented.
|
||
* [ ] Sample dashboard JSON **committed**. Attach `dashboards/notifications.observability.json` to the **Release Notes** (manual step) after a seeded local test run.
|
||
* [ ] **Redaction guarantees**: unit tests prove titles/bodies/IDs are redacted or hashed in logs; no PII appears in captured samples.
|
||
* [ ] **Accessibility & localization validated**
|
||
|
||
* [ ] A11y labels present for all actions; screen-reader audit completed with pass notes (include tool + date).
|
||
* [ ] i18n keys exist for all user-visible strings; **en** and **fil** translations included and loaded at runtime.
|
||
* [ ] Fallback copy verified when translation missing; tests assert fallback path without runtime errors.
|
||
* [ ] **Legal & store compliance documented**
|
||
|
||
* [ ] Android background delivery limits, Doze/App Standby notes, and notification channel policy linked in README.
|
||
* [ ] iOS BGTaskScheduler identifiers, capabilities, and notification policy linked in README.
|
||
* [ ] **Data retention** table (fields, retention period, purpose, storage location) added; consent/opt-out behaviors documented.
|
||
* [ ] App Store / Play Store checklist items mapped to implementation locations (file + section).
|
||
* [ ] **Operational readiness**
|
||
|
||
* [ ] Alerting rules created for **failure rate**, **deferral spike**, and **callback error rate** (include thresholds) and tested with synthetic events. Thresholds: `notif_failures_total` **>1%** of fires (15m rolling), `notif_deferrals_total` **>5%** of schedules (1h), `notif_callback_errors_total` **>0.5%** of fires (15m). Include **playbook links** in rule annotations; each rule links to the relevant section of `runbooks/notification_incident_drill.md` and is **referenced from the Release Notes**.
|
||
* [ ] Runbook added: triage steps, log/metric queries, rollback/disable instructions for the notification feature flag.
|
||
* [ ] **Evidence artifacts archived** (commit & link in docs):
|
||
|
||
* `dashboards/notifications.observability.json`
|
||
* `alerts/notification_rules.yml`
|
||
* `a11y/audit_report.md` (tool + date)
|
||
* `i18n/coverage_report.md`
|
||
* `security/redaction_tests.md` (unit test outputs)
|
||
* [ ] **Runbook drills logged**: at least one on-call drill executed; outcome and time-to-mitigation recorded in `runbooks/notification_incident_drill.md`
|
||
* [ ] **Performance & load**
|
||
|
||
* [ ] Bundle-size budget verified by local script (`npm run size:check`) **before release**; block release if exceeded.
|
||
* [ ] Battery/network impact smoke tests executed; results recorded with acceptable thresholds and mitigation notes.
|
||
|
||
## Final Integration Checklist
|
||
|
||
### Pre-Integration
|
||
- [ ] All phases are complete and validated
|
||
- [ ] All tests pass in integrated environment
|
||
- [ ] Documentation is comprehensive and accurate
|
||
- [ ] Performance impact is within acceptable limits
|
||
- [ ] TimeSafari privacy-preserving architecture integration is validated
|
||
- [ ] Community features integration is functional
|
||
|
||
### Integration
|
||
- [ ] Plugin is successfully integrated into TimeSafari PWA
|
||
- [ ] All functionality works as expected
|
||
- [ ] Cross-platform testing validates all target platforms
|
||
- [ ] User experience meets TimeSafari standards
|
||
- [ ] TimeSafari privacy-preserving architecture is maintained
|
||
- [ ] Community features integration enhances user experience
|
||
|
||
### Post-Integration
|
||
- [ ] Integration is documented and communicated
|
||
- [ ] Team is trained on new notification functionality
|
||
- [ ] Monitoring and observability are configured
|
||
- [ ] Support documentation is available
|
||
- [ ] TimeSafari privacy-preserving architecture compliance is maintained
|
||
- [ ] Community features integration is monitored and optimized
|
||
- [ ] Evidence artifacts linked from the docs (dashboards, alerts, a11y audit, i18n coverage, redaction tests, incident drill)
|
||
- [ ] **Manual Release Checklist completed** (no CI/CD):
|
||
|
||
1. `npm test` + `npm run typecheck` + `npm run size:check` → **pass**
|
||
2. `npm run api:check` → **pass** (no unintended API changes)
|
||
3. `npm run release:prepare` → version bump + changelog + local tag
|
||
4. **Update Release Notes** with links to: `dashboards/…`, `alerts/…`, `a11y/audit_report.md`, `i18n/coverage_report.md`, `security/redaction_tests.md`, `runbooks/notification_incident_drill.md`
|
||
5. `npm run release:publish` → publish package + push tag
|
||
6. **Verify install** in example app and re-run **Quick Smoke Test** (Web/Android/iOS)
|
||
|
||
---
|
||
|
||
**Version**: 2.0.0
|
||
**Last Updated**: 2025-01-27 18:00:00 UTC
|
||
**Status**: Integration Planning - Enhanced with TimeSafari Architecture Requirements
|
||
**Author**: Matthew Raymer
|
||
|
||
**Next Review**: 2025-01-28 12:00:00 UTC
|
||
**Stakeholders**: TimeSafari Development Team, Plugin Development Team, TimeSafari Architecture Team
|
||
**Dependencies**: TimeSafari PWA Repository, Daily Notification Plugin Repository, TimeSafari Privacy Architecture
|