@@ -7,12 +7,14 @@ Gitify is a Node.js/Electron desktop application that displays GitHub notificati
77## Working Effectively
88
99### Prerequisites and Setup
10+
1011- ** Install pnpm globally first** : ` npm install -g pnpm `
1112- ** Node.js requirement** : This project requires Node.js >=22 (check .nvmrc), though it works with Node 20+ with warnings
1213- ** Bootstrap the repository** :
1314 - ` pnpm install ` -- takes 2.5 minutes. NEVER CANCEL. Set timeout to 5+ minutes.
1415
1516### Development Workflow
17+
1618- ** Build the application** :
1719 - ` pnpm build ` -- takes 32 seconds. NEVER CANCEL. Set timeout to 60+ minutes.
1820 - Builds both main (Electron process) and renderer (React UI) bundles
@@ -27,13 +29,15 @@ Gitify is a Node.js/Electron desktop application that displays GitHub notificati
2729 - Use ` CmdOrCtrl+R ` to reload when watch mode detects changes
2830
2931### Linting and Code Quality
30- - ** Check linting and formatting** :
31- - ` pnpm lint:check ` -- takes <1 second using Biome
32+
33+ - ** Check formatting, linting, and types** :
34+ - ` pnpm check ` -- runs Vite+'s unified format/lint/type-check pipeline
3235 - ** ALWAYS run before committing** or CI will fail
3336- ** Auto-fix issues** :
34- - ` pnpm lint ` -- automatically fixes linting and formatting issues
37+ - ` pnpm check:fix ` -- formats and applies lint fixes
3538
3639### Testing
40+
3741- ** Run TypeScript compilation check** :
3842 - ` pnpm tsc --noEmit ` -- takes 5 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
3943- ** Run unit tests** :
@@ -47,58 +51,69 @@ Gitify is a Node.js/Electron desktop application that displays GitHub notificati
4751** CRITICAL** : After making changes, ALWAYS validate your work by running these scenarios:
4852
4953### Build Validation
54+
50551 . ** Clean build test** : ` rm -rf build && pnpm build `
51562 . ** Verify build outputs** : Check that ` build/main.js ` , ` build/renderer.js ` , and ` build/styles.css ` are created
52573 . ** File sizes should be reasonable** : main.js ~ 300KB, renderer.js ~ 2MB, styles.css ~ 1MB
53584 . ** Success indicators** : Look for "webpack compiled successfully" messages for both main and renderer
5459
5560### Code Quality Validation
61+
56621 . ** Linting passes** : ` pnpm lint:check ` should show warnings but complete successfully (exit code 0)
57632 . ** TypeScript compiles** : ` pnpm tsc --noEmit ` should complete without errors
58643 . ** Tests pass** : Run ` pnpm test ` and ensure no new test failures (some existing ones may fail - focus on your changes)
5965
6066### Development Environment Testing
67+
61681 . ** Watch mode works** : Start ` pnpm watch ` , make a small change to a file in ` src/ ` , verify webpack recompiles (look for compilation success messages)
62692 . ** Development build** : The watch mode creates development builds with source maps in ` build/ ` directory
6370
6471## Expected Command Outputs
6572
6673### Successful Build
74+
6775```
6876webpack 5.101.2 compiled successfully in [time]
6977```
7078
7179### Successful Tests (with some expected failures)
80+
7281```
7382Test Suites: X failed, Y passed, Z total
7483Tests: A failed, B passed, C total
7584```
85+
7686Note: Focus on ensuring no NEW test failures from your changes.
7787
7888### Successful Linting
89+
7990```
8091Checked X files in Yms. No fixes applied.
8192Found Z warnings.
8293```
94+
8395Warnings are acceptable - the important part is that it completes successfully.
8496
8597## Common Tasks and File Locations
8698
8799### Key Files and Directories
100+
88101- ** Main Electron process** : ` src/main/ ` - Node.js backend code
89- - ** Renderer process** : ` src/renderer/ ` - React frontend code
102+ - ** Renderer process** : ` src/renderer/ ` - React frontend code
90103- ** Shared code** : ` src/shared/ ` - Common utilities and types
91104- ** Build configuration** : ` config/ ` - Webpack configs and electron-builder settings
92105- ** Assets** : ` assets/ ` - Icons, sounds, and static resources
93106
94107### Configuration Files
108+
95109- ** package.json** : Main project configuration and scripts
96- - ** biome.json ** : Linting and formatting rules
110+ - ** vite.config.ts ** : Vite+ unified config — ` lint ` , ` fmt ` , and ` staged ` blocks live here
97111- ** vitest.config.ts** : Test configuration
98112- ** tsconfig.json** : TypeScript configuration
99113- ** tailwind.config.ts** : CSS framework configuration
100114
101115### Frequently Modified Areas
116+
102117- ** Notification logic** : ` src/renderer/hooks/useNotifications.ts `
103118- ** GitHub API client** : ` src/renderer/utils/api/ `
104119- ** UI components** : ` src/renderer/components/ `
@@ -108,18 +123,21 @@ Warnings are acceptable - the important part is that it completes successfully.
108123## Build and Release Process
109124
110125### Local Packaging (for testing)
126+
111127- ** macOS** : ` pnpm package:macos --publish=never `
112- - ** Windows** : ` pnpm package:win --publish=never `
128+ - ** Windows** : ` pnpm package:win --publish=never `
113129- ** Linux** : ` pnpm package:linux --publish=never `
114130- ** NOTE** : These require the full build first and additional platform-specific dependencies
115131
116132### Pre-commit Checks
133+
117134- ** Automatic via Husky** : Git hooks run ` pnpx lint-staged ` on commit
118- - ** Manual validation** : Run ` pnpm lint: check && pnpm tsc --noEmit && pnpm test `
135+ - ** Manual validation** : Run ` pnpm check && pnpm tsc --noEmit && pnpm test `
119136
120137## Important Constraints and Limitations
121138
122139### Timing Expectations
140+
123141- ** Dependency installation** : 2-3 minutes (normal for Electron projects)
124142- ** Full build (clean)** : 30-35 seconds
125143- ** Watch mode initial compilation** : 10-15 seconds
@@ -129,12 +147,14 @@ Warnings are acceptable - the important part is that it completes successfully.
129147- ** Linting** : <1 second
130148
131149### Environment Issues
150+
132151- ** Electron in containers** : Will fail to start due to sandbox restrictions (expected behavior in headless environments)
133152- ** Node version warnings** : Project requires Node >=22, works with 20+ but shows warnings in ` pnpm ` commands
134153- ** Build warnings** : Some PostCSS/Tailwind warnings in renderer build are normal and expected
135154- ** Linting warnings** : Existing codebase has some linting warnings - focus only on your changes
136155
137156### Common Troubleshooting
157+
138158- ** Build failures** : Check Node version, ensure ` pnpm install ` completed successfully
139159- ** Test snapshot failures** : Run ` pnpm test -u ` to update snapshots after legitimate UI changes
140160- ** Linting errors** : Run ` pnpm lint ` to auto-fix most issues
@@ -143,6 +163,7 @@ Warnings are acceptable - the important part is that it completes successfully.
143163## Development Philosophy
144164
145165This project focuses on GitHub notification monitoring, not being a full GitHub client. Keep changes:
166+
146167- ** Simple and focused** on core notification functionality
147168- ** Consistent** with existing UI patterns and design language
148169- ** Minimal** - avoid adding complexity for edge cases
@@ -151,21 +172,23 @@ This project focuses on GitHub notification monitoring, not being a full GitHub
151172## Technology Stack Reference
152173
153174** Core Technologies:**
175+
154176- ** Electron 40+** : Desktop app framework
155- - ** React 19+** : UI library
177+ - ** React 19+** : UI library
156178- ** TypeScript 5+** : Language
157179- ** pnpm 10+** : Package manager
158- - ** Biome ** : Linting and formatting
180+ - ** Vite+ ** : Unified toolchain (lint via oxlint, format via oxfmt, dev/build/test)
159181- ** Jest** : Testing framework
160182- ** Webpack 5** : Build system
161183- ** Tailwind CSS** : Styling framework
162184
163185** Key Dependencies:**
186+
164187- ** menubar** : System tray integration
165188- ** electron-updater** : Auto-update functionality
166189- ** @primer/react ** : GitHub's React component library
167190- ** octokit** : HTTP client for GitHub API
168191- ** @primer/octicons-react ** : GitHub icon library
169192- ** date-fns** : Date utilities
170193
171- ALWAYS reference this information first before exploring the codebase or running commands to save time and avoid common pitfalls.
194+ ALWAYS reference this information first before exploring the codebase or running commands to save time and avoid common pitfalls.
0 commit comments