How clive0707/citewise-2 works
CiteLabs evaluates how likely a site is to appear in AI-generated answers. A user submits a target URL in the dashboard; the frontend starts a run through the Fastify API, which dispatches work to the Python worker. The evaluation crawls and summarizes the target, infers intent and category, generates queries, discovers competitors, indexes content, and runs RAG simulations to produce scores and recommendations. The backend persists run and event data and exposes progress and analytics to the dashboard. The README documents the end-to-end stages; sampled excerpts do not show every worker implementation detail, so uncertain internal call wiring is omitted.
Main entry points: sandbox.ts Sandbox Routes · crawl.py Target Crawl · sandbox.py Competitor Crawl · vector_store.py Vector Store
Components 21
User Interface
- Run Launchpad
citelabs/cl-frontend/pages/index.tsx - Run Dashboard
citelabs/cl-frontend/pages/[runId].tsx
Backend API
- Fastify API
citelabs/cl-backend/src/server.ts - Sandbox Routes
citelabs/cl-backend/src/routes/sandbox.ts - Worker Client
citelabs/cl-backend/src/services/pythonClient.ts
Evaluation Worker
- Worker API
citelabs/cl-workers/app/main.py - Target Crawl
citelabs/cl-workers/app/crawl.py - Intent Analysis
citelabs/cl-workers/app/sandbox.py - Query Generation
citelabs/cl-workers/app/sandbox.py - Competitor Discovery
citelabs/cl-workers/app/sandbox.py - Competitor Crawl
citelabs/cl-workers/app/sandbox.py - RAG and Scoring
citelabs/cl-workers/app/sandbox.py
Retrieval and Models
- Content Chunking
citelabs/cl-workers/app/chunkers/factory.py - Text Embeddings
citelabs/cl-workers/app/embeddings.py - Vector Store
citelabs/cl-workers/app/vector_store.py - LLM Providers
citelabs/cl-workers/app/llm_provider.py
Evaluation State
- Run and Event Store
citelabs/cl-backend/src/routes/sandbox.ts
Other components
- Analyst
- Target and Competitor Sites
- Model Services
- Vector Database
Connections 24
- Analyst → Run Launchpad: submits URL
- Run Launchpad → Fastify API: starts run
- Fastify API → Sandbox Routes: dispatches request
- Sandbox Routes → Worker Client: starts evaluation
- Worker Client → Worker API: HTTP request
- Worker API → Target Crawl: calls crawl
- Target Crawl → Target and Competitor Sites: fetches page
- Target Crawl → Intent Analysis: provides content
- Intent Analysis → Query Generation: provides intent
- Query Generation → Competitor Discovery: provides queries
- Competitor Discovery → Competitor Crawl: identifies competitors
- Competitor Crawl → Target and Competitor Sites: fetches pages
- Competitor Crawl → Content Chunking: provides content
- Content Chunking → Text Embeddings: chunks text
- Text Embeddings → Vector Store: provides vectors
- Vector Store → Vector Database: indexes and retrieves
- Vector Store → RAG and Scoring: retrieves context
- RAG and Scoring → LLM Providers: generates answers
- LLM Providers → Model Services: requests inference
- RAG and Scoring → Sandbox Routes: reports progress
- Sandbox Routes → Run and Event Store: persists run data
- Sandbox Routes → Run Dashboard: serves run results
- Run Dashboard → Sandbox Routes: polls progress
- Analyst → Run Dashboard: views results