Before you start
Join the Discord community to discuss ideas, ask questions, and coordinate development efforts.
Technical constraints
KAnki runs on jailbroken Kindle devices with very limited browser capabilities:Development environment
You’ll need:-
A jailbroken Kindle device for testing
- Kindle Paperwhite, Oasis, or Scribe recommended
- Basic, Touch, or Voyage also supported
-
Access to Kindle filesystem via:
- USB connection
- SSH (if configured)
- Text editor with ES5 linting configured
- Git for version control
You can develop on any OS, but final testing must be done on actual Kindle hardware. Desktop browsers don’t accurately simulate Kindle’s WebKit engine.
Development workflow
1. Set up the repository
Clone the KAnki repository:2. Make your changes
Edit files in thekanki/ directory:
- UI changes: Edit
index.html,main.css, orresponsive.css - Logic changes: Edit
main.js - SDK additions: Edit
js/sdk.js - Config format: Edit
js/kanki_config.js
Code style guidelines
Code style guidelines
JavaScript:
- Use ES5 syntax only
- Use semicolons
- Use
varfor all variables - Use
functionkeyword for all functions - Add comments for complex logic
- Keep functions under 50 lines when possible
- Use kebab-case for class names
- Avoid deep nesting (max 3 levels)
- Use pixel values, not rem/em (font scaling is done via device detection)
- Comment responsive breakpoints
- Use semantic HTML5 tags
- Keep structure flat to minimize reflows
- Add
idattributes for JavaScript access
3. Test on Kindle
Desktop browser testing is useful for basic functionality, but Kindle hardware testing is mandatory before submitting changes.
- Connect your Kindle via USB
- Copy the modified
kanki/folder to/mnt/us/documents/ - Copy
kanki.shto/mnt/us/documents/ - Safely eject Kindle
- On Kindle home screen, run the KAnki app
- Test all modified features
- Check multiple device sizes if possible
- Create new cards and review them
- Test spaced repetition intervals
- Try error review mode
- Test starred cards feature
- Change levels and filters
- Reset progress and reset all data
- Verify localStorage persistence (restart app)
- Test with different vocabulary configurations
4. Debug on Kindle
Kindle’s browser doesn’t have developer tools. Debugging techniques: Console logging:index.html, change:
Submitting contributions
Pull request process
- Fork the repository on GitHub
-
Create a feature branch:
- Make your changes following the guidelines above
- Test thoroughly on Kindle hardware
-
Commit with clear messages:
-
Push to your fork:
-
Open a pull request on GitHub with:
- Clear description of changes
- Why the change is needed
- Which Kindle devices you tested on
- Screenshots if UI changed
Commit message format
Use clear, descriptive commit messages:Feature development guidelines
Adding new features
When proposing new features:- Check compatibility: Will it work with ES5 and limited CSS?
- Consider e-ink: Will it cause excessive refreshes?
- Test on multiple devices: Different screen sizes behave differently
- Update configuration: Does
kanki_config.jsneed changes? - Maintain backwards compatibility: Don’t break existing decks
Performance considerations
Kindle processors are slow. Optimize for performance:
- Minimize DOM manipulation
- Cache DOM queries in variables
- Use simple selectors (
getElementByIdoverquerySelector) - Avoid complex calculations in loops
- Debounce resize and scroll events
Accessibility
Even on Kindle:- Use semantic HTML
- Provide text alternatives for icons
- Ensure touch targets are at least 40×40px
- Test with Kindle’s zoom feature
Community
Discord server
Join the KAnki Discord community for:- Development discussions
- Feature proposals
- Bug reports
- Help with testing
- Sharing vocabulary configurations
Acknowledgments
KAnki is maintained by Kurizu with help from:- PolishPenguin - Development assistance
- Bluebotlaboratories - Kindle SDK functions
- The jailbreak community - Making Kindle development possible
Special thanks to the Anki project for spaced repetition inspiration and the Kindle modding community for tools and documentation.
Support the project
If you’d like to support KAnki development:- Contribute code and bug fixes
- Test on different Kindle devices
- Share vocabulary configurations
- Report issues on GitHub
- Help other users on Discord
- Support on Ko-fi