This is an enhanced version of the NotifyAfrica SMS sender application built with VintLang, showcasing the comprehensive features and capabilities of the VintLang programming language.
- notifyafrica_pkg - Custom SMS API package
- os - File operations and existence checks
- time - Time formatting and current time operations
- uuid - Unique ID generation for request tracking
- dotenv - Environment variable management
- json - JSON encoding for data structures
- crypto - MD5 hashing for security logging
- random - Random number generation for verification codes
- sysinfo - System information retrieval
- string - String manipulation and type conversion
- ✅ Functions with parameters and return values
- ✅ Dictionaries and arrays for data structures
- ✅ For loops and while loops for iteration
- ✅ Conditional statements (if/else) for logic flow
- ✅ File I/O operations for logging and data persistence
- ✅ Error handling and validation
- ✅ User input and formatted output
- ✅ Type conversion and string operations
-
Multi-Method SMS Sending
- Direct SMS to multiple recipients
- Verification code SMS with auto-generated codes
- Enhanced recipient input with validation
-
Security & Logging
- Secure logging with MD5 hash verification
- Comprehensive activity logging with timestamps
- Error tracking and statistics
-
Dashboard & Analytics
- Real-time SMS statistics tracking
- System information display
- Environment configuration status
- Success rate calculations
-
Enhanced User Experience
- Emoji-enhanced interface for better UX
- Color-coded status messages
- Progress indicators and request tracking
- Interactive menus with clear options
-
Environment Management
- Automatic environment configuration detection
- API token validation
- Base URL configuration display
- Set up your environment variables in
.envfile:
NOTIFYAFRICA_TOKEN=your_actual_api_token_here
NOTIFYAFRICA_BASEURL=https://notify.africa/api/v2/send-sms- Copy the example environment file:
cp .env.example .envvint main.vint- 📤 Send SMS - Send SMS to multiple recipients
- 🎲 Send SMS with Verification Code - Generate and send verification codes
- 📊 Dashboard - View statistics and system information
- 📋 View Logs - Check application activity logs
- 🚀 About VintLang Features - Learn about features demonstrated
- 🚪 Exit - Close the application
// Enhanced logging with MD5 hash verification
let hash = crypto.hashMD5(logMessage + "security_salt")
let fullLog = "[" + timestamp + "] [" + level + "] " + logMessage + " (Hash: " + hash + ")\n"// Generate secure 6-digit verification codes
let generateVerificationCode = func() {
return string(random.int(100000, 999999))
}// Real-time system information
print(" OS: " + sysinfo.os())
print(" Architecture: " + sysinfo.arch())
print(" Current Time: " + time.format(time.now(), "2006-01-02 15:04:05"))// Dynamic environment validation
let token = dotenv.get("NOTIFYAFRICA_TOKEN")
if (token != "" && token != "your_api_token_here") {
print(" 🔑 API Token: ✅ Configured")
} else {
print(" 🔑 API Token: ❌ Not configured")
}This application serves as a comprehensive demonstration of VintLang's capabilities:
- Module System: Importing and using various built-in and custom modules
- Error Handling: Robust error checking and user feedback
- Data Structures: Working with dictionaries, arrays, and complex data
- File Operations: Reading, writing, and checking file existence
- String Processing: Advanced string manipulation and formatting
- Time Operations: Date/time formatting and operations
- Cryptographic Functions: Hashing for security
- Random Operations: Secure random number generation
- System Integration: Accessing system information
- Environment Management: Configuration through environment variables
The application follows a modular design with clear separation of concerns:
- Initialization Layer: Environment setup and validation
- Business Logic Layer: SMS sending, verification, and logging
- Presentation Layer: User interface and interaction
- Data Layer: File operations and statistics
- Security Layer: Hashing and validation
This architecture demonstrates VintLang's capability to build well-structured, maintainable applications with enterprise-grade features.
The application produces colorful, emoji-enhanced output:
🚀 Initializing NotifyAfrica SMS Pro...
✅ API token loaded successfully
✅ Initialization complete!
==================================================
📱 NotifyAfrica SMS Pro v2.0.0
==================================================
1. 📤 Send SMS
2. 🎲 Send SMS with Verification Code
3. 📊 Dashboard
4. 📋 View Logs
5. 🚀 About VintLang Features
6. 🚪 Exit
This enhanced NotifyAfrica SMS Pro application showcases VintLang as a powerful, feature-rich programming language capable of building professional-grade applications with modern UX and robust functionality.# notify.africa.vint