A highly configurable, maintainable calculator built with Electron, with a heavy config options.
- Basic arithmetic operations (addition, subtraction, multiplication, division)
- Percentage calculation
- Clear and delete functionality
- Keyboard support
- Highly Configurable: Easy-to-modify configuration files for themes, buttons, and app behavior
- Multiple Themes: Default, Dark, and Minimal themes with easy theme switching
- Responsive: Adapts to different screen sizes
- Accessible: WCAG compliant with proper focus management
- Maintainable: Modular architecture with clear separation of concerns
- Error Handling: Comprehensive error handling and logging
- Cross-Platform: Works on Windows, macOS, and Linux
- Node.js (v16 or higher)
- npm (comes with Node.js)
Run in development mode with additional logging:
npm run dev
Edit config/theme.config.js
to modify existing themes or add new ones:
export const THEMES = {
myCustomTheme: {
name: 'My Custom Theme',
colors: {
background: '#your-color',
// ... other colors
}
}
}
Modify config/buttons.config.js
to change button layout or add new functions:
export const BUTTON_LAYOUT = [
[
{ type: 'special', action: 'clear', label: 'AC' },
// ... other buttons
]
]
Adjust config/app.config.js
for window size, features, and behavior:
export const APP_CONFIG = {
window: {
width: 320,
height: 500,
// ... other settings
}
}
Key | Action |
---|---|
0-9 |
Number input |
. |
Decimal point |
+ , - , * , / |
Operations |
Enter or = |
Calculate |
Backspace |
Delete last digit |
Escape or Delete |
Clear |
% |
Percentage |
Cmd/Ctrl+T |
Toggle always on top |
Cmd/Ctrl+D |
Toggle theme |
Cmd/Ctrl+Q |
Quit |
To build the application for your platform:
npm run build
Build for all platforms:
npm run build:all
This project is licensed under the MIT License - see the LICENSE file for details.