From 110f5dc92e19ab860252ba5de686d3b1da09a027 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Mon, 23 Mar 2026 14:49:47 +0000 Subject: [PATCH] docs: rewrite README to describe ConceptSketch project (closes #4) --- README.md | 119 ++++++++++++++++++++++++++---------------------------- 1 file changed, 58 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index d2e7761..2569be0 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,70 @@ -# React + TypeScript + Vite +# ConceptSketch -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +An interactive concept map editor for creating and exploring hierarchical graph diagrams. Build knowledge structures visually by connecting nodes into nested subgraphs. -Currently, two official plugins are available: +## Features -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +- **Interactive graph editing** — click nodes to create children, ctrl+click to multi-select, click edges to remove them +- **Nested subgraphs** — convert any node into its own subgraph layer for infinite nesting +- **Breadcrumb navigation** — navigate through graph hierarchy with breadcrumb trail +- **Sidebar tree view** — see and navigate the full hierarchical structure at a glance +- **Rename nodes** — right-click any node to rename, create subgraphs, or remove +- **Orphaned nodes** — right-click empty canvas area to create standalone nodes +- **Save & load** — export/import your entire graph as a JSON file -## React Compiler +## Getting Started -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). +### Prerequisites -## Expanding the ESLint configuration +- Node.js (v18+) +- npm -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: +### Installation -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, - - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) +```bash +npm install ``` -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: +### Development -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) +```bash +npm run dev ``` + +Opens at `http://localhost:5173` with hot module replacement. + +### Build + +```bash +npm run build +``` + +### Tests + +```bash +npx playwright test +``` + +## Usage + +| Action | Result | +|---|---| +| Click a node | Create a new child node | +| Ctrl+click nodes, then click target | Link selected nodes as parents to target | +| Click an edge | Delete that edge | +| Right-click a node | Open context menu (Rename / Subgraph / Remove) | +| Right-click empty area | Create an orphaned (unconnected) node | +| Click sidebar tree item | Navigate to that subgraph | + +## Tech Stack + +- **React 19** + **TypeScript** +- **Vite** — build tool +- **Viz.js** (Graphviz) — graph rendering +- **D3** — SVG interactivity +- **Ant Design** — UI components +- **Zustand** — state management + +## File Format + +Graphs are saved as `concept-sketch.json`. The format supports nested subgraphs with recursive structure, preserving the full hierarchy.