How nkavt/locket works
Locket is a local-first desktop planner: people organize projects and tickets, add comments and images, and keep the workspace in a local SQLite database. The renderer presents project, ticket, and settings routes; its state layer selects the Electron bridge or local-storage backend. In the desktop runtime, Electron exposes data operations over IPC and shares services with the built-in MCP server, allowing agents to work on the same workspace. The README documents the major capabilities; some feature implementations and IPC wiring were not sampled, so those links are documented rather than inferred from module names.
Main entry points: useAppStateStore.ts Workspace state · services Workspace services · http.ts MCP HTTP host · main.ts Electron main
Components 21
Desktop interface
- App routes
src/router.tsx - Workspace state
src/state/useAppStateStore.ts - Data backends
src/state/backend.ts
Workspace features
- Projects UI
src/features/projects - Tickets UI
src/features/tickets - Comments UI
src/features/comments - Image attachments
src/features/attachments - Settings UI
src/features/settings
Electron runtime
- Electron main
electron/main.ts - Data IPC
electron/ipc/data.ts - Workspace services
electron/services - Attachment service
electron/services/attachments.ts - Menu bar controls
electron/tray/index.ts
Local persistence
- Image file store
electron/attachments/store.ts - SQLite workspace
electron/db
Agent access
- MCP HTTP host
electron/mcp/http.ts - MCP server
electron/mcp/server.ts - Project and ticket tools
electron/mcp/tools - MCP resources
electron/mcp/resources.ts
Other components
- Person
- MCP agent
Connections 23
- Person → App routes: uses
README.md - App routes → Workspace state: reads workspace
- Workspace state → Data backends: selects backend
src/state/useAppStateStore.ts - Data backends → Data IPC: uses Electron bridge
- Workspace state → Projects UI: serves project state
- Workspace state → Tickets UI: serves ticket state
- Workspace state → Comments UI: serves comment state
- Workspace state → Image attachments: serves attachment state
- Workspace state → Settings UI: serves settings
- Electron main → Data IPC: registers handlers
electron/main.ts - Data IPC → Workspace services: delegates data operations
electron/ipc/data.ts - Workspace services → SQLite workspace: reads and writes
electron/services/projects.ts - Workspace services → Attachment service: exports attachment operations
electron/services/index.ts - Attachment service → Image file store: manages image files
- Electron main → SQLite workspace: initializes
electron/main.ts - Electron main → MCP HTTP host: creates host
electron/main.ts - MCP HTTP host → MCP server: serves MCP requests
electron/mcp/http.ts - MCP server → Project and ticket tools: registers tools
electron/mcp/server.ts - MCP server → MCP resources: registers resources
electron/mcp/server.ts - Project and ticket tools → Workspace services: uses shared services
electron/mcp/tools/tickets.ts - MCP agent → MCP HTTP host: sends MCP requests
README.md - MCP HTTP host → Menu bar controls: status controls
electron/tray/index.ts - Person → Menu bar controls: controls server
electron/tray/index.ts