Skip to content

Quick Start

Get the Bloqr Compiler up and running in minutes with your preferred runtime.

Prerequisites

  • Git installed locally
  • Docker path: Docker + Docker Compose
  • Deno / Workers path: Deno installed (deno --version)
  • Workers deploy: Cloudflare account + Wrangler auth (deno task wrangler login)

Installation Methods

Quick Start

  1. Clone the repository

    Terminal window
    git clone https://github.com/jaypatrick/bloqr-compiler.git
    cd bloqr-compiler
  2. Start with Docker Compose

    Terminal window
    docker compose up -d
  3. Access the application

    SurfaceURL
    Web UIhttp://localhost:8787
    API Documentationhttp://localhost:8787/api
    Test Interfacehttp://localhost:8787/test.html
    Metricshttp://localhost:8787/metrics

Managing the Container

  1. View logs

    Terminal window
    docker compose logs -f
  2. Stop the container

    Terminal window
    docker compose down
  3. Restart the container

    Terminal window
    docker compose restart
  4. Update the container

    Terminal window
    git pull
    docker compose down
    docker compose build --no-cache
    docker compose up -d

Configuration

Environment Variables

Copy the example environment file and customize:

Terminal window
cp .env.example .env
# Edit .env with your preferred settings

Available variables:

  • COMPILER_VERSION: Version identifier (default: 0.6.0)
  • PORT: Server port (default: 8787)
  • DENO_DIR: Deno cache directory (default: /app/.deno)

Custom Port

To run on a different port, edit docker-compose.yml:

ports:
- '8080:8787' # Runs on port 8080 instead

Development Mode

For active development with live reload:

Terminal window
# Source code is already mounted in docker-compose.yml
docker compose up

Changes to files in src/, worker/, and public/ will be reflected automatically.

Example Usage

Using the Web UI

  1. Open http://localhost:8787 in your browser
  2. Switch to “Simple Mode” or “Advanced Mode”
  3. Add filter list URLs or paste a configuration
  4. Click “Compile” and watch the real-time progress
  5. Download or copy the compiled filter list

Using the API

Compile a filter list programmatically:

Terminal window
curl -X POST http://localhost:8787/compile \
-H "Content-Type: application/json" \
-d '{
"configuration": {
"name": "My Filter List",
"sources": [
{
"source": "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt",
"transformations": ["RemoveComments", "Deduplicate"]
}
],
"transformations": ["RemoveEmptyLines"]
}
}'

Streaming Compilation SSE

Get real-time progress updates using Server-Sent Events:

Terminal window
curl -N -X POST http://localhost:8787/compile/stream \
-H "Content-Type: application/json" \
-d '{
"configuration": {
"name": "My Filter List",
"sources": [{"source": "https://example.com/filters.txt"}]
}
}'

Troubleshooting

Container Won’t Start

Check the logs:

Terminal window
docker compose logs

Permission Issues

If you encounter permission errors with volumes:

Terminal window
sudo chown -R 1001:1001 ./output

Next Steps