Thanks for your interest in improving OTG Code! This guide covers the dev setup, conventions, and PR workflow.
- Node.js
>= 20.19 - pnpm
>= 10(corepack enablewill provide it)
pnpm installpnpm dev # local dev server (no tunnel)
bash start.sh # production build + server + Cloudflare quick tunnelBy default the app runs on http://localhost:7777 (override with OTG_PORT).
CI runs these on every PR; they must pass.
pnpm lint # Biome lint + format check (biome ci)
pnpm format # auto-fix formatting and safe lint issues
pnpm typecheck # React Router typegen + tsc
pnpm run build # production buildFormatting and linting are handled by Biome — config in
biome.json. Run pnpm format to auto-apply. Don't hand-format; let Biome
decide. Match the conventions of the surrounding code.
This project uses Conventional Commits.
It keeps history readable and makes the CHANGELOG.md easy to assemble per
release.
Common types:
feat:— a new featurefix:— a bug fixchore:,docs:,style:,refactor:,test:,ci:— supporting changes
Example: fix: flip file menu upward near the bottom of the pane
Security fixes should use fix: and are listed under a Security section in
the changelog — there is no separate security-advisory file.
- Branch off
main. - Make your change; keep commits focused and Conventionally named.
- Ensure
pnpm lint,pnpm typecheck, andpnpm run buildpass. - Open a PR against
mainwith a short description of what and why.
Releases are cut manually:
- Update the version in
package.jsonand add a section toCHANGELOG.md(group changes under Added / Changed / Fixed / Security). - Merge to
main. - Tag and push:
git tag -a vX.Y.Z -m "Release vX.Y.Z" && git push origin vX.Y.Z. - Create a GitHub Release for the tag, using the changelog section as the notes.
The in-app version (shown in the header) is read from package.json at build
time, so bumping package.json is enough to update it.
app/ React Router (SSR) frontend
components/ UI — browser/, files/, terminal/
routes/ routes + routes/api/ (file ops, tmux, system info)
stores/ Zustand stores
lib/ shared client helpers (clipboard, socket, constants)
server/ Node backend
index.ts Express + Socket.IO entry
pty-manager.ts node-pty terminal sessions
socket-handlers.ts realtime terminal I/O
proxy.ts reverse proxy
tunnel.ts Cloudflare quick-tunnel management
start.sh builds, installs cloudflared, runs server + tunnel