Quickstart

Set up your HIRALL project, configure environment variables, and make your first request.

1) Create a project

From the dashboard, go to Project Settings → API Keys. Keys are auto‑generated when the project is created.

2) Configure environment variables

Add these to your .env files. Client variables should be prefixed per your framework (e.g. NEXT_PUBLIC_).

# Client (.env.local)
NEXT_PUBLIC_HIRALL_URL=https://api.hirall.com
NEXT_PUBLIC_HIRALL_ANON_KEY=ak_************************

# Server (.env)
HIRALL_SERVICE_ROLE_KEY=sk_************************

Names we recommend:

  • NEXT_PUBLIC_HIRALL_URL – API base URL
  • NEXT_PUBLIC_HIRALL_ANON_KEY – public key for browsers (RLS enforced)
  • HIRALL_SERVICE_ROLE_KEY – secret server‑only key

3) Install SDK

npm install @hirall/client
# or
pnpm add @hirall/client
import { createClient } from '@hirall/client';

export const hirall = createClient(
  process.env.NEXT_PUBLIC_HIRALL_URL!,
  process.env.NEXT_PUBLIC_HIRALL_ANON_KEY!,
);

4) First request

// Example: sign in a user
const session = await hirall.auth.signIn('user@example.com', 'password123');