Skip to content

Timadey/windsms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WindSMS - SMS Campaign Management Platform

A modern, full-featured SMS campaign management system built with Laravel 12 and React 19. WindSMS enables businesses to create, schedule, and manage SMS marketing campaigns with subscription-based billing and comprehensive analytics.

πŸš€ Features

Campaign Management

  • Bulk SMS Campaigns: Send SMS to thousands of contacts simultaneously
  • Smart Scheduling: Schedule campaigns with enforcement of sending hours (8am - 8pm WAT)
  • Recurring Campaigns: Set up daily, weekly, monthly, or custom recurring campaigns
  • Spintax Support: Create message variations with AI-powered spintax generation
  • Multiple Recipient Types: Send to all contacts, specific tags, or manual phone number lists
  • Campaign Analytics: Track sent, failed, and pending messages in real-time

Subscriber Management

  • Contact Database: Store and organize contacts with metadata
  • Tag System: Categorize subscribers using tags for targeted campaigns
  • Bulk Import: Import contacts via CSV files
  • Search & Filter: Quickly find and manage subscribers

Subscription & Billing

  • Flexible Plans: Multiple subscription tiers with different SMS allowances
  • Paystack Integration: Secure payment processing with automatic webhooks
  • Extra SMS Units: Purchase additional SMS credits as needed
  • Usage Tracking: Real-time balance monitoring and transaction history
  • Auto-renewal: Automatic subscription renewal support

Sender ID Management

  • Custom Sender IDs: Request custom sender IDs for brand recognition
  • Admin Approval System: Built-in approval workflow for sender ID requests
  • Multiple Sender IDs: Use different sender IDs for different campaigns

Advanced Features

  • Two-Factor Authentication: Enhanced account security with 2FA
  • Queue System: Background processing for large campaigns
  • Email Verification: Secure user registration with email verification
  • Real-time Logging: Monitor application logs with Laravel Pail
  • Dark Mode: User preference-based theme switching
  • Responsive Design: Mobile-friendly interface built with Tailwind CSS

πŸ› οΈ Tech Stack

Backend

  • Laravel 12: Modern PHP framework
  • Laravel Fortify: Authentication & security
  • Laravel Wayfinder: Type-safe routing
  • Laravel Soulbscription: Subscription management
  • OpenAI PHP: AI-powered message generation
  • League CSV: CSV import/export
  • SQLite/MySQL: Database support

Frontend

  • React 19: Latest React with React Compiler
  • Inertia.js: Modern monolithic SPA architecture
  • TypeScript: Type-safe JavaScript
  • Tailwind CSS 4: Utility-first CSS framework
  • Radix UI: Accessible component primitives
  • Lucide Icons: Beautiful icon library
  • Recharts: Data visualization
  • Vite 7: Lightning-fast build tool

Development Tools

  • Laravel Pail: Real-time log monitoring
  • Laravel Pint: Opinionated PHP code formatter
  • ESLint: JavaScript/React linting
  • Prettier: Code formatting
  • Concurrently: Run multiple processes simultaneously

πŸ“‹ Requirements

  • PHP 8.2 or higher
  • Composer
  • Node.js 18 or higher
  • NPM or Yarn
  • SQLite or MySQL database

πŸ”§ Installation

Quick Setup

The easiest way to set up the project is using the automated setup script:

composer run setup

This will:

  1. Install PHP dependencies
  2. Create .env file from .env.example
  3. Generate application key
  4. Run database migrations
  5. Install Node dependencies
  6. Build frontend assets

Manual Setup

If you prefer manual setup:

  1. Clone the repository

    git clone <repository-url>
    cd windsms
  2. Install PHP dependencies

    composer install
  3. Environment configuration

    cp .env.example .env
    php artisan key:generate
  4. Configure database

    For SQLite (default):

    touch database/database.sqlite

    For MySQL, update .env:

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=windsms
    DB_USERNAME=root
    DB_PASSWORD=
  5. Run migrations

    php artisan migrate
  6. Seed the database (optional)

    php artisan db:seed

    This creates a test user:

  7. Install Node dependencies

    npm install
  8. Build frontend assets

    npm run build

πŸš€ Running the Application

Development Mode

The application includes a convenient development script that runs all necessary services:

composer run dev

This starts:

Individual Services

You can also run services individually:

# Laravel server
php artisan serve

# Queue worker (required for campaigns)
php artisan queue:work --tries=3

# Watch logs
php artisan pail

