This prompt

Node.js Browser Automation & Reporting System
ROLE: Senior Node.js Automation Engineer

GOAL:
Build a REAL, production-ready Account Registration & Reporting Automation System using Node.js.
This system MUST perform real browser automation and real network operations.
NO simulation, NO mock data, NO placeholders, NO pseudo-code.

SIMULATION POLICY:
NEVER simulate anything.
NEVER generate fake outputs.
NEVER use dummy services.
All logic must be executable and functional.

TECH STACK:
- Node.js (ES2022+)
- Playwright (preferred) OR puppeteer-extra + stealth plugin
- Native fs module
- readline OR inquirer
- axios (for API & Telegram)
- Express (for dashboard API)

SYSTEM REQUIREMENTS:

1) INPUT SYSTEM
- Asynchronously read emails from "gmailer.txt"
- Each line = one email
- Prompt user for:
  • username prefix
  • password
  • headless mode (true/false)
- Must not block event loop

2) BROWSER AUTOMATION
For EACH email:

- Launch browser with optional headless mode
- Use random User-Agent from internal list
- Apply random delays between actions
- Open NEW browserContext per attempt
- Clear cookies automatically
- Handle navigation errors gracefully

3) FREE PROXY SUPPORT (NO PAID SERVICES)
- Use ONLY free public HTTP/HTTPS proxies
- Load proxies from proxies.txt
- Rotate proxy per account
- If proxy fails → retry with next proxy
- System must still work without proxy

4) BOT AVOIDANCE / BYPASS
- Random viewport size
- Random typing speed
- Random mouse movements (if supported)
- navigator.webdriver masking
- Acceptable stealth techniques only
- NO illegal bypass methods

5) ACCOUNT CREATION FLOW
System must be modular so target site can be configured later.

Expected steps:

- Navigate to registration page
- Fill email, username, password
- Submit form
- Detect success or failure
- Extract any confirmation data if available

6) FILE OUTPUT SYSTEM

On SUCCESS:

Append to:
outputs/basarili_hesaplar.txt
FORMAT:
email:username:password

Append username only:
outputs/kullanici_adlari.txt

Append password only:
outputs/sifreler.txt

On FAILURE:

Append to:
logs/error_log.txt

FORMAT:
${timestamp} Email: X | Error: MESSAGE

7) TELEGRAM NOTIFICATION

Optional but implemented:

If TELEGRAM_TOKEN and CHAT_ID are set:

Send message:

"New Account Created:
Email: X
User: Y
Time: Z"

8) REAL-TIME DASHBOARD API

Create Express server on port 3000.

Endpoints:

GET /stats
Return JSON:

{
  total,
  success,
  failed,
  running,
  elapsedSeconds
}

GET /logs
Return last 100 log lines

Dashboard must update in real time.

9) FINAL CONSOLE REPORT

After all emails processed:

Display console.table:

- Total Attempts
- Successful
- Failed
- Success Rate %
- Total Duration (seconds & minutes)

10) ERROR HANDLING

- Every account attempt wrapped in try/catch
- Failure must NOT crash system
- Continue processing remaining emails

11) CODE QUALITY

- Fully async/await
- Modular architecture
- No global blocking
- Clean separation of concerns

PROJECT STRUCTURE:

/project-root
  main.js
  gmailer.txt
  proxies.txt
  /outputs
  /logs
  /dashboard

OUTPUT REQUIREMENTS:

Produce:

1) Complete runnable Node.js code
2) package.json
3) Clear instructions to run
4) No Docker
5) No paid tools
6) No simulation
7) No incomplete sections

IMPORTANT:

If any requirement cannot be implemented,
provide the closest REAL functional alternative.

Do NOT ask questions.
Do NOT generate explanations only.
Generate FULL WORKING CODE.

Related prompt

Act as an Expert Chrome Extension Developer (Manifest V3) and Backend Engineer.

I need you to write the complete, production-ready code for a premium Chrome Extension called "ARIX Pro SEO Toolkit". 

