Skip to main content

Component Structure

Glyph’s frontend is organized into logical component groups:

App Shell Components

AppShell

Location: src/components/app/AppShell.tsx Root layout component that orchestrates the main UI:
Location: src/components/app/Sidebar.tsx Navigable sidebar with multiple panes:

MainContent

Location: src/components/app/MainContent.tsx Tab-based content area:

CommandPalette

Location: src/components/app/CommandPalette.tsx Cmd+K quick actions:

Editor Components

CanvasNoteInlineEditor

Location: src/components/editor/CanvasNoteInlineEditor.tsx TipTap-based markdown editor:

EditorRibbon

Location: src/components/editor/EditorRibbon.tsx Formatting toolbar:

NotePropertiesPanel

Location: src/components/editor/NotePropertiesPanel.tsx Frontmatter editor:

File Tree Components

FileTreePane

Location: src/components/filetree/FileTreePane.tsx Recursive file browser:

FileTreeDirItem

Location: src/components/filetree/FileTreeDirItem.tsx Collapsible directory:

AI Components

AIPanel

Location: src/components/ai/AIPanel.tsx AI chat sidebar:

AIChatThread

Location: src/components/ai/AIChatThread.tsx Message list:

Database Components

DatabasePane

Location: src/components/database/DatabasePane.tsx Database view (table or board):

DatabaseTable

Location: src/components/database/DatabaseTable.tsx TanStack Table:

UI Primitives

shadcn/ui Components

Location: src/components/ui/shadcn/ Accessible Radix UI-based components:
  • Button - Buttons with variants
  • Dialog - Modals
  • Popover - Floating menus
  • DropdownMenu - Context menus
  • Input - Text inputs
  • Tabs - Tab navigation
  • Table - Semantic tables
  • ScrollArea - Custom scrollbars

Motion Components

Location: src/components/ui/animations.ts Animated wrappers:
Usage:

Component Patterns

Compound Components

Render Props

Custom Hooks as Logic

Next Steps

Contexts

React Context state management

Hooks

Custom React hooks