How t73fde/zettelstore works
Zettelstore is a self-hosted knowledge-management system for collecting durable notes (zettel) and linking them. Users enter through the web UI or the broader HTTP API: requests are routed, authenticated, handled by use cases, and served from managed boxes; note content is parsed or evaluated and results encoded for presentation. The README also highlights multiple interfaces and security by default. The graph includes documented runtime layers and key storage, query, parsing, and rendering capabilities. Several subsystems are represented by directory paths because their individual source was not sampled; links are limited to visible calls or README-described roles.
Main entry points: manager.go Box manager · main.go Command entry · router.go HTTP routing · usecase Zettel operations
Components 20
Startup and access
- Command entry
cmd/main.go - Service kernel
internal/kernel - HTTP server
internal/web/server - HTTP routing
internal/web/server/router.go - Authentication
internal/auth
Note operations
- Zettel operations
internal/usecase - Query execution
internal/usecase/query.go - Query language
internal/query - Zettel model
internal/zettel
Storage and indexing
- Box manager
internal/box/manager/manager.go - Box interface
internal/box/box.go - Directory storage
internal/box/dirbox/service.go - File and ZIP storage
internal/box/filebox - Other box providers
internal/box
Content processing
- Syntax parsers
internal/parser/parser.go - Content evaluator
internal/evaluator
Interfaces and output
- Web interface
internal/web/adapter/webui - HTTP API
internal/web/adapter/webapi - Content encoders
internal/encoder
Other components
- User
Connections 28
- User → Command entry: starts
- Command entry → Service kernel: configures
cmd/main.go - Command entry → Box manager: creates
cmd/main.go - Command entry → Authentication: creates
cmd/main.go - Service kernel → HTTP server: starts
internal/kernel/server.go - User → HTTP server: sends requests
- HTTP server → HTTP routing: routes
internal/web/server/router.go - HTTP routing → Authentication: checks tokens
internal/web/server/router.go - HTTP routing → HTTP API: dispatches
- HTTP routing → Web interface: dispatches
- HTTP API → Zettel operations: invokes
internal/web/adapter/webapi/query.go - Web interface → Zettel operations: invokes
- Zettel operations → Box manager: accesses boxes
- Query execution → Box manager: selects metadata
- Query execution → Query language: executes directives
internal/usecase/query.go - Query execution → Content evaluator: evaluates items
internal/usecase/query.go - Box manager → Box interface: manages
internal/box/manager/manager.go - Box manager → Directory storage: coordinates
internal/box/manager/manager.go - Box interface → Directory storage: implemented by
internal/box/dirbox/service.go - Box interface → Other box providers: implemented by
- Directory storage → File and ZIP storage: uses
internal/box/dirbox/service.go - Zettel operations → Syntax parsers: parses notes
- Syntax parsers → Zettel model: produces parsed notes
internal/parser/parser.go - Content evaluator → Syntax parsers: uses parsed syntax
internal/evaluator/inline.go - Content evaluator → Box interface: retrieves linked notes
internal/evaluator/inline.go - HTTP API → Content encoders: formats responses
- Web interface → Content encoders: renders content
- Content encoders → Zettel model: encodes
internal/encoder/mdenc.go