Skip to content

profullstack/neon-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Neon Prompt Engine Builder

A production-ready Node.js CLI tool for generating digital product bundles with AI-powered content, branded PDFs, and automated packaging.

Features

  • πŸš€ Interactive CLI - Inquirer-based prompts with sensible defaults
  • πŸ“Š Progress Tracking - Real-time progress bars for all operations
  • πŸ€– AI Content Generation - OpenAI-powered content creation with retry logic
  • πŸ“„ Branded PDFs - Puppeteer-based PDF generation with custom branding
  • πŸ“¦ Automated Packaging - ZIP archives for each section and master bundle
  • βš™οΈ Highly Configurable - Override chunks, models, colors, and more

Requirements

  • Node.js 20 or newer
  • OpenAI API key
  • pnpm (recommended) or npm

Installation

# Clone or download the project
cd neon-builder

# Install dependencies
pnpm install

Usage

Interactive Mode

Run the CLI and follow the prompts:

pnpm start

On first run, you'll be prompted to enter your OpenAI API key. The key is securely stored in ~/.config/neon-builder/credentials.json for future use.

Or use the binary directly:

./src/index.js

Configuration Options

The CLI will prompt you for:

Option Description Default
Root Folder Output directory name NeonPromptEngine
Model OpenAI model to use gpt-4
Temperature Generation creativity (0-2) 0.7
Generate PDFs Create branded PDF files true
Primary Color Brand primary color (hex) #00FFC8
Secondary Color Brand secondary color (hex) #1a1a2e
Logo URL URL to brand logo -
Footer Text PDF footer text Β© Neon Prompt Engine

API Key Management

Your OpenAI API key is stored securely in:

~/.config/neon-builder/credentials.json

The CLI will:

  1. Check for OPENAI_API_KEY environment variable first
  2. Fall back to stored credentials in ~/.config/neon-builder/
  3. Prompt you to enter a key if none is found
  4. Optionally save the key for future use

Environment Variables

Variable Description
OPENAI_API_KEY OpenAI API key (overrides stored credentials)
NEON_MODEL Override default model
NEON_OUTPUT_DIR Override output directory
NEON_VERBOSE Enable verbose logging (true/false)

Sections

The builder generates content for these sections:

Section Default Chunks Description
Core Prompts 12 300 strategic prompts
Premium Prompts 14 700 advanced prompts
Automation 5 75 automation workflows
Sales Pages 5 Funnel sales pages
Thank You Pages 5 Post-purchase pages
Launch Emails 2 Email sequences
Affiliate Toolkit 4 JV/affiliate materials
Branding Docs 2 Brand guidelines
JVZoo Docs 3 Marketplace listings
READMEs 3 Documentation files

Output Structure

NeonPromptEngine/
β”œβ”€β”€ core_prompts/
β”‚   β”œβ”€β”€ chunk_01.txt
β”‚   β”œβ”€β”€ chunk_01.pdf
β”‚   └── ...
β”œβ”€β”€ premium_prompts/
β”‚   └── ...
β”œβ”€β”€ core_prompts.zip
β”œβ”€β”€ premium_prompts.zip
└── NeonPromptEngine_complete.zip

Development

Project Structure

neon-builder/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.js           # Main CLI entry point
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ sections.js    # Section definitions
β”‚   β”‚   β”œβ”€β”€ defaults.js    # Default configuration
β”‚   β”‚   └── index.js
β”‚   β”œβ”€β”€ generators/
β”‚   β”‚   β”œβ”€β”€ content-generator.js  # OpenAI integration
β”‚   β”‚   β”œβ”€β”€ pdf-generator.js      # Puppeteer PDF creation
β”‚   β”‚   β”œβ”€β”€ zip-packager.js       # ZIP archive creation
β”‚   β”‚   └── index.js
β”‚   β”œβ”€β”€ prompts/
β”‚   β”‚   β”œβ”€β”€ cli-prompts.js # Inquirer prompts
β”‚   β”‚   └── index.js
β”‚   └── utils/
β”‚       β”œβ”€β”€ progress.js    # Progress bars & logging
β”‚       β”œβ”€β”€ file-system.js # File operations
β”‚       └── index.js
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ generators/
β”‚   └── utils/
β”œβ”€β”€ package.json
β”œβ”€β”€ vitest.config.js
β”œβ”€β”€ eslint.config.js
└── .prettierrc

Running Tests

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

Linting & Formatting

# Run ESLint
pnpm lint

# Fix ESLint issues
pnpm lint:fix

# Check formatting
pnpm format:check

# Format code
pnpm format

API Reference

Content Generator

import { createOpenAIClient, generateChunk, generateSection } from './generators/content-generator.js';

// Create client
const client = createOpenAIClient(process.env.OPENAI_API_KEY);

// Generate a single chunk
const content = await generateChunk(client, {
  model: 'gpt-4',
  temperature: 0.7,
  section: sectionConfig,
  chunkIndex: 0,
  totalChunks: 5,
  branding: brandingConfig,
});

PDF Generator

import { generateBrandedPdf, generateSectionPdfs } from './generators/pdf-generator.js';

// Generate a single PDF
await generateBrandedPdf({
  content: 'Your content here',
  outputPath: './output/document.pdf',
  title: 'Document Title',
  sectionLabel: 'Section Name',
  chunkNumber: 1,
  totalChunks: 5,
  branding: brandingConfig,
});

ZIP Packager

import { createSectionZip, createMasterZip } from './generators/zip-packager.js';

// Create section ZIP
const zipPath = await createSectionZip({
  sectionId: 'core_prompts',
  sectionDir: './output/core_prompts',
  outputDir: './output',
});

// Create master ZIP
await createMasterZip(sectionZipPaths, './output/master.zip');

Dependencies

Production

Package Purpose
openai OpenAI API client
inquirer Interactive CLI prompts
cli-progress Progress bar display
puppeteer PDF generation
jszip ZIP archive creation
fs-extra Enhanced file operations

Development

Package Purpose
vitest Test framework
@vitest/coverage-v8 Code coverage
eslint Code linting
prettier Code formatting

License

MIT

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new functionality
  4. Implement the feature
  5. Run tests and linting
  6. Submit a pull request

Roadmap

  • HTML sales page templates
  • React/Next.js PDF layouts
  • Image generation for banners
  • License key generator
  • S3 upload integration
  • Resume generation on API failure
  • Caching system
  • GUI dashboard version

About

A builder for selling AI generated digital products on sites like JVzoo and Clickbank.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published