Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zendyani/laravel-gumroad-license
A Laravel application to manage licenses for Figma users purchased via Gumroad.
https://github.com/zendyani/laravel-gumroad-license
gumroad laravel laravel-framework php
Last synced: 5 days ago
JSON representation
A Laravel application to manage licenses for Figma users purchased via Gumroad.
- Host: GitHub
- URL: https://github.com/zendyani/laravel-gumroad-license
- Owner: zendyani
- Created: 2024-08-01T21:15:52.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-18T15:23:51.000Z (3 months ago)
- Last Synced: 2024-10-18T13:43:25.662Z (29 days ago)
- Topics: gumroad, laravel, laravel-framework, php
- Language: PHP
- Homepage:
- Size: 197 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel Gumroad License Manager
## Table of Contents
1. [Introduction](#introduction)
2. [Features](#features)
3. [Requirements](#requirements)
4. [Installation](#installation)
5. [Usage](#usage)
6. [API Endpoints](#api-endpoints)
- [License Offer Endpoints](#license-offer-endpoints)
- [Token Endpoints](#token-endpoints)
7. [Testing](#testing)
8. [Linting](#linting)
9. [License](#license)
10. [TODO](#todo)## Introduction
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.## Features
- **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.## Requirements
- PHP ^8.2
- Composer
- Node.js & NPM/Yarn (for frontend assets)## Installation
1. Clone the repository:
```bash
git clone [email protected]:zendyani/Laravel-gumroad-license.git
cd Laravel-gumroad-license
```2. Install dependencies:
```bash
composer install
```3. Run post-installation scripts:
```bash
composer run post-root-package-install
```4. Create and set up the database:
```bash
composer run post-create-project-cmd
```## Usage
1. Start the development server:
```bash
php artisan serve
```2. Access the application at `http://localhost:8000`.
## API Endpoints
### License Offer Endpoints
#### Get License Offers
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.```php
Route::prefix('v1')->group(function () {
Route::get('/license-offers/{licenseGroup}', LicenseOfferController::class);
});
```### Token Endpoints
#### Get Token
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.```php
Route::prefix('v1')->group(function () {
Route::post('/token', TokenController::class);
});
```## Testing
Run the test suite:
```bash
php artisan test
```## Linting
Run PHP CS Fixer:
```bash
composer lint
```## TODO
- **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.## License
This project is licensed under the MIT License.