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: CLAUDE.md
+46-39Lines changed: 46 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,34 +4,34 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
BreakTimer is a cross-platform desktop application built with Electron that helps users manage periodic breaks. The app runs as a system tray application and can display break reminders as notifications or fullscreen overlays.
7
+
Cross-platform Electron desktop app for managing periodic breaks. Runs as system tray application with notifications and fullscreen overlays.
8
8
9
9
## Architecture
10
10
11
11
### Main Process (`app/main/`)
12
12
13
-
-**Entry Point**: `index.ts` - Main application entry point
14
-
-**Core Logic**: `lib/` directory contains the main business logic:
13
+
-**Entry Point**: `index.ts`
14
+
-**Core Logic**: `lib/` directory:
15
15
-`breaks.ts` - Break scheduling and management
16
16
-`ipc.ts` - Inter-process communication handlers
17
-
-`store.ts` - Settings persistence using electron-store
17
+
-`store.ts` - Settings persistence
18
18
-`tray.ts` - System tray integration
19
19
-`windows.ts` - Window management
20
-
-`notifications.ts` - Native notification system
21
-
-`auto-launch.ts` - Auto-startup functionality
20
+
-`notifications.ts` - Native notifications
21
+
-`auto-launch.ts` - Auto-startup
22
22
23
23
### Renderer Process (`app/renderer/`)
24
24
25
-
-**Entry Point**: `index.tsx` - React application entry point
26
-
-**Components**: React components for UI (Break, Settings, etc.)
27
-
-**Styling**: CSS with Tailwind CSS for component styling
28
-
-**Sounds**: Audio files for break notifications
29
-
-**Preload**: `preload.js` - Secure context bridge for IPC
30
-
-**Fonts**: Inter font bundled locally in `public/fonts/`
- Shared TypeScript type definitions for IPC, settings, and breaks
34
+
- Shared TypeScript definitions for IPC, settings, breaks
35
35
36
36
## Common Development Commands
37
37
@@ -99,7 +99,7 @@ npm run package-linux # Package for Linux
99
99
100
100
## IPC Communication
101
101
102
-
The app uses a typed IPC system defined in `app/types/ipc.ts`. Main process handlers are in `app/main/lib/ipc.ts`, providing secure communication between main and renderer processes for:
102
+
Typed IPC system in `app/types/ipc.ts` with handlers in `app/main/lib/ipc.ts`:
103
103
104
104
- Settings management
105
105
- Break control
@@ -108,7 +108,7 @@ The app uses a typed IPC system defined in `app/types/ipc.ts`. Main process hand
108
108
109
109
## Settings Architecture
110
110
111
-
Settings are managed through electron-store with TypeScript interfaces defined in `app/types/settings.ts`. The store persists user preferences including:
111
+
electron-store with TypeScript interfaces in `app/types/settings.ts`:
112
112
113
113
- Break intervals and duration
114
114
- Working hours
@@ -117,44 +117,51 @@ Settings are managed through electron-store with TypeScript interfaces defined i
117
117
118
118
## Build System
119
119
120
-
-**Main Process**: Uses Webpack 5 for building the Electron main process
121
-
-**Renderer Process**: Uses Vite for fast development and optimized production builds
122
-
- Babel for transpiliation with TypeScript support
123
-
- React Fast Refresh for hot module replacement (replaced react-hot-loader)
124
-
- Production builds are optimized and minified
125
-
- TypeScript configured with `skipLibCheck: true` to avoid node_modules type checking
120
+
-**Main Process**: Webpack 5
121
+
-**Renderer Process**: Vite
122
+
- Babel + TypeScript
123
+
- React Fast Refresh
124
+
- TypeScript `skipLibCheck: true`
126
125
127
126
## Recent Updates
128
127
129
128
### UI and Styling
130
129
131
-
-**Migrated to shadcn/ui** - Modern component library with Radix UI primitives
132
-
-**Added Tailwind CSS** - Utility-first CSS framework for consistent styling
133
-
-**Bundled Inter font locally** - High-quality typography with WOFF2 format for offline use
134
-
-**Enhanced button interactions** - Improved hover/active states for better UX
130
+
-**shadcn/ui** - Modern component library with Radix UI primitives
131
+
-**Tailwind CSS** - Utility-first CSS framework
132
+
-**Inter font** - Bundled locally (WOFF2)
133
+
-**Enhanced button interactions** - Improved hover/active states
135
134
136
135
### Animation System
137
136
138
-
-**Replaced react-spring with framer-motion**for better performance and modern API
139
-
-Break window animations now use `motion.div` components
140
-
-**Smooth progress animations** - 50ms updates for notification progress, 100ms for break window
141
-
- Fixed infinite loop issues by using functional state updates in useEffect hooks
0 commit comments