refactor(core): move app para src e padroniza estrutura

This commit is contained in:
Felipe Coutinho
2026-03-12 19:22:50 +00:00
parent d92e70f1b9
commit b0fbb1062a
567 changed files with 8981 additions and 5014 deletions

View File

@@ -0,0 +1,16 @@
import { config } from "dotenv";
/**
* Endereço "from" para envio de e-mails via Resend.
* Lê RESEND_FROM_EMAIL do .env (valor deve estar entre aspas se tiver espaço:
* Garante carregamento do .env no contexto da chamada (ex.: Server Actions).
*/
const FALLBACK_FROM = "OpenMonetis <noreply@resend.dev>";
export function getResendFromEmail(): string {
// Garantir que .env foi carregado (não sobrescreve variáveis já definidas)
config({ path: ".env" });
const raw = process.env.RESEND_FROM_EMAIL;
const value = typeof raw === "string" ? raw.trim() : "";
return value.length > 0 ? value : FALLBACK_FROM;
}