Skip to main content

Introduction

While KafkaCode is primarily a CLI tool, it’s built with modular components that can be used programmatically in your Node.js applications.

Architecture

KafkaCode consists of five main components:

FileScanner

Discovers and filters source code files

PatternScanner

Regex-based pattern detection

LLMAnalyzer

AI-powered contextual analysis

AnalysisEngine

Orchestrates the scanning process

ReportGenerator

Generates formatted reports

Basic Usage

Installation

Import Syntax

Data Structures

Finding Object

Each finding has this structure:
Example:

Quick Examples

Example 1: Simple Scan

Example 2: Custom Filtering

Example 3: Verbose Mode

Example 4: Single File Analysis

Example 5: Custom Report

Use Cases

Integrate KafkaCode into your build tools or scripts:
Build custom tools on top of KafkaCode:
Create a scanning API service:
Track privacy metrics over time:

Component Overview

Next Steps

FileScanner API

Learn about file discovery

AnalysisEngine API

Explore the analysis engine

PatternScanner API

Understand pattern detection

Examples

See practical examples