DaFit Canvas
A web-based visual editor for designing smartwatch faces compatible with the Da Fit / MoYoung ecosystem. Import an existing .bin, swap assets, retouch positions, regenerate digits from a font, and export a watch-ready binary — without ever touching a hex editor.
🌐 Live: dafit-canvas.elabins.com · no install needed, runs entirely in the browser.

Features
Editor
- Import & decode real Type C
.bin files (fileID 0x81, faceNumber 50001, RGB565 little-endian) and the alternative FaceN format.
- Layer-based editor with a live 240×240 canvas, drag-to-position, click-to-select, marquee select, and per-layer properties.
- Multi-select + align / distribute with a relative-to selector (selection / canvas / first item) — works on layers and on user guide lines.
- Guide lines + smart guides + snapping — drag horizontal / vertical guides onto the canvas, get real-time alignment indicators while dragging, and snap to guides, canvas edges/center, or other layers’ edges/centers.
- Animation support —
TAP_TO_CHANGE, ANIMATION, ANIMATION_F8 with project-wide animationFrames, frame-batch BMP import, separate auto vs tap playback controls, configurable preview FPS.
- Shared asset library — multiple layers can point at the same bitmap set (the way the firmware actually packs digits, weekday strings, progress bars, etc.).
- Font-to-glyphs generator — pick from system fonts, paste a Google Fonts embed (full CSS2 URL with weights / italics), or upload a TTF / OTF. Per-slot text override for multi-slot kinds so you can switch
Jan/Feb → JAN/FEB or to translated names.
- Built-in BMP pixel editor — pencil, eraser, bucket, eyedropper. Edit any slot in place; round-trip-safe (preserves per-slot compression hints).
- Import assets from another watchface — pull individual asset sets out of any
.bin / .zip and into your current project.
- Undo / redo with Cmd/Ctrl-Z + coalescing for drag and keystroke runs.
- Round-trip safe — per-blob compression (RLE_LINE vs raw) is preserved on import/export, so re-saving a working face never breaks it on the watch.
Pages
/editor — the main visual editor.
/watch-faces — browse the MoYoung catalogue, search by category, download .bins.
/upload — direct Web Bluetooth flash to the watch (no external uploader).
/console — BLE playground: find-my-watch, send notifications, sync time, weather, trigger HR / SpO2 / BP measurements, custom step goal, real-time event log of every packet to / from the watch.
/pack, /dump — low-level workbench for inspecting blobs and repacking.
/docs — in-app explanation of the Type C binary format.



Watch hardware target
- 240×240 circular display
- 16-bit RGB565, little-endian, no alpha channel
- Type C binary (
fileType C, fileID 0x81, faceNumber 50001)
The editor includes a built-in Upload page that talks to the watch over Web Bluetooth — no external uploader required. dawft / dawfu are still listed under Credits below since this project is built on top of their reverse-engineering work.
⚠️ Use at your own risk. This is hobby software written against a reverse-engineered format. Flashing a malformed face won’t brick the watch in any case I’ve seen, but I make no guarantees — try it on a watch you can afford to wipe.
Tested on: Porodo Vortex (round) watch, firmware MOY-GKE5-2.2.7. Other Da Fit / MoYoung watches should work but are not verified.
Quick start
Just want to use it? Open dafit-canvas.elabins.com in Chrome or Edge (Web Bluetooth requires a Chromium browser).
Running locally / contributing:
git clone https://github.com/e-labInnovations/DaFit-Canvas.git
cd DaFit-Canvas
npm install
npm run dev
Then open the URL Vite prints (typically http://localhost:5173).
Build for production
npm run build # tsc -b && vite build
npm run preview # serve the built bundle
Lint
npm run lint
Usage
- Browse the MoYoung catalogue under
/watch-faces, pick a face, and download its .bin.
- Open
/editor, import the .bin (or a previously-exported project .zip).
- Edit layers: change positions, swap bitmaps, regenerate digits from a font, or insert a new layer.
- Export back to
.bin, then push it to your watch directly from the /upload page (Web Bluetooth) — or hand it off to dawfu if you prefer the original CLI.
For a deeper explanation of how Type C watch faces are structured, what each layer type means, and how the binary is laid out — open the in-app Watchface format docs page (/docs).
Tech stack
- React 19 + TypeScript 6 + Vite 8
- Zustand for editor state
- JSZip for project packaging
- Axios for the MoYoung API client
- HTML5 Canvas for rendering (no Konva)
No backend, no telemetry — everything runs in the browser.
Project layout
src/
components/ UI components (editor panels, modals, dump viewers)
lib/ Domain logic — dawft.ts (Type C codec), faceN.ts,
projectIO.ts (import/export), bmp.ts, moyoung.ts
pages/ Top-level routes (Editor, WatchFaces, Pack, Dump, Docs)
store/ Zustand editor store
types/ Shared TS types
scripts/ Corpus tooling (extract-watchfaces, analyze-corpus, …)
faces-corpus/ 387 real watch faces used to derive defaults (gitignored)
See CLAUDE.md for engineering rules, format notes, and corpus-derived sharing/whitelist data.
Author
Built by Mohammed Ashad — @e-labInnovations.
Credits
DaFit Canvas would not exist without the reverse-engineering work of David Atkinson. All Type C decoding and packing in this editor descends directly from his tools:
- dawft — original Da Fit watch face CLI (decode/encode
.bin).
- extrathundertool — companion utility for related watch protocols.
- dawfu — BLE uploader for built
.bin files.
License
MIT. See LICENSE if present, otherwise treat this repo as MIT-licensed pending a formal file.
评论