{"id":31691358,"url":"https://github.com/freemius/freemius-js","last_synced_at":"2025-10-08T13:49:17.968Z","repository":{"id":315902153,"uuid":"1032379260","full_name":"Freemius/freemius-js","owner":"Freemius","description":"Official JavaScript/TypeScript based Backend SDK for Freemius API, plus a Shadcn-based SaaS starter kit for rapid app development and integration.","archived":false,"fork":false,"pushed_at":"2025-09-21T13:03:35.000Z","size":814,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T15:06:21.380Z","etag":null,"topics":["checkout","merchant-of-record","monetization","nodejs","saas"],"latest_commit_sha":null,"homepage":"https://freemius.com/help/documentation/saas-sdk/js-sdk/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Freemius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-05T08:15:07.000Z","updated_at":"2025-09-21T14:16:05.000Z","dependencies_parsed_at":"2025-09-21T15:06:26.019Z","dependency_job_id":"f23ee9cd-1e8d-4f62-b45a-3e0e3d0228ec","html_url":"https://github.com/Freemius/freemius-js","commit_stats":null,"previous_names":["freemius/freemius-js"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Freemius/freemius-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freemius%2Ffreemius-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freemius%2Ffreemius-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freemius%2Ffreemius-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freemius%2Ffreemius-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freemius","download_url":"https://codeload.github.com/Freemius/freemius-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freemius%2Ffreemius-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956337,"owners_count":26075221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checkout","merchant-of-record","monetization","nodejs","saas"],"created_at":"2025-10-08T13:49:08.025Z","updated_at":"2025-10-08T13:49:17.963Z","avatar_url":"https://github.com/Freemius.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Freemius JavaScript\n\nType-safe Freemius integration toolkit: a production-focused TypeScript/JavaScript SDK plus a React / Next.js Starter\nKit for implementing subscriptions, one‑off purchases, license \u0026 entitlement validation, and a secure self-service\ncustomer portal.\n\n[![npm version](https://img.shields.io/npm/v/@freemius/sdk.svg?label=@freemius/sdk)](https://www.npmjs.com/package/@freemius/sdk)\n![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178c6?logo=typescript\u0026logoColor=white)\n\n\u003ca href=\"https://freemius.com/help/documentation/saas-sdk/js-sdk/\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://freemius.com/help/img/freemius-logo.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://freemius.com/help/img/freemius-logo-dark.svg\"\u003e\n  \u003cimg alt=\"Fallback image description\" src=\"https://freemius.com/help/img/freemius-logo.svg\" width=\"200\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n![Freemius Paywall Component](./freemius-paywall.png)\n\n---\n\nLooking for a step‑by‑step walkthrough of backend checkout generation, secure purchase validation, local entitlement\nstorage, webhook‑driven license lifecycle syncing, and feature gating logic? Check out the guides below.\n\n- [Next.js / React Starter Kit](https://freemius.com/help/documentation/saas-sdk/framework/nextjs/) Integration.\n- [Framework Agnostic](https://freemius.com/help/documentation/saas-sdk/js-sdk/integration/) Integration.\n\nWe also have the [React Starter Kit](https://freemius.com/help/documentation/saas-sdk/react-starter/) you can use on\nyour front-end to quickly render Checkout overlays, pricing tables, and a customer portal.\n\n## Support / Questions\n\n- Core SDK Docs: https://freemius.com/help/documentation/saas-sdk/js-sdk/\n- Next.js Integration: https://freemius.com/help/documentation/saas-sdk/framework/nextjs/\n- General Integration Flow: https://freemius.com/help/documentation/saas-sdk/js-sdk/integration/\n- React Starter Kit: https://freemius.com/help/documentation/saas-sdk/react-starter/\n- Issues / Bug Reports: https://github.com/Freemius/freemius-js/issues\n\nPlease open an issue for reproducible defects or clearly scoped feature gaps that align with the minimal,\nexecution‑oriented philosophy of this repository.\n\n## Features \u0026 Packages\n\n### [`@freemius/sdk`](./packages/sdk/README.md) (Server / Edge Runtimes)\n\nFocused, framework‑agnostic primitives for securely interacting with the Freemius platform:\n\n- [Typed API Client](https://freemius.com/help/documentation/saas-sdk/js-sdk/api/): Fine-tuned OpenAPI-derived API\n  classes to easily interact with the [Freemius REST API](https://freemius.com/help/documentation/api/).\n- [Checkout Utilities](https://freemius.com/help/documentation/saas-sdk/js-sdk/checkout/): Create Checkout URLs or\n  Options for the Overlay mode, sandbox mode, redirect result parsing etc.\n- [Webhook Processing](https://freemius.com/help/documentation/saas-sdk/js-sdk/webhooks/): HMAC‑SHA256 signature\n  verification + event listener abstraction\n- [Purchases \u0026 Entitlements](https://freemius.com/help/documentation/saas-sdk/js-sdk/purchases/): License retrieval,\n  entitlement state validation, minimal model helpers\n\nSee the [full documentation](https://freemius.com/help/documentation/saas-sdk/js-sdk/) for all exported capabilities.\n\n### [React Starter Kit](./packages/saas-kit/README.md) (Next.js / React)\n\nAn opinionated, production‑ready reference implementation showing how to operationalize the SDK inside a modern React /\nNext.js stack. Built with shadcn/ui + Tailwind CSS.\n\nIncluded building blocks:\n\n- [Checkout](https://freemius.com/help/documentation/saas-sdk/react-starter/components/#checkout-components):\n  `CheckoutProvider` + context wiring for invoking\n  [overlay checkout](http://freemius.com/help/documentation/checkout/freemius-checkout-buy-button/) from any component\n- [Pricing / Paywall](https://freemius.com/help/documentation/saas-sdk/react-starter/components/#paywall): `Subscribe` \u0026\n  `Topup` components for plan display, subscription initiation, and credit top‑ups\n- [Customer Portal](https://freemius.com/help/documentation/saas-sdk/react-starter/components/#customer-portal-component):\n  Authenticated portal UI for subscription, billing method, and invoice management\n\nSee the [Starter Kit docs](https://freemius.com/help/documentation/saas-sdk/react-starter/) for component APIs and\nintegration notes.\n\n## Security Notes\n\nHard requirements for a correct integration:\n\n- Secrets: Never expose `API_KEY`, `SECRET_KEY`, or signing material to the browser or untrusted execution contexts.\n- Webhooks: Always verify the HMAC‑SHA256 signature using the raw, unparsed request body before mutating state.\n\n## Contributing\n\n1. Fork \u0026 clone\n2. `npm install`\n3. Create a feature branch (e.g. `feat/\u003cconcise-scope\u003e`)\n4. Implement change; run local builds / lint; add or update a changeset (`npx changeset`) if publishing a package change\n5. Commit with a precise, imperative message\n6. Open a PR referencing any related issue(s)\n\nRead [Contribution Principles](./CONTRIBUTING.md) for more details.\n\n## License\n\nMIT © Freemius Inc\n\n---\n\nPayments, tax handling, subscription lifecycle management, and licensing are abstracted so you can focus on product\nfunctionality rather than billing infrastructure.\n\nhttps://freemius.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreemius%2Ffreemius-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreemius%2Ffreemius-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreemius%2Ffreemius-js/lists"}