How mizcausevic-dev/fraud-click-filter works
Purpose and principal workflow
Fraud Click Filter is a TypeScript demo control plane that presents sample traffic decisions, rules, threat signals, and spend-at-risk summaries to help growth and RevOps users reason about low-trust clicks. A browser user initiates the main workflow with an HTTP request: the Express app serves a rendered page or JSON response derived from in-memory sample data. The sampled implementation models decisions; it does not ingest or filter live ad traffic.
Components
HTTP entry and presentation
• Browser user — Path: null (external actor). Requests the documented pages and API routes to view traffic-integrity information.
• Express route application — src/app.ts. Defines HTML and JSON GET routes, calls renderers or service functions, and listens on loopback when run directly.
• Traffic dashboard renderer — src/services/render.ts. Builds the overview and grouped filter-lane, threat-signal, verification, and docs pages; its shown renderers obtain figures and records from the traffic service.
Domain data and projections
• Traffic sample dataset — src/data/sampleTraffic.ts. Defines event, rule, and threat-signal types and supplies the static records used by the demo.
• Traffic projections and payload — src/services/trafficFilterService.ts. Computes dashboard counts and spend at risk from events, exposes events/rules/signals/verification content, and assembles the combined sample payload.
Static output
• Prerendered site and API exporter — scripts/prerender.ts. Calls the same page renderers and service projections as the app, then writes HTML pages and JSON files under site/.
Relationships
• Browser user -> Express route application: sends HTTP GET requests to the documented routes.
• Express route application -> Traffic dashboard renderer: calls a page renderer for HTML routes.
• Traffic dashboard renderer -> Traffic projections and payload: reads summary, rule, signal, event, or verification projections to populate pages.
• Express route application -> Traffic projections and payload: calls the corresponding projection for JSON API routes.
• Traffic projections and payload -> Traffic sample dataset: reads the static events, rules, and threat signals; computes summary counts and spend from the events.
• Prerendered site and API exporter -> Traffic dashboard renderer: calls page renderers to produce static HTML.
• Prerendered site and API exporter -> Traffic projections and payload: calls projection functions to produce static JSON.
• Prerendered site and API exporter -> Local filesystem (external system, Path: null): writes generated HTML and JSON beneath site/.
Coverage limits
The source sample establishes an in-memory demo and its served and prerendered outputs, not a production traffic-ingestion or decision-enforcement pipeline. The README documents routes and product intent, but sampled code does not establish live integrations, persistent state, authentication, or downstream analytics/ad-platform connections. The renderer excerpt is partial, so details of unsampled page implementations are not inferred.
Main entry points: trafficFilterService.ts Traffic projections · prerender.ts Prerender exporter · app.ts Express routes · render.ts Traffic renderer
Components 7
HTTP Presentation
- Express routes
src/app.ts - Traffic renderer
src/services/render.ts
Traffic Data
- Traffic projections
src/services/trafficFilterService.ts - Traffic samples
src/data/sampleTraffic.ts
Static Output
- Prerender exporter
scripts/prerender.ts
Other components
- Browser user
- Local filesystem
Connections 8
- Browser user → Express routes: HTTP GET · Requests documented pages and API routes.
- Express routes → Traffic renderer: renders pages
- Traffic renderer → Traffic projections: reads projections
- Express routes → Traffic projections: calls projections
- Traffic projections → Traffic samples: reads samples
- Prerender exporter → Traffic renderer: renders pages
- Prerender exporter → Traffic projections: calls projections
- Prerender exporter → Local filesystem: writes outputs · Writes generated HTML and JSON beneath site/.