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.
- package/README.md +110 -61
- package/content/docs/guide/boards-in-markdown.md +28 -26
- package/content/docs/guide/boards.md +44 -82
- package/content/docs/guide/getting-started.md +36 -48
- package/content/docs/index.md +21 -32
- package/dist/assets/index-C30zRPsW.js +60 -0
- package/dist/assets/index-e5aqtN8W.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/app/AppController.ts +7 -0
- package/src/elements/renderElement.ts +89 -0
- package/src/elements/types.ts +1 -0
- package/src/shell/Shell.ts +4 -6
- package/src/shell/Sidebar.ts +382 -83
- package/src/styles.css +75 -0
- package/src/templates/handoffTemplate.ts +34 -0
- package/src/templates/helpers.ts +10 -2
- package/src/templates/index.ts +14 -0
- package/src/templates/systemDiagramTemplate.ts +6 -6
- package/src/templates/workflowTemplate.ts +35 -0
- package/src/tools/ArrowTool.ts +11 -1
- package/src/tools/SelectTool.ts +1 -1
- package/src/tools/ShapeTool.ts +2 -2
- package/src/tools/ToolContext.ts +7 -0
- package/src/ui/TextEditorOverlay.ts +136 -11
- package/src/ui/Toolbar.ts +39 -1
- package/src/ui/icons.ts +6 -0
- package/vite.config.ts +16 -10
- package/content/docs/capabilities.md +0 -89
- package/content/docs/docs.md +0 -84
- package/content/docs/guide/test.md +0 -6
- package/content/docs/test.md +0 -219
- package/content/docs/tetst-dir/test-board.board.json +0 -15
- package/content/docs/tetst-dir/test-test.md +0 -1
- package/content/docs/workspace.md +0 -73
- package/dist/assets/index-CEpxLM2o.css +0 -1
- 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.
|
|
3
|
+
A local-first documentation workspace and infinite-canvas whiteboard.
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
29
|
+
ViteBoard opens in your browser at `http://localhost:5173`.
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
pnpm dlx viteboard
|
|
29
|
-
```
|
|
31
|
+
## Getting Started
|
|
30
32
|
|
|
31
|
-
|
|
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
|
-
|
|
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
|
-
|
|
40
|
+
## Features
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
61
|
+
### Capability Specs
|
|
45
62
|
|
|
46
|
-
|
|
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
|
-
###
|
|
65
|
+
### Full-Text Search
|
|
49
66
|
|
|
50
|
-
|
|
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
|
-
###
|
|
69
|
+
### Sidebar Navigation
|
|
53
70
|
|
|
54
|
-
|
|
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
|
-
|
|
73
|
+
Other sidebar features:
|
|
57
74
|
|
|
58
|
-
|
|
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
|
-
|
|
80
|
+
## How It Works
|
|
61
81
|
|
|
62
|
-
|
|
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
|
-
|
|
84
|
+
### Directory Convention
|
|
65
85
|
|
|
66
|
-
|
|
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/ <-
|
|
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/ <-
|
|
101
|
+
docs/ <- Discovered
|
|
84
102
|
endpoints.md
|
|
85
|
-
|
|
103
|
+
boards/
|
|
104
|
+
api-flow.board.json
|
|
105
|
+
backend/ <- No docs/ yet
|
|
86
106
|
```
|
|
87
107
|
|
|
88
|
-
Each `docs/` folder becomes a content root
|
|
89
|
-
|
|
90
|
-
## Navigation
|
|
108
|
+
Each `docs/` folder becomes a self-contained content root with its own docs, boards, capabilities, and assets.
|
|
91
109
|
|
|
92
|
-
###
|
|
110
|
+
### Workspace
|
|
93
111
|
|
|
94
|
-
|
|
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
|
-
|
|
114
|
+
## Development
|
|
97
115
|
|
|
98
|
-
|
|
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
|
-
###
|
|
123
|
+
### Scripts
|
|
101
124
|
|
|
102
|
-
|
|
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
|
-
###
|
|
132
|
+
### Project Structure
|
|
105
133
|
|
|
106
|
-
|
|
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
|
-
|
|
153
|
+
### Tech Stack
|
|
109
154
|
|
|
110
|
-
- **
|
|
111
|
-
- **
|
|
112
|
-
- **
|
|
113
|
-
- **
|
|
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
|
-
##
|
|
161
|
+
## API Reference
|
|
116
162
|
|
|
117
|
-
|
|
163
|
+
ViteBoard exposes a local REST API at `/__api/` during development:
|
|
118
164
|
|
|
119
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
179
|
+
## Contributing
|
|
127
180
|
|
|
128
|
-
|
|
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
|
|
3
|
-
order: 2
|
|
2
|
+
title: Embedding Boards in Docs
|
|
4
3
|
---
|
|
5
4
|
|
|
6
|
-
# Boards in
|
|
5
|
+
# Embedding Boards in Docs
|
|
7
6
|
|
|
8
|
-
You can embed any board into a
|
|
7
|
+
You can embed a region of any board directly into a markdown document using a fenced code block.
|
|
9
8
|
|
|
10
|
-
##
|
|
9
|
+
## Syntax
|
|
11
10
|
|
|
11
|
+
````md
|
|
12
12
|
```board
|
|
13
|
-
src:
|
|
14
|
-
region:
|
|
13
|
+
src: architecture
|
|
14
|
+
region: 100, 50, 1200, 700
|
|
15
15
|
height: 360
|
|
16
|
-
title:
|
|
16
|
+
title: System Overview
|
|
17
17
|
```
|
|
18
|
+
````
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
### Parameters
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
##
|
|
29
|
+
## Getting the Embed Snippet
|
|
25
30
|
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
+
The copied snippet includes the exact viewport coordinates for the current view.
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
## How It Works
|
|
36
41
|
|
|
37
|
-
|
|
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
|
-
|
|
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: ../
|
|
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
|
|
8
|
-
|
|
9
|
-
## Creating a
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
| Shift + scroll |
|
|
29
|
-
| Cmd/Ctrl + scroll
|
|
30
|
-
| Click element
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
| Delete
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
+
These files are small, diffable, and work naturally with git.
|
|
76
51
|
|
|
77
|
-
##
|
|
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
|
-
|
|
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
|
|
2
|
+
title: Getting Started
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# Getting
|
|
5
|
+
# Getting Started
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Adding a Project
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
|
|
11
|
+
You can add multiple projects. Each appears as a collapsible section in the sidebar.
|
|
21
12
|
|
|
22
|
-
|
|
13
|
+
## Creating Documentation
|
|
23
14
|
|
|
24
|
-
|
|
15
|
+
Right-click any directory in the sidebar to create:
|
|
25
16
|
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
38
|
+
### Creating a docs/ Folder
|
|
50
39
|
|
|
51
|
-
|
|
40
|
+
If a directory doesn't have a `docs/` folder yet:
|
|
52
41
|
|
|
53
|
-
1.
|
|
54
|
-
2.
|
|
55
|
-
3.
|
|
56
|
-
4.
|
|
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
|
-
##
|
|
47
|
+
## Editing
|
|
59
48
|
|
|
60
|
-
|
|
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
|
-
|
|
51
|
+
Changes are saved directly to the file on disk.
|
|
66
52
|
|
|
67
|
-
|
|
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
|
-
|
|
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`.
|
package/content/docs/index.md
CHANGED
|
@@ -4,44 +4,33 @@ title: Overview
|
|
|
4
4
|
|
|
5
5
|
# ViteBoard
|
|
6
6
|
|
|
7
|
-
A local-first documentation workspace
|
|
7
|
+
A local-first documentation workspace and infinite-canvas whiteboard.
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
##
|
|
18
|
+
## Content Types
|
|
28
19
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
25
|
+
## Keyboard Shortcuts
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
| Shortcut | Action |
|
|
28
|
+
|----------|--------|
|
|
29
|
+
| `Cmd/Ctrl K` | Open search |
|
|
30
|
+
| `Escape` | Close modals and search |
|
|
38
31
|
|
|
39
|
-
|
|
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
|
-
|
|
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
|