Gitify is a Node.js/Electron desktop application that displays GitHub notifications in the system tray. It's built with React, TypeScript, and uses pnpm for package management.
ALWAYS follow these instructions first and only fallback to additional search and context gathering if the information in the instructions is incomplete or found to be in error.
- Install pnpm globally first:
npm install -g pnpm - Node.js requirement: This project requires Node.js >=22 (check .nvmrc), though it works with Node 20+ with warnings
- Bootstrap the repository:
pnpm install-- takes 2.5 minutes. NEVER CANCEL. Set timeout to 5+ minutes.
- Build the application:
pnpm build-- takes 32 seconds. NEVER CANCEL. Set timeout to 60+ minutes.- Builds both main (Electron process) and renderer (React UI) bundles
- Output goes to
build/directory
- Development mode with hot reload:
pnpm watch-- starts webpack in watch mode for both main and renderer- Takes ~15 seconds for initial compilation
- Leave running while developing
- Run the Electron app:
pnpm start-- launches the desktop application- NOTE: Will fail in headless/container environments due to Electron sandbox restrictions (expected)
- Use
CmdOrCtrl+Rto reload when watch mode detects changes
- Check linting and formatting:
pnpm lint:check-- takes <1 second using Biome- ALWAYS run before committing or CI will fail
- Auto-fix issues:
pnpm lint-- automatically fixes linting and formatting issues
- Run TypeScript compilation check:
pnpm tsc --noEmit-- takes 5 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
- Run unit tests:
pnpm test-- takes 67 seconds. NEVER CANCEL. Set timeout to 30+ minutes.- Uses Jest with jsdom environment
- NOTE: Some existing snapshot tests may fail but still return success - this is normal
- Update snapshots after legitimate UI changes with
pnpm test -u
- Run tests with coverage (CI format):
pnpm test --verbose
CRITICAL: After making changes, ALWAYS validate your work by running these scenarios:
- Clean build test:
rm -rf build && pnpm build - Verify build outputs: Check that
build/main.js,build/renderer.js, andbuild/styles.cssare created - File sizes should be reasonable: main.js ~300KB, renderer.js ~2MB, styles.css ~1MB
- Success indicators: Look for "webpack compiled successfully" messages for both main and renderer
- Linting passes:
pnpm lint:checkshould show warnings but complete successfully (exit code 0) - TypeScript compiles:
pnpm tsc --noEmitshould complete without errors - Tests pass: Run
pnpm testand ensure no new test failures (some existing ones may fail - focus on your changes)
- Watch mode works: Start
pnpm watch, make a small change to a file insrc/, verify webpack recompiles (look for compilation success messages) - Development build: The watch mode creates development builds with source maps in
build/directory
webpack 5.101.2 compiled successfully in [time]
Test Suites: X failed, Y passed, Z total
Tests: A failed, B passed, C total
Note: Focus on ensuring no NEW test failures from your changes.
Checked X files in Yms. No fixes applied.
Found Z warnings.
Warnings are acceptable - the important part is that it completes successfully.
- Main Electron process:
src/main/- Node.js backend code - Renderer process:
src/renderer/- React frontend code - Shared code:
src/shared/- Common utilities and types - Build configuration:
config/- Webpack configs and electron-builder settings - Assets:
assets/- Icons, sounds, and static resources
- package.json: Main project configuration and scripts
- biome.json: Linting and formatting rules
- jest.config.ts: Test configuration
- tsconfig.json: TypeScript configuration
- tailwind.config.ts: CSS framework configuration
- Notification logic:
src/renderer/hooks/useNotifications.ts - GitHub API client:
src/renderer/utils/api/ - UI components:
src/renderer/components/ - Authentication:
src/renderer/utils/auth/ - Settings:
src/renderer/routes/Settings.tsx
- macOS:
pnpm package:macos --publish=never - Windows:
pnpm package:win --publish=never - Linux:
pnpm package:linux --publish=never - NOTE: These require the full build first and additional platform-specific dependencies
- Automatic via Husky: Git hooks run
pnpx lint-stagedon commit - Manual validation: Run
pnpm lint:check && pnpm tsc --noEmit && pnpm test
- Dependency installation: 2-3 minutes (normal for Electron projects)
- Full build (clean): 30-35 seconds
- Watch mode initial compilation: 10-15 seconds
- Watch mode recompilation: 5-8 seconds for incremental changes
- Test suite: 60-70 seconds
- TypeScript compilation: 5 seconds
- Linting: <1 second
- Electron in containers: Will fail to start due to sandbox restrictions (expected behavior in headless environments)
- Node version warnings: Project requires Node >=22, works with 20+ but shows warnings in
pnpmcommands - Build warnings: Some PostCSS/Tailwind warnings in renderer build are normal and expected
- Linting warnings: Existing codebase has some linting warnings - focus only on your changes
- Build failures: Check Node version, ensure
pnpm installcompleted successfully - Test snapshot failures: Run
pnpm test -uto update snapshots after legitimate UI changes - Linting errors: Run
pnpm lintto auto-fix most issues - Watch mode not updating: Restart watch mode, check file permissions
This project focuses on GitHub notification monitoring, not being a full GitHub client. Keep changes:
- Simple and focused on core notification functionality
- Consistent with existing UI patterns and design language
- Minimal - avoid adding complexity for edge cases
- Cross-platform compatible (macOS, Windows, Linux)
Core Technologies:
- Electron 40+: Desktop app framework
- React 19+: UI library
- TypeScript 5+: Language
- pnpm 10+: Package manager
- Biome: Linting and formatting
- Jest: Testing framework
- Webpack 5: Build system
- Tailwind CSS: Styling framework
Key Dependencies:
- menubar: System tray integration
- electron-updater: Auto-update functionality
- @primer/react: GitHub's React component library
- octokit: HTTP client for GitHub API
- @primer/octicons-react: GitHub icon library
- date-fns: Date utilities
ALWAYS reference this information first before exploring the codebase or running commands to save time and avoid common pitfalls.