You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,32 @@ Stories are managed via git subtrees. Because subtree remotes are not tracked by
85
85
86
86
---
87
87
88
+
## Developer Guide: How to Update Things
89
+
90
+
If you are modifying or expanding the functionality of Fezcodex, follow these specific architectural patterns:
91
+
92
+
### 1. Adding or Updating Commands
93
+
Commands are used in the **Commands Page** and the **Command Palette**. To update them, you must touch three places:
94
+
-**`src/data/commands.js`**: Update the UI data (title, description, icon color) for the `/commands` page.
95
+
-**`src/hooks/useCommandRegistry.js`**: Implement the actual logic/handler for what the command does.
96
+
-**`src/hooks/useSearchableData.js`**: Update the `customCommands` list so the Command Palette (`Ctrl + K`) can "find" the command.
97
+
98
+
### 2. Updating Search Data
99
+
The site-wide search (Command Palette and Search bar) is powered by a unified registry:
100
+
-**Automatic:** Blog posts, Projects, and Logs are automatically indexed from their respective `.json` and `.piml` files in the `public/` directory.
101
+
-**Manual:** Static pages and custom commands must be manually added to the `staticRoutes` or `customCommands` lists in `src/hooks/useSearchableData.js`.
102
+
103
+
### 3. Modifying Visual Themes (Brutalist vs. Luxe)
104
+
Every core component should be **Theme-Aware**:
105
+
-**Switcher Components:** Components like `CommandPalette.jsx`, `SidePanel.jsx`, and `GenericModal.jsx` act as controllers. They detect `fezcodexTheme` and render either a `BrutalistX` or `LuxeX` variant.
106
+
-**Universal Styles:** Prefer the `variant="brutalist"` or `variant="paper"` props for shared components like `CustomDropdown` to maintain consistency.
107
+
108
+
### 4. Global State & Persistence
109
+
- Use `VisualSettingsContext.jsx` for any UI state that needs to survive a page refresh (Invert mode, Theme selection, etc.).
110
+
- Use `usePersistentState` hook to automatically sync your context variables with `localStorage`.
0 commit comments