Files
geek-calc/QWEN.md
snowprint 54f427ea21
Some checks failed
Deploy to GitHub Pages / build-and-deploy (push) Has been cancelled
init geek calc
2025-10-04 10:53:41 +08:00

1.9 KiB

Qwen Code Instructions: Geek Calculator

Project Overview

Calculator application with standard and RPN modes, keyboard-first operation, and terminal-like UI aesthetic. Built with vanilla HTML/CSS/JS with zero dependencies and <50KB total payload.

Key Technologies

  • HTML5, CSS3, JavaScript ES6+
  • Service Workers for offline capability
  • LocalStorage for history persistence
  • ES6 Modules for code organization
  • Custom test harness (no dependencies)

File Structure

index.html          # Main application file
styles.css          # Dark terminal theme, responsive layout
app.js              # Main application logic with modules:
  ├── calculator.js    # Core calculation logic
  ├── rpn-calculator.js # RPN calculator implementation
  ├── ui.js           # User interface interactions
  ├── state.js        # Application state management
  └── utils.js        # Utility functions
service-worker.js   # Offline functionality
manifest.webmanifest # PWA capabilities
tests/              # Test directory

Implementation Notes

  • Keep bundle size under 50KB
  • Full keyboard navigation required
  • ARIA roles and accessibility features
  • ASCII banner in
     tag
  • Blinking cursor effect
  • Easter eggs for fun
  • RPN stack data structure
  • Calculation history with re-run capability
  • Command palette accessible with "@"

Testing

  • Unit tests for core arithmetic operations
  • Unit tests for RPN stack operations
  • Integration tests for UI interactions
  • Accessibility compliance tests
  • Performance tests to ensure <100ms operations

Recent Changes

  • 001-build-a-single: Added HTML5, CSS3, JavaScript ES6+ (vanilla, no build step) + None (pure HTML/CSS/JS, zero dependencies as per constitution)
  • 001-build-a-single: Initial calculator implementation with standard and RPN modes
  • 001-build-a-single: Keyboard-first operation with command palette