AutoBrain

Generate working interactive tools from a natural-language prompt. Describe what you need, and the app uses OpenAI to produce a JSON UI schema, then renders a live tool with inputs, formulas, outputs, and charts. Suggestions, prompt refinement, and schema generation are served from dedicated API routes—not hard-coded mock content.

Next.js 15React 19TypeScriptTailwind CSSOpenAI APIPrismaSQLiteNextAuth.jsRecharts

Development Process

  1. Schema & validation

    Defined the Gen UI schema, TypeScript types, and server-side validation with a single repair path shared by streaming and batch routes.

    2 weeks
  2. Generation API

    Implemented OpenAI JSON-mode calls, SSE streaming, suggestion and refine endpoints, and graceful degradation without an API key.

    3 weeks
  3. Renderer & calculator

    Built the tool renderer, chart bindings, and a safe expression evaluator for formulas and aggregates.

    3 weeks
  4. Persistence & social

    Added Prisma models, local storage sync, dashboard, gallery, fork, and like flows with authentication.

    Ongoing

Key Features

Prompt to live UI

Large prompt input with refine flow, AI-curated suggestions, and modify chips so users can iterate without leaving the page.

Streaming generation

Real-time schema deltas with validation and optional auto-repair so broken JSON does not strand the user.

Dynamic tool engine

Renders sliders, selects, wizards, tabs, and conditional visibility, then runs safe client-side math for outputs.

Gallery & accounts

Register and log in with NextAuth, save tools to the database, browse community tools, fork, and like public entries.

App Preview

AutoBrain prompt and generation workspace

Prompt workspace with streaming generation, JSON validation, and live tool preview

AutoBrain rendered tool with charts

Dynamic tool renderer with inputs, calculated outputs, and Recharts visualizations

Project Overview

Role
Full Stack Developer
Timeline
Ongoing
Year
2026

Technical Challenges

  • Designing a JSON schema that is expressive enough for layouts, conditional inputs, and charts while staying safe to evaluate on the client
  • Streaming OpenAI responses (SSE), parsing partial JSON, and recovering with a constrained repair pass when validation fails
  • Keeping non-streaming and streaming generation aligned via a shared system prompt and validation pipeline
  • Persisting tools locally and in the cloud with Prisma, plus public gallery, fork, and like flows