viteboard 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +110 -61
  2. package/content/docs/guide/boards-in-markdown.md +28 -26
  3. package/content/docs/guide/boards.md +44 -82
  4. package/content/docs/guide/getting-started.md +36 -48
  5. package/content/docs/index.md +21 -32
  6. package/dist/assets/index-C30zRPsW.js +60 -0
  7. package/dist/assets/index-e5aqtN8W.css +1 -0
  8. package/dist/index.html +2 -2
  9. package/package.json +1 -1
  10. package/src/app/AppController.ts +7 -0
  11. package/src/elements/renderElement.ts +89 -0
  12. package/src/elements/types.ts +1 -0
  13. package/src/shell/Shell.ts +4 -6
  14. package/src/shell/Sidebar.ts +382 -83
  15. package/src/styles.css +75 -0
  16. package/src/templates/handoffTemplate.ts +34 -0
  17. package/src/templates/helpers.ts +10 -2
  18. package/src/templates/index.ts +14 -0
  19. package/src/templates/systemDiagramTemplate.ts +6 -6
  20. package/src/templates/workflowTemplate.ts +35 -0
  21. package/src/tools/ArrowTool.ts +11 -1
  22. package/src/tools/SelectTool.ts +1 -1
  23. package/src/tools/ShapeTool.ts +2 -2
  24. package/src/tools/ToolContext.ts +7 -0
  25. package/src/ui/TextEditorOverlay.ts +136 -11
  26. package/src/ui/Toolbar.ts +39 -1
  27. package/src/ui/icons.ts +6 -0
  28. package/vite.config.ts +16 -10
  29. package/content/docs/capabilities.md +0 -89
  30. package/content/docs/docs.md +0 -84
  31. package/content/docs/guide/test.md +0 -6
  32. package/content/docs/test.md +0 -219
  33. package/content/docs/tetst-dir/test-board.board.json +0 -15
  34. package/content/docs/tetst-dir/test-test.md +0 -1
  35. package/content/docs/workspace.md +0 -73
  36. package/dist/assets/index-CEpxLM2o.css +0 -1
  37. package/dist/assets/index-D4xvJdEQ.js +0 -60
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # ViteBoard
2
2
 
3
- A local-first documentation workspace and infinite-canvas whiteboard. Markdown docs, boards, and structured capability specs — all plain files on disk, tracked by git.
3
+ A local-first documentation workspace and infinite-canvas whiteboard.
4
4
 
5
- **Zero runtime dependencies.** Built entirely in vanilla TypeScript with Vite.
5
+ Write markdown docs, create visual boards, and manage structured capability specs -- all stored as plain files on disk, tracked by git. No database, no cloud, no vendor lock-in.
6
+
7
+ Built entirely in vanilla TypeScript with Vite. Zero runtime framework dependencies.
6
8
 
7
9
  ## Install
8
10
 
@@ -20,117 +22,164 @@ Or run without installing:
20
22
 
21
23
  ```bash
22
24
  npx viteboard
25
+ # or
26
+ pnpm dlx viteboard
23
27
  ```
24
28
 
25
- Or with pnpm:
29
+ ViteBoard opens in your browser at `http://localhost:5173`.
26
30
 
27
- ```bash
28
- pnpm dlx viteboard
29
- ```
31
+ ## Getting Started
30
32
 
31
- ViteBoard opens in your browser. Click **Add Repo** in the sidebar, pick any local project directory, and ViteBoard discovers all `docs/` folders and mounts them in the sidebar.
33
+ 1. Click **Add Repo** in the sidebar
34
+ 2. Pick any local project directory
35
+ 3. ViteBoard scans for `docs/` folders and mounts them in the sidebar
36
+ 4. Start writing
32
37
 
33
- ## Development
38
+ If your project doesn't have a `docs/` folder yet, select **View: Raw** from the project menu, then right-click the target directory and choose **Create docs folder here**.
34
39
 
35
- To work on ViteBoard itself:
40
+ ## Features
36
41
 
