@themukherjee/toview
v0.1.0-beta.1
Published
AI-native admin console for your own product. Introspects your Next.js + Prisma app and generates a capability graph an LLM can safely query.
Maintainers
Readme
toview
Your backend already knows everything. Why build another dashboard to see it?
toview introspects a Next.js + Prisma app and generates a capability graph — a
typed map of what your backend can do (search, create, update, delete, per model) —
without you hand-building admin pages. This is Phase 1 of a three-phase system; later
phases turn the same graph into a natural-language admin console and a curated
error/issue feed for AI coding agents.
Status
Phase 1 (this package): working, pilot-testing. Next.js + Prisma only for now.
Quick start
npx @themukherjee/toview initThis will:
- Detect your framework, ORM, auth provider, and known integrations (Stripe, Redis, S3, etc.)
- Show you what it found — nothing is written until you confirm
- Parse your Prisma schema and build a capability graph (
.admin/graph.json) - Scaffold
.admin/with editable config, permissions, and per-model annotation files
Re-run any time with:
npx @themukherjee/toview inspectgraph.json is fully regenerated on every run. Everything else in .admin/ (config,
permissions, annotations) is written once and preserved across re-runs — edit it freely.
What gets generated
.admin/
├── config.ts # detected stack + where to plug in your auth
├── graph.json # the capability graph — regenerated every run
├── permissions.ts # role -> allowed action mapping
├── tools/ # per-model annotations for fields toview couldn't safely infer
└── generated/ # cache for later phases, gitignoredDesign decisions worth knowing
- No LLM call at
inittime. Semantics come from your Prisma schema directly: aSubscriptionStatusenum gives real values for free. A bareIntfield namedstatusorroledoes not get guessed at — it's flagged underneedsAnnotationfor you to describe by hand. Wrong guesses on fields that gate destructive actions are worse than an honest "I don't know." - Static introspection only. No DB connection, no dev server required — the
Prisma schema file is parsed directly. This keeps
npx @themukherjee/toview initfast and reliable in CI/sandboxed environments. - Destructive by default is confirmed. Every
deletetool, and anyupdatetool touching a field that looks money-related (amount,price,balance,stripe*, ...), is flaggedrequires_confirmationin the graph.
Requirements
- Node >= 18
- A Next.js project with
prisma/schema.prisma
Roadmap
- Phase 2: natural-language query → capability-graph tool call → generated table/chart/KPI UI
- Phase 3: read-only MCP server exposing errors correlated to capability-graph nodes, for coding agents like Claude Code
License
MIT