# Vite dev server
npm run dev

Production Build

# Build assets for production
npm run build

# Serve with production server
php artisan serve

Server-Side Rendering (SSR)

For SSR support:

composer run dev:ssr

πŸ” Configuration

SMS Provider

Configure your SMS provider in .env:

# Add your SMS provider credentials
# Example for SMS Live247
SMSLIVE247_API_TOKEN=your_token_here
SMSLIVE247_SENDER_ID=YourBrand

Paystack (Payment Gateway)

PAYSTACK_PUBLIC_KEY=your_public_key
PAYSTACK_SECRET_KEY=your_secret_key
PAYSTACK_PAYMENT_URL=https://api.paystack.co
PAYSTACK_MERCHANT_EMAIL=your@email.com

OpenAI (Optional - for Spintax)

OPENAI_API_KEY=your_openai_api_key

Mail Configuration

MAIL_MAILER=smtp
MAIL_HOST=your_smtp_host
MAIL_PORT=587
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_FROM_ADDRESS=noreply@yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"

Queue Configuration

For production, use a more robust queue driver:

QUEUE_CONNECTION=redis
# or
QUEUE_CONNECTION=database

πŸ“š Key Concepts

Campaign Lifecycle

  1. Creation: User creates campaign with recipients and message
  2. Validation: System checks SMS balance and subscription status
  3. Scheduling: Campaign scheduled for immediate or future dispatch
  4. Processing: Queue workers send SMS in batches
  5. Tracking: Real-time updates on delivery status
  6. Completion: Final stats recorded with success/failure counts

SMS Calculation

The system automatically calculates SMS units:

  • Standard SMS: 160 characters = 1 unit
  • Extended SMS: 161-306 chars = 2 units, 307-459 chars = 3 units, etc.
  • Unicode (with special characters): 70 chars = 1 unit

Subscription Features

The application uses feature-based subscriptions:

  • Each plan includes SMS units
  • Units are consumed when campaigns are sent
  • Users can purchase extra units
  • Expired subscriptions prevent campaign sending

πŸ§ͺ Testing

# Run PHPUnit tests
composer run test

# Or directly
php artisan test

🎨 Code Style

PHP (Laravel Pint)

# Format PHP code
./vendor/bin/pint

JavaScript/React (ESLint & Prettier)

# Lint and fix
npm run lint

# Format code
npm run format

# Check formatting
npm run format:check

πŸ“ Project Structure

windsms/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”œβ”€β”€ Controllers/       # Request handlers
β”‚   β”‚   β”œβ”€β”€ Middleware/        # HTTP middleware
β”‚   β”‚   └── Requests/          # Form request validation
β”‚   β”œβ”€β”€ Jobs/                  # Queue jobs
β”‚   β”œβ”€β”€ Models/                # Eloquent models
β”‚   β”œβ”€β”€ Services/              # Business logic
β”‚   └── Shared/
β”‚       └── Enums/            # Application enums
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/           # Database migrations
β”‚   └── seeders/              # Database seeders
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ css/                  # Stylesheets
β”‚   └── js/
β”‚       β”œβ”€β”€ components/       # React components
β”‚       β”œβ”€β”€ layouts/          # Page layouts
β”‚       β”œβ”€β”€ pages/            # Inertia pages
β”‚       └── routes/           # Wayfinder routes
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ web.php              # Web routes
β”‚   └── settings.php         # Settings routes
└── public/                  # Public assets

πŸ”„ Scheduled Tasks

The application includes scheduled commands for:

# Process recurring campaigns
php artisan campaigns:recurring

# Reprocess pending SMS
php artisan sms:reprocess-pending

Add to your crontab:

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

πŸ› Common Issues

Queue Timeout Error

If you encounter process timeout errors with the queue worker:

# Use queue:work instead of queue:listen
php artisan queue:work --timeout=300 --tries=3

Or increase the timeout in your configuration.

Missing Route Files

If you see errors about missing TypeScript route files, regenerate them:

npm run dev

The Wayfinder plugin will automatically generate route definitions.

Database Connection Issues

For SQLite, ensure the database file exists:

touch database/database.sqlite
chmod 664 database/database.sqlite

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is open-sourced software licensed under the MIT license.

πŸ™ Acknowledgments

πŸ“§ Support

For support, email dlktimothy@gmail.com or open an issue in the repository.

πŸ”— Links


Built with ❀️ Timadey

About

A premium bulk sms service with message rotation powered by AI for more personalized campaigns

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages