diff --git a/.env.example b/.env.example index 2c1dd75..03238c2 100644 --- a/.env.example +++ b/.env.example @@ -2,8 +2,10 @@ DATABASE_URL="" # Redis -REDIS_URL="" -REDIS_TTL="" +UPSTASH_REDIS_REST_URL="" +UPSTASH_REDIS_REST_TOKEN="" +UPSTASH_RATELIMIT_REQUESTS="" +UPSTASH_RATELIMIT_SECONDS="" #Next Auth Core NEXTAUTH_SECRET="" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c100851..05ab092 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,6 +1,3 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - enum RoleValue { USER ADMIN diff --git a/src/components/templates/Goodbye.tsx b/src/components/templates/Goodbye.tsx index 26ae496..8f132dc 100644 --- a/src/components/templates/Goodbye.tsx +++ b/src/components/templates/Goodbye.tsx @@ -8,27 +8,42 @@ import { Preview, Text, Hr, + Tailwind, + Section, + Img, } from "@react-email/components"; +import { env } from "~/env.mjs"; -interface EmailTemplateProps { +interface GoodbyeTemplateProps { name: string; } -export const Goodbye: React.FC> = ({ name }) => ( +export const Goodbye: React.FC> = ({ name }) => ( Sorry to see you go... 😭 - - - Farewell, {name}... - {"Were sorry to see you go."} - - Your data has been deleted, including all room history, user data, - votes, etc. - -
- Sprint Padawan Admin - Atridad -
- + + + +
+ {`Sprint +
+ Farewell, {name}... + {"Were sorry to see you go."} + + Your data has been deleted, including all room history, user data, + votes, etc. + +
+ — The Sprint Padawan team +
+ +
); diff --git a/src/components/templates/Welcome.tsx b/src/components/templates/Welcome.tsx index fc7432a..4f4372d 100644 --- a/src/components/templates/Welcome.tsx +++ b/src/components/templates/Welcome.tsx @@ -8,27 +8,47 @@ import { Preview, Text, Hr, + Tailwind, + Section, + Img, } from "@react-email/components"; +import { env } from "~/env.mjs"; -interface EmailTemplateProps { +interface WelcomeTemplateProps { name: string; } -export const Welcome: React.FC> = ({ name }) => ( +export const Welcome: React.FC> = ({ name }) => ( 🎉 Welcome to Sprint Padawan! 🎉 - - - Welcome, {name}! - Thank you for signing up for Sprint Padawan! - - If at any point you encounter issues, please let me know at - support@sprintpadawan.dev. - -
- Sprint Padawan Admin - Atridad -
- + + + +
+ {`Sprint +
+ + 🎉 Welcome to Sprint Padawan, {name}! 🎉 + + + Hello {name}, + + Thank you for signing up for Sprint Padawan! + + If at any point you encounter issues, please let me know at + support@sprintpadawan.dev. + +
+ — The Sprint Padawan team +
+ +
); diff --git a/src/env.mjs b/src/env.mjs index d09bbf1..52bf8c8 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -22,27 +22,8 @@ const server = z.object({ // VERCEL_URL doesn't include `https` so it cant be validated as a URL process.env.VERCEL ? z.string().min(1) : z.string().url() ), - // Add `.min(1) on ID and SECRET if you want to make sure they're not empty - GITHUB_CLIENT_ID: z.preprocess( - // This makes Vercel deployments not fail if you don't set NEXTAUTH_URL - // Since NextAuth.js automatically uses the VERCEL_URL if present. - (str) => - process.env.NODE_ENV === "development" - ? process.env.GITHUB_CLIENT_ID_LOCAL - : process.env.GITHUB_CLIENT_ID, - // VERCEL_URL doesn't include `https` so it cant be validated as a URL - z.string() - ), - GITHUB_CLIENT_SECRET: z.preprocess( - // This makes Vercel deployments not fail if you don't set NEXTAUTH_URL - // Since NextAuth.js automatically uses the VERCEL_URL if present. - (str) => - process.env.NODE_ENV === "development" - ? process.env.GITHUB_CLIENT_SECRET_LOCAL - : process.env.GITHUB_CLIENT_SECRET, - // VERCEL_URL doesn't include `https` so it cant be validated as a URL - z.string() - ), + GITHUB_CLIENT_ID: z.string(), + GITHUB_CLIENT_SECRET: z.string(), GOOGLE_CLIENT_ID: z.string(), GOOGLE_CLIENT_SECRET: z.string(), ABLY_PRIVATE_KEY: z.string(),