Skip to content

devhims/weblinq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WebLinq

High-performance web scraping and browser automation platform

License: MIT TypeScript Cloudflare Workers Node.js Hono

πŸš€ Overview

WebLinq is a modern web scraping and browser automation platform that revolutionizes performance through intelligent browser session reuse. Built on Cloudflare's edge infrastructure, it provides lightning-fast web operations while maintaining reliability and scalability.

🎯 Perfect for: Realtime web access in chat apps, Browser automation, Data aggregation, Competitor analysis, and Market research.

Key Features

  • πŸ”„ Browser Session Reuse: Intelligent architecture that reduces operation latency from ~2-3s to ~200-500ms
  • ⚑ High Performance: Built on Cloudflare Workers for global edge deployment
  • 🎯 Comprehensive API: Search, Screenshot capture, Markdown / HTML extraction, PDF generation, AI data extraction
  • πŸ”§ MCP Integration: Model Context Protocol server for AI assistant integration
  • πŸ›‘οΈ Enterprise Ready: Authentication, rate limiting, and secure API key management
  • πŸ“± Modern Dashboard: Full-featured web interface for API management

🌐 Live Demo

Try WebLinq instantly with our interactive API:

# Extract markdown from any webpage
curl -X POST "https://api.weblinq.dev/v1/web/markdown" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

# Take a screenshot
curl -X POST "https://api.weblinq.dev/v1/web/screenshot" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

πŸ”— Get your free API key β€’ πŸ“– View live documentation

πŸ—οΈ Directory Structure

weblinq/
β”œβ”€β”€ backend/                    # Core API server (Cloudflare Worker)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ durable-objects/   # Browser session management
β”‚   β”‚   β”œβ”€β”€ routes/            # API endpoints
β”‚   β”‚   β”œβ”€β”€ lib/               # Core utilities and operations
β”‚   β”‚   └── middlewares/       # Authentication and CORS
β”‚   └── scripts/               # Build and deployment scripts
β”œβ”€β”€ frontend/                   # Next.js 15 dashboard application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/               # App router pages
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable UI components
β”‚   β”‚   └── lib/               # Client utilities
β”œβ”€β”€ weblinq-mcp/              # Model Context Protocol server
β”‚   └── src/                   # MCP implementation
β”œβ”€β”€ docs/                      # Mintlify documentation site
β”‚   β”œβ”€β”€ api-reference/         # API documentation
β”‚   └── guides/                # User guides and examples
└── tests/                     # Integration testing suite

πŸ”„ Browser Session Reuse Innovation

WebLinq's core innovation lies in its intelligent browser session reuse architecture powered by Cloudflare Durable Objects:

Architecture Overview

  • BrowserManagerDO: Orchestrates up to 10 concurrent browser sessions
  • BrowserDO: Manages individual Playwright/Puppeteer browser instances
  • Session Pooling: Maintains warm sessions across requests
  • Blue-Green Refresh: Zero-downtime session rotation every 8.5 minutes

Performance Benefits

Metric Traditional WebLinq
Cold Start Latency 2-3 seconds 200-500ms
Resource Efficiency ❌ New browser per request βœ… Persistent sessions
Concurrent Operations Limited by startup time Up to 10 parallel sessions
Cost Optimization High browser startup overhead Reduced slot usage

How It Works

  1. Session Management: Durable Objects maintain persistent browser sessions
  2. Intelligent Allocation: Available sessions are reused; new ones created on-demand
  3. Proactive Refresh: Sessions are refreshed before Cloudflare's 10-minute limit
  4. Fault Tolerance: Automatic recovery from crashes and network issues

πŸ› οΈ Core Technologies

Backend Stack

Built with modern, high-performance technologies:

πŸ”Œ MCP Server Integration

The weblinq-mcp/ directory contains a complete Model Context Protocol server implementation, enabling seamless integration with AI assistants like Claude Desktop and other MCP-compatible clients.

Features

  • πŸ”— Direct API Integration: Connect AI assistants to WebLinq's full API
  • πŸ”„ Real-time Operations: Screenshot capture, data extraction, web search
  • πŸ›‘οΈ Secure Authentication: API key-based access control
  • πŸ“Š Structured Responses: Type-safe data exchange with AI models

Usage

cd weblinq-mcp
npm install
npm run dev  # Development server
npm run deploy  # Deploy to Cloudflare Workers

The MCP server provides AI assistants with tools for web scraping, screenshot capture, and data extraction, making WebLinq's capabilities directly accessible within AI workflows.

πŸš€ Quick Start

For Developers

# Clone and setup
git clone https://github.com/devhims/weblinq.git
cd weblinq

# Install dependencies
cd backend && pnpm install
cd ../frontend && pnpm install

# Setup environment
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env.local

# Start development
cd backend && pnpm dev    # Backend: http://localhost:8787
cd frontend && pnpm dev   # Frontend: http://localhost:3000

Requirements: Node.js 18+, Cloudflare account with Workers/D1/Durable Objects enabled

πŸ“– Full setup guide in CONTRIBUTING.md

πŸ“š Documentation

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for detailed information on:

  • πŸ› οΈ Development setup and workflow
  • πŸ“‹ Code style and standards
  • πŸ§ͺ Testing requirements
  • πŸ› Bug reporting process
  • πŸ’‘ Feature request guidelines

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Cloudflare - For Workers, Durable Objects, and Browser Rendering API
  • Hono.js - For the clean, lightning-fast web framework
  • Better Auth - The most complete authentication framework

Documentation β€’ API Reference β€’ Examples β€’ Contributing

Made with ❀️ by the WebLinq team

About

High-performance web scraping and browser automation platform built on Cloudflare

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published