Getting Started
Get up and running with Allem SDK in your React project.
1. Install
Install the full SDK or just the packages you need:
# Everything in one package npm install allem-sdk # Or individual packages npm install @allem-sdk/hooks npm install @allem-sdk/ai npm install @allem-sdk/forms npm install @allem-sdk/analytics npm install @allem-sdk/auth
2. AI peer dependencies
If you're using @allem-sdk/ai, install the Vercel AI SDK and your preferred provider:
npm install ai @ai-sdk/react # Pick your provider(s) npm install @ai-sdk/google # Google Gemini npm install @ai-sdk/anthropic # Anthropic Claude npm install @ai-sdk/openai # OpenAI GPT
3. Start using
// Import from individual packages
import { useDebounce, useToggle } from "@allem-sdk/hooks";
import { useForm, required, email } from "@allem-sdk/forms";
import { useAllemChat } from "@allem-sdk/ai";
// Or from the meta-package
import { useDebounce, useForm, useAllemChat } from "allem-sdk";
// Sub-path imports also work
import { useDebounce } from "allem-sdk/hooks";
import { useForm } from "allem-sdk/forms";Packages
| Package | Description |
|---|---|
| @allem-sdk/hooks | 8 essential React hooks |
| @allem-sdk/ai | AI chat & completion hooks with multi-provider support |
| @allem-sdk/forms | Form management with validation |
| @allem-sdk/analytics | Provider-agnostic analytics |
| @allem-sdk/auth | Authentication with session management |
Framework support
Allem SDK works with Next.js, Vite, Remix, and any React framework. All hooks include the "use client" directive and are SSR-safe.