Getting Started

Project Structure

The @ezz-auth/next SDK is architected to separate client, server, and edge concerns to ensure maximum performance and security.

Directory Overview

terminal
client/        // Client-side auth utilities
server/        // Server-side auth helpers
middleware/    // Edge authentication middleware
index.js       // Public exports
index.d.ts     // Type definitions

Note: Only these modules are part of the public API. Internal logic is intentionally encapsulated to prevent unauthorized access to core auth protocols.

Public Modules

client/

Client-Side

Contains hooks and components like AuthProvider and useUser for browser-based auth state.

server/

Server-Side

Utilities like currentUser and requireAuth for Secure Server Components and Actions.

middleware/

Edge/Middleware

Lightweight middleware logic designed to run at the edge before request resolution.