# Architecture

Spiderfootplus is a Rust workspace of small crates:

| Crate | Responsibility |
| --- | --- |
| `spiderfootplus-core` | Event model and taxonomy, the async scan engine (de-dup, bounded concurrency, stop/pause/resume), SQLite storage, the HTTP client, the correlation engine, exports, and the provider register. |
| `spiderfootplus-modules` | Native Rust modules. |
| `spiderfootplus-templates` | The template vulnerability scanner — its own YAML format plus an importer for public template sets. |
| `spiderfootplus-api` | REST API (axum) + OpenAPI spec + the embedded web UI. |
| `spiderfootplus-python` | Bridge that runs legacy Python modules unchanged (feature `legacy`). |
| `spiderfootplus-cli` | The `spiderfootplus` binary. |

## How a scan runs

1. The target is classified into an event type (a domain becomes `DOMAIN_NAME`, an IP `IP_ADDRESS`, and so on) and seeded onto the bus.
2. Each module declares which event types it **watches** and which it **produces**. The engine delivers every new event to the modules that watch its type.
3. Modules never call each other. They only react to events and emit new ones, so the graph grows until nothing new is produced.
4. Events are de-duplicated before dispatch, so the same fact is never processed twice.
5. When the bus drains, the correlation rules run over the whole graph and raise findings.

Because everything is events in and events out, adding a capability is just
adding a module — see [Add an integration](https://spiderfootplus.com/docs/guides/add-an-integration).

## The CLI, UI and API

All three are clients of the same engine and the same OpenAPI contract. The CLI
can run a scan locally, or drive a running server with `--server`; either way the
behaviour and the data are identical.
