Skip to content

apnotic/Source-License

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

305 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Source License Logo

CodeQL Security Analysis Join our Discord

Source License - Professional Software Licensing Platform

NOTE: CodeQL Security Analysis is failing due to a issue outside of the codebase. It will be resolved within the next 30 days and begin displaying the correct information once again

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.

πŸ“– Complete Documentation

All detailed documentation has been moved to the Project Wiki

Overview

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.

🌟 Key Features

πŸ’° Complete E-Commerce Solution

  • 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

πŸ” Advanced License Management

  • 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

πŸ‘¨β€πŸ’Ό Comprehensive Admin Interface

  • 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

🎨 Customizable Frontend

  • 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

πŸ”’ Enterprise Security

  • 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

🌐 REST API

  • 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

πŸ“Š Subscription 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

πŸš€ Quick Start

Prerequisites

  • Ruby 3.4.7 or higher
  • Database: MySQL, PostgreSQL, or SQLite (development only)
  • Git for cloning the repository

Installation

  1. Clone and install

    git clone https://github.com/LyrinoxTechnologies/Source-License.git
    cd Source-License
    
    # Windows
    .\install.ps1 && .\deploy.ps1
    
    # Linux/macOS  
    ./install.sh && ./deploy.sh
  2. Access the application

Configuration

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.

πŸ“ Project Structure

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.

πŸ”Œ API Reference

License Validation

curl -X GET http://localhost:4567/api/license/XXXX-XXXX-XXXX-XXXX/validate

License Activation

curl -X POST http://localhost:4567/api/license/XXXX-XXXX-XXXX-XXXX/activate \
  -d '{"machine_fingerprint": "unique_machine_id"}'

Key Endpoints

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.

🎨 Customization & Development

  • 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.

πŸ“– Use Cases

Software Vendors

  • 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

SaaS Applications

  • License validation for client-side applications
  • Machine-based activation for offline software
  • Subscription management with automatic renewals
  • Multi-tier licensing with different activation limits

Educational Software

  • Student/teacher license management
  • Institution-wide licensing
  • Temporary access and trial periods
  • Bulk license generation for schools

🀝 Contributing

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

πŸ“„ License

This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.

πŸ†˜ Support

πŸ“ˆ Roadmap

Current Version (v1.0-ALPHA)

  • βœ… Complete license management system
  • βœ… Stripe and PayPal integration
  • βœ… REST API with JWT authentication
  • βœ… Admin dashboard and user management
  • βœ… Cross-platform launcher
  • βœ… Multiple database support

Future Enhancements

  • πŸ”„ 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 Lyrinox Technologies team

Source License - Empowering software vendors with professional licensing solutions

About

Free and Open Source Software Licensing and Selling

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 55.3%
  • Ruby 39.3%
  • Shell 3.2%
  • PowerShell 2.2%