A simple license code generation and verification server built with Laravel.
This project provides an API and basic UI for claiming purchase/license codes, sending them via email, and verifying them from client applications.
- 🎟️ Claim License: Generate a unique license code by submitting name, email, and company info.
- 📧 Email Delivery: Send license codes automatically to buyer’s email (configurable via
.env). - ✅ Verify License: Check validity, status, support period, and activation count of a license.
- 📊 Activation Control: Support for limiting max activations per license.
- 🛡️ Throttling: API routes protected with request throttling.
- 🗄️ Database-backed: Stores licenses with meta info (price, company, support_until, etc.).
- 🧩 Extensible: Can be integrated into SaaS apps, digital products, or software distribution systems.
- PHP >= 8.1
- Laravel >= 10 (tested with Laravel 12)
- MySQL/MariaDB or any supported database
- Composer
- (Optional) Mail service (SMTP/Gmail/Mailpit/Mailtrap)
-
Clone the repo:
git clone https://github.com/esteham/license-server.git cd license-server -
Install dependencies:
composer install
-
Copy
.env:cp .env.example .env
-
Set up your database in
.env, then run migrations:php artisan migrate
-
Configure mail settings in
.env(choose Gmail, Mailtrap, or Mailpit). -
Start the server:
php artisan serve
-
POST
/api/claim -
Params:
name(string, required)email(string, required)company(string, optional)price(numeric, optional)
-
GET
/api/verify -
Params:
purchase_code(string, required)domain(string, optional)app_url(string, optional)
- Responsive HTML email is included (
resources/views/emails/license.blade.php). - Contains buyer name, license code, and support message.
Form for claiming license code:

Sample email with license code:

This project is open-source and available under the MIT License.