37
- ```bash
38
- git clone https://gitlab.com/ajsib/viteboard.git
39
- cd viteboard
40
- npm install
41
- npm run dev
42
+ ### Markdown Docs
43
+
44
+ Write and edit markdown files inside any `docs/` directory. Full rendering support for headings, lists, tables, code blocks, blockquotes, images, and links. Inline editor with live preview.
45
+
46
+ ### Infinite-Canvas Boards
47
+
48
+ Visual whiteboards saved as `.board.json` files alongside your docs. Elements include sticky notes, shapes, arrows, text, images, tasks, and frames. Boards are small JSON files that diff cleanly in git.
49
+
50
+ Board regions can be embedded directly into markdown:
51
+
52
+ ````md
53
+ ```board
54
+ src: architecture
55
+ region: 100, 50, 1200, 700
56
+ height: 360
57
+ title: System Architecture
42
58
  ```
59
+ ````
43
60
 
44
- ## What It Does
61
+ ### Capability Specs
45
62
 
46
- ViteBoard is a local documentation tool that runs alongside your codebase. Point it at a project directory and it finds every `docs/` folder, giving you a workspace to write, organize, and browse documentation — all stored as plain files that git tracks naturally.
63
+ Structured markdown documents with YAML frontmatter (`title`, `summary`, `tags`). Designed for building AI prompts -- add specs to a cart and copy them as a combined prompt.
47
64
 
48
- ### Docs
65
+ ### Full-Text Search
49
66
 
50
- Write markdown files inside any `docs/` directory. ViteBoard renders them with full markdown support: headings, lists, tables, code blocks, images, and links. Edit inline or in an integrated editor.
67
+ Search across every doc and capability in every registered project. Open with `Cmd/Ctrl K` from anywhere. Results are ranked by title, path, headings, and body text.
51
68
 
52
- ### Boards
69
+ ### Sidebar Navigation
53
70
 
54
- Infinite-canvas whiteboards saved as `.board.json` files next to your docs. Create sticky notes, shapes, arrows, text, images, tasks, and frames. Boards are small, diffable, and git-native.
71
+ The sidebar has two projections of one project-relative tree. **View: Docs** shows docs roots and the folder paths leading to them. **View: Raw** adds muted project folders and files for discovery. Discovered `docs/` folders stay in their physical location in both views.
55
72
 
56
- Board regions can be embedded directly into markdown documents using fenced code blocks.
73
+ Other sidebar features:
57
74
 
58
- ### Capabilities
75
+ - Right-click files and directories for contextual actions (new doc, rename, delete, etc.)
76
+ - Drag and drop to reorganize files between directories
77
+ - Inline rename and creation (VS Code style)
78
+ - Full breadcrumb navigation with wiki pages at every directory level
59
79
 
60
- Structured markdown specs with YAML frontmatter (title, summary, tags). Build a cart of specs and copy them as a combined prompt for AI workflows.
80
+ ## How It Works
61
81
 
62
- ### Search
82
+ ViteBoard uses a custom Vite plugin as its backend. The dev server reads and writes files directly to your project's `docs/` folders. There is no separate database -- your filesystem is the source of truth.
63
83
 
64
- Full-text search across every doc and capability in every registered project. `Cmd/Ctrl K` to open from anywhere.
84
+ ### Directory Convention
65
85
 
66
- ## Project Structure
86
+ Any folder named `docs/` inside a registered project is automatically discovered and mounted:
67
87
 
68
88
  ```
69
89
  your-project/
70
90
  frontend/
71
91
  src/
72
- docs/ <- ViteBoard discovers this
92
+ docs/ <- Discovered
73
93
  index.md
74
94
  guides/
75
95
  getting-started.md
76
- boards/
77
- architecture.board.json
78
96
  capabilities/
79
97
  auth-flow.md
80
98
  assets/
81
99
  screenshot.png
82
100
  api/
83
- docs/ <- And this
101
+ docs/ <- Discovered
84
102
  endpoints.md
