Skip to content

Deepcoders30/Project-Reviewer

Repository files navigation

🕵️‍♂️ Project Reviewer – Playwright + Node.js Automation Tool

This tool reviews and tags web projects automatically using Playwright and Node.js. It detects the frontend framework (React, Next.js, Vanilla), validates if the project demo is live, takes a screenshot, checks for interactiveness, and handles broken URLs gracefully.

🚀 Features

For each project with a demo_url, the tool:

  • Navigates to the demo page using Playwright
  • Captures a full-page screenshot
  • Detects if the page is live
  • Checks whether it is interactive (basic interaction with input fields or buttons)
  • Extracts visible UI elements like input, button.
  • Identifies the frontend framework (React, Next.js, or Vanilla HTML/CSS/JS)
  • Error Handling
  • Returns a structured JSON summary for all reviewed projects

📁 Folder Structure

project-reviewer/
│
├── lighthouse_reports/       # Stores lighthouse audit reports
│   ├── project1.json        
│   └── project2.json
├── screenshots/              # Stores screenshots
│   ├── project1.png          # Example: Screenshot files
│   └── project2.png
└── README.md                 # Project documentation
├── input.json                # Input file with `candidate_id` and project URLs
├── output.json               # Output file with review results (auto-generated)
├── review_projects.js        # Main script to run the review
├── lighthouse_audit.js       # lighthouse audit script
└── timing_logs.txt           # Time each project review is taking

📦 Prerequisites

  • Node.js (v18+ recommended)
  • NPM installed globally
  • Google Chrome (stable version) installed locally ( The script uses Lighthouse via chrome-launcher, which requires a local Chrome installation. If Chrome is not in the default install path Set the CHROME_PATH environment variable to the location of Chrome)

🧱 Installation

  1. Clone this repository:

    git clone https://github.com/your-username/project-reviewer.git
    cd project-reviewer
  2. Install the required Node.js dependencies:

    npm install
  3. Install Playwright browsers:

    npx playwright install

🛠 How to Run

  1. Create an input.json file with your project details inside root folder:

    {
      "candidate_id": "cand_umair_23a4e1",
      "projects": [
        {
          "name": "Project One",
          "demo_url": "https://example.com"
        },
        {
          "name": "Project Two",
          "demo_url": "https://example2.com"
        }
      ]
    }
  2. Run this command and the output.json file will be created automatically inside the root folder:

    node review_projects.js input.json > output.json

📊 Output Format (Sample)

{
  "candidate_id": "cand_umair_23a4e1",
  "project_reviews": [
    {
      "name": "AI ChatPDF",
      "status": "live",
      "interactive": true,
      "ui_elements": ["button"],
      "framework": "React JS",
      "error_message": null,
      "screenshot_path": "D:\\project-reviewer\\screenshots\\cand_umair_23a4e1_AI ChatPDF.png"
    }
  ]
}

About

Project Reviewer - This tool reviews and tags web projects automatically using Playwright and Node.js.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published