VinaKey v3 evolves from legacy AVIM.js to a modern, cross-platform Vietnamese input system with extension capabilities.
- Cross-platform: Works on all major browsers and platforms
- Extension-ready: Can be packaged as browser extension
- Test-driven: Full TDD approach with comprehensive testing
- Modern: TypeScript, ES modules, clean architecture
- Performance: Efficient input processing with minimal latency
- VietnameseInputProcessor: Main processing engine
- InputMethods: TELEX, VNI, VIQR implementations
- CharacterMap: Vietnamese character mappings and transformations
- SpellChecker: Vietnamese spelling validation
- StateManager: Input state management
- WebAdapter: For web applications (current VinaKey)
- ChromeExtensionAdapter: For Chrome extension
- ContentScriptAdapter: For extension content scripts
- manifest.json: Extension configuration
- background.js: Service worker for extension
- content-script.js: Inject input processor into web pages
- popup/: Extension popup UI
- InputAPI: Public API for input processing
- EventEmitter: Event system for input events
- ConfigManager: Configuration management
- Vietnamese character processing engine
- Input method implementations (TELEX, VNI, VIQR)
- Comprehensive test suite
- DOM event handling
- Content-editable integration
- Virtual keyboard support
- Chrome extension manifest
- Content script injection
- Cross-site input support
- Predictive text
- Custom dictionaries
- Multi-language support
- Limited scope: ChromeOS only, doesn't work in regular Chrome
- Poor adoption: Most users aren't on ChromeOS
- Alternative: Content script injection works everywhere
User Keypress → Platform Adapter → Input Engine → Character Processing → Output
Background Script ← Content Script ← DOM Events
↓ ↓
Configuration Input Processing
src/
├── engine/ # Core Vietnamese input engine
│ ├── processor.ts # Main input processor
│ ├── methods/ # Input method implementations
│ ├── maps/ # Character mapping tables
│ └── state/ # State management
├── adapters/ # Platform-specific adapters
├── api/ # Public API
└── utils/ # Shared utilities
extension/ # Chrome extension
├── manifest.json
├── background/
├── content/
└── popup/
tests/ # Test suites
├── engine/
├── adapters/
└── integration/
- Unit Tests: Core engine components
- Integration Tests: Adapter integrations
- E2E Tests: Full user workflows
- Performance Tests: Input latency benchmarks