How the pieces connect
Clerk runs the identity service and gives the Next.js app server and browser helpers for the active session. ClerkProvider supplies client context. clerkMiddleware() runs in proxy.ts on Next.js 16+ (middleware.ts on earlier versions) so auth() has request context. Server Components and Route Handlers can then await auth() to read the active user and organization. Follow the installed Clerk SDK version's quickstart for exact API signatures.