Clerk
User management for modern apps Drop-in components and APIs for authentication, user management, and session handling. Built for React and Next.js with a generous free tier.Key Features
- Pre-built components
- Next.js & React
- Free tier
Quick Setup
Add environment variables
Add env vars (NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY) to your
.env.local file.Protecting routes
Middleware protection
Middleware protection
Use middleware to protect routes:
Get current user
Get current user
Get the current user with
auth() in server components or useUser() in client components.Hackathon tips
- Social logins (Google, GitHub) work out of the box—fast for demos.
- Free tier is generous; no credit card needed for most hackathon projects.
Resources
Clerk quickstart
Official Next.js quickstart guide
Watch: Clerk official setup walkthrough
Official video walkthrough
Visit Clerk
Official website