Config and Sync Files Guide
This guide explains these files:
server_config.jsonbackend/sync_status.jsonbackend/client.jsonbackend/backup_status.json
1. server_config.json
Purpose:
- Controls which backend URL this terminal uses.
- Controls which outlet codes are available on this terminal.
Current example:
{"baseUrl":"http://127.0.0.1:3000","outlets":["OUTLET202604212159"]}
Fields:
baseUrl: backend API base URL.outlets: outlet code list mapped to this machine.
When to update:
- Backend server IP/port changed.
- Terminal should access different/additional outlets.
2. backend/sync_status.json
Purpose:
- Tracks cloud sync progress per outlet.
Current example:
{
"OUTLET202604212159": {
"folder_created": true,
"sheet_synced": true,
"config_synced": true,
"file_created": false,
"backup_synced": true
}
}
Meaning of keys:
folder_created: Drive folder created for outlet.sheet_synced: client row synced to Google Sheet.config_synced: config payload synced.file_created: local marker state.backup_synced: backup upload completed.
Note:
- This is a runtime status file. Usually do not edit manually.
3. backend/client.json
Purpose:
- Stores per-outlet local runtime identity and cloud mapping.
Typical fields:
client_idfolderId(Google Drive folder id)outlet_codeoutlet_idproperty_namemachine_iddb_namecreated_atstatusexpiry_datecontact_emailcontact_phonetax_idpin(hashed recovery pin value)
Important:
- Keep valid JSON array format.
- Do not remove
folderIdfor active cloud-synced outlets. - Treat file as sensitive operational data.
4. backend/backup_status.json
Purpose:
- Stores cloud backup enable flag and latest successful sync timestamp per outlet.
Current example:
{
"undefined": {
"lastSyncTime": null,
"isCloudEnabled": true
},
"OUTLET202604212159": {
"lastSyncTime": 1778160608614,
"isCloudEnabled": true
}
}
Fields:
lastSyncTime: epoch milliseconds of last successful cloud sync.isCloudEnabled: true/false cloud backup toggle.
Operational note:
- If you see
undefinedkey, it means one backup status update happened without a resolved outlet code. Prefer fixing outlet mapping flow instead of manual file edits.
5. Safe Handling Rules
- Take a backup copy before any manual edit.
- Stop backend before editing runtime JSON files.
- Validate JSON syntax after edit.
- Restart backend and verify
/health. - Run a test sync and check file updates.
6. Which File to Use for What
- Change server endpoint or terminal outlets:
- Edit
server_config.json
- Edit
- Check cloud sync progress:
- Read
backend/sync_status.json
- Read
- Verify outlet-cloud mapping and client identity:
- Read
backend/client.json
- Read
- Check last backup sync time and cloud toggle:
- Read
backend/backup_status.json
- Read