Skip to main content

Docs

Intelbase developer docs

This documents only what the project actually implements. Unimplemented capabilities are labelled as such — no sample code pretending to work.

Storage: Memory (demo)Demo data: off3/6 sources configured

Lookup orchestration & status

The browser posts { kind, value, requestId, consent }. The server resolves user and organization from the session — client-sent userId / organizationId is never trusted.

Emails are lowercased and length-checked; usernames have leading @ stripped. Quota check and task creation happen inside a single transaction,organization_id + request_id is unique so retries never bill twice.

Each source runs with its own timeout and status. Final states converge tocompleted / partial / empty / failed / cancelled, with reserve and refund recorded separately in the usage ledger.

Internal API

Method & pathBehavior
POST /api/lookupsIdempotently create and execute a lookup; returns the full snapshot plus statusUrl / eventsUrl
GET /api/lookupsPaginated history with kind, status, cursor, limit
GET /api/lookups/[id]Current snapshot; cross-tenant access returns 404 without leaking existence
GET /api/lookups/[id]/eventsSSE replay of persisted events with Last-Event-ID / after support
POST /api/lookups/[id]?action=cancelIdempotent cancel; incurred provider cost is reported separately
POST /api/lookups/[id]/exports?format=csv|jsonGenerate a redacted export and write an audit event
GET /api/providersPublic capability, configuration status and storage mode — no secrets
POST /api/monitorsCreate a monitor; explicitly rejected without completed domain verification
POST /api/api-keysCreate a key; plaintext returned exactly once
POST /api/sharesCreate a revocable, expiring redacted share link

Public API

Reuses the same orchestration layer. Requires an Authorization: Bearer key, a UUID Idempotency-Key and the matching scope.

curl -X POST https://intelbase.art/api/v1/lookup/email \
  -H "Authorization: Bearer ib_xxxxxxxx" \
  -H "Idempotency-Key: 3f1b2c4d-8e9a-4b7c-9d1e-2f3a4b5c6d7e" \
  -H "Content-Type: application/json" \
  -d '{"value":"name@example.com","consent":true}'

The response contains assessments, accounts, exposures, providers and timeline. Raw vendor responses are never exposed.

Error semantics

codeHTTPRetryableMeaning
invalid_request400NoMissing kind / value / consent / idempotency key, or invalid format
unauthenticated401NoNot signed in, or API key invalid
forbidden403NoCross-tenant, untrusted origin, or missing required scope
not_found404NoTask does not exist or belongs to another organization
conflict409NoSame idempotency key used with different parameters
quota_exceeded429NoOrganization daily quota exhausted
provider_unavailable503YesAll sources unavailable; quota has been refunded
internal_error500YesServer error; includes requestId for troubleshooting

Source support matrix

SourceSupportsRequiresStatus

Demo data

Fixed synthetic data for validating the full interaction chain; never calls external sources.

email / usernameNo key neededNot configured

Email-domain signals

Reads MX / SPF / DMARC via public DNS-over-HTTPS; describes domain configuration only.

emailNo key neededAvailable

Gravatar

Public avatar & profile API for the email hash.

emailNo key neededAvailable

GitHub

Public user profile and creation date from GitHub’s REST API.

usernameGITHUB_API_TOKENAvailable

Breach metadata (HIBP)

Licensed breach metadata: event, date, data classes. No credentials.

emailHIBP_API_KEYNot configured

Email-linked accounts (Apify)

Runs a licensed actor to collect email-linked public accounts.

emailAPIFY_TOKEN, APIFY_EMAIL_LOOKUP_ACTOR_IDNot configured

DNS uses Cloudflare DoH; Gravatar uses the official public profile API; GitHub uses the public REST API (optional token raises the limit). HIBP and Apify need keys — when missing the state is not_configured and no metered request is made.

Data model

Migration script: data/intelbase/schema.sql. Every table uses a dedicated DB_TABLE_PREFIX (default intelbase_) — never reuse the template site’s production database.

lookups

Tasks, encrypted input, idempotency key, final-state snapshot

lookup_events

Monotonic seq, supports resumable replay

usage_ledger

reserve / refund with a unique business key

monitors / monitor_runs

Targets, verification state, next run, deltas

api_keys

SHA-256 hash, scopes, revocation time

report_shares

Token hash, redaction level, expiry & revocation

memberships

Organization, member, role

suppression_requests

Removal / objection intake and disposition

Deployment & configuration checklist

The table below is generated from live environment probing — the checkmarks are this instance’s real state.

VariablePurposeRequiredStatus
AUTH_SECRETAuth.js signing secretsign-in sessionsYesMissing
AUTH_GOOGLE_IDGoogle OAuth Client IDGoogle sign-inYesMissing
AUTH_GOOGLE_SECRETGoogle OAuth Client SecretGoogle sign-inYesMissing
SUPABASE_URLSupabase Project URLpersistent storage, history, teamYesMissing
SUPABASE_SERVICE_ROLE_KEYSupabase service_role Keyserver-side database accessYesMissing
LOOKUP_INPUT_ENCRYPTION_KEYLookup input encryption keyencrypted lookup valuesYesMissing
LOOKUP_HMAC_KEYLookup input HMAC keydeduplication indexYesMissing
HIBP_API_KEYHave I Been Pwned Keybreach metadata moduleOptionalMissing
GITHUB_API_TOKENGitHub Tokenusername lookup rate limitOptionalMissing
APIFY_TOKENApify Tokenemail-linked accountsOptionalMissing
DODO_PAYMENTS_API_KEYDodo Payments API Keysubscriptions and quotaOptionalMissing
DODO_PAYMENTS_WEBHOOK_KEYDodo Webhook verification keypayment callbacksOptionalMissing
WEBHOOK_SIGNING_KEYMonitor webhook signing keymonitor notificationsOptionalMissing

Minimal go-live steps

  1. 1. Create a dedicated Supabase project and run data/intelbase/schema.sql in the SQL Editor.
  2. 2. Configure AUTH_SECRET and Google OAuth; callback is https://your-host/api/auth/callback/google.
  3. 3. Set AUTH_URL and NEXT_PUBLIC_SITE_URL to the final domain (https, no path).
  4. 4. Generate two 32-byte keys — LOOKUP_INPUT_ENCRYPTION_KEY, LOOKUP_HMAC_KEY — and store them as server secrets.
  5. 5. Configure HIBP / Apify / GitHub / Dodo as needed; unconfigured modules automatically show not_configured.
  6. 6. Verify with npm run build, then deploy to Cloudflare or a container.

Known limits

  • Long lookups currently complete within a single request; no persistent queue. Apify overruns return unknown without retry to avoid double billing. Production should adopt Cloudflare Queues or a dedicated worker.
  • Monitoring depends on scheduled execution and domain verification; today only a controlled switch exists.
  • PDF export is unimplemented — no unauditable screenshot-style reports.
  • The AI summary is not wired to a model and shows not_configured; once wired it may only cite existing evidenceIds.
  • Payments reuse the template’s Dodo integration capability, but new plans need dedicated products and webhooks — currently unbound, so the pricing button shows "payments not configured".
  • Bulk lookups, SSO and webhook notifications are planned but have no clickable placeholders.