Summary
Extend the license validator to support multiple plan types beyond just "paid". This allows offering complimentary or discounted licenses to qualifying organizations.
Proposed Plan Types
| Plan |
Description |
Attribution Required? |
paid |
Standard commercial license |
No |
startup |
Complimentary for qualifying startups |
Yes |
nonprofit |
Complimentary for non-profits |
Optional |
education |
For educational institutions |
Optional |
oss |
For open source projects |
Yes |
partner |
Strategic partners |
No |
Proposed Changes
1. Extend valid plans in LicenseValidator
VALID_PLANS = %w[paid startup nonprofit education oss partner].freeze
def check_plan(decoded_data)
plan = decoded_data["plan"]
return :valid unless plan # No plan = valid (backwards compat)
return :valid if VALID_PLANS.include?(plan)
:invalid
end
2. Add license_plan method
def license_plan
# Extract and cache plan from decoded JWT
end
3. Update logging to show plan type
# Example output for non-paid plans:
"[React on Rails Pro] License validated successfully - Acme Corp (startup license)."
Decision: Trial Licenses
Not implementing a separate "trial" plan. A trial is effectively just a license with a short expiration date. The messaging difference ("trial expired" vs "license expired") doesn't justify the added complexity.
Related
Summary
Extend the license validator to support multiple plan types beyond just "paid". This allows offering complimentary or discounted licenses to qualifying organizations.
Proposed Plan Types
paidstartupnonprofiteducationosspartnerProposed Changes
1. Extend valid plans in LicenseValidator
2. Add
license_planmethod3. Update logging to show plan type
Decision: Trial Licenses
Not implementing a separate "trial" plan. A trial is effectively just a license with a short expiration date. The messaging difference ("trial expired" vs "license expired") doesn't justify the added complexity.
Related