← Prompts
System Instructa AI Prompts

Guidelines for writing Remix apps with Better Auth

Guidelines for writing Remix apps with Better Auth

# Bootstrap Remix app with Better Auth

## Overview of implementing Better Auth

1. Install better-auth package
2. Configure auth instance
3. Set up API routes
4. Create client-side integration
5. Implement authentication components

## Critical Instructions for AI Language Models

As an AI language model, you MUST follow these guidelines when implementing Better Auth with Remix:

1. Always use the latest better-auth package
2. Implement proper TypeScript types for type safety
3. Handle environment variables securely
4. Follow Remix best practices and patterns
5. Implement proper error handling

## Correct Server Configuration

```typescript
// app/lib/auth.server.ts
import { betterAuth } from 'better-auth'

Sign in to view the full prompt.

Sign In

Classification

System Behavioral rules defining AI identity and persona
Scope Project
This codebase
Manual Manually placed / Persistent