Drag — The AI-native email marketing studio.
Effortlessly build and brand stunning emails and marketing assets with AI-assisted workflows and drag-and-drop editing.
Built as a Bun + Turborepo monorepo.
- Drag & drop editor: compose emails from React Email components with drag & drap and AI assistant
- Brand tools: import brand identity via Firecrawl + generate marketing stunning market assets via fal.ai
Drag helps you build production-ready marketing and even transactional emails with a component-based editor, then export clean JSX/HTML.
.
├── apps/
│ ├── app/ # Main product - Email Builder (Next.js)
│ ├── web/ # Marketing / waitlist site (Next.js)
│ └── api/ # Reserved (currently empty)
├── packages/
│ ├── ui/ # Shared UI components (shadcn)
│ ├── email/ # React Email templates/utilities
│ └── ... # analytics / jobs / kv / logger / (legacy/
├── env.example # Example env vars (see per-app env.example too)
├── turbo.json # Turborepo config
└── README.md
- Runtime: Bun
- Monorepo: Turborepo
- Apps: Next.js (App Router) + React 19
- Email:
@react-email/components+@react-email/render - Drag & drop:
@dnd-kit/* - Backend/Auth: Convex +
@convex-dev/auth - Email sending: Resend (optional)
- AI: Vercel AI SDK + Vercel AI Gateway (optional)
- Lint/format: Biome
bun installThis repo includes env.example files you can copy locally:
cp apps/app/env.example apps/app/.env.local
cp apps/web/env.example apps/web/.env.localConvex environment variables are separate (set in Convex Dashboard or via CLI). See:
apps/app/convex/env.example
In one terminal:
cd apps/app
bunx convex devIn another terminal from the repo root:
# Builder (http://localhost:3000)
bun dev:app
# Marketing (http://localhost:3001)
# bun dev:webThere are two runtimes for the builder:
- Next.js runtime:
apps/app/.env.local(browser + Next routes) - Convex runtime: set via Convex Dashboard / CLI (Convex functions + Convex Auth)
NEXT_PUBLIC_CONVEX_URL: required (your deployment URL, e.g.https://<name>.convex.cloud)NEXT_PUBLIC_APP_URL: recommended (defaults tohttp://localhost:3000)AI_GATEWAY_API_KEY: required for AI assistant featuresRESEND_API_KEY: optional (enables sending emails from/api/send-email; otherwise it logs)
See apps/app/convex/env.example. Common ones:
CONVEX_SITE_URL: required by Convex Auth config (typicallyhttp://localhost:3000for local)JWT_PRIVATE_KEY: required by Convex AuthRESEND_API_KEY+RESEND_FROM: required for OTP verification / password reset emailsFIRECRAWL_API_KEY: optional (brand import on/assets)FAL_KEY: optional (marketing image generation on/assets)
To generate JWT keys locally:
cd apps/app
bun run generate-jwt-keysbun dev # dev all apps
bun dev:app # dev builder only
bun dev:web # dev marketing only
bun build # build all
bun lint # lint all
bun format # biome format
bun check # biome check --writeAGPL-3.0 — see LICENSE.