85
- backend/ <- No docs/ yet (create one via View: Raw)
103
+ boards/
104
+ api-flow.board.json
105
+ backend/ <- No docs/ yet
86
106
  ```
87
107
 
88
- Each `docs/` folder becomes a content root. ViteBoard reads and writes files directly to disk. Git in your project is the source of truth.
89
-
90
- ## Navigation
108
+ Each `docs/` folder becomes a self-contained content root with its own docs, boards, capabilities, and assets.
91
109
 
92
- ### View: Docs (default)
110
+ ### Workspace
93
111
 
94
- The sidebar shows only your `docs/` folders and their contents. Clean, focused, no noise from the rest of the project filesystem.
112
+ ViteBoard stores which projects you've registered in `.workspace/workspace.json`. This file is local to your machine and should be gitignored -- it contains only absolute paths to project roots.
95
113
 
96
- ### View: Raw
114
+ ## Development
97
115
 
98
- Toggle via the three-dot menu on any project header. Shows the full directory tree with non-docs directories subtly muted. Right-click any directory to create a `docs/` folder inside it. Once created, toggle back to Docs view and the new root appears immediately.
116
+ ```bash
117
+ git clone https://gitlab.com/ajsib/viteboard.git
118
+ cd viteboard
119
+ npm install
120
+ npm run dev
121
+ ```
99
122
 
100
- ### Breadcrumbs
123
+ ### Scripts
101
124
 
102
- Every page shows its full path as clickable breadcrumbs. Each directory segment links to a wiki page showing the contents of that level — docs, boards, capabilities, and subdirectories.
125
+ | Command | Description |
126
+ |---------|-------------|
127
+ | `npm run dev` | Start development server |
128
+ | `npm run build` | Type-check and bundle to `dist/` |
129
+ | `npm run preview` | Preview the production build |
130
+ | `npm start` | Run via the CLI entry point |
103
131
 
104
- ### Shared Links
132
+ ### Project Structure
105
133
 
106
- Copy any URL from the address bar. Links are stable and resolve correctly when the same project is registered in the workspace.
134
+ ```
135
+ src/
136
+ app/ Application controller, keyboard shortcuts, board state
137
+ board/ Board service (CRUD operations for .board.json files)
138
+ canvas/ Canvas renderer, viewport, hit testing, image cache
139
+ content/ Content API client, markdown parser, markdown renderer
140
+ editor/ Inline document editor
141
+ elements/ Board element types and rendering
142
+ shell/ Shell (routing, topbar) and Sidebar (navigation tree)
143
+ storage/ Asset store, board serialization, IndexedDB fallback
144
+ templates/ Board templates (journey map, persona, system diagram, etc.)
145
+ testing/ Stress test utilities
146
+ tools/ Board tools (select, pan, sticky, shape, arrow, text, image)
147
+ ui/ UI components (modal, toolbar, top controls, overlays)
148
+ styles.css All application styles
149
+ vite.config.ts Vite plugin (backend API server)
150
+ index.html Entry point
151
+ ```
107
152
 
108
- ## Sidebar Actions
153
+ ### Tech Stack
109
154
 
110
- - **Right-click a directory** inside `docs/` to create docs, boards, capabilities, or subdirectories
111
- - **Right-click a file** to open, edit, rename, or delete
112
- - **Drag and drop** files and directories to reorganize
113
- - **Three-dot menu** on project headers for View: Raw/Docs toggle, wiki, and project actions
155
+ - **Vite** -- Dev server and bundler
156
+ - **TypeScript** -- All source code, zero JavaScript files
157
+ - **Canvas API** -- Board rendering (no canvas libraries)
158
+ - **Custom Vite plugin** -- Backend API for file I/O and workspace management
159
+ - **Hash-based routing** -- Client-side navigation, works as static files
114
160
 
115
- ## Workspace
161
+ ## API Reference
116
162
 
117
- Developer-specific workspace settings (which projects are registered) live in `.workspace/` and should be gitignored. The workspace file stores only absolute paths to project roots.
163
+ ViteBoard exposes a local REST API at `/__api/` during development:
118
164
 
119
- ## Building
165
+ | Endpoint | Method | Description |
166
+ |----------|--------|-------------|
167
+ | `/workspace` | GET | List all projects and their docs roots |
168
+ | `/workspace/pick-project` | POST | Open native folder picker to add a project |
169
+ | `/workspace/project` | DELETE | Remove a project from workspace |
170
+ | `/tree` | GET | Get file tree for a docs root |
171
+ | `/project-tree` | GET | Get full directory tree for a project |
172
+ | `/file` | GET/PUT/PATCH/DELETE | Read, write, rename, or delete files |
173
+ | `/directory` | PUT | Create a directory |
174
+ | `/board` | GET/PUT/DELETE | Read, write, or delete board documents |
175
+ | `/asset` | GET/POST | Serve or upload assets |
120
176
 
121
- ```bash
122
- npm run build # Type-check + bundle to dist/
123
- npm run preview # Preview the production build
124
- ```
177
+ All file operations are scoped to registered docs roots and reject paths that escape the root directory.
125
178
 
126
- ## Tech
179
+ ## Contributing
127
180
 
128
- - **Vite** dev server and build tool
129
- - **TypeScript** — all source code, zero JavaScript
130
- - **Canvas API** — infinite-canvas board rendering (no libraries)
131
- - **Custom Vite plugin** — serves as the backend, handling file I/O and workspace management
132
- - **Hash-based routing** — works as static files, no page reloads
181
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
133
182
 
134
183
  ## License
135
184
 
136
- MIT
185
+ [MIT](LICENSE)
@@ -1,48 +1,50 @@
1
1
  ---
2
- title: Boards in markdown
3
- order: 2
2
+ title: Embedding Boards in Docs
4
3
  ---
5
4
 
6
- # Boards in markdown
5
+ # Embedding Boards in Docs
7
6
 
8
- You can embed any board into a doc and **frame exactly the region you want to show**.
7
+ You can embed a region of any board directly into a markdown document using a fenced code block.
9
8
 
10
- ## The directive
9
+ ## Syntax
11
10
 
11
+ ````md
12
12
  ```board
