npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

navflow-browser-server

v1.15.0

Published

Standalone Playwright browser server for NavFlow - enables browser automation with API key authentication, workspace device management, session sync, LLM discovery tools, and requires Node.js v22+

Readme

NavFlow Browser Server

A standalone Playwright browser server that enables remote browser automation through secure API key authentication. Perfect for running browser automation workflows from cloud-based frontends.

Quick Start

npx navflow-browser-server

The server will start and display an API key that you can use in the NavFlow frontend at https://buildship-pfw15o.web.app.

Features

Playwright Integration - Full support for Chromium, Firefox, and WebKit browsers
API Key Authentication - Secure device-based authentication with generated API keys
Auto-Installation - Automatically detects and installs Playwright browsers on first run
Node.js v22+ Support - Built for modern Node.js with version validation
Session Management - Persistent browser sessions with cookie/storage support
Flow Execution - Execute complex automation workflows
LLM Discovery Tools - AI-powered flow creation with real-time validation
Real-time Communication - WebSocket support for live updates
Easy Installation - No setup required, works with npx

Usage

Basic Usage

# Start server on default port (3002)
npx navflow-browser-server

# Start server on custom port
npx navflow-browser-server --port=3003

# Show help
npx navflow-browser-server --help

# Show version
npx navflow-browser-server --version

Using with NavFlow Frontend

  1. Start the server:

    npx navflow-browser-server
  2. Copy the API key from the console output:

    📋 API KEY (Copy this to your NavFlow webapp):
    ────────────────────────────────────────────────────────
    abc123def456789...your-api-key-here
    ────────────────────────────────────────────────────────
  3. Configure the frontend:

  4. Start automating! Create and run browser automation flows from the cloud interface.

System Requirements

Automatic Validation

The server automatically checks and validates:

  • Node.js v22+ - Required for optimal performance and security
  • Playwright Browsers - Auto-installs if not detected
  • System Compatibility - Validates environment before starting

Manual Requirements

  • Internet connection for Playwright browser downloads
  • ~1GB disk space for Playwright browsers
  • Modern operating system (Windows 10+, macOS 10.14+, Linux)

API Endpoints

The server exposes several REST endpoints for browser automation (all require API key authentication):

Health Check

GET /health

Returns server status and device information.

Device Information

GET /device

Returns device details including MAC address and configuration.

Session Management

POST /sessions                    # Create browser session
GET /sessions/:id                 # Get session info  
DELETE /sessions/:id              # Close session
POST /sessions/:id/actions        # Execute browser action

Flow Execution

POST /execute-flow               # Execute automation flow

Authentication Sessions

GET /api/sessions                # List saved sessions
POST /api/sessions               # Create new session
DELETE /api/sessions/:name       # Delete session

Discovery Tools (LLM Self-Discovery System)

The browser server includes specialized endpoints for AI-powered flow creation. These tools allow Large Language Models to interact with real browsers to validate and test automation steps in real-time:

POST /discovery/checkSelector     # Validate CSS selectors exist on page
POST /discovery/getHTML          # Extract HTML content from elements  
POST /discovery/screenshot       # Capture page screenshots for AI analysis
POST /discovery/executeStep      # Test automation steps (click, type, navigate)
POST /discovery/getCurrentURL    # Get current page URL and status

Example: Checking if a selector exists

// Request
{
  "sessionId": "my-session",
  "selector": "button[aria-label='Submit']"
}

// Response
{
  "exists": true,
  "count": 1,
  "visible": true
}

Example: Testing an automation step

// Request
{
  "sessionId": "my-session", 
  "action": "click",
  "selector": "button.submit-btn"
}

// Response
{
  "success": true,
  "error": "",
  "newUrl": "https://example.com/success"
}

These tools enable the LLM to:

  • Test multiple selector candidates to find reliable ones
  • Verify that automation steps actually work before including them in flows
  • Understand page context through screenshots and HTML inspection
  • Build flows incrementally with real-time validation

All discovery endpoints require API key authentication and operate within isolated browser sessions.

Authentication

All API endpoints (except /health and /device) require API key authentication:

# Include in Authorization header
Authorization: Bearer your-api-key-here

# Or as query parameter
GET /sessions?apiKey=your-api-key-here

Environment Variables

  • BROWSER_SERVER_PORT - Port to run server on (default: 3002)

Data Storage

The server creates data directories to store:

  • Device Configuration: device-config.json (API key, MAC address)
  • Session Data: data/sessions/ (authentication profiles, cookies)
  • Temporary Files: Various runtime data

Troubleshooting

Node.js Version Issues

If you see a Node.js version error:

  1. Visit https://nodejs.org/
  2. Download Node.js v22 or higher
  3. Install and restart your terminal
  4. Run the command again

Port Already in Use

npx navflow-browser-server --port=3003

Playwright Installation Issues

The server auto-installs Playwright browsers, but if you encounter issues:

npx playwright install

API Key Issues

  • API keys are unique per device (MAC address)
  • Keys are automatically generated on first run
  • If you need a new key, delete device-config.json and restart

Security

  • Device-Based Authentication - Unique API keys per machine
  • Local Data Storage - All browser data stays on your device
  • Secure Communication - API key authentication for all requests
  • No Cloud Dependencies - Direct connection, no proxy servers

Startup Output

When everything is working correctly, you'll see:

🌊 NavFlow Browser Server starting on port 3002...
📍 Health check: http://localhost:3002/health
🔌 WebSocket: ws://localhost:3002

🔍 Checking Playwright browser installation...
✅ Playwright browsers are installed and ready

🖥️  SYSTEM STATUS
──────────────────────────────────────────────────
Node.js: v22.14.0 ✅
Playwright: 1.54.1
Browsers: ✅ Installed

🔧 Initializing device registry...

================================================================================
🔐 NAVFLOW DEVICE REGISTRATION
================================================================================
Device Name: Your-Computer-abc123
MAC Address: 12:34:56:78:90:ab
Port: 3002
Created: 31/07/2025, 10:30:15 am

📋 API KEY (Copy this to your NavFlow webapp):
────────────────────────────────────────────────────────────────────────────────
your-unique-api-key-will-appear-here
────────────────────────────────────────────────────────────────────────────────

📝 To add this device to your workspace:
   1. Open your NavFlow webapp
   2. Go to Workspace Settings → Devices
   3. Click "Add Device" and paste the API key above

✅ Device is ready to receive connections!
================================================================================

🚀 NavFlow Browser Server is ready for API key connections!

Support

License

MIT License - see LICENSE file for details.


Made with ❤️ by the NavFlow team