{"id":47599645,"url":"https://github.com/owieth/dynamic-charts-by-prompt","last_synced_at":"2026-04-01T18:40:15.372Z","repository":{"id":345528326,"uuid":"1186153790","full_name":"owieth/dynamic-charts-by-prompt","owner":"owieth","description":"AI-powered dashboard generator — describe charts in natural language and watch them stream to life. Built with Next.js, Chart.js, Vercel AI SDK, and Anthropic Claude.","archived":false,"fork":false,"pushed_at":"2026-03-26T16:19:27.000Z","size":700,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T06:42:25.826Z","etag":null,"topics":["ai","anthropic","chartjs","claude","dashboard","data-visualization","json-render","natural-language","nextjs","react","streaming","tailwindcss","typescript","vercel-ai-sdk","zod"],"latest_commit_sha":null,"homepage":"https://owieth.github.io/dynamic-charts-by-prompt/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/owieth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-19T10:22:27.000Z","updated_at":"2026-03-26T16:21:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/owieth/dynamic-charts-by-prompt","commit_stats":null,"previous_names":["owieth/dynamic-charts-by-prompt"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/owieth/dynamic-charts-by-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owieth%2Fdynamic-charts-by-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owieth%2Fdynamic-charts-by-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owieth%2Fdynamic-charts-by-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owieth%2Fdynamic-charts-by-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owieth","download_url":"https://codeload.github.com/owieth/dynamic-charts-by-prompt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owieth%2Fdynamic-charts-by-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","chartjs","claude","dashboard","data-visualization","json-render","natural-language","nextjs","react","streaming","tailwindcss","typescript","vercel-ai-sdk","zod"],"created_at":"2026-04-01T18:40:14.804Z","updated_at":"2026-04-01T18:40:15.365Z","avatar_url":"https://github.com/owieth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic Charts by Prompt\n\nGenerate interactive chart dashboards from natural language prompts, powered by AI.\n\n\u003c!-- TODO: Add screenshot --\u003e\n\n## Features\n\n- **Prompt-driven chart generation** -- describe the dashboard you want in plain text\n- **Real-time streaming** -- watch charts render progressively as the AI responds\n- **Six chart types** -- Line, Bar, Pie, Doughnut, Area, and Radar\n- **Drag-and-drop grid** -- rearrange and resize charts in a responsive dashboard layout\n- **Interactive charts** -- zoom, pan, and hover tooltips via Chart.js\n- **Schema-validated rendering** -- streamed JSONL is parsed and rendered as a typed component tree\n\n## Tech Stack\n\n| Layer        | Technology                                                                     |\n| ------------ | ------------------------------------------------------------------------------ |\n| Framework    | [Next.js 15](https://nextjs.org) (App Router, Turbopack) + React 19            |\n| AI           | [Vercel AI SDK v6](https://sdk.vercel.ai) + Anthropic Claude                   |\n| Charting     | [Chart.js 4](https://www.chartjs.org) + react-chartjs-2 + chartjs-plugin-zoom  |\n| UI Rendering | [@json-render](https://github.com/nicklaros/json-render) (core, react, shadcn) |\n| Styling      | [Tailwind CSS v4](https://tailwindcss.com)                                     |\n| Validation   | [Zod](https://zod.dev)                                                         |\n| Grid Layout  | [react-grid-layout](https://github.com/react-grid-layout/react-grid-layout)    |\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- [pnpm](https://pnpm.io) 10.6.5+\n- An [Anthropic API key](https://console.anthropic.com/settings/keys)\n\n### Installation\n\n```bash\ngit clone https://github.com/owieth/dynamic-charts-by-prompt.git\ncd dynamic-charts-by-prompt\npnpm install\n```\n\n### Environment Setup\n\nCreate a `.env.local` file in the project root:\n\n```bash\nANTHROPIC_API_KEY=your-api-key-here\n```\n\n### Development\n\n```bash\npnpm dev\n```\n\nThe app will be available at [http://localhost:3000](http://localhost:3000).\n\n## Project Structure\n\n```\nsrc/\n├── app/\n│   ├── layout.tsx                # Root layout with Geist font\n│   ├── page.tsx                  # Main page with prompt UI and streaming\n│   ├── globals.css               # Tailwind v4 + CSS variables\n│   └── api/generate/route.ts     # Streaming API route (Anthropic + AI SDK)\n├── components/\n│   ├── dashboard-renderer.tsx    # Client-side renderer (Chart.js + json-render)\n│   ├── grid-dashboard.tsx        # Drag-and-drop resizable grid layout\n│   ├── metric-card.tsx           # Metric display card\n│   └── charts/\n│       ├── line-chart.tsx\n│       ├── bar-chart.tsx\n│       ├── pie-chart.tsx\n│       ├── doughnut-chart.tsx\n│       ├── area-chart.tsx\n│       └── radar-chart.tsx\n└── lib/\n    ├── catalog.ts                # json-render catalog definition\n    ├── registry.tsx              # Client-side component registry\n    ├── chart-schemas.ts          # Zod schemas for chart props\n    ├── chartjs-setup.ts          # Chart.js global plugin registration\n    ├── sample-data.ts            # Sample datasets for the system prompt\n    ├── data-context.tsx          # Data context provider\n    ├── data-query.ts             # Data query utilities\n    ├── chart-utils.ts            # Chart helper functions\n    ├── use-chart-data.ts         # Chart data hook\n    └── use-grid-layout.ts        # Grid layout hook\n```\n\n## How It Works\n\n1. **Prompt** -- The user types a natural language request describing the desired dashboard.\n2. **Stream** -- The API route sends the prompt to Anthropic Claude via the Vercel AI SDK. The model streams back JSONL describing a component tree.\n3. **Parse** -- `@json-render/react` incrementally parses the streamed JSONL into a live component tree using the registered catalog.\n4. **Render** -- Chart.js components render inside a `react-grid-layout` dashboard that supports drag-and-drop repositioning and resizing.\n\n## Available Chart Types\n\n| Type     | Component       | Description                              |\n| -------- | --------------- | ---------------------------------------- |\n| Line     | `LineChart`     | Trend lines over time or categories      |\n| Bar      | `BarChart`      | Categorical comparisons                  |\n| Pie      | `PieChart`      | Proportional distribution                |\n| Doughnut | `DoughnutChart` | Proportional distribution (ring variant) |\n| Area     | `AreaChart`     | Filled line charts for volume            |\n| Radar    | `RadarChart`    | Multi-axis comparison                    |\n\n## Contributing\n\nContributions are welcome. Please open an issue first to discuss what you would like to change.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/your-feature`)\n3. Commit your changes using [conventional commits](https://www.conventionalcommits.org)\n4. Push to the branch (`git push origin feature/your-feature`)\n5. Open a pull request\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowieth%2Fdynamic-charts-by-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowieth%2Fdynamic-charts-by-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowieth%2Fdynamic-charts-by-prompt/lists"}