Prompt-to-database scaffolding for agent-native applications.
A Portal-powered workspace over the NEDB engine — the phpMyAdmin for NEDB. Describe an app in plain language and get a validated schema — collections, fields, types, relations, indexes, search fields, seed data, NQL, plus Python and Node snippets and a README — rendered as a live schema graph and exportable in one click.
Then deploy it to a live NEDB server (nedbd) and query and edit it in plain English: the two-way console compiles natural language → NQL for reads, and for writes shows the exact row it would insert/update (editable, with regenerate and an explicit commit) before writing to the real engine.
Generation and natural-language actions run through AiAssist (api.aiassist.net) as the AI gateway — your provider, your key, read server-side only. The studio is a thin client of a running NEDB server (NEDB_URL, env-first with a Settings override); the engine owns storage, the log, time-travel, integrity, and durability.
Website → eth-interchained.github.io/nedb-studio
This is a Portal app, not a generic SPA. It uses Portal conventions throughout:
- Contract —
app.contract.tsviadefineApp(...)(schema v1.1): identity, audience, conversion goals, integrations, and quality gates. - File-based routes —
routes/*.page.tsx, each exporting anintentobject for the agents. - Entry —
src/main.tsxwraps the app in<PortalProvider routes={routes} contract={contract} />(routes from the@portal/routesvirtual module). - Components/hooks —
Link,Head,useIsActive,useSearchParamsfrom@interchained/portal-react. - Vite —
portalPlugin()from@interchained/portal-core/vite. - CLI —
portal dev | build | preview | serve | audit | improve | guard.
cd apps/nedb-studio
npm install
cp .env.example .env # optional — leave blank to run in mock mode
npm run dev # Portal app on :3000 + AiAssist API server on :3001npm run devruns the Portal dev server and the Express API server (which holds the AiAssist key) together. Vite proxies/api/*→:3001.- Production:
npm run buildthennpm start(one Express process servesdist/+/api).
NEDB Studio uses AiAssist Secure / AiAS as the only AI gateway — it never calls OpenAI/Anthropic/Groq/Gemini directly. Set these server-side:
AIASSIST_BASE_URL=https://api.aiassist.net
AIASSIST_API_KEY=your_key_here
AIASSIST_DEFAULT_PROVIDER=anthropic
AIASSIST_DEFAULT_MODEL=claude-sonnet-4-6- The key is read only by the server (
server.ts/src/server). It is never sent to the browser. - Provider/model lists come from
GET /v1/providers(bearer auth, server-side) and populate the selectors + the marquee. X-AiAssist-Provideris sent on every request; the selected model is sent in the body.- Pipeline: prompt → runner (fast generation) → sentinel (validate/repair) → Zod (
validateScaffold) → render. Model output is extracted with KeyStone-Lite sentinel blocks (<<<SCAFFOLD>>>/<<<NQL>>>, content taken verbatim) so code/quotes/newlines never break parsing. - Mock templates are the no-credentials demo only. In live mode there is no silent fallback — if generation fails, the studio surfaces the real error instead of quietly serving a mock.
No credentials? Everything still works. The studio serves deterministic templates — Contractor CRM, Salon booking, AI agent memory store, Marketplace, and a generic fallback — matched to your prompt by keyword. Schema graph, artifacts, and export are all functional offline.
| Route | Purpose |
|---|---|
/ |
Landing — hero, example prompts, feature grid |
/studio |
Three-panel workspace: prompt + provider/model controls · schema graph + NL→NQL query console · artifact tabs |
/about |
The NEDB engine: replay-protected log, MVCC time-travel, relations, Cascade compression, Merkle roots |
/docs |
Install (npm/PyPI), Python/Node usage, AiAssist setup, mock mode, export |
apps/nedb-studio/
app.contract.ts Portal contract (v1.1)
vite.config.ts portalPlugin + /api dev proxy
server.ts Express: /api routes + serves dist in prod
routes/ index | studio | databases | settings | about | docs (*.page.tsx)
src/
main.tsx PortalProvider entry
lib/ types (Zod), scaffold builders, sample databases, nql, api client
server/ aiassist client, prompts, generate router, nedbd client + config, databases/settings routers
components/ Nav, GatewayBar, PromptPanel, SchemaGraph, QueryConsole, ArtifactTabs
Schema JSON · Relations · Indexes · Seed Data · NQL Queries · Python · Node · README — each copyable and downloadable, plus a one-click full export (*-nedb-scaffold.json).
app.contract.ts enables forbidPlaceholderCopy, forbidUnreplacedTokens, requireMetaTitle/Description, requireH1, requirePrimaryCTA, and zero broken links. Run portal audit to check, portal improve to fix, portal guard before applying patches. The AiAssist key is never exposed client-side; all generated scaffolds validate before render.
GPLv3 · © INTERCHAINED, LLC — interchained.org. Built on the NEDB engine, powered by AiAssist.
Built by Mark Allen Evans Jr. (INTERCHAINED, LLC) with Claude Sonnet 4.6 on Hyperagent.
"Take one idea, turn it into an LP, then an app, then a system, then a platform, then infrastructure that is irreplaceable."