Installation
Requirements
- Next.js 13+ (App Router)
- Node.js 18+
Install the package
npm install @simplelogs/next
# or
pnpm add @simplelogs/next
# or
yarn add @simplelogs/next
Get your API keys
- Go to simplelogs.io and sign in
- Open Settings → API Keys
- Click Create API Key, give it a name, and add your production domain to the allowed origins list
- Copy the Server Key and Client Key — you'll only see the full values once
Add your keys to the environment
Add the following to your .env.local (and your production environment variables):
SIMPLELOGS_SERVER_KEY=sk_...
SIMPLELOGS_CLIENT_KEY=ck_...
The SDK picks these up automatically. You do not need to pass them manually unless you prefer the explicit config approach.
info
The server key and client key are different values. Keep the server key secret — never expose it to the browser. The client key is safe to use in browser code because it is restricted to your allowed origins.
Next steps
- Quickstart — Send your first log in 5 minutes
- Architecture — Understand the provider vs. standalone tradeoffs before picking an integration style