Insightics is an open-source SDK that turns plain-language questions into read-only SQL and live charts, inside your app and on your own Postgres.

  • Security Layers7
  • Framework Adapters4
  • Model Providers2
  • Chart Dependencies0

Works with Next.js, Express, Fastify, Hono, React, PostgreSQL, Anthropic, OpenAI, Node.js, TypeScript, Zod and libpg_query.

A Guard Between
Model And Database

Every query the model writes is parsed with Postgres’s own parser and checked against an allowlist. Only a single SELECT gets through, and what runs is re-emitted from the checked tree, not the model’s text.

Live Charts,
No Chart Library

Answers come back as bar, line or single-number charts drawn in hand-rolled SVG. Turn on live and the chart keeps itself current over server-sent events.

Drop one component into your admin panel and let your team ask in plain language. “How many users joined this week, split by signup method?” comes back as a live bar chart, with nobody writing SQL or wiring a dashboard.

Questions people ask

  • Signups this week by method
  • Orders stuck over two days
  • Refunds by reason

  • Guard

    Postgres’s own parser reads it. Only a single SELECT gets through.

    Layer 01 / 07

  • Guard

    What runs is re-emitted from the checked tree, never the raw text.

    Layer 02 / 07

  • Guard

    The row cap lives inside the validated tree, then gets read back.

    Layer 03 / 07

  • Database

    A reader role granted SELECT only. No write privilege to escalate.

    Layer 04 / 07

  • Database

    BEGIN READ ONLY, confirmed by the server, and always rolled back.

    Layer 05 / 07

  • Database

    Your row-level security policies scope every read to its tenant.

    Layer 06 / 07

  • Wire

    Errors cross the wire as coarse statuses. Deny codes never do.

    Layer 07 / 07

Then npx ik init writes the read-only role, and npx ik doctor proves it from the live catalog, in CI.

  • insightics-sdk/serverHTTP handler for Next, Express, Fastify, Hono
  • insightics-sdk/react<Insight />, hooks and SVG charts
  • insightics-sdk/coreRead-only path, introspection, planner
  • insightics-sdk/core/pgThe node-postgres adapter
  • insightics-sdk/sql-guardThe security kernel
  • insightics-sdk/protocolThe browser–server contract
  • insightics-sdk/llm/anthropicAnthropic provider
  • insightics-sdk/llm/openaiOpenAI provider