How geodacenter/openassistant works
Project type and purpose
• This is a large monorepo JavaScript/TypeScript library called “OpenAssistant.”
• Purpose: provide a core LLM-assistant engine, a suite of “tools” (Plot, Geo, Map, DuckDB, GeoDa, OSM, etc.), reusable React UI components (chat interface, visualization containers), shared utilities, plus examples/playground/docs for developers to build AI data-analysis applications.
File structure
• Top-level configuration: lerna.json, turbo.json, GitHub workflows, esbuild.config.mjs, TypeScript and ESLint configs.
• packages/
• core – the assistant engine: tool invocation, LLM abstractions, streaming, hooks.
• tools/* – domain-specific tool plugins (duckdb, geoda, map, osm, plots). Each exports a tool interface, registerTools, uses WASM or external APIs.
• components/* – headless React components for charts, maps, tables.
• ui – pre-built chat UI component using the core engine and components.
• utils – shared helpers (caching, formatting, tool-output management).
• examples/ & playground/ & storybook/ – client applications demonstrating usage.
• website/ – Docusaurus-based docs site and blog.
• CI/CD & scripts/ – build, test, versioning, publish pipelines.
README for insights
• Describes core features: one interface for multiple LLM providers, tool ecosystem, React chat component.
• Shows flow: user prompt → tool selection → context.getValues → tool executes (e.g. DuckDB, ECharts, Mapbox, OSM) → returns data and UI metadata → callback on completion → UI renders result.
• Highlights dependency injection, plugin architecture, and examples path.
Essential architectural elements
• Monorepo management at a high level, not every script.
• Runtime flow (user → UI → core → tools → external → back).
• Every major package boundary is represented and labelled.