ALPHA RELEASE: Source License is currently in Alpha. While feature-complete for most use cases, you may encounter issues. Please report bugs via GitHub Issues.
A comprehensive Ruby/Sinatra-based software licensing management system with integrated payment processing, secure license validation APIs, and enterprise-grade features for independent software vendors.
All detailed documentation has been moved to the Project Wiki
- Installation Guide - Complete setup instructions
- API Reference - REST API documentation
- Admin Guide - Administrative documentation
- Architecture Overview - System design and components
- Development Guide - Contributing and development setup
Source License is a complete solution for software vendors who need to sell, manage, and validate software licenses. Built with Ruby and Sinatra, it provides a robust platform for handling everything from product sales to license validation APIs that integrate directly into your software.
- Product Management: Create and manage software products with pricing, descriptions, and download files
- Shopping Cart & Checkout: Full e-commerce flow with cart functionality and secure checkout
- Payment Processing: Integrated Stripe and PayPal support with webhook-first PayPal flow and signature verification
- Order Management: Complete order tracking and fulfillment system
- Cryptographically Secure License Keys: Multiple formats (XXXX-XXXX-XXXX-XXXX, UUID, custom)
- Activation Control: Limit installations per license with machine fingerprinting
- License Types: Support for perpetual, subscription, and trial licenses
- License Operations: Suspend, revoke, extend, transfer, and batch generate licenses
- Validation API: REST endpoints for real-time license verification in your software
- Dashboard: Real-time statistics and system overview
- Product Management: Create products with pricing, trial periods, and download files
- License Administration: Generate, manage, and monitor all licenses
- Customer Management: Track users, orders, and support requests
- Order Processing: View, manage, and fulfill customer orders
- Reports & Analytics: Detailed insights into sales and license usage
- Template System: ERB templates with extensive helper functions
- Live Customization: Admin interface for colors, branding, and content
- Responsive Design: Bootstrap-based responsive layout
- Multi-language Ready: Template structure supports internationalization
- JWT Authentication: Secure API access with token-based auth
- Admin Role Management: Granular permissions and multi-admin support
- Security Middleware: CSRF protection, rate limiting, and security headers
- Audit Logging: Comprehensive logging of all license operations
- Database Security: Sequel ORM with prepared statements prevents SQL injection
- License Validation: Real-time license verification endpoints
- License Activation: Machine-based activation and deactivation
- Order Processing: Complete API for order creation and management
- Webhook Support: Stripe and PayPal webhook handling (PayPal uses verify-webhook-signature API for signature verification)
- Settings Management: API for configuration management
- Recurring Billing: Automatic subscription renewals
- Grace Periods: Handle failed payments gracefully
- Trial Management: Free trial periods with automatic conversion
- Billing History: Complete payment and billing tracking
- Ruby 3.4.7 or higher
- Database: MySQL, PostgreSQL, or SQLite (development only)
- Git for cloning the repository
-
Clone and install
git clone https://github.com/PixelRidgeSoftworks/Source-License.git cd Source-License # Windows .\install.ps1 && .\deploy.ps1 # Linux/macOS ./install.sh && ./deploy.sh
-
Access the application
- Website: http://localhost:4567
- Admin Panel: http://localhost:4567/admin
- License Lookup: http://localhost:4567/my-licenses
The installer creates a .env file from the template. Key settings to configure:
# Database (choose one)
DATABASE_ADAPTER=mysql # or postgresql, sqlite
DATABASE_HOST=localhost
DATABASE_NAME=source_license
DATABASE_USER=your_username
DATABASE_PASSWORD=your_password
# Security
APP_SECRET=your_secure_secret_key
JWT_SECRET=your_jwt_secret_key
# Payment Processing (optional)
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
PAYPAL_CLIENT_ID=your_client_id
# Optional: set to 'true' to use webhook-first PayPal flow. When enabled, fulfillment occurs via verified webhooks.
PAYPAL_USE_WEBHOOKS=trueπ For complete installation instructions, database setup, and configuration options, see the Installation Guide.
Built with a modular Ruby/Sinatra architecture:
Source-License/
βββ app.rb # Main application entry point
βββ launch.rb # Cross-platform launcher
βββ lib/ # Core application logic
β βββ models.rb # Database models
β βββ controllers/ # Modular controllers
β βββ auth.rb # Authentication system
β βββ payment_processor.rb # Payment integration
βββ views/ # ERB templates
βββ test/ # Test suite
βββ .env.example # Configuration template
π For detailed architecture, database schema, and component documentation, see the Architecture Overview.
curl -X GET http://localhost:4567/api/license/XXXX-XXXX-XXXX-XXXX/validatecurl -X POST http://localhost:4567/api/license/XXXX-XXXX-XXXX-XXXX/activate \
-d '{"machine_fingerprint": "unique_machine_id"}'| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth |
Get JWT authentication token |
| GET | /api/license/:key/validate |
Validate license key |
| POST | /api/license/:key/activate |
Activate license on machine |
| GET | /api/products |
List available products |
| POST | /api/orders |
Create new order |
π For complete API documentation, authentication details, and code examples, see the API Reference.
- Admin Panel Customization: Live branding, colors, content editing
- Template System: ERB templates with extensive helper functions
- Development Setup:
bundle install && ruby launch.rb - Code Quality: RuboCop style enforcement and auto-fixing
- Production Deployment: Automated scripts for Windows/Linux/macOS
π For detailed customization guides, development setup, and deployment instructions, see the Development Guide.
- Sell desktop applications with license management
- Distribute plugins and extensions with activation limits
- Manage trial periods and subscription renewals
- Track usage analytics and license compliance
- License validation for client-side applications
- Machine-based activation for offline software
- Subscription management with automatic renewals
- Multi-tier licensing with different activation limits
- Student/teacher license management
- Institution-wide licensing
- Temporary access and trial periods
- Bulk license generation for schools
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Check code style (
bundle exec rubocop) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Project Wiki
- Discussions: GitHub Discussions
- β Complete license management system
- β Stripe and PayPal integration
- β REST API with JWT authentication
- β Admin dashboard and user management
- β Cross-platform launcher
- β Multiple database support
- π Advanced analytics and reporting
- π Multi-language support
- π± Mobile-responsive admin interface
- π§ Plugin system for extensions
- π Advanced subscription management
- π International payment methods
Built with β€οΈ using Ruby and Sinatra by the PixelRidge Softworks team
Source License - Empowering software vendors with professional licensing solutions