# peakk2011/mousse architecture

> Architecture diagram of the GitHub repository peakk2011/mousse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/peakk2011/mousse
- Repository: https://github.com/peakk2011/mousse

## Overview

Mousse is an Electron-based writing and thinking workspace whose main user workflow is composing and formatting notes in the renderer, with command-palette and preview affordances, and optional collaboration and canvas-style marker-board organization. The main process boots the app and manages windows; the renderer owns editing and note state. Separate branches cover sharing/profile UI and real-time collaboration. The README documents several capabilities whose internal wiring is not shown here, so those branches are represented at their known module paths without speculative call chains; unsampled implementation details are not asserted.

Main entry points: [`src/api/marker/window/WindowManager.js`](https://github.com/peakk2011/mousse/blob/master/src/api/marker/window/WindowManager.js) (Board windows), [`src/renderer/content/pages/editorPage.js`](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pages/editorPage.js) (Rich editor), [`src/renderer/scripts/note/noteStore.js`](https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/note/noteStore.js) (Note state), [`src/initFascinateNotes.js`](https://github.com/peakk2011/mousse/blob/master/src/initFascinateNotes.js) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App runtime"]
  node_bootstrap["App bootstrap"]
  node_main["Electron entry<br/>[main.js]"]
  node_windows["Window lifecycle<br/>[createWindow.js]"]
  node_ipc["IPC manager<br/>[ipcManager.js]"]
end

subgraph group_writing["Writing workspace"]
  node_renderer["Renderer app<br/>[app.js]"]
  node_editor["Rich editor<br/>[editorPage.js]"]
  node_editing["Editing pipeline<br/>[markdown.js]"]
  node_command["Command palette"]
  node_cursor["Cursor manager<br/>[CursorManager.js]"]
  node_noteui["Note interactions<br/>[notehandlers.js]"]
  node_notestore[("Note state<br/>[noteStore.js]")]
end

subgraph group_board["Marker board"]
  node_marker["Board orchestration<br/>[MarkerBoard.js]"]
  node_winmanager["Board windows<br/>[WindowManager.js]"]
  node_factory["Window rendering<br/>[WindowFactory.js]"]
  node_groups["Group management<br/>[GroupManager.js]"]
  node_boardstate[("Board persistence<br/>[persistence.js]")]
  node_preview["Note previews<br/>[preview.js]"]
  node_zoom["Canvas navigation<br/>[zoomPan.js]"]
end

subgraph group_collab["Collaboration"]
  node_collabui["Collaboration client<br/>[realtimeCollab.js]"]
  node_collabworker["Collaboration service<br/>[index.js]"]
  node_collabstore[("Collaboration persistence<br/>[persistence.js]")]
end

subgraph group_identity["Sharing and profile"]
  node_sharing["Room sharing<br/>[collabShare.js]"]
  node_profile["Profile editor<br/>[detailsStep.js]"]
end

node_user(("User"))
node_external{{"WebSocket service"}}

node_user -->|"launches"| node_main
node_main -->|"starts"| node_bootstrap
node_bootstrap -->|"creates windows"| node_windows
node_bootstrap -.->|"configures IPC"| node_ipc
node_windows -->|"loads interface"| node_renderer
node_user -->|"uses workspace"| node_renderer
node_renderer -.->|"opens editor"| node_editor
node_editor -->|"transforms input"| node_editing
node_editor -.->|"edits notes"| node_notestore
node_command -->|"saves and restores"| node_cursor
node_command -.->|"applies commands"| node_editor
node_noteui -.->|"updates notes"| node_notestore
node_marker -.->|"manages windows"| node_winmanager
node_winmanager -->|"creates windows"| node_factory
node_winmanager -->|"persists board"| node_boardstate
node_winmanager -->|"deletes note"| node_notestore
node_groups -->|"persists groups"| node_boardstate
node_preview -->|"reads note"| node_notestore
node_marker -.->|"navigates canvas"| node_zoom
node_collabui -.->|"syncs over WebSocket"| node_external
node_collabworker -->|"uses persistence"| node_collabstore
node_sharing -.->|"starts room sharing"| node_collabui
node_user -->|"shares room"| node_sharing
node_user -->|"edits profile"| node_profile

click node_bootstrap "https://github.com/peakk2011/mousse/blob/master/src/initFascinateNotes.js"
click node_main "https://github.com/peakk2011/mousse/blob/master/src/main.js"
click node_windows "https://github.com/peakk2011/mousse/blob/master/src/core/createWindow.js"
click node_ipc "https://github.com/peakk2011/mousse/blob/master/src/core/ipcManager.js"
click node_renderer "https://github.com/peakk2011/mousse/blob/master/src/renderer/content/app.js"
click node_editor "https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pages/editorPage.js"
click node_editing "https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/editor/markdown.js"
click node_command "https://github.com/peakk2011/mousse/blob/master/src/renderer/content/contentComponents/commandPalette/controller/CommandPaletteController.js"
click node_cursor "https://github.com/peakk2011/mousse/blob/master/src/renderer/content/contentComponents/commandPalette/utils/CursorManager.js"
click node_noteui "https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/note/notehandlers.js"
click node_notestore "https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/note/noteStore.js"
click node_marker "https://github.com/peakk2011/mousse/blob/master/src/api/marker/board/MarkerBoard.js"
click node_winmanager "https://github.com/peakk2011/mousse/blob/master/src/api/marker/window/WindowManager.js"
click node_factory "https://github.com/peakk2011/mousse/blob/master/src/api/marker/window/WindowFactory.js"
click node_groups "https://github.com/peakk2011/mousse/blob/master/src/api/marker/group/GroupManager.js"
click node_boardstate "https://github.com/peakk2011/mousse/blob/master/src/api/marker/board/persistence.js"
click node_preview "https://github.com/peakk2011/mousse/blob/master/src/api/marker/board/preview.js"
click node_zoom "https://github.com/peakk2011/mousse/blob/master/src/api/marker/controllers/zoomPan.js"
click node_collabui "https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/collab/realtimeCollab.js"
click node_collabworker "https://github.com/peakk2011/mousse/blob/master/workers/collab/index.js"
click node_collabstore "https://github.com/peakk2011/mousse/blob/master/workers/collab/persistence.js"
click node_sharing "https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pageComponents/collabShare.js"
click node_profile "https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pageComponents/profile/steps/detailsStep.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrap,node_main,node_windows,node_ipc,node_user toneBlue
class node_renderer,node_editor,node_editing,node_command,node_cursor,node_noteui,node_notestore toneAmber
class node_marker,node_winmanager,node_factory,node_groups,node_boardstate,node_preview,node_zoom toneMint
class node_collabui,node_collabworker,node_collabstore toneRose
class node_sharing,node_profile,node_external toneIndigo
```

## Components

### App runtime

- [App bootstrap](https://github.com/peakk2011/mousse/blob/master/src/initFascinateNotes.js): `src/initFascinateNotes.js`
- [Electron entry](https://github.com/peakk2011/mousse/blob/master/src/main.js): `src/main.js`
- [Window lifecycle](https://github.com/peakk2011/mousse/blob/master/src/core/createWindow.js): `src/core/createWindow.js`
- [IPC manager](https://github.com/peakk2011/mousse/blob/master/src/core/ipcManager.js): `src/core/ipcManager.js`

### Writing workspace

- [Renderer app](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/app.js): `src/renderer/content/app.js`
- [Rich editor](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pages/editorPage.js): `src/renderer/content/pages/editorPage.js`
- [Editing pipeline](https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/editor/markdown.js): `src/renderer/scripts/editor/markdown.js`
- [Command palette](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/contentComponents/commandPalette/controller/CommandPaletteController.js): `src/renderer/content/contentComponents/commandPalette/controller/CommandPaletteController.js`
- [Cursor manager](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/contentComponents/commandPalette/utils/CursorManager.js): `src/renderer/content/contentComponents/commandPalette/utils/CursorManager.js`
- [Note interactions](https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/note/notehandlers.js): `src/renderer/scripts/note/notehandlers.js`
- [Note state](https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/note/noteStore.js): `src/renderer/scripts/note/noteStore.js`

### Marker board

- [Board orchestration](https://github.com/peakk2011/mousse/blob/master/src/api/marker/board/MarkerBoard.js): `src/api/marker/board/MarkerBoard.js`
- [Board windows](https://github.com/peakk2011/mousse/blob/master/src/api/marker/window/WindowManager.js): `src/api/marker/window/WindowManager.js`
- [Window rendering](https://github.com/peakk2011/mousse/blob/master/src/api/marker/window/WindowFactory.js): `src/api/marker/window/WindowFactory.js`
- [Group management](https://github.com/peakk2011/mousse/blob/master/src/api/marker/group/GroupManager.js): `src/api/marker/group/GroupManager.js`
- [Board persistence](https://github.com/peakk2011/mousse/blob/master/src/api/marker/board/persistence.js): `src/api/marker/board/persistence.js`
- [Note previews](https://github.com/peakk2011/mousse/blob/master/src/api/marker/board/preview.js): `src/api/marker/board/preview.js`
- [Canvas navigation](https://github.com/peakk2011/mousse/blob/master/src/api/marker/controllers/zoomPan.js): `src/api/marker/controllers/zoomPan.js`

### Collaboration

- [Collaboration client](https://github.com/peakk2011/mousse/blob/master/src/renderer/scripts/collab/realtimeCollab.js): `src/renderer/scripts/collab/realtimeCollab.js`
- [Collaboration service](https://github.com/peakk2011/mousse/blob/master/workers/collab/index.js): `workers/collab/index.js`
- [Collaboration persistence](https://github.com/peakk2011/mousse/blob/master/workers/collab/persistence.js): `workers/collab/persistence.js`

### Sharing and profile

- [Room sharing](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pageComponents/collabShare.js): `src/renderer/content/pageComponents/collabShare.js`
- [Profile editor](https://github.com/peakk2011/mousse/blob/master/src/renderer/content/pageComponents/profile/steps/detailsStep.js): `src/renderer/content/pageComponents/profile/steps/detailsStep.js`

### Other components

- **User**
- **WebSocket service**

## Connections

- User → Electron entry: launches
- Electron entry → App bootstrap: starts (evidence: `src/main.js`)
- App bootstrap → Window lifecycle: creates windows (evidence: `src/initFascinateNotes.js`)
- App bootstrap → IPC manager: configures IPC
- Window lifecycle → Renderer app: loads interface
- User → Renderer app: uses workspace
- Renderer app → Rich editor: opens editor
- Rich editor → Editing pipeline: transforms input
- Rich editor → Note state: edits notes
- Command palette → Cursor manager: saves and restores (evidence: `src/renderer/content/contentComponents/commandPalette/controller/CommandPaletteController.js`)
- Command palette → Rich editor: applies commands
- Note interactions → Note state: updates notes
- Board orchestration → Board windows: manages windows
- Board windows → Window rendering: creates windows (evidence: `src/api/marker/window/WindowManager.js`)
- Board windows → Board persistence: persists board (evidence: `src/api/marker/window/WindowManager.js`)
- Board windows → Note state: deletes note (evidence: `src/api/marker/window/WindowManager.js`)
- Group management → Board persistence: persists groups (evidence: `src/api/marker/group/GroupManager.js`)
- Note previews → Note state: reads note (evidence: `src/api/marker/board/preview.js`)
- Board orchestration → Canvas navigation: navigates canvas
- Collaboration client → WebSocket service: syncs over WebSocket
- Collaboration service → Collaboration persistence: uses persistence (evidence: `workers/collab/index.js`)
- Room sharing → Collaboration client: starts room sharing
- User → Room sharing: shares room
- User → Profile editor: edits profile
