- Add User, Session, Account, Verification models to Prisma schema - Create auth configuration with Prisma adapter - Add Resend email integration for verification emails - Create sign-in, sign-up, and verify-email pages - Create user dashboard with profile display - Add middleware for /dashboard route protection - Add better-auth and resend dependencies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
780 B
TypeScript
19 lines
780 B
TypeScript
import { createEnv } from '@tpmjs/env';
|
|
import { z } from 'zod';
|
|
|
|
export const env = createEnv({
|
|
NODE_ENV: z.enum(['development', 'production', 'test']).default('development'),
|
|
NEXT_PUBLIC_API_URL: z.string().url().optional(),
|
|
CRON_SECRET: z.string().min(32).optional(), // Required for Vercel Cron security
|
|
RAILWAY_EXECUTOR_URL: z
|
|
.string()
|
|
.url()
|
|
.default('https://endearing-commitment-production.up.railway.app'), // Railway service for health checks
|
|
|
|
// Better Auth
|
|
BETTER_AUTH_SECRET: z.string().min(32).optional(), // Required for session encryption
|
|
BETTER_AUTH_URL: z.string().url().optional(), // Base URL for auth callbacks
|
|
|
|
// Resend (Email)
|
|
RESEND_API_KEY: z.string().startsWith('re_').optional(), // Resend API key for sending emails
|
|
});
|