Skip to content

rownap/lead-magnet-generator

Repository files navigation

Lead Magnet Generator

Portfolio MVP for creating AI-assisted lead magnets, publishing opt-in pages, and collecting leads in a local dashboard.

This is not presented as a live SaaS with paying users. It is a verifiable product demo: it builds from a clean clone, runs without OAuth, supports a local SQLite database, and falls back to deterministic demo content when no AI key is configured.

Portfolio Links

Link Status
Public demo Not deployed yet
Source code github.com/rownap/lead-magnet-generator
Local verification Build, lint, audit, database setup, generation API, opt-in page, lead capture

Current Status

Area Status
Marketing page Implemented
Demo dashboard Implemented
Lead magnet wizard Implemented
AI generation Implemented with Gemini when configured; deterministic fallback otherwise
Campaign and opt-in pages Implemented
Lead capture and CSV export Implemented
Auth Demo workspace only; OAuth is intentionally not required
Payments Not implemented; pricing copy is product-roadmap packaging
Live deployment Not published yet

Verified Locally

These checks pass from this repository:

npm ci
npm run lint
npm run build
npm audit --audit-level=moderate
npm run db:setup
npm run dev

API smoke tested:

  • POST /api/lead-magnets/generate
  • POST /api/campaigns
  • POST /api/leads
  • GET /api/leads/list
  • GET /l/[slug]
  • GET /l/[slug]/thank-you

Quick Start

npm ci
npm run db:setup
npm run dev

Open http://localhost:3000, then use the demo dashboard at /dashboard.

Optional AI generation:

cp .env.example .env.local
# set GEMINI_API_KEY in .env.local

Without GEMINI_API_KEY, the app still works and creates deterministic demo lead magnet content.

Tech Stack

Layer Technology
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS
Backend Next.js API routes
Database Prisma ORM with local SQLite
AI Gemini API via @google/generative-ai, with local fallback
UI Framer Motion, Lucide icons

Product Flow

  1. Create a lead magnet from the dashboard wizard.
  2. Generate outline and Markdown content.
  3. Create a campaign with opt-in copy.
  4. Share /l/[slug].
  5. Capture name and email.
  6. Export collected leads as CSV.

Deployment Notes

The current repo is optimized for local portfolio verification. Before production deployment:

  • Replace the demo workspace with real authentication.
  • Move from SQLite to managed Postgres.
  • Add rate limits and abuse protection to public lead capture.
  • Add email delivery or ESP integration.
  • Replace roadmap pricing with real billing or remove it.

Repository Hygiene

  • No OAuth provider is required for the demo.
  • No secrets are required to build.
  • npm audit --audit-level=moderate currently reports zero vulnerabilities.
  • Local database files are ignored by git.

About

AI lead magnet and opt-in funnel generator built with Next.js and Prisma.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors