A secure, web-based terminal emulator built with React and Socket.IO.
Frontend: React 18, Redux Toolkit, Socket.IO Client, Vite, SCSS
Backend: Node.js, Express, Socket.IO, JWT, Bcrypt, node-pty
git clone https://github.com/alexandrglm/websocket-shell-react.git
cd websocket-shell-react
npm installCreate .env file:
JWT_SECRET=a-secret-token
SHELL_HASHWORD=$2b$10$your-hashed-password
WEBSHELL_SERVER_PORT=3001
VITE_SHELL_URI=http://localhost:3001
REACT_APP_SHELL_URI=http://localhost:3001Generate password hash:
node .tools/hashpass.js your-password# Development
node server
npm run start
# Production
npm run build
node serverAccess: http://localhost:7777
Header Controls
- 🔴 Close - Disconnect session
- 🟡 Minimise - Exit fullscreen
- 🟢 Maximise - Enter fullscreen
Status Indicator (click to open menu):
- ● Green - Connected
- ● Red - Disconnected
Options
- Login - Authenticate for full access
- Session Info - View session details
- Themes - 5 built-in themes (Default, Light, Ubuntu, Minimal, Monokai)
- Help - Keyboard shortcuts & commands
- About - Project information
- Exit - Disconnect
| Key | Action |
|---|---|
↑ / ↓ |
Navigate command history |
Enter |
Execute command |
Ctrl+D |
Send EOF / Cancel command |
- Guest Mode: Limited commands (ls, pwd, whoami, date, uptime, help, clear)
- Authenticated: Full system access
- IP Lockout: 3 failed attempts = 5min block
- Rate Limiting: 3 req/s (guest) / 20 req/s (authenticated)
GET /statusPOST /auth/validate
Content-Type: application/json
{ "password": "your-password" }MIT
Built by @alexandrglm