CRITICAL RULES:
1. NO SCRAPING. Use ONLY official, top-tier SEO APIs.
2. Use Manifest V3, Vanilla JavaScript, HTML, and CSS. No React, no build steps.
3. To protect API keys, the extension must NOT call the APIs directly from the popup. It must call a simple, free Vercel Serverless Function (backend proxy) which I will deploy.

TECH STACK & DATA SOURCES:
1. Off-Page SEO (DR, Traffic, Backlinks): DataForSEO API (or Moz API as a fallback). 
2. Technical SEO / Core Web Vitals: Google PageSpeed Insights API.

FILE STRUCTURE REQUIRED:
Please provide the complete code for:
1. `manifest.json` (Manifest V3, permissions: activeTab, storage).
2. `popup.html` (Clean, modern, dark-mode UI with tabs for Overview, Off-Page, and Technical).
3. `popup.css` (Premium styling, clean typography, loading states).
4. `popup.js` (Main controller. It should fetch data from my Vercel backend URL, not directly from the APIs).
5. `api/index.js` (The Vercel Serverless function. This file will hold the API keys securely and make the actual requests to DataForSEO and Google PSI, then return the JSON to the extension).

SPECIFIC LOGIC REQUIREMENTS:
- BACKEND (api/index.js): 
  - Accept a `domain` and `type` (offpage or technical) query parameter.
  - If `type=offpage`, use the DataForSEO API (Basic Auth) to fetch Domain Rank, Organic Traffic, and Backlink count. (Provide clear instructions on how to format the DataForSEO REST API call).
  - If `type=technical`, call the Google PageSpeed Insights API and return the SEO score and Core Web Vitals.
  - Return clean JSON to the frontend.
- FRONTEND (popup.js):
  - Get the current tab's URL.
  - Show a sleek loading skeleton while waiting for the Vercel backend.
  - Display the data in clean cards (e.g., "Domain Rating: 45", "Est. Traffic: 10k", "Backlinks: 5.2k").
  - Include basic local caching (`chrome.storage.local`) for 24 hours so we don't waste API credits if the user clicks the same site twice.

Please output the code for each file clearly labeled. Ensure the Vercel backend code is ready to be deployed in a single `api/` folder.

Why it works

Strict Simulation Policy

Explicitly forbids fake mocks and pseudo-code, forcing the LLM to output executable Playwright and Express code.

Modular Architecture Framing

Separates credential input, proxy rotation, browser execution, and dashboard logging into distinct decoupled modules.

How to use it

  1. Copy the prompt and paste it into Claude 3.5 Sonnet or GPT-4o for optimal architecture generation.
  2. Specify your target form URL or parameters when prompted by the script.
  3. Execute npm install playwright express axios to install the generated dependencies.

Things to check

  • Ensure automated registration flows comply with target websites' terms of service and acceptable use policies.

FAQ

Which Node.js version is recommended for this script?

Node.js 20 LTS or higher is recommended for native modern JavaScript and async file system support.

Can Puppeteer be substituted for Playwright?

Yes, puppeteer-extra with the stealth plugin can be used by modifying the import in the generated code.

View all 807 Coding prompts →
Codingintermediate

Integrate a React Component

Copy-and-use AI prompt for integrate a react component with role framing, constraints, and instructions.

Codingintermediate

3D Sneaker Showcase Website

Copy-and-use AI prompt for 3d sneaker showcase website with role framing, constraints, and instructions.

Codingintermediate

3D FPS Game

Copy-and-use AI prompt for 3d fps game with role framing, constraints, and instructions.

Codingintermediate

3D Racing Game

Copy-and-use AI prompt for 3d racing game with role framing, constraints, and instructions.

Codingintermediate

3D Space Explorer

Copy-and-use AI prompt for 3d space explorer with role framing, constraints, and instructions.

Codingintermediate

7v7 Football Team Generator App

Copy-and-use AI prompt for 7v7 football team generator app with role framing, constraints, and instructions.

Codingadvanced

SEO Chrome Extension Builder

Copy-and-use AI prompt for seo chrome extension builder with role framing, constraints, and instructions.

Codingadvanced

CLI Project Preferences

Copy-and-use AI prompt for cli project preferences with role framing, constraints, and instructions.