A desktop app that automates the Revelo behavioral data annotation workflow.
Architecture:
- Windows machine — runs the Node.js backend (API) and MongoDB
- Ubuntu machine — runs the Electron desktop app (UI)
The Ubuntu app connects to the Windows server over your local network.
- Requirements
- Windows Server Setup
- Ubuntu Client Setup
- Running the App
- Workflow Guide
- Troubleshooting
| Tool | Version | Notes |
|---|---|---|
| Node.js | 20+ | nodejs.org |
| MongoDB | 7.0 | Installed as a Windows service — mongodb.com |
| Tool | Version | Notes |
|---|---|---|
| Node.js | 20+ | For running the Electron app |
| xdotool | any | sudo apt install xdotool — enables auto-typing |
| X11 display | — | Required for xdotool (see Wayland note) |
Do this once on the Windows machine.
Download the MongoDB Community Server 7.0 MSI from mongodb.com/try/download/community.
Run the installer:
- Choose Complete installation
- Check "Install MongoDB as a Windows Service"
Verify it is running:
Get-Service -Name MongoDBgit clone <your-repo-url>
cd behavioral_workDouble-click setup-server.bat or run in Command Prompt:
setup-server.batThis installs the Node.js backend dependencies (npm install in backend/).
Open PowerShell as Administrator (one-time only):
New-NetFirewallRule -DisplayName "Behavioral AI Bot API" `
-Direction Inbound -Protocol TCP -LocalPort 8000 -Action AllowEvery time you want to use the app:
powershell -ExecutionPolicy Bypass -File start-server.ps1This starts MongoDB (if not already running) and launches the backend on port 8000. It also prints your machine's IP addresses, for example:
http://192.168.1.105:8000
Keep this terminal open while using the app.
Do this once on the Ubuntu machine.
git clone <your-repo-url>
cd behavioral_workchmod +x setup.sh
./setup.shThis installs Node.js, xdotool, Electron dependencies, and builds the frontend.
powershell -ExecutionPolicy Bypass -File start-server.ps1Note the IP address printed (e.g. http://192.168.1.105:8000).
./run.shOn first launch, a setup window appears asking for the server URL.
Enter the URL printed by the Windows script:
http://192.168.1.105:8000
Click Save & Launch. This is saved and won't be asked again.
To reset the server URL, delete
~/.config/behavioral-ai-bot/config.jsonand relaunch.
- Open the app (you will land on the Upload page)
- Drag and drop the task requirement document (
.txt,.md,.pdf, or any text file) - Click Use This & Continue
- Paste the GitHub URL for the issue/commit you are working on
- Any format works: commit URL, PR URL, issue URL, or plain repo URL
- (Optional) Enter a GitHub personal token to avoid rate limits
- Click Fetch GitHub Data
- When the data loads, click Generate Prompts →
- The app shows a prompt to copy into claude.ai
- Copy it → paste into claude.ai → send
- Copy Claude's response → paste back into the app
- Click Parse & Load Prompts
- Review the 10 prompts and click Start Interactions →
- The suggested prompt is shown in the Prompt box (editable)
- Copy it and paste it into your
claude-hfiterminal
Results are saved to 1.txt in each cloned VSCode repo.
Use the File Watcher (auto-fills the text areas):
- Enter the path to each repo folder in the Auto-read 1.txt panel
- Click Watch for 1.txt
- The app polls every 2 seconds — when both files are written, they are loaded automatically
Or paste manually:
- Copy the content of each
1.txtfile and paste into the Model A / Model B text areas
- Click Generate Feedback
- Copy the evaluation prompt
- Paste into claude.ai → send
- Copy Claude's JSON response → paste back → click Parse Feedback
Use the Terminal Automation panel (requires xdotool):
- Click inside the
claude-hfiterminal to focus it - Click the matching Type↵ button in the app for each field
- The text is automatically typed and Enter is pressed
Or use Copy buttons to copy each value manually.
- Click Next Interaction → in the app
- Click continue in the
claude-hfiterminal - Repeat for all 10 interactions
- Click Finish All Interactions
- The Done page shows a summary of all 10 feedbacks
- Click Copy All Feedback
On the Done page:
- Enter the source repo directory
- Enter the output
.tarpath - Click Create tar
Fill in the Revelo platform forms with the final comments and ratings, then upload the .tar file.
xdotool types text into whichever window is currently focused.
- Click inside the
claude-hfiterminal to focus it - Click a Type↵ button in the app — the text is typed and Enter is pressed
xdotool requires X11. If you are on Wayland (default in Ubuntu 22.04+):
Option A — Log out and select "Ubuntu on Xorg" at the login screen.
Option B — Run the app with X11 backend:
GDK_BACKEND=x11 npx electron .Option C — Check your session type:
echo $XDG_SESSION_TYPE # should print "x11", not "wayland"If you see E: Could not get lock /var/lib/apt/lists/lock, Ubuntu's automatic update daemon is running in the background. Kill it and clear the lock:
sudo killall aptd
sudo rm -f /var/lib/apt/lists/lock /var/lib/apt/lists/lock-frontend
./setup.shcd frontend && npm run build- Make sure
start-server.ps1is running on the Windows machine - Check the URL (must include
http://and port:8000) - Make sure port 8000 is allowed through the Windows Firewall
- Both machines must be on the same network
Make sure MongoDB was installed as a Windows service, then:
Start-Service -Name MongoDB
Get-Service -Name MongoDBMake sure setup-server.bat was run first, then check Node.js is installed:
node --versionClick the terminal window first, then quickly click the Type↵ button.
sudo apt install xdotoolRestart the app after installing.
- Enter the folder path, not the file path
- If the file already existed before clicking Watch, click Watch again after the models finish
behavioral_work/
├── backend/ # Node.js/Express server (runs on Windows)
│ ├── server.js # Entry point
│ ├── db.js # MongoDB connection
│ ├── package.json # Backend dependencies
│ └── routes/
│ ├── documents.js # Upload & store requirement docs
│ ├── github.js # Fetch GitHub URL data
│ ├── prompts.js # Generate 10 interaction prompts
│ ├── feedback.js # Generate feedback for each interaction
│ ├── watcher.js # Poll filesystem for 1.txt files
│ └── automation.js # xdotool + tar file creation
├── electron/ # Electron app (runs on Ubuntu)
│ ├── main.js # Main process — static server + config
│ ├── preload.js # Injects Windows server URL into renderer
│ ├── config-preload.js # Preload for the setup window
│ └── setup.html # First-time server URL configuration UI
├── frontend/ # Next.js app (built to frontend/out/)
│ ├── pages/
│ │ ├── index.js # Upload requirements
│ │ ├── github.js # GitHub URL input
│ │ ├── plan.js # View & parse 10 prompts
│ │ ├── interaction.js # Run interactions + file watcher + automation
│ │ └── done.js # Summary + tar file creation
│ ├── components/
│ │ ├── api.js # HTTP client (uses Windows server URL)
│ │ └── Layout.js # Navigation layout
│ ├── styles/globals.css # Global dark theme styles
│ └── next.config.js # Static export config
├── setup-server.bat # Windows: one-time backend setup (npm install)
├── start-server.bat # Windows: start MongoDB service + backend
├── start-server.ps1 # Windows: PowerShell version (shows IP)
├── setup.sh # Ubuntu: one-time system + Electron setup
├── run.sh # Ubuntu: launch the Electron app
└── README.md