How chyhsu/vizthinker works
Project type and purpose
• VizThinker AI is a full-stack desktop application that replaces a linear chat interface with a node-based graph for LLM-driven conversations.
• The frontend is implemented in React/TypeScript (built with Vite), and the backend is a Python server that persists data in SQLite and proxies requests to external LLM providers (Google Generative AI, Ollama).
File structure
• Top-level:
• config/ – TypeScript and Vite build configs
• server/ – Python modules:
– main.py: entry point, starts HTTP server & handles requests
– route.py: defines REST endpoints for chat operations
– dao/sqlite.py: Data Access Object for persisting/restoring graphs
– llm.py: adapter layer for different LLM providers
– logger.py: centralized logging
– scheme/ – data models for chat nodes
• src/ – React frontend:
– asset/ – static images and graph templates
– constants/, typejs/ – global constants and TypeScript type declarations
– react/ – UI components (ChatLayout, ChatNode, HeaderBar, Settings, etc.) and context
– styles.css, index.css, main.tsx: entry point
• res/requirements.txt & pyproject.toml – Python dependencies
• package.json & tsconfig.json – Node.js dependencies and TS config
• Makefile – orchestrates install, build, run
README for additional insights
• Confirms node-based chat graph, LLM integration, persistent local sessions, desktop native packaging
• Describes major features: branching logic, dynamic graph canvas, settings modal, multi-provider support