| name | firecrawl-reference-architecture |
| description | Implement Firecrawl reference architecture with scrape/crawl/map/extract pipelines.
Use when designing new Firecrawl integrations, reviewing project structure,
or building content ingestion pipelines for AI/RAG applications.
Trigger with phrases like "firecrawl architecture", "firecrawl project structure",
"firecrawl pipeline", "firecrawl RAG", "firecrawl knowledge base".
|
| allowed-tools | Read, Grep |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","firecrawl","firecrawl-reference"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Firecrawl Reference Architecture
Overview
Production architecture for web scraping and content ingestion with Firecrawl. Covers three tiers: on-demand scraping, scheduled crawl pipelines, and real-time RAG ingestion. Uses all four Firecrawl endpoints: scrape, crawl, map, and extract.
Architecture Diagram
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Firecrawl Pipeline โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโ โโโโโโโโโโโโโ โ
โ โ scrapeUrlโ โ crawlUrl โ โmapUrlโ โ extract โ โ
โ โ (1 page) โ โ (N pages)โ โ(URLs)โ โ (LLM+JSON)โ โ
โ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโฌโโโโ โโโโโโโฌโโโโโโ โ
โ โ โ โ โ โ
โ โผ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Content Processing Layer โ โ
โ โ Clean MD โ Validate โ Deduplicate โ Chunk โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Storage & Output โ โ
โ โ Files โ Database โ Vector Store โ Search Index โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Instructions
Step 1: Firecrawl Service Layer
import FirecrawlApp from "@mendable/firecrawl-js";
const firecrawl = new FirecrawlApp({
apiKey: process.env.FIRECRAWL_API_KEY!,
});
export async function scrapePage(url: string) {
return firecrawl.scrapeUrl(url, {
formats: ["markdown"],
onlyMainContent: ,
: ,
});
}
() {
firecrawl.(baseUrl, {
: opts?. || ,
: ,
: opts?.,
: opts?. || [, ],
: { : [], : },
});
}
() {
map = firecrawl.(baseUrl);
map. || [];
}
() {
firecrawl.(url, {
: [],
: { schema },
});
}