DeveloperUnsorted
Playbook
Step by step guide to create this repo
Overview
Better Auth
Using @better-auth/cli to initialize and setup Better Auth
Init
The init command allows you to initialize Better Auth in your project iteratively.
This will generate auth-client.ts , auth.ts and add dependencies.
cd apps/console
bunx @better-auth/cli@latest initGenerate
Generate better auth database schema for Drizzle ORL
Run the migration or generate the schema to add the necessary fields and tables to the database.
cd packages/db
dotenv-run -v -- bunx @better-auth/cli generate --config ../../apps/console/src/lib/auth.ts --output src/schema/auth.tsReact Email
Setting up Resend / react-email
Let's talk about the packages we just installed:
- resend: It is the service that we will be using to send emails
- react-email: It allows us to create email templates using React Js.
- @react-email/render: For converting react js based templates to an html string.
cd apps/console
bun add react-email -D -E
bun add resend @react-email/components @react-email/render -EReferences
- How to send emails using Next.js 14, Resend and React-Email blog
How is this guide?
Last updated on