Skip to content

About

A modern, scalable newsletter automation platform built with a microservices architecture using Turborepo.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Newsletter Automation Platform

A modern, scalable newsletter automation platform built with a microservices architecture using Turborepo. This monorepo contains all the services and packages needed to create, manage, and send AI-powered newsletters.

Overview

This platform allows users to create personalized newsletters with AI-generated content based on specified topics and requirements. The system handles scheduling, content generation, and email delivery through a series of coordinated microservices.

What's inside?

This Turborepo includes the following apps and packages:

Apps

  • api: An Express.js REST API server that handles user requests, newsletter management, and webhook processing
  • web: A Next.js frontend application with user authentication, newsletter creation/management, and dashboard
  • queue-worker: A worker service that monitors the queue for scheduled newsletters and triggers processing
  • processor-worker: A worker service that generates newsletter content using LLMs and sends emails

Packages

  • @repo/db: PostgreSQL database access layer using Prisma ORM
  • @repo/logger: Centralized logging system using Pino
  • @repo/queue: Redis-based job queue system using BullMQ
  • @repo/mailer: Email delivery service using Nodemailer
  • @repo/llm: AI language model integration with LangChain (OpenAI, Groq)
  • @repo/template-engine: Email template rendering using MJML
  • @repo/shared: Shared types, utilities, and constants
  • @repo/jest-presets: Jest configurations for testing
  • @repo/config-eslint: ESLint configurations
  • @repo/config-typescript: TypeScript configurations

Key Features

  • User authentication and management via Clerk
  • AI-powered newsletter content generation
  • Customizable newsletter topics and scheduling
  • Email template rendering and delivery
  • Job queue for reliable processing
  • Dashboard with analytics and history

Tech Stack

  • Frontend: Next.js, React, Tailwind CSS, Radix UI
  • Backend: Express.js, Node.js
  • Database: PostgreSQL with Prisma ORM
  • Queue: Redis with BullMQ
  • AI: LangChain with OpenAI/Groq integration
  • Email: Nodemailer, MJML
  • Authentication: Clerk
  • Deployment: Docker, Vercel

Getting Started

  1. Clone the repository
  2. Install dependencies with pnpm install
  3. Set up environment variables (see .env.example files)
  4. Start the development server with pnpm dev

Development Workflow

This project uses Turborepo to manage the build system. Common commands:

# Install dependencies
pnpm install

# Start development servers
pnpm dev

# Build all packages and apps
pnpm build

# Run linting
pnpm lint

# Type checking
pnpm check-types

# Run tests
pnpm test

Environment Setup

Each app and some packages require environment variables. Check the .env files in each directory for required variables.

Database

The project uses PostgreSQL with Prisma ORM. To set up the database:

# Generate Prisma client
pnpm -F @repo/db db:generate

# Push schema changes to database
pnpm -F @repo/db db:migrate-dev

# Seed the database
pnpm -F @repo/db db:seed

Deployment

The project can be deployed using Docker with the included docker-compose.yml file or through platform-specific deployments (Vercel, etc.).

About

A modern, scalable newsletter automation platform built with a microservices architecture using Turborepo.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages