syncraws-bridge
v1.2.2
Published
Local bridge server for SyncRaws web app - provides file system access
Readme
SyncRaws Bridge Server
Local bridge service used by SyncRaws Web to watch local folders and stream file contents.
Run
Recommended:
npx syncraws-bridgeOr install it globally:
npm install -g syncraws-bridge
syncraws-bridgeFor repository development:
cd bridge
npm install
npm startSecurity Defaults
- Bind host:
127.0.0.1 - A random 256-bit token is generated on first run and stored at
~/.syncraws/bridge-token. - All API routes except
/healthrequire the token inX-SyncRaws-Token. - CORS is restricted to configured origins.
- File lists expose opaque IDs, file names, and a SHA-256 content hash, never absolute paths.
- The SHA-256 hash is calculated for every supported file type and is used to reject exact duplicate uploads.
- Gaussian discovery includes PLY, SPZ, SPLAT, KSPLAT, and RAD files.
- Hashing is concurrency-limited so large watched folders do not start unbounded disk and CPU work.
- Open the pairing URL printed by the bridge to connect
syncraws.pages.dev.
Environment Variables
PORT(default:3456)HOST(default:127.0.0.1)BRIDGE_TOKEN(optional override; otherwise a persistent random token is generated)BRIDGE_ALLOWED_ORIGINS(comma-separated origins)HASH_CONCURRENCY(default:2, range:1to8)
Example:
BRIDGE_TOKEN=my-secret-token BRIDGE_ALLOWED_ORIGINS="http://localhost:5038,http://127.0.0.1:5038" npm startAPI
Health
GET /health
Response:
{ "status": "ok", "version": "1.2.2" }Start Watching
POST /api/watch
Body:
{ "folderPath": "C:/path/to/folder" }Stop Watching
POST /api/stop
Scan Now
POST /api/scan
List Files
GET /api/files
Mark Complete
POST /api/files/:id/complete
Read File Content
GET /api/files/:id/content
WebSocket
Connect to ws://127.0.0.1:3456/?token=<BRIDGE_TOKEN>.
Events:
initfile_addedfile_removed(opaqueid, no local path)file_status
Supported Extensions
- Images:
.jpg,.jpeg,.png,.gif,.webp,.bmp,.tiff,.raw,.cr2,.nef,.arw - Videos:
.mp4,.mov,.avi,.mkv,.webm - 3D models:
.fbx,.obj,.gltf,.glb,.blend
