How the pieces connect
Resend runs entirely on the server side of Next.js. The Resend client is constructed with new Resend(process.env.RESEND_API_KEY) and only ever lives inside a Route Handler (app/api/.../route.ts), a Server Action, or a server component's data path — never in a "use client" file, because the API key would ship to the browser.
React Email is where the two halves overlap. You author templates as ordinary React components under emails/, then pass the component instance to resend.emails.send({ react: <WelcomeEmail name={name} /> }). Resend renders that component to HTML server-side before handing it to its delivery API, so the same JSX primitives you know from the web UI describe the email body. The handler returns { data, error } — check error rather than assuming success.