# Clone and install
git clone https://github.com/atomantic/PortOS.git
cd PortOS
npm run install:all
# Start development
npm run dev
# Or with PM2
pm2 start ecosystem.config.cjs- Favor functional programming over classes
- Keep code DRY (Don't Repeat Yourself)
- Follow YAGNI (You Aren't Gonna Need It)
- Use functional components and hooks
- Use Tailwind CSS for all styling
- No
window.alertorwindow.confirm- Use inline confirmation components or toast notifications - Linkable routes for all views - Tabbed pages, sub-pages, and forms should have distinct URL routes for bookmarking/sharing
// Good - linkable routes
/devtools/history
/devtools/runner
/devtools/processes
// Bad - state-based tabs (not linkable)
/devtools (with local state for active tab)- Use Zod for request validation
- No shell interpolation - use spawn with arg arrays
- Command execution uses allowlist for security
See VERSIONING.md for full details.
- Work on
devbranch - Push triggers CI → auto-bumps build number
- Create PR
dev→mainfor releases - Merge triggers release creation + version prep
Use conventional commit format:
feat: add new feature
fix: resolve bug
build: version/CI changes
docs: documentation updates
refactor: code restructuring
PortOS/
├── client/ # React + Vite frontend (port 5554)
│ └── src/
│ ├── components/
│ ├── pages/
│ └── services/
├── server/ # Express.js API (port 5555)
│ ├── routes/
│ ├── services/
│ └── lib/
├── data/ # Runtime data (gitignored)
├── docs/ # Documentation
└── .github/workflows # CI/CD
# Run server tests
cd server && npm test
# Watch mode
cd server && npm run test:watchSee API.md for the complete REST API and WebSocket event reference.