Integration Guide
Step-by-step guides for integrating the Spark Strand notifications system into your applications. The system uses a self-service architecture where each app manages its own provider credentials.
Quick Start
1. Install Core Package
Start by installing the core notification package in your application.
npm install @sparkstrand/notifications-core2. Configure Your Providers
Set up your own provider API keys in your application's environment variables.
# Your app's .env file
SPORTY_EXPATS_NOVU_API_KEY=sk_123...
SPORTY_EXPATS_NOVU_APP_ID=novu-app-id
SPORTY_EXPATS_RESEND_API_KEY=re_456...
SPORTY_EXPATS_FROM_EMAIL=notifications@sportyexpats.com3. Register Your App
Register your application with the notification service during startup.
How It Works
App Registration
Each application registers with the notification service using its own provider API keys. The system creates isolated provider instances per app and automatically routes notifications through the best available provider for each channel.
Benefits
- • Complete isolation: Each app's data and credentials are completely separate
- • Independent deployment: Apps can be deployed and scaled independently
- • Provider flexibility: Each app can use different providers and configurations
- • Security: No shared credentials or cross-app data access
- • Scalability: Apps can scale their notification usage independently
Platform Integration
Web Applications
- • React applications
- • Vue.js applications
- • Angular applications
- • Vanilla JavaScript
Mobile Applications
- • React Native
- • Native iOS (Swift)
- • Native Android (Kotlin)
- • Flutter
Desktop Applications
- • Electron applications
- • Native macOS apps
- • Native Windows apps
- • Cross-platform frameworks
Backend Services
- • Node.js/Express
- • Python/Django
- • Go applications
- • Java/Spring Boot
Provider Configuration
Novu Provider
Full-featured notification platform supporting multiple channels.
Resend Provider
Modern email API for transactional emails with high deliverability.
Twilio Provider
SMS and voice communications with global coverage.
Usage Examples
Basic Notification
Bulk Notifications
User Preferences
Testing
Test Environment
Test your integration using the demo environment:
- • Demo API: https://demo.notifications.sparkstrand.com/api
- • Test credentials: Use your own provider test keys
- • Sandbox mode: All notifications are logged but not delivered
- • Rate limits: Higher limits for testing purposes
Best Practices
- • Register early: Register your app during application startup
- • Provider priority: Set appropriate priority levels for your providers
- • Fallback strategy: Choose the right fallback strategy for your use case
- • Rate limits: Configure appropriate rate limits per app and provider
- • Error handling: Always wrap notification calls in try-catch blocks
- • Testing: Test with multiple providers to ensure fallback works
- • Monitoring: Use the built-in metrics and status endpoints