https://github.com/polarsource/polar-figma
A Figma example plugin with Polar License Key support
https://github.com/polarsource/polar-figma
Last synced: 4 months ago
JSON representation
A Figma example plugin with Polar License Key support
- Host: GitHub
- URL: https://github.com/polarsource/polar-figma
- Owner: polarsource
- Created: 2024-10-24T12:32:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-11T17:20:33.000Z (over 1 year ago)
- Last Synced: 2025-04-05T22:11:27.200Z (about 1 year ago)
- Language: TypeScript
- Size: 845 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# polar-figma

A simple example of how to use Polar License Key validation in a Figma plugin.
[The complete guide can be found here](https://docs.polar.sh/developers/guides/figma?ref=github)
### Development
Import this plugin into Figma using "Import Manifest". Run the following command to start the development server:
```bash
pnpm run dev
```
### Configuration
#### Organization ID
Replace `ORGANIZATION_ID` in `src/ui/main.tsx` with your actual organization ID. It can be found in your Polar Organization Settings page.
#### Server Environment
Set the `server` parameter in `src/ui/polar.ts` to `"sandbox"` to use the sandbox server for development. Switch this to `"production"` (or omit the parameter) when you're ready to go live.
#### Manifest
It is very important to allow the plugin to access the Polar API. You can allow this by adding the following to the `networkAccess` section in `manifest.json`:
```json
"networkAccess": {
"allowedDomains": ["https://*.polar.sh"]
}
```
This allows the plugin to validate license keys using the Polar API server.