Expand description
HTTP server for the Adler OSINT username-search engine.
This crate hosts the JSON API and embedded SolidJS web UI for
Adler. It is a thin shell around adler_core: scans run through
the same adler_core::executor the CLI uses, and the same
adler_core::Client is shared across all in-process scans.
§Quick start
use std::net::SocketAddr;
use adler_core::{Client, Registry};
use adler_server::{AppConfig, serve};
let registry = Registry::default_embedded()?;
// Use the caller's filtering rules — the CLI already exposes
// --only/--tag/--exclude, so the server just runs whatever site
// list it's handed.
let filter = adler_core::SiteFilter::default();
let sites = registry.filter_with(&filter);
let catalog = registry.matches_with(&filter);
let client = Client::builder().build()?;
let config = AppConfig {
bind: "127.0.0.1:8765".parse::<SocketAddr>()?,
scan_capacity: 32,
scans_dir: None, // or Some(adler_server::default_scans_dir())
};
serve(sites, catalog, client, config).await?;§Routes
| Route | Method | Purpose |
|---|---|---|
/api/health | GET | liveness |
/api/sites | GET | site catalogue |
/api/scan | POST | start a scan, returns a scan_id |
/api/scan/{id} | GET | poll status / final aggregate |
/api/scan/{id}/report | GET | investigation report export |
/api/scan/{id}/stream | GET | Server-Sent Events |
/api/scan/{id}/retry | POST | retry one site in a scan |
/api/scan/{id}/refilter | POST | cancel and restart with new filters |
/api/scans | GET | recent scan history |
/api/access | GET | read-only access-engine summary |
/ | GET | embedded SolidJS SPA |
§Threading and shutdown
serve binds the TCP listener, installs a SIGINT / SIGTERM
graceful-shutdown signal, and runs until the listener closes. All
state (registry, client, in-flight scans) lives in an AppState
cloned into each handler — no global mutables.
Structs§
- AppConfig
- Server configuration.
- AppState
- State shared across all axum handlers.
- Evidence
Change - Profile evidence transition for one still-found site.
- Finished
Scan - Aggregate published once a scan finishes.
- Persisted
Scan - Self-contained snapshot of a completed scan. Round-trips losslessly through JSON; tests assert that.
- Scan
Diff - Deterministic scan-to-scan diff used as the basis for timelines and watchlists.
- Scan
Handle - Live state of one scan.
- ScanId
- Identifier for a running or finished scan.
- Scan
Timeline - Historical view derived from a sequence of persisted scans.
- Summary
- Verdict counts for a finished scan.
- Timeline
Event - One lifecycle event for a profile across scans.
- Timeline
Profile - Per-site lifecycle state in a scan timeline.
- Verdict
Change - A verdict transition for one site.
Enums§
- Error
- Errors surfaced by the public
serveentry point. - Timeline
Event Kind - Timeline event category.
Functions§
- apply_
historical_ confidence_ overlay - Apply a non-persisted confidence overlay from previous scans of the same username.
- build_
investigation_ report - Build a history-aware investigation report from a scan artifact.
- build_
scan_ timeline - Build a chronological timeline from persisted scans.
- default_
scans_ dir - Default directory for persisted scans.
- diff_
scans - Compare two persisted scans.
- router
- Build the axum router. Public so test harnesses can drive it
directly without going through
crate::serve. - serve
- Run the server until the listener closes or a shutdown signal arrives.
Type Aliases§
- Result
Result<T, Error>alias used throughout the crate.