Step-by-step guide to obtaining Clerk API keys for Shelf AI's authentication system.
- Go to clerk.com and click Get started free.
- Sign up with your GitHub, Google, or email address.
- In the Clerk Dashboard, click Create application.
- Enter the application name:
Shelf AI. - Select the sign-in methods you want to enable (Email, Google, GitHub, etc.).
- Click Create application.
After creating the application, you're taken to the API Keys page. You need two keys:
| Key | Variable | Location |
|---|---|---|
| Publishable key | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Starts with pk_test_ or pk_live_ |
| Secret key | CLERK_SECRET_KEY |
Starts with sk_test_ or sk_live_ |
Both are visible on the API Keys page of your Clerk Dashboard at: dashboard.clerk.com → [Your App] → API Keys.
Add these keys to .env.local in both apps/user/ and apps/admin/:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_key_here
CLERK_SECRET_KEY=sk_test_your_key_hereThe admin and user dashboards use different redirect paths after authentication:
apps/user/.env.local:
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/home
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/homeapps/admin/.env.local:
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard- Run
pnpm dev. - Navigate to
http://localhost:3002/sign-in. - You should see the Clerk-hosted sign-in form styled with Shelf AI's dark theme.