-
Notifications
You must be signed in to change notification settings - Fork 0
web ui
A Preact app served by the architecture/http-api over plain HTTP on localhost. The dist bundle (~860 KB minified) is embedded into the Go binary at compile time via //go:embed.
graph TD
A[App.tsx] --> S[Sidebar]
A --> M[Main pane]
S --> SB[PageBrowser]
SB --> SR[Search input + sort]
SB --> PL[PageList]
SB --> PT[PageTree]
M --> GV[GraphView]
M --> PV[Page view]
PV --> MD[marked + mermaid]
GV --> FG[force-graph canvas]
The sidebar holds the page list. Three sort modes, two renderings:
| Sort | Rendering |
|---|---|
| Recent | Flat list, newest first |
| A→Z path | Outlook-style tree, folders first |
| A→Z title | Flat list, alphabetical |
Search filters both the sidebar and the #graph-view live as you type. See concepts/search.
When no page is selected (or you click the "mind-map" header), the main pane shows an interactive force-directed graph of every page and link. See design/wikilinks-as-graph for the design notes.
| Edge kind | Source | Style |
|---|---|---|
| Path | parent → child path prefix | Translucent border-color line |
| Reference |
[[wikilink]] source → target |
Translucent accent-color line + arrow |
Both are togglable via an in-graph legend. A "fit all" button rescales to fit the current visible set.
The hash encodes both the current page and the active search filter:
#/concepts/wikilinks?q=arch
Typing into the search box replaces the URL in place. Pressing Enter or clicking a folder-only graph node pushes a new history entry — Back undoes the filter session.
- architecture/http-api — REST endpoints the UI calls
- concepts/wikilinks — graph data source
- design/lightweight — bundle-size notes