Gumroad License Manager is a Laravel application designed to manage licenses for Figma users purchased via Gumroad. This project allows users to register, add licenses, and manage their premium status based on the latest licenses they own. The system supports multiple users per license and multiple licenses per user, providing a robust solution for managing Figma product licenses.
- License Management: Users can add their Gumroad licenses to the system, which stores all relevant details such as product information, purchase details, and usage.
- Premium Status: The system determines and updates users' premium status based on the latest active license.
- Multiple Licenses and Seats: Supports multiple licenses for different products and multiple seats per license, allowing shared use among users.
- API Integration: Integrates with Gumroad API to validate and retrieve license information.
- PHP ^8.2
- Composer
- Node.js & NPM/Yarn (for frontend assets)
-
Clone the repository:
git clone git@github.com:zendyani/Laravel-gumroad-license.git cd Laravel-gumroad-license
-
Install dependencies:
composer install
-
Run post-installation scripts:
composer run post-root-package-install
-
Create and set up the database:
composer run post-create-project-cmd
-
Start the development server:
php artisan serve
-
Access the application at
http://localhost:8000
.
Retrieve license offers for a specific license group.
- URL:
/api/v1/license-offers/{licenseGroup}
- Method:
GET
- Parameters:
licenseGroup
: The group of licenses to retrieve offers for. Must be a valid license group.
- Responses:
200 OK
: Returns the license offers for the specified group.422 Unprocessable Entity
: Validation error for an invalid license group.
Route::prefix('v1')->group(function () {
Route::get('/license-offers/{licenseGroup}', LicenseOfferController::class);
});
Generate a token for a Figma user based on their license.
- URL:
/api/v1/token
- Method:
POST
- Request Body:
id
(string, required): The Figma user ID.name
(string, required): The Figma user name.code
(string, required): The product code. Must be a valid license code.
- Responses:
200 OK
: Returns the generated token.422 Unprocessable Entity
: Validation error for invalid input data.
Route::prefix('v1')->group(function () {
Route::post('/token', TokenController::class);
});
Run the test suite:
php artisan test
Run PHP CS Fixer:
composer lint
- Event System:
- Send Notifications on License Addition: Implement an event system to send notifications when a new license is added.
- Send Notifications on License Expiry: Implement notifications for when a license is nearing its expiry date.
This project is licensed under the MIT License.