Skip to main content

Overview

The Encore Web SDK is framework-agnostic and works seamlessly with any JavaScript framework or vanilla JS. Click on your framework below to see detailed integration guides with complete examples.

Supported Frameworks

React

Complete guide for React 18+ with hooks and TypeScript

Vue

Complete guide for Vue 3 with Composition API and TypeScript

Angular

Complete guide for Angular 17+ with standalone components

Next.js

Complete guide for Next.js App Router with Server Components

Svelte

Complete guide for Svelte 4+ with stores and TypeScript

Vanilla JavaScript

Complete guide for vanilla JavaScript with CDN (no build tools)

iOS WebView Embed

Embed Encore in iOS apps with a single Swift file (no SDK dependencies)

What You’ll Find in Each Guide

Each framework guide includes:
  • Installation instructions - npm/yarn/pnpm or CDN
  • Complete setup example - Ready to copy and use
  • Framework-specific patterns - Hooks, composables, services, stores
  • Environment variables - Proper configuration for each framework
  • User ID management - localStorage patterns for persistence
  • Working examples - Links to complete GitHub examples

Common Patterns

All frameworks follow similar patterns:

1. Install the SDK

npm install @encorekit/web-sdk

2. Configure with userId

Encore.configure({
  apiKey: 'your-api-key',
  userId: 'user-123', // Required
  environment: 'production'
});

3. Present Offers

const result = await Encore.presentOffer();
if (result.granted) {
  // Handle entitlement grant
}

4. Validate Server-Side

Always validate entitlements on your backend for security.

Quickstart

Get started with installation and basic setup

SDK Reference

Complete API documentation

Need Help?