Home - usmantahirr/infobip-notification-service GitHub Wiki
A starter project for building a notification service using Infobip's API with Express.js and TypeScript. This project provides a foundation for sending email and SMS notifications with built-in security, validation, and error handling.
-
📧 Email Notifications
- Send emails with file attachments
- HTML content support
- File type validation
- Size restrictions (2MB)
-
📱 SMS Notifications
- Text message support
- Phone number validation
- Simple payload structure
-
🔒 Security
- API key authentication
- Rate limiting
- Input validation
- Security headers
- CORS configuration
-
📝 Documentation
- OpenAPI/Swagger documentation
- Request/Response examples
- Error handling guide
-
Clone the repository:
git clone https://github.com/usmantahirr/infobip-notification-service.git cd infobip-notification-service
-
Install dependencies:
npm install
-
Set up environment:
cp .env.example .env # Edit .env with your Infobip credentials
-
Start the development server:
npm run dev
-
Send notifications using the API:
# Send SMS curl -X POST http://localhost:3000/api/v1/notifications/sms \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "recipient": "+1234567890", "message": "Your verification code is: 123456" }' # Send Email curl -X POST http://localhost:3000/api/v1/notifications/email \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "recipient": "[email protected]", "subject": "Welcome", "message": "Welcome to our platform!" }'
- Architecture Overview - System design and components
- API Documentation - API endpoints and usage
- Deployment Guide - Deployment instructions
- Contributing Guidelines - How to contribute
- FAQ - Frequently asked questions
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Validation: Zod
- Documentation: OpenAPI/Swagger
- Logging: Winston
- Security: Helmet, CORS
- API: Infobip
- Message Queue (Redis/Bull)
- Database (PostgreSQL)
- Monitoring (Prometheus/Grafana)
- Testing (Jest)
Create a .env
file with your configuration:
# Application
NODE_ENV=development
PORT=3000
# Infobip
INFOBIP_API_KEY=your_api_key
INFOBIP_BASE_URL=your_base_url
INFOBIP_SENDER_EMAIL=your_verified_sender_email
INFOBIP_SENDER_NUMBER=your_sender_number
# Rate Limiting
RATE_LIMIT_WINDOW=60000
RATE_LIMIT_MAX_REQUESTS=100
-
Clone the repository:
git clone https://github.com/usmantahirr/infobip-notification-service.git cd infobip-notification-service
-
Install dependencies:
npm install
-
Set up environment:
cp .env.example .env # Edit .env with your credentials
-
Start the service:
npm run dev
We welcome contributions! Please see our Contributing Guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Infobip for providing the messaging API
- Express.js for the web framework
- TypeScript for type safety
- Zod for runtime type validation
- All contributors to this project
- Message queue integration for reliable delivery
- Database integration for notification tracking
- Enhanced error handling and retries
- Caching layer for rate limiting
- Health check endpoints
- Metrics collection
- Advanced monitoring
- A/B testing capabilities
- Analytics dashboard
Built with ❤️ by Usman Tahir
Last updated: March 2025