Skip to content

Commit

Permalink
docs: add commercial license setup guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ilunglee committed Oct 15, 2021
1 parent 11edd3d commit 08357b3
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,19 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).

## License
Adminterface is free for personal and non-commercial use and with a yearly subscription for commercial purposes. See [our Terms of Service in full text](LICENSE.md) for more information.

### For Commerical License
Get a license at https://adminterface.io/pricing, then create and add the `license_key` into the following file in your project:
```ruby
# config/initializers/adminterface.rb
Adminterface.setup do |config|
config.license_key = "**********************"

## Use Rails credentials:
## doc: https://edgeguides.rubyonrails.org/security.html#custom-credentials
# config.license_key = Rails.application.credentials.adminterface[:license_key]

## Or, use environment variables:
# config.license_key = ENV["ADMINTERFACE_LICENSE_KEY"]
end
```
4 changes: 4 additions & 0 deletions website/docs/start/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ description: Adminterface Installation & Quick Start Guide.
$ rails server
```

:::info
If you are on the "Commerical License" plan, please see the [licensing doc](/docs/start/licensing) for instructions on how to configure your license.
:::

If you're having issues installing, please visit our [support page](/community/support) for ways to get help or submitting issues.

[ActiveAdmin]: https://activeadmin.info
59 changes: 59 additions & 0 deletions website/docs/start/licensing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
sidebar_position: 99
description: Adminterface License Configuration Guide
---

# Licensing
Adminterface is free for personal and non-commercial use and with a yearly subscription for commercial purposes. See [our Terms of Service in full text](/docs/terms) for more information.

:::tip
🤗 We appreciate your support for purchasing the "Commercial License" plan and help us make Adminterface better.
:::

## Everything's included, always
Every pricing plan will always include all features. There are absolutely no functionality differences with Adminterface's pricing plan.

## One license per project
Each license permits you to run one commercial project in the production environment.

## Add the license key
Create and add the `license_key` into the following file in your project:
```ruby title="config/initializers/adminterface.rb" {2,6,9}
Adminterface.setup do |config|
config.license_key = "**********************"

## Use Rails credentials:
## doc: https://edgeguides.rubyonrails.org/security.html#custom-credentials
# config.license_key = Rails.application.credentials.adminterface[:license_key]

## Or, use environment variables:
# config.license_key = ENV["ADMINTERFACE_LICENSE_KEY"]
end
```

## Purchase a license
We are currently working on the customer's dashboard. But, for now, you can purchase a license from the "Register for the beta" link on https://adminterface.io/pricing.

## License verification
When the application initializes, it pings our server with some information about the current Adminterface installation.
The server will respond with a license valid/invalid back to your application.

:::info
The application will only send the request when it first initializes, so it will not impact your application's performance.

Furthermore, when the verification fails, it won't crash your application, but you will receive a friendly reminder from us.
:::

You can find the full payload below:
```ruby
{
license_key: license_key, # Your license key
license: license, # e.g., personal, commerical
adminterface_version: Adminterface::VERSION,
rails_version: Rails::VERSION::STRING,
ruby_version: RUBY_VERSION,
environment: Rails.env,
app_name: app_name, # e.g., MyAwesomeProject
}
```

0 comments on commit 08357b3

Please sign in to comment.