- Electron for desktop shell, tray, startup integration, and packaging.
- TypeScript for main, preload, and renderer code.
- React for the management UI.
- Node.js libraries:
chokidarfor filesystem watching.ssh2-sftp-clientorssh2for SFTP.basic-ftpfor FTP.minimatchorpicomatchfor ignore rules.electron-storefor non-secret settings.- OS credential storage for secrets when implemented.
Responsibilities:
- Load sync profiles.
- Manage tray menu.
- Start and stop watchers.
- Own upload queues.
- Communicate with renderer over IPC.
- Persist logs.
- Start on login.
Responsibilities:
- Profile management UI.
- Mapping table.
- Status and logs display.
- Manual sync trigger.
Can initially run in the main process. If sync grows heavy, move to worker threads or a separate Node child process.
- Watch local directory.
- Debounce events per path.
- Apply ignore rules.
- Convert local path to remote path.
- Ensure remote parent directory exists.
- Upload to temporary remote path.
- Rename temporary remote path to final path.
- Record success or failure.
- Retry failures with backoff.
Use temporary remote files:
target.php.__codedeployer_tmp__
After upload completes, rename the temporary file to the target path.
{
"id": "profile-id",
"name": "Example Web App",
"enabled": true,
"localPath": "E:\\Workspace\\example-web-app",
"remote": {
"protocol": "sftp",
"host": "203.0.113.10",
"port": 22,
"username": "deploy",
"authMode": "privateKey",
"remotePath": "/var/www/example-web-app"
},
"ignore": [
".git/",
"node_modules/",
"dist/",
"build/",
".env"
],
"deleteRemote": false,
"concurrency": 2
}- Whether to add FTPS support in addition to plain FTP and SFTP.
- Whether first version should include remote directory browsing.
- Whether remote deletion should be supported in MVP or delayed.