| name | firecrawl-local-dev-loop |
| description | Configure Firecrawl local development with self-hosted Docker, mocking, and testing.
Use when setting up a development environment, running Firecrawl locally to save credits,
or configuring test workflows with vitest.
Trigger with phrases like "firecrawl dev setup", "firecrawl local development",
"firecrawl docker", "firecrawl self-hosted dev", "firecrawl test setup".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pnpm:*), Bash(docker:*), Grep |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","firecrawl","testing","workflow"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Firecrawl Local Dev Loop
Overview
Set up a fast development workflow for Firecrawl integrations. Use self-hosted Firecrawl via Docker to avoid burning API credits during development, mock the SDK for unit tests, and run integration tests against the local instance.
Prerequisites
- Node.js 18+ with npm/pnpm
- Docker + Docker Compose (for self-hosted Firecrawl)
@mendable/firecrawl-js installed
Instructions
Step 1: Project Structure
my-firecrawl-project/
โโโ src/
โ โโโ scraper.ts # Firecrawl business logic
โ โโโ config.ts # Environment-aware config
โโโ tests/
โ โโโ scraper.test.ts # Unit tests (mocked SDK)
โ โโโ integration.test.ts # Integration tests (real API)
โโโ docker-compose.yml # Self-hosted Firecrawl
โโโ .env.local # Dev secrets (git-ignored)
โโโ .env.example # Template for team
โโโ package.json
Step 2: Self-Hosted Firecrawl for Zero-Credit Dev
services:
firecrawl:
image: mendableai/firecrawl:latest
ports:
- "3002:3002"
environment:
- PORT=3002
- USE_DB_AUTHENTICATION=false
- REDIS_URL=redis://redis:6379
- NUM_WORKERS_PER_QUEUE=1
- BULL_AUTH_KEY=devonly
depends_on:
redis:
condition: service_healthy
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", , ]