# flowz5/topaze-notes architecture

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

- Interactive diagram: https://gitdiagram.com/flowz5/topaze-notes
- Repository: https://github.com/flowz5/topaze-notes

## Overview

Topaze Notes is a collaborative knowledge-base app. Users sign in, choose or create a knowledge base, then organize folders and notes, search and link notes, and edit them collaboratively. The sampled code shows routing, authentication, Firestore reads/writes, and the editor’s Yjs/WebRTC setup. The README documents graph visualization and presence, but those implementations are not shown in the excerpts; their links are therefore marked unverified.

Main entry points: [`src/pages/KbView.tsx`](https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx) (Knowledge workspace), [`src/App.tsx`](https://github.com/flowz5/topaze-notes/blob/main/src/App.tsx) (App router), [`src/components/TiptapEditor.tsx`](https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx) (Rich-text editor), [`src/pages/Home.tsx`](https://github.com/flowz5/topaze-notes/blob/main/src/pages/Home.tsx) (Knowledge dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["App router<br/>[App.tsx]"]
  node_login["Sign-in<br/>[Login.tsx]"]
end

subgraph group_knowledge["Knowledge bases"]
  node_dashboard["Knowledge dashboard<br/>[Home.tsx]"]
  node_workspace["Knowledge workspace<br/>[KbView.tsx]"]
  node_graph["Note graph<br/>[KbView.tsx]"]
  node_search["Global search<br/>[KbView.tsx]"]
  node_folders["Folders and notes<br/>[KbView.tsx]"]
end

subgraph group_authoring["Note authoring"]
  node_editor["Rich-text editor<br/>[TiptapEditor.tsx]"]
  node_mentions["Mention suggestions"]
end

subgraph group_platform["Data and collaboration"]
  node_firebase["Firebase client<br/>[firebase.ts]"]
  node_auth["Firebase Auth"]
  node_firestore[("Firestore")]
  node_yjs["Yjs document<br/>[TiptapEditor.tsx]"]
  node_webrtc["WebRTC sync<br/>[TiptapEditor.tsx]"]
end

node_user(("User"))

node_user -->|"opens app"| node_app
node_app -->|"checks session"| node_firebase
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_workspace
node_user -->|"authenticates"| node_login
node_login -->|"signs in or registers"| node_auth
node_dashboard -->|"queries and creates bases"| node_firestore
node_dashboard -.->|"opens a base"| node_workspace
node_workspace -->|"reads and writes notes"| node_firestore
node_workspace -->|"renders editor"| node_editor
node_editor -->|"edits shared document"| node_yjs
node_editor -->|"connects peers"| node_webrtc
node_editor -->|"uses suggestions"| node_mentions
node_workspace -.->|"provides search"| node_search
node_workspace -->|"organizes content"| node_folders
node_workspace -.->|"offers graph view"| node_graph
node_firebase -->|"initializes client"| node_auth
node_firebase -->|"initializes database"| node_firestore

click node_app "https://github.com/flowz5/topaze-notes/blob/main/src/App.tsx"
click node_login "https://github.com/flowz5/topaze-notes/blob/main/src/pages/Login.tsx"
click node_firebase "https://github.com/flowz5/topaze-notes/blob/main/src/firebase.ts"
click node_dashboard "https://github.com/flowz5/topaze-notes/blob/main/src/pages/Home.tsx"
click node_workspace "https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx"
click node_editor "https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx"
click node_mentions "https://github.com/flowz5/topaze-notes/blob/main/src/components/mentionSuggestion.tsx"
click node_yjs "https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx"
click node_webrtc "https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx"
click node_graph "https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx"
click node_search "https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx"
click node_folders "https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx"

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_app,node_login,node_user toneBlue
class node_dashboard,node_workspace,node_graph,node_search,node_folders toneAmber
class node_editor,node_mentions toneMint
class node_firebase,node_auth,node_firestore,node_yjs,node_webrtc toneRose
```

## Components

### Access and navigation

- [App router](https://github.com/flowz5/topaze-notes/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in](https://github.com/flowz5/topaze-notes/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`

### Knowledge bases

- [Knowledge dashboard](https://github.com/flowz5/topaze-notes/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Knowledge workspace](https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx): `src/pages/KbView.tsx`
- [Note graph](https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx): `src/pages/KbView.tsx`
- [Global search](https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx): `src/pages/KbView.tsx`
- [Folders and notes](https://github.com/flowz5/topaze-notes/blob/main/src/pages/KbView.tsx): `src/pages/KbView.tsx`

### Note authoring

- [Rich-text editor](https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx): `src/components/TiptapEditor.tsx`
- [Mention suggestions](https://github.com/flowz5/topaze-notes/blob/main/src/components/mentionSuggestion.tsx): `src/components/mentionSuggestion.tsx`

### Data and collaboration

- [Firebase client](https://github.com/flowz5/topaze-notes/blob/main/src/firebase.ts): `src/firebase.ts`
- **Firebase Auth**
- **Firestore**
- [Yjs document](https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx): `src/components/TiptapEditor.tsx`
- [WebRTC sync](https://github.com/flowz5/topaze-notes/blob/main/src/components/TiptapEditor.tsx): `src/components/TiptapEditor.tsx`

### Other components

- **User**

## Connections

- User → App router: opens app (evidence: `src/App.tsx`)
- App router → Firebase client: checks session (evidence: `src/App.tsx`)
- App router → Sign-in: routes to (evidence: `src/App.tsx`)
- App router → Knowledge dashboard: routes to (evidence: `src/App.tsx`)
- App router → Knowledge workspace: routes to (evidence: `src/App.tsx`)
- User → Sign-in: authenticates (evidence: `src/pages/Login.tsx`)
- Sign-in → Firebase Auth: signs in or registers (evidence: `src/pages/Login.tsx`)
- Knowledge dashboard → Firestore: queries and creates bases (evidence: `src/pages/Home.tsx`)
- Knowledge dashboard → Knowledge workspace: opens a base
- Knowledge workspace → Firestore: reads and writes notes (evidence: `src/pages/KbView.tsx`)
- Knowledge workspace → Rich-text editor: renders editor (evidence: `src/pages/KbView.tsx`)
- Rich-text editor → Yjs document: edits shared document (evidence: `src/components/TiptapEditor.tsx`)
- Rich-text editor → WebRTC sync: connects peers (evidence: `src/components/TiptapEditor.tsx`)
- Rich-text editor → Mention suggestions: uses suggestions (evidence: `src/components/TiptapEditor.tsx`)
- Knowledge workspace → Global search: provides search (evidence: `src/pages/KbView.tsx`)
- Knowledge workspace → Folders and notes: organizes content (evidence: `src/pages/KbView.tsx`)
- Knowledge workspace → Note graph: offers graph view (evidence: `src/pages/KbView.tsx`)
- Firebase client → Firebase Auth: initializes client (evidence: `src/firebase.ts`)
- Firebase client → Firestore: initializes database (evidence: `src/firebase.ts`)
