How gaurgle/pinz works
pinz is a terminal-based spatial bulletin board whose notes are stored separately from the program in a git-backed pin repository. The main workflow is to open that repository, load its worlds and notes, navigate and edit the board in the TUI, then persist changes and synchronize them across machines. Its core separates the note/world model and projection from the terminal renderer; the storage seam also supports persistence concerns such as conflict handling and single-writer protection. The README documents sync and version commands; wiring for some CLI details is not fully shown in the sampled source.
Main entry points: main.rs TUI entry · app.rs App state · ui.rs Board renderer · sync.rs Git synchronization
Components 19
Terminal interaction
- TUI entry
crates/pinz-tui/src/main.rs - App state
crates/pinz-tui/src/app.rs - Board renderer
crates/pinz-tui/src/ui.rs - Text editor
crates/pinz-tui/src/editor.rs - Clipboard
crates/pinz-tui/src/clipboard.rs - Themes
crates/pinz-tui/src/theme.rs - Text wrapping
crates/pinz-tui/src/wrap.rs
Board domain
- Terminal projection
crates/pinz-tui/src/view.rs - Worlds and notes
crates/pinz-core/src/model.rs - Projection geometry
crates/pinz-core/src/geometry.rs
Persistence and sync
- Storage seam
crates/pinz-core/src/store.rs - Pin file store
crates/pinz-core/src/file_store.rs - Board write lock
crates/pinz-core/src/lock.rs - Git synchronization
crates/pinz-core/src/sync.rs - Pin conflict merge
crates/pinz-core/src/merge.rs
Other components
- Board user
- Pin repository
- Git remote
- Release tags
Connections 22
- Board user → TUI entry: runs
- TUI entry → Storage seam: opens and loads
- TUI entry → App state: creates and drives
- TUI entry → Board renderer: draws frames
- TUI entry → Board write lock: acquires lock
- TUI entry → Git synchronization: runs sync commands
- App state → Worlds and notes: updates board
- App state → Terminal projection: projects interaction
- App state → Text editor: edits note text
- App state → Clipboard: copies and pastes
- Board renderer → App state: reads state
- Board renderer → Terminal projection: positions notes
- Board renderer → Themes: styles display
- Board renderer → Text wrapping: wraps note text
- Terminal projection → Projection geometry: uses projection math
- Storage seam → Pin file store: implemented by
- TUI entry → Pin file store: persists board
- Pin file store → Pin repository: reads and writes
- Git synchronization → Pin repository: commits and pulls
- Git synchronization → Git remote: fetches and pushes
- Git synchronization → Pin conflict merge: resolves pin conflicts
- TUI entry → Release tags: checks latest tags