Installation
Choose the SDK that matches your application environment.
React SDK
For client-side React applications:
npm install @easylabs/react
# or
yarn add @easylabs/react
# or
pnpm add @easylabs/react
Requirements
- React 18.0 or higher
- Node.js 20.0 or higher
Node.js SDK
For server-side Node.js applications:
npm install @easylabs/node
# or
yarn add @easylabs/node
# or
pnpm add @easylabs/node
Requirements
- Node.js 20.0 or higher
- TypeScript 5.0+ (recommended)
Using Both SDKs
For full-stack applications, you can use both SDKs together:
npm install @easylabs/react @easylabs/node
Typical Architecture
┌─────────────────┐
│ Client-Side │
│ (@easylabs/ │
│ react) │
└────────┬────────┘
│
│ HTTPS
│
┌────────▼────────┐
│ Server-Side │
│ (@easylabs/ │
│ node) │
└────────┬────────┘
│
│ API
│
┌────────▼────────┐
│ Easy API │
└─────────────────┘
Getting API Keys
- Sign up at itseasy.co
- Navigate to your dashboard
- Generate API keys:
- Publishable Key: Use in client-side code (React)
- Secret Key: Use in server-side code (Node.js)
warning
Never expose your secret API key in client-side code!
Environment Setup
React (Client-Side)
Create a .env file:
Vite:
VITE_EASY_API_KEY=your_publishable_key_here
Next.js:
NEXT_PUBLIC_EASY_API_KEY=your_publishable_key_here
Node.js (Server-Side)
Create a .env file:
EASY_API_KEY=your_secret_key_here
NODE_ENV=development
tip
Use different API keys for development and production environments.