This guide shows how to set up Better Auth with Prisma and a database (SQLite or Postgres) in a Next.js project.
# Core dependencies| const { useState } = React; | |
| const PasswordStrength = () => { | |
| const [password, setPassword] = useState(''); | |
| const requirements = [ | |
| { label: '8+ characters', check: (pwd) => pwd.length >= 8 }, | |
| { label: '12+ characters', check: (pwd) => pwd.length >= 12 }, | |
| { label: 'Lowercase letter', check: (pwd) => /[a-z]/.test(pwd) }, | |
| { label: 'Uppercase letter', check: (pwd) => /[A-Z]/.test(pwd) }, |
| import { clsx, type ClassValue } from 'clsx' | |
| import { twMerge } from 'tailwind-merge' | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)) | |
| } |
| # for windows | |
| PS C:\Users\sayem> netstat -aon | findstr :3000 | |
| TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 12008 | |
| TCP [::]:3000 [::]:0 LISTENING 12008 | |
| PS C:\Users\sayem> taskkill /PID 12008 /F | |
| SUCCESS: The process with PID 12008 has been terminated. | |
| PS C:\Users\sayem> | |
| #for linux | |
| lsof -i :3000 |
| keycode 117 = End |
| import { Check } from "lucide-react"; | |
| export default function Steps({ steps, currentStep = 1 }: { steps: string[], currentStep?: number }) { | |
| return ( | |
| <div className="flex gap-x-0 -mx-4 lg:-ms-0 overflow-auto py-4"> | |
| {steps.map((step, index) => ( | |
| <div key={index} className="flex flex-col items-center px-4 gap-2 relative step-circle-container "> | |
| <div className={`${currentStep > index + 1 ? 'before:bg-gray-700 after:bg-gray-700 border-gray-700' : 'before:bg-gray-300 after:bg-gray-300 border-gray-300'} h-5 w-5 bg-white border rounded-full step-circle flex items-center justify-center `}> | |
| <div className={`${currentStep > index + 1 ? 'scale-100 w-full h-full' : currentStep == index + 1 ? ' scale-100 h-1.5 w-1.5' : 'scale-0'} flex items-center justify-center rounded-full bg-gray-700 `}> |
| { | |
| "version": 2, | |
| "builds": [ | |
| { | |
| "src": "app.js", | |
| "use": "@vercel/node" | |
| } | |
| ], | |
| "routes": [ | |
| { |
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-7.0.asc
If you receive an error indicating that gnupg is not installed, perform the following steps:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=Edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Colorful Glowing Liquid</title> | |
| <!-- Custom Styles --> | |
| <style> |