You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			| 
				
					
						 | 
			1 month ago | |
|---|---|---|
| .cursor/rules | 2 months ago | |
| .github | 7 months ago | |
| android | 2 months ago | |
| doc | 1 month ago | |
| examples | 2 months ago | |
| gradle | 2 months ago | |
| ios | 2 months ago | |
| lib | 2 months ago | |
| scripts | 7 months ago | |
| src | 2 months ago | |
| test-apps | 2 months ago | |
| tests | 1 month ago | |
| www | 7 months ago | |
| .eslintrc.json | 7 months ago | |
| .gitattributes | 7 months ago | |
| .gitignore | 2 months ago | |
| .prettierrc | 7 months ago | |
| API.md | 1 month ago | |
| CHANGELOG.md | 1 month ago | |
| CONTRIBUTING.md | 1 month ago | |
| CRITICAL_IMPROVEMENTS.md | 1 month ago | |
| CapacitorDailyNotification.podspec | 7 months ago | |
| IMPROVEMENT_SUMMARY.md | 1 month ago | |
| LICENSE | 7 months ago | |
| PROJECT_ASSESSMENT.md | 1 month ago | |
| README.md | 1 month ago | |
| SECURITY.md | 1 month ago | |
| USAGE.md | 1 month ago | |
| build.gradle.kts | 7 months ago | |
| capacitor.config.ts | 7 months ago | |
| gradle.properties | 7 months ago | |
| gradlew | 2 months ago | |
| gradlew.bat | 2 months ago | |
| package-lock.json | 2 months ago | |
| package.json | 2 months ago | |
| rollup.config.js | 3 months ago | |
| settings.gradle.kts | 7 months ago | |
| tsconfig.json | 7 months ago | |
		
			
				
				README.md
			
		
		
	
	Daily Notification Plugin
A Native-First Capacitor plugin for reliable daily notifications across Android, iOS, and Web platforms.
Key Features
- Native-First Architecture: Optimized for mobile platforms with offline-first design
 - Shared SQLite Storage: Single database file with WAL mode for concurrent access
 - TTL-at-Fire Enforcement: Skip stale notifications before delivery
 - Rolling Window Safety: Always keep today's notifications armed
 - Cross-Platform: Unified API across Android, iOS, and Web
 - Production Ready: Comprehensive error handling, performance optimization, and monitoring
 
Quick Start
import { DailyNotification } from '@timesafari/daily-notification-plugin';
// Configure and schedule
await DailyNotification.configure({
  storage: 'shared',
  ttlSeconds: 1800,
  prefetchLeadMinutes: 15
});
await DailyNotification.scheduleDailyNotification({
  url: 'https://api.example.com/daily-content',
  time: '09:00',
  title: 'Daily Update',
  body: 'Your daily notification is ready'
});
Installation
npm install @timesafari/daily-notification-plugin
Documentation
- Complete Usage Guide - Comprehensive guide with examples and best practices
 - API Reference - Complete method and type definitions
 - Implementation Roadmap - Technical implementation details
 - Notification System Spec - Architecture and design principles
 - Glossary - Key terminology and concepts
 
Examples
- Basic Usage: 
examples/usage.ts - Phase-by-Phase Implementation:
- Phase 1: 
examples/phase1-*.ts(Core Infrastructure) - Phase 2: 
examples/phase2-*.ts(Platform Completion) - Phase 3: 
examples/phase3-*.ts(Network Optimization) 
 - Phase 1: 
 - Advanced Scenarios: 
examples/advanced-usage.ts - Enterprise Features: 
examples/enterprise-usage.ts 
Configuration
Android
Add the following permissions to your AndroidManifest.xml:
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Development
Prerequisites
- Node.js 14 or later
 - Android Studio
 - Android SDK
 - Gradle
 
Building
# Install dependencies
npm install
# Build the plugin
npm run build
# Run tests
npm test
Project Structure
daily-notification-plugin/
├── android/                 # Android implementation
│   ├── app/                # Main application module
│   └── build.gradle        # Root build configuration
├── src/                    # TypeScript source
├── tests/                  # Test files
├── package.json           # Package configuration
└── README.md              # This file
Contributing
- Fork the repository
 - Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
 
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Matthew Raymer
Security
This plugin follows security best practices:
- Uses AndroidX for modern security features
 - Implements proper permission handling
 - Follows Android security guidelines
 - Uses secure storage for sensitive data
 - Implements proper error handling
 - Logs security-relevant events
 - Uses secure communication channels
 - Implements proper access control
 - Follows Android's security model
 - Uses secure defaults
 
Changelog
1.0.0
- Initial release
 - Basic notification scheduling
 - System state handling
 - Battery optimization support
 - Background task management
 - Rich logging system