diff --git a/README.md b/README.md index 8c56115..35ae8e4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # MkSaaS -Make AI SaaS in days, simply and effortlessly. +Make AI SaaS in a weekend. -MkSaaS is a complete Next.js boilerplate for building AI SaaS websites. Make money from day one with our battle-tested stack and built-in monetization features. +The complete Next.js boilerplate for building profitable SaaS, with auth, payments, i18n, newsletter, dashboard, blog, docs, blocks, themes, SEO and more. ## Author diff --git a/package.json b/package.json index feeed28..fc8d610 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "db:migrate": "drizzle-kit migrate", "db:push": "drizzle-kit push", "db:studio": "drizzle-kit studio", + "list-contacts": "tsx scripts/list-contacts.ts", "docs": "content-collections build", "email": "email dev --dir src/mail/templates --port 3333" }, diff --git a/scripts/list-contacts.ts b/scripts/list-contacts.ts new file mode 100644 index 0000000..28e6d14 --- /dev/null +++ b/scripts/list-contacts.ts @@ -0,0 +1,25 @@ +import dotenv from 'dotenv'; +import { Resend } from 'resend'; +dotenv.config(); + +const resend = new Resend(process.env.RESEND_API_KEY); + +export default async function listContacts() { + const contacts = await resend.contacts.list({ + audienceId: process.env.RESEND_AUDIENCE_ID!, + }); + + // print all emails + const emails: string[] = []; + if (Array.isArray(contacts.data?.data)) { + for (const contact of contacts.data.data) { + emails.push(contact.email); + } + } else { + console.error('contacts is not iterable'); + } + + console.log(emails.join(', ')); +} + +listContacts();