App data¶
Where NayaFlow keeps its database, logs and backups, what the tables mean, which values reach the
keyboard, and how to back up and restore safely. The one thing to know: user-data.db is the
source of every NayaFlow flash, and several of its values reach the board (colors, the layer list,
animations), so a NayaFlow backup is a real backup of your configuration; the keyboard's own stores
are a second copy that NayaFlow never reads back.
Before you edit or restore
Quit all three NayaFlow programs before touching user-data.db by hand. Restoring a backup
overwrites the database and restarts the app. Take a backup (NayaFlow's manual backup, or a device
read with a tool) before any Danger Zone action or a flash from another tool.
At a glance
- Windows:
%APPDATA%\NayaFlow\; macOS:~/Library/Application Support/NayaFlow/. - flow-bg-server owns and migrates the SQLite database; NayaCore only reads it during a flash.
- The stock database holds 201
pressbindings over three layers and no macro. - Backups: a ring of ten automatic zips every 30 minutes (when data changed), plus manual backups.
Where the data lives¶
| Platform | Location | Evidence |
|---|---|---|
| Windows | %APPDATA%\NayaFlow\: user-data.db, logs\core\ (NayaCore), logs\flow\ (bg-server), logs\main.log (Electron main), components\ (component downloads), backups\ |
STATIC MEASURED (the owner's machine, 2026-09-23) |
| macOS | ~/Library/Application Support/NayaFlow/ |
STATIC INFERRED (the app is named NayaFlow, the main process hands Electron's userData path to the bg-server, and that path on macOS is ~/Library/Application Support/<name>) |
| Linux | No NayaFlow data path to give. Only 0.0.1-0.1.1 shipped a Linux AppImage, and it carried no firmware service; the Linux NayaCore builds of 1.15.0-1.17.3 were not run by us | STATIC (release assets5); OPEN (details) |
| NayaFlow-Beta | its own NayaFlow-Beta data folder; stable 1.17.3 fixed NayaCore logs being written there instead of into NayaFlow |
DOC34 |
user-data.db¶
user-data.db is SQLite, created and migrated by flow-bg-server (goose migrations; queries generated
by sqlc). NayaCore only reads it, when an update_keymap event passes it db_path (see
NayaFlow and NayaCore) STATIC21.
- 21 tables: color_palettes, color_swatches, dynamic_layer_groups, dynamic_layers, goose_db_version, key_bindings, keys, layers, loop_action_macro_steps, macros, module_bindings, module_config_bindings, module_configs, module_settings, mouse_action_macro_steps, profiles, settings, standard_action_macro_steps, templates, text_action_macro_steps, wait_for_release_macro_steps STATIC (schema of a 1.25.1 database).
- Nine goose migrations:
20250609122327_initial,20250803231606_update_settings_column,20250821193635_add_module_setting_table,20250826171852_add_action_id_to_keybinding_and_module_binding,20250902212225_add_composite_primary_key_to_module_settings,20250902214523_change_settings_primary_key_to_correlation_id,20250903113837_add_module_config_binding_state_and_remove_is_transparent_and_is_disabled,20250929162102_add_context_to_keybinding,20260421070750_add_animation_to_layersSTATIC (goose_db_versionrows of the stock database). - The stock database holds 201
key_bindingsrows, all with behaviorpress, over the three layers of the "Naya Default Windows" profile, and no macro. Every Naya Default and Naya Japanese template (Windows and macOS) from 1.15.0 to 1.25.1 carries the same 201pressbindings, and three stock Windows databases hold the same STATIC MEASURED (templates embedded in the installers; databases of 2026-08-28, 2026-08-31 and 2026-09-08 opened read-only).
| Table | Purpose | Reaches the keyboard? |
|---|---|---|
profiles |
profiles; state = 'ON_BOARD' marks the active one, the only one NayaCore flashes |
through the flash |
layers |
layers per profile, with animation_id |
the layer list (not the names) |
keys |
97 rows per layer (position_id 0-96) with a color_hex |
colors of 0-89 as the LED map |
key_bindings |
behaviors per key (press, hold, double_tap, tap_hold) |
yes, as keymap records |
module_configs, module_bindings, module_config_bindings |
module profiles, their gesture bindings, and which config each layer uses where | yes, as module configs and bay records |
module_settings |
speeds, acceleration, Tune ticks | yes, as module config fields |
settings |
app settings by correlation id | some (timeouts, tapping term, flavor, LED settings) |
macros and the five *_macro_steps tables |
macros | no: the keyboard has no macro table |
color_palettes, color_swatches |
palettes | no |
dynamic_layer_groups, dynamic_layers |
a switched-off feature | no |
templates |
shipped templates | no |
goose_db_version |
migration bookkeeping | no |
Profiles, layers, keys and positions¶
| Fact | Evidence |
|---|---|
profiles.state = 'ON_BOARD' marks the active profile; NayaCore flashes only that one (SELECT id, name FROM profiles WHERE state = 'ON_BOARD'). |
STATIC1 |
keys holds 97 rows per layer (position_id 0-96) with a color_hex; #xxxxxx marks "no color set". |
STATIC (stock 1.25.1 database) |
| Positions 0-73 are the 74 keys (the only positions with bindings). 74-80 and 81-87 are the two 7-LED side bars; 88 and 89 carry the two module-bay colors, painted onto LED blocks 88-111 and 112-135 (which of 88/89 feeds which side is OPEN: both held the same color in every capture). 90-96 carry colors in the stock profile but never reach the board. NayaCore's log says "Read 74 keys for layer with id:N". | MEASURED STATIC (owner's board, 3.41.0, 2026-09-08/09; the owner's NayaCore logs; key geometry as the 1.25.1 renderer draws it); positions on Layout |
keys.color_hex is what NayaFlow flashes as the LED map: NayaCore turns each #rrggbb into hue and saturation ("LED at index: %1 Hue: %2 Sat: %3"); #xxxxxx becomes saturation 150 (the no-color value). A flash with known database colors read back matching on 17 of 18 color classes across three layers, including all 40 white keys. NayaFlow's hue is the integer 60-degree formula, truncated (#0084ff -> 208). |
STATIC1 MEASURED (owner's board, 3.41.0, 2026-09-08) |
Layer names are host-only (the protocol has no names). The layer list itself (one 20-byte entry per layer: index, id, animation, 10, 16-byte UUID) lives on the keyboard; NayaCore writes only changed entries, so its log line "No data to write for layer list" means no entry changed. |
MEASURED (captures, 2026-09-01/03) STATIC; see Layers |
| Layer names by template: the 1.25.x templates name the three layers "Typing", "Keypad + Arrow Keys" and "System"; the templates of 1.15.0 to 1.21.0 named the base layer "QWERTY"; the Create manual draws "Base Layer (QWERTY)", "Layer 1 (Function)" and "Layer 2 (System)". | STATIC (embedded templates of 1.15.0, 1.15.1, 1.17.3, 1.19.1, 1.21.0 and 1.25.1) DOC (manual7) |
layers.animation_id holds the layer's animation (added 2026-04-21); NayaCore defaults to SOLID when it is empty. |
STATIC1 |
Key bindings, module configs and module settings¶
key_bindings.behavioris one ofpress,hold,double_tap,tap_hold; NayaCore's own words aretap,hold,double_tap,tap_hold(it has nopressliteral, so any other word counts as the tap slot). Other columns:action_type,action_code,key_id,context(added 2025-09-29) STATIC.module_config_bindingsties a module config to a layer and a location:touch,track,tuneorfloatcrossed withkeyboard_left/keyboard_right(8 locations);stateistransparent,disabled, or NULL (use the bound config). Migration 20250903113837 replaced two booleans withstateSTATIC1.module_bindingsrows:behavior(gesture id),action_type,action_code,action_id,invert,threshold,direction(default+),modeSTATIC.- NayaCore refuses a module setting whose correlation id belongs to another module type ("Invalid correlation id for touch/track/tune config") STATIC1.
Module settings (1.25.1 defaults; ranges 1-100 unless stated) STATIC2:
| Module | Settings |
|---|---|
| Touch | MS-2 scroll speed 50, MS-3 pointer speed 10, MS-4 pointer acceleration 50, MS-5 acceleration on |
| Track | MS-7 scroll 10, MS-8 acceleration 50, MS-9 pointer 10, MS-10 acceleration on |
| Tune | MS-12 scroll 10, MS-13 pointer 10, MS-14 acceleration 50, MS-15 acceleration on, MS-16 ticks per rotation 5-170 (72), MS-17 tick strength 0-100 (75), MS-18 ticks on |
MS-1, MS-6 and MS-11 are absent OPEN
(details). On the keyboard these settings land in module config fields 0x00 pointer speed, 0x01
scroll speed, 0x02 acceleration, 0x03 acceleration on (INFERRED for the Touch and Track); on the
Tune 0x05 = degrees per detent (360 / ticks, so 72 ticks = 5), 0x06 tick strength, 0x07 ticks on
MEASURED (owner's board, 3.41.0, module 2.3.3, 2026-09-11 and
2026-09-16). Details on Module fields.
App settings¶
Table settings, keyed by correlation id, with 1.25.1 defaults STATIC2:
| Setting | Default and range |
|---|---|
| Language | en (en, jp) |
| Input source | qwerty (qwerty, jis) |
| Interrupt flavor | balanced (tap-preferred, hold-preferred, tap-unless-interrupted) |
| Tapping term | 200 ms (10-1000) |
| Auto check update | on |
| Hold layer LED activation delay | 0 ms (0-3000) |
| Idle timeout | 90 s (0-6000, 0 = off) |
| Sleep timeout | 300 s (0-6000, 0 = off) |
| Module battery in tray | off |
| Zoom level | 0 % (-500 to 500, step 25) |
| LED action override | until_keyboard_restart (or until_layer_change) |
| LED max brightness | 100 % (0-100) |
| LED scan mode | on |
- The idle and sleep sliders are in seconds, not milliseconds: a stored 6000 means 100 minutes and goes to the keyboard as 6 000 000 ms STATIC2.
- NayaCore reads these settings by correlation id and falls back to built-in defaults. The
keyboard-side block it verifies has
tapping_term_ms,tap_hold_flavour,idle_time_ms,sleep_time_ms,sleep_battery_time_ms,scanmode_pwm,led_layer_override;sleep_battery_time_mshas no NayaFlow setting STATIC1. See Settings and timing.
Macros and other host-only tables¶
The macro tables (macros, standard_, text_, mouse_, loop_,
wait_for_release_action_macro_steps) are edited by the bg-server but never flashed; the keyboard has
no macro table (see NayaFlow and NayaCore) STATIC
MEASURED (owner's board, 2026-09-07). The stock database holds no
macro. The stock palette "Rainbow" has 9 swatches #ff0000, #ff6f00, #ffe500, #00ff00,
#00ffd9, #0000ff, #6f00ff, #00ff5e, #9000ff. dynamic_layer_groups and dynamic_layers
exist but the feature is switched off in the renderer; templates holds the shipped templates
STATIC.
Logs¶
| Log | What it holds | Evidence |
|---|---|---|
logs/core/nayacore_<yyyy-MM-dd_HH-mm-ss>.log (header "=== Naya Core Log File ===") and debug_nayacore_<...>.log |
NayaCore: CDC traffic, ZMQ verdicts, profile dumps | STATIC1 MEASURED (file names on the owner's machine) |
logs/flow/NayaFlow-bg-<yyyy-mm-dd>.log (daily) |
flow-bg-server; every ZMQ message as "Sending ZMQ message to NayaCore: %+v" | STATIC2 MEASURED |
logs/main.log |
the Electron main process | MEASURED |
Log rotation and a fix for logs over 100 MB came in 1.17.2 DOC3.
- A NayaCore profile dump prints per key
tap: (ACTION)andwire: <hex>STATIC1. Awire:line is NayaCore's re-encoding of the key as its own model has it, not the bytes on the board: it printedwire: 351007c800012a000700for key0x35while the board held a plain01BACKSPACE there. Verification dumps show every hold-tap at term 200 and flavor 1. A key with four behaviors goes on the wire as two full 27-byte type-10records (both banks). Record layouts learned from log lines need a USB capture or a30/1003read to confirm MEASURED (owner's board, 3.41.0, 2026-09-09 and 2026-09-17; USB capture 2026-09-03). - Test and Format SPI-Flash (
repair_flash) formats only partitions whose self-test fails, so a "success" on a healthy board means it only tested; a firmware flash leaves stored maps and bond tables untouched DOC MEASURED (vendor text2; the owner's boards, 2026-09-20/22; create-legacy-firmware6).
Backups¶
- Cadence: automatic every 30 minutes when data changed (from 1.17.2); manual backups kept in a
separate folder (1.25.0); 500-2000 KB each; the automatic set is a ring of 10 (
maxBackupCount), and/rpc/trigger-userdata-backuppushes the oldest out DOC STATIC MEASURED (release notes3; the bg-server; the owner's machine, wherebackups/1.25.1/holds exactly ten<yyyy-mm-dd_HH-mm-ss>.zipfiles). - Format: a backup zip holds
backup_meta.json({"created_at": "...", "data": {"software_version": "1.25.1"}}) anduser-data.db, in a folder named after the app version (backups/1.25.1/). Restoring overwrites the database and restarts the app STATIC DOC MEASURED (a 1.25.1 backup read 2026-09-23; the restore overlay text2). - A NayaFlow backup (zip or
user-data.db) is a valid OpenFlow database: OpenFlow uses the same schema and imports it STATIC (OpenFlow). - App identity: appId
tech.naya.nayaflow, author "NayaTech", "Copyright 2024 tech.naya"; the updater caches innayaflow-updaterSTATIC (0.0.1package.json; 1.25.1app-update.yml).
Third-party snapshots and restores¶
- A device-side snapshot holds the keymap and LED map of every layer (
30/1003,30/100d) and the module-config slots (30/100b); a restore writes them back record by record with30/1004,30/100eand30/100cand reads each store back to check it MEASURED (the read and write forms, owner's board, 3.41.0, 2026-09-01 to 09-08) INFERRED (the restore as a whole). - A device-side snapshot should also keep the raw layer list (the
30/1001reply):30/10cawipes it, and writing it back first after a format is the proposed restore, untested after a format MEASURED (the list's write form, captured 2026-09-03/10) INFERRED. See Factory reset. - OpenFlow keeps its own data apart:
%APPDATA%\OpenFlow(Windows),~/Library/Application Support/OpenFlow(macOS),$XDG_DATA_HOME/OpenFlow(Linux), orOPENFLOW_DATA_DIR; next touser-data.dbarebackups/,logs/backend.log,logs/sidecar.log,shell/; uninstalling leaves the data STATIC (OpenFlow README, link at release).
Open questions¶
- OPEN Which of positions 88 and 89 feeds which bay color (flash different colors at 88 and 89 and read the LED map).
- OPEN NayaFlow's data path on Linux, and whether 1.19.1 or later shipped a Linux build (details).
- OPEN Why MS-1, MS-6 and MS-11 are absent (details).
- OPEN The effect of
sleep_battery_time_ms(the third timeout field) on hardware.
Sources¶
-
NayaFlow 1.25.1 for Windows,
core/NayaCore/NayaCore.exe(NayaCore 6.11.0): strings (SQL queries, log formats, settings names). ↩↩↩↩↩↩↩↩↩ -
NayaFlow 1.25.1,
flow/flow-bg-server.exe: strings and embedded data (settings, module settings, templates, i18n, backup code). ↩↩↩↩↩↩↩ -
Vendor release notes, NayaTech/NayaFlow-releases, mirrored in create-legacy-firmware
CHANGELOG.md. ↩↩↩ -
Vendor release notes of the beta channel, NayaTech/NayaFlow-beta-releases. ↩
-
create-legacy-firmware,
MANIFEST.json(the assets of every stable release). ↩ -
create-legacy-firmware,
FLASHING-PROCEDURE.md, "Measured on hardware, both halves (2026-09-20)". ↩ -
Naya Create manual v1.1.x, pp. 18-23 (see Manuals for archived copies). ↩