Skip to content

Support multiple license plan types (startup, nonprofit, education, etc.) #2332

@justin808

Description

@justin808

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions