feat: miller column browser, offline cache, search, breadcrumbs

- Dynamic miller column sizing with flexbox layout
- Root column (160px), middle slices (48px), active column (flex)
- Auto-scroll browser to rightmost column on navigation
- Offline indicator UI and IndexedDB cache integration
- /api/documents endpoint for client-side document caching
- Breadcrumb navigation in document content area
- FTS5 search with SQLite virtual table
- Client-side Mermaid and KaTeX rendering via CDN
- Deep sample content (advanced-topics/raft-deep-dive)
- Border removal (only search button keeps radius)
- Full viewport layout with proper borders between sidebar/content
This commit is contained in:
2026-04-30 11:55:03 -04:00
parent e45eeeb600
commit 780ff3a02c
40 changed files with 2986 additions and 190 deletions

View File

@@ -22,8 +22,34 @@ This repository now contains the Milestone 1 foundation scaffold:
- npm 11+
- Docker (optional)
- CGO-capable toolchain for `go-libsql`
- `air` for Go live reload (`go install github.com/air-verse/air@latest`)
### Run locally
### Development Mode (with live reload)
Run both the Go server and Vite dev server with live reload:
```bash
make dev
```
This starts:
- Go server with `air` live reload on http://localhost:8080
- Vite dev server with HMR on http://localhost:5173
- The Go server proxies `/app/*` requests to Vite, so access the app at http://localhost:8080/app/
You can also run them separately in two terminals:
```bash
# Terminal 1 - Go server with live reload
make dev-server
# Terminal 2 - Vite dev server
make dev-web
```
### Production Mode
Build the web app and run the Go server without Vite proxy:
```bash
make web-install
@@ -40,6 +66,7 @@ make server-test
make server-build
make docker-build
make ci
make fmt
```
## Configuration
@@ -47,7 +74,7 @@ make ci
Configuration can come from:
1. `config.json` via `MD_HUB_CONFIG`
2. environment variables
2. Environment variables
Supported variables:
@@ -58,6 +85,7 @@ Supported variables:
- `MD_HUB_CONTENT_SOURCE_DIR`
- `MD_HUB_CONTENT_STORE_DIR`
- `MD_HUB_WEB_DIST_DIR`
- `MD_HUB_DEV_VITE_URL` - Set to proxy `/app/*` to Vite dev server (e.g. `http://localhost:5173`)
- `MD_HUB_LOG_LEVEL`
## Noted Gaps
@@ -65,4 +93,3 @@ Supported variables:
- The docs describe both a single-binary system and a separate Vite/Preact app. This implementation keeps the Go server as the primary runtime and treats the web app as compiled static assets.
- The docs call for `golang-migrate`, but the current foundation uses an internal migration runner while `go-libsql` integration details are validated.
- The sync docs describe JSON messages while the Milestone 1 layout mentions a protobuf package; both are preserved in `packages/protocol/` pending a later protocol lock.