13
- src: ../product-roadmap
14
- region: -393, -16, 1259, 663
13
+ src: architecture
14
+ region: 100, 50, 1200, 700
15
15
  height: 360
16
- title: Product Roadmap
16
+ title: System Overview
17
17
  ```
18
+ ````
18
19
 
19
- `src` is required — it's the board file name without `.board.json`.
20
+ ### Parameters
20
21
 
21
- - `region` is four numbers in **world coordinates**: `x, y, width, height`. Omit it to fit the whole board.
22
- - The preview is **read-only** and rendered with the same drawing engine as the editor, so it looks identical — just cropped and static.
22
+ | Parameter | Required | Description |
23
+ |-----------|----------|-------------|
24
+ | `src` | Yes | Board ID (filename without `.board.json`) |
25
+ | `region` | No | Viewport region: `x, y, width, height` |
26
+ | `height` | No | Display height in pixels (default: 300) |
27
+ | `title` | No | Caption shown below the embed |
23
28
 
24
- ## How to get a region without doing math
29
+ ## Getting the Embed Snippet
25
30
 
26
- 1. Open the board from the Boards section for the active docs root and click **Edit**.
27
- 2. Pan/zoom until the area you want fills the screen.
28
- 3. Click **Copy embed** in the top bar.
29
- 4. Paste the snippet into any markdown file. The current visible rectangle becomes the `region`
31
+ The easiest way to create an embed:
30
32
 
31
- \`\`\`board
33
+ 1. Open the board in the editor
34
+ 2. Navigate to the region you want to embed
35
+ 3. Click **Copy embed** in the toolbar
36
+ 4. Paste the snippet into your markdown document
32
37
 
33
- src: product-roadmap
38
+ The copied snippet includes the exact viewport coordinates for the current view.
34
39
 
35
- region: 4958, 3057, 1273, 789
40
+ ## How It Works
36
41
 
37
- height: 360
42
+ When a markdown document is rendered, board embeds are replaced with a live canvas preview showing the specified region. The preview is read-only -- click it to open the full board editor.
38
43
 
39
- title: Product Roadmap
44
+ ## Relative Paths
40
45
 
41
- \`\`\`
46
+ Board paths are resolved relative to the current document. If your document is at `docs/guides/setup.md` and the board is at `docs/boards/flow.board.json`, use:
42
47
 
43
48
  ```board
44
- src: ../product-roadmap
45
- region: 4958, 3057, 1273, 789
46
- height: 360
47
- title: Product Roadmap
49
+ src: ../boards/flow
48
50
  ```
@@ -4,89 +4,51 @@ title: Boards
4
4
 
5
5
  # Boards
6
6
 
7
- Boards are infinite-canvas files stored as JSON alongside your docs. They open in a full-screen editor, close back to the doc view, and commit to git like any other file.
8
-
9
- ## Creating a board
10
-
11
- Three ways:
12
-
13
- 1. Right-click a directory in the sidebar → **New Board**
14
- 2. Click **All Boards** for a project → **+ New board** button on the page
15
- 3. Click the board page button in the top-right of the boards list page
16
-
17
- Give the board a title. The file is created at `<docs-root>/boards/<slug>.board.json`.
18
-
19
- ## Editing a board
20
-
21
- Click any board in the sidebar or on the All Boards page. The board opens full-screen. The shell layout is hidden while the editor is active — close with the **×** button in the top-right to return.
22
-
23
- ### Canvas controls
24
-
25
- | Input | Action |
26
- | --- | --- |
27
- | Scroll | Pan vertically |
28
- | Shift + scroll | Pan horizontally |
29
- | Cmd/Ctrl + scroll | Zoom in / out |
30
- | Click element | Select |
31
- | Click + drag empty area | Pan |
32
- | Double-click element | Edit text |
33
- | Delete / Backspace | Remove selected |
34
-
35
- ### Toolbar elements
36
-
37
- The bottom toolbar contains every element type:
38
-
39
- - **Select** — move, resize, multi-select
40
- - **Pan** — drag canvas
41
- - **Sticky** — colour-coded sticky notes
42
- - **Task** — checkbox task items
43
- - **Text** — free text at any size
44
- - **Shapes** rectangles, ellipses, and more with fill/stroke
45
- - **Arrow / Connector** — lines between elements
46
- - **Image** — paste or drag an image file; stored in `assets/`
47
- - **Frame** — group elements into a named region
48
- - **Templates** — pre-built layout starters
49
-
50
- ### Renaming and deleting
51
-
52
- Right-click any board link in the sidebar:
53
-
54
- - **Rename** — updates the board's title (the `.board.json` filename stays the same)
55
- - **Delete** — removes the file after confirmation
56
-
57
- ## Embedding a board in a doc
58
-
59
- A board region can be embedded inline in any markdown doc using a fenced `board` block:
60
-
61
- ````
62
- ```board
63
- src: my-board
64
- region: 100, 200, 800, 400
65
- height: 320
66
- title: Sprint overview
7
+ Boards are infinite-canvas whiteboards saved as `.board.json` files inside your `docs/` folders.
8
+
9
+ ## Creating a Board
10
+
11
+ Right-click any directory in the sidebar and select **New Board**. Enter a name and the board opens immediately in full-screen editing mode.
12
+
13
+ ## Elements
14
+
15
+ | Element | Shortcut | Description |
16
+ |---------|----------|-------------|
17
+ | Sticky Note | `S` | Color-coded notes with text |
18
+ | Shape | `R` | Rectangles, ellipses, diamonds, and more |
19
+ | Text | `T` | Free-form text labels |
20
+ | Arrow | `A` | Connectors between elements |
21
+ | Image | `I` | Drag or paste images onto the canvas |
22
+ | Task | `O` | Checklist items with completion state |
23
+
24
+ ## Navigation
25
+
26
+ | Action | Input |
27
+ |--------|-------|
28
+ | Pan | Click and drag on empty space, or Shift + scroll |
29
+ | Zoom | Cmd/Ctrl + scroll, or pinch on trackpad |
30
+ | Select | Click an element, or drag to select multiple |
31
+ | Move | Drag a selected element |
32
+ | Resize | Drag the handles on a selected element |
33
+ | Delete | Select and press Backspace/Delete |
34
+
35
+ ## File Format
36
+
37
+ Boards are stored as JSON:
38
+
39
+ ```json
40
+ {
41
+ "id": "architecture",
42
+ "title": "System Architecture",
43
+ "elements": [...],
44
+ "viewport": { "x": 0, "y": 0, "zoom": 1 },
45
+ "createdAt": 1700000000000,
46
+ "updatedAt": 1700000000000
47
+ }
67
48
  ```
68
- ````
69
-
70
- - `src` — the board filename without `.board.json` (**required**)
71
- - `region` — four world-space coordinates: `x, y, width, height` (optional — omit to fit the whole board)
72
- - `height` — height of the embed in pixels (optional, defaults to 360)
73
- - `title` — caption shown below the embed (optional)
74
49
 
75
- The embed is **read-only** and rendered with the same drawing engine as the editor.
50
+ These files are small, diffable, and work naturally with git.
76
51
 
77
- ## Getting a region without doing the maths
78
-
79
- 1. Open the board and click **Edit** to enter the canvas editor.
80
- 2. Pan and zoom until the area you want to show fills the screen.
81
- 3. Click **Copy embed** in the top-right toolbar.
82
- 4. Paste the snippet anywhere in a markdown doc.
83
-
84
- The `region` coordinates are calculated from whatever is currently visible on screen.
85
-
86
- ## Board files are git-native
87
-
88
- Each board is a single JSON file. `git diff` shows exactly which elements changed. Board files are small — a board with 50 elements is typically under 20 KB.
89
-
90
- ---
52
+ ## Exiting the Board Editor
91
53
 
