TEXT

Aaa

Contributed by swift282831@gmail.com

Improved by Laravel Company · 2026-09-07

Improved prompt:

Role: Lead Node.js Automation Engineer

Project Objective:
Develop a comprehensive, production-grade Account Registration and Reporting Automation System using Node.js. This system must execute real browser automation and genuine network operations. No simulations, mock data, placeholders, or pseudo-code are permitted.

Simulation Policy:

  • Never simulate any actions or use fake outputs.
  • Avoid dummy services and placeholder data.
  • Ensure all logic is fully functional and executable.

Tech Stack:

  • Node.js (ES2022+)
  • Playwright (preferred) or Puppeteer Extra with Stealth Plugin
  • Native fs module
  • readline or inquirer for user interaction
  • axios for API and Telegram communication
  • Express for dashboard API

System Requirements:

  1. Input System Requirements

    • Asynchronously read email addresses from the gmailer.txt file.
    • Each line represents a unique email address.
    • Prompt the user for required parameters:
      • Username prefix
      • Password
      • Headless mode (boolean: true/false)
    • Ensure the system does not block the event loop during user input.
  2. Browser Automation Requirements
    For each email address:

    • Launch a browser with an optional headless mode.
    • Use a random user agent from an internal list.
    • Apply random delays between actions to mimic human behavior.
    • Open a new browser context for each attempt.
    • Automatically clear cookies after each attempt.
    • Handle navigation errors gracefully without crashing the system.
  3. Free Proxy Support

    • Use only free public HTTP/HTTPS proxies.
    • Load proxies from the proxies.txt file.
    • Rotate proxies per account for each attempt.
    • If a proxy fails, retry with the next available proxy.
    • The system must still function without a proxy.
  4. Bot Avoidance / Bypass Techniques

    • Implement random viewport sizes.
    • Simulate random typing speeds.
    • Generate random mouse movements (if supported).
    • Mask navigator.webdriver.
    • Utilize acceptable stealth techniques only.
    • Avoid illegal bypass methods or techniques that violate terms of service.
  5. Account Creation Flow

    • The system must be modular to facilitate easy configuration for target websites.
    • The expected steps are:
      a. Navigate to the registration page.
      b. Fill in the email, username, and password fields.
      c. Submit the form.
      d. Detect and handle the success or failure of the registration.
      e. Extract any confirmation data if it is available.
  6. File Output System Requirements
    On successful account creation:

    • Append the successful account details to the outputs/basarili_hesaplar.txt file.
    • Append only the username to the outputs/kullanici_adlari.txt file.
    • Append only the password to the outputs/sifreler.txt file.
    • Use the following format:
      php
      email:username:password

    On failed attempts:

    • Append the error details to the logs/error_log.txt file.
    • Use the following format:
      php
      ${timestamp} Email: X | Error: MESSAGE
  7. Telegram Notification

    • If both TELEGRAM_TOKEN and CHAT_ID are set, send a message with the following format:
      php
      New Account Created:
      Email: X
      User: Y
      Time: Z
  8. Real-Time Dashboard API

    • Create an Express server on port 3000.
    • Provide the following endpoints:
      • GET /stats: Return JSON data with the following fields:
        • total: Total number of attempts
        • success: Number of successful attempts
        • failed: Number of failed attempts
        • running: Number of currently running attempts
        • elapsedSeconds: Total duration in seconds
      • GET /logs: Return the last 100 log lines
    • The dashboard must update in real-time.
  9. Final Console Report

    • After all email addresses have been processed, display a console.table with the following data:
      • Total Attempts
      • Successful Attempts
      • Failed Attempts
      • Success Rate (%)
      • Total Duration (seconds and minutes)
  10. Error Handling

    • Wrap each account attempt within a try/catch block.
    • Ensure the system does not crash on a single failed attempt.
    • Continue processing the remaining email addresses.
  11. Code Quality Requirements

    • Implement fully asynchronous code using async/await.
    • Adopt a modular architecture for easy maintenance and scalability.
    • Avoid global blocking to ensure efficient resource utilization.
    • Maintain a clean separation of concerns.

Project Structure:

php
project-root
  main.js
  gmailer.txt
  proxies.txt
  /outputs
    /basarili_hesaplar.txt
    /kullanici_adlari.txt
    /sifreler.txt
  /logs
    /error_log.txt
  /dashboard
    /index.js
    /public
    /views
  package.json

Output Requirements:

  • Produce a complete runnable Node.js application.
  • Include a package.json file with the necessary dependencies.
  • Provide clear, step-by-step instructions for running the application.
  • Do not include Docker or paid tools.
  • Avoid any simulations, incomplete sections, or placeholder code.
  • If any requirement cannot be implemented, provide the closest real functional alternative.
  • Do not ask questions or generate explanations only; provide full, working code.

Important Notes:

  • If any requirement cannot be implemented, provide the closest real functional alternative.
  • Do not ask questions or generate explanations only; provide full, working code.
Original prompt (before our improvements)

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.