92
- **Next:** [Capabilities](capabilities.md) writing reusable specs and building LLM prompts.
54
+ Click the back arrow in the top-left corner to return to the documentation view. Your board is saved automatically.
@@ -1,71 +1,59 @@
1
1
  ---
2
- title: Getting started
2
+ title: Getting Started
3
3
  ---
4
4
 
5
- # Getting started
5
+ # Getting Started
6
6
 
7
- ## Install and run
7
+ ## Adding a Project
8
8
 
9
- ```bash
10
- pnpm install
11
- pnpm dev
12
- ```
13
-
14
- Open the URL printed in the terminal. You'll see the home page with an empty workspace.
15
-
16
- ## Add a project
17
-
18
- Click **+ Add Repo** on the home page or at the bottom of the sidebar. A native folder picker opens — select the root of any project you want to document.
9
+ Click **Add Repo** in the sidebar footer. A native folder picker opens -- select your project's root directory. ViteBoard scans for `docs/` folders and mounts each one in the sidebar.
19
10
 
20
- The tool scans the selected directory recursively for folders named `docs/`. Every `docs/` folder that contains at least one `.md` or `.board.json` file becomes a **docs root** and appears in the sidebar.
11
+ You can add multiple projects. Each appears as a collapsible section in the sidebar.
21
12
 
22
- > The tool only records the path. It never copies, uploads, or modifies your project files.
13
+ ## Creating Documentation
23
14
 
24
- ## What the sidebar shows
15
+ Right-click any directory in the sidebar to create:
25
16
 
26
- After adding a project you'll see it as a collapsible section in the sidebar. Click to expand. Inside you'll find the path tree leading to each discovered `docs/` root.
17
+ - **New Doc** -- A markdown file
18
+ - **New Board** -- An infinite-canvas whiteboard
19
+ - **New Directory** -- A subdirectory for organizing content
20
+ - **New Capability** -- A structured spec with YAML frontmatter
27
21
 
28
- - Each docs root shows its relative path (e.g. `backend/api/docs`)
29
- - Right-click any directory to create a new doc, board, or capability inside it
30
- - **All Boards** and **All Capabilities** appear at the bottom of each project
22
+ ## The docs/ Convention
31
23
 
32
- ## The folder model
33
-
34
- The tool expects this layout inside each `docs/` root:
24
+ ViteBoard looks for folders named `docs/` inside your project. This is a convention -- documentation lives alongside the code it describes:
35
25
 
36
26
  ```
37
- docs/
38
- index.md → shows as "Overview" in the sidebar
39
- any-subdir/ → becomes a collapsible group
40
- my-doc.md
41
- boards/ → board files; excluded from the doc tree
42
- my-board.board.json
43
- capabilities/ → capability specs; shown via All Capabilities
44
- auth-flow.md
45
- assets/ → images; excluded from the doc tree
46
- screenshot.png
27
+ my-project/
28
+ frontend/
29
+ src/
30
+ docs/ <- ViteBoard finds this
31
+ index.md
32
+ guides/
33
+ api/
34
+ docs/ <- And this
35
+ endpoints.md
47
36
  ```
48
37
 
49
- `boards/`, `capabilities/`, and `assets/` are special directories — the tool recognises them and surfaces their contents through dedicated views rather than as doc tree nodes.
38
+ ### Creating a docs/ Folder
50
39
 
51
- ## Your first doc
40
+ If a directory doesn't have a `docs/` folder yet:
52
41
 
53
- 1. Right-click a directory in the sidebar.
54
- 2. Choose **New Doc**.
55
- 3. Type a name it becomes the filename (`my-doc.md`) and the page title.
56
- 4. The doc opens immediately. Click **Edit** in the top bar to write in it.
42
+ 1. Open the project menu and select **View: Raw**
43
+ 2. Right-click the directory where you want documentation
44
+ 3. Select **Create docs folder here**
45
+ 4. Switch back to **View: Docs** when you want the focused docs-only view
57
46
 
58
- ## Your first board
47
+ ## Editing
59
48
 
60
- 1. Right-click a directory or click **All Boards** **+ New board**.
61
- 2. Give it a title.
62
- 3. The board opens in full-screen canvas mode.
63
- 4. Draw, add stickies, shapes, tasks. Close with the × button when done.
49
+ Click any doc in the sidebar to view it. Click the **Edit** button in the topbar (or right-click the doc and select **Edit**) to open the inline editor.
64
50
 
65
- ## Removing a project
51
+ Changes are saved directly to the file on disk.
66
52
 
67
- Right-click the project name in the sidebar → **Remove from workspace**. The project is unregistered. Nothing on disk is deleted.
53
+ ## Search
68
54
 
69
- ---
55
+ Press `Cmd/Ctrl K` to open the command palette. Search across all docs and capabilities in every registered project. Use arrow keys to navigate results and Enter to open.
56
+
57
+ ## Workspace
70
58
 
71
- **Next:** [Docs](docs.md) writing and managing markdown content.
59
+ Your registered projects are stored in `.workspace/workspace.json` in the ViteBoard directory. This file is local to your machine -- add it to `.gitignore`.
@@ -4,44 +4,33 @@ title: Overview
4
4
 
5
5
  # ViteBoard
6
6
 
7
- A local-first documentation workspace for development teams. Markdown docs, infinite-canvas boards, and structured capability specs — all plain files on disk, committed to git alongside your source code.
7
+ A local-first documentation workspace and infinite-canvas whiteboard.
8
8
 
9
- There is no cloud service, no database, no account. The Vite dev-server plugin reads and writes files directly. Every change you make is immediately a git diff.
9
+ ViteBoard discovers `docs/` folders inside your projects and gives you a workspace to write, organize, and browse documentation. Everything is stored as plain files on disk -- markdown, board JSON, and assets -- tracked by your project's git history.
10
10
 
11
- ---
12
-
13
- ## What's in here
14
-
15
- **[Getting started](guide/getting-started.md)** — add your first project, understand the folder model, make your first doc and board.
16
-
17
- **[Docs](guide/docs.md)** — writing and managing markdown documents, the sidebar tree, right-click actions, full-text search.
11
+ ## Quick Start
18
12
 
19
- **[Boards](guide/boards.md)** creating and editing infinite-canvas boards, embedding board regions into docs, the Copy embed workflow.
20
-
21
- **[Capabilities](guide/capabilities.md)** writing capability specs, the component cart, building and copying LLM prompts.
22
-
23
- **[Workspace](guide/workspace.md)** — managing multiple projects, the project wiki, keyboard shortcuts, removing projects.
24
-
25
- ---
13
+ 1. Click **Add Repo** in the sidebar
14
+ 2. Pick any local project directory
15
+ 3. ViteBoard scans for `docs/` folders and mounts them
16
+ 4. Start writing
26
17
 
27
- ## The short version
18
+ ## Content Types
28
19
 
29
- 1. Run `pnpm dev` in this directory.
30
- 2. Click **Add Repo** in the sidebar and pick any project root.
31
- 3. The sidebar discovers every `docs/` folder under that root.
32
- 4. Right-click any directory in the sidebar to create a doc, board, or capability.
33
- 5. Everything saves to disk. Commit with git as normal.
20
+ - **Docs** -- Markdown files with full rendering support
21
+ - **Boards** -- Infinite-canvas whiteboards saved as `.board.json`
22
+ - **Capabilities** -- Structured specs with YAML frontmatter for AI prompt building
23
+ - **Assets** -- Images stored alongside your docs
34
24
 
35
- **Note:** These built-in docs ship with ViteBoard. To remove them, delete the `content/docs/` folder from the ViteBoard directory and restart the dev server.
25
+ ## Keyboard Shortcuts
36
26
 
37
- ## How it stores things
27
+ | Shortcut | Action |
28
+ |----------|--------|
29
+ | `Cmd/Ctrl K` | Open search |
30
+ | `Escape` | Close modals and search |
38
31
 
39
- | Action | What happens on disk |
40
- | --- | --- |
41
- | Create / edit a doc | Writes `<docs-root>/<path>.md` |
42
- | Create / save a board | Writes `<docs-root>/boards/<id>.board.json` |
43
- | Paste image on board | Writes `<docs-root>/assets/<filename>` |
44
- | Create a capability | Writes `<docs-root>/capabilities/<name>.md` |
45
- | Add a project | Records path in `.workspace/workspace.json` |
32
+ ## Learn More
46
33
 
47
- Nothing leaves your machine.
34
+ - [Getting Started](guide/getting-started.md) -- First steps with ViteBoard
35
+ - [Boards](guide/boards.md) -- Working with the infinite canvas
36
+ - [Embedding Boards](guide/boards-in-markdown.md) -- Embed board regions in docs