Sets up the complete mRemotify project — a browser-based remote connection manager — with a working pnpm workspace monorepo: Frontend (React + TypeScript + Vite + Ant Design 5): - Login page with JWT auth - Resizable sidebar with drag-and-drop connection tree (folders + connections) - Tabbed session area (SSH via xterm.js, RDP via guacamole-common-js) - Connection CRUD modal with SSH/RDP-specific fields - Zustand store for auth, tree data, and open sessions Backend (Fastify + TypeScript + Prisma + PostgreSQL): - JWT authentication (login + /me endpoint) - Full CRUD REST API for folders (self-referencing) and connections - AES-256-CBC password encryption at rest - WebSocket proxy for SSH sessions (ssh2 <-> xterm.js) - WebSocket proxy for RDP sessions (guacd TCP handshake + bidirectional relay) - Admin user seeding on first start Infrastructure: - Docker Compose: postgres (healthcheck) + guacd + backend + frontend/nginx - nginx: serves SPA, proxies /api and /ws (with WebSocket upgrade) to backend - .env.example with all required variables documented Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
93 lines
3.0 KiB
Markdown
93 lines
3.0 KiB
Markdown
# mRemotify
|
|
|
|
A browser-based remote connection manager — open-source alternative to mRemoteNG.
|
|
|
|
Manage SSH and RDP connections through a clean web UI with a familiar tree-based layout and tabbed session view.
|
|
|
|
## Stack
|
|
|
|
| Layer | Tech |
|
|
|-----------|-------------------------------------------------|
|
|
| Frontend | React 18 · TypeScript · Vite · Ant Design 5 |
|
|
| Backend | Fastify · TypeScript · Prisma · PostgreSQL |
|
|
| SSH | ssh2 (Node.js) proxied over WebSocket |
|
|
| RDP | Apache Guacamole (guacd) + guacamole-common-js |
|
|
| Auth | JWT · bcryptjs · AES-256 password encryption |
|
|
| Infra | Docker Compose · pnpm workspaces |
|
|
|
|
## Features
|
|
|
|
- **Connection tree** — folders with drag-and-drop, Linux / Windows icons per connection
|
|
- **Tabbed sessions** — each opened connection gets its own tab
|
|
- **SSH sessions** — full xterm.js terminal over WebSocket
|
|
- **RDP sessions** — Guacamole-based remote desktop in the browser
|
|
- **Encrypted storage** — passwords stored AES-256 encrypted at rest
|
|
- **JWT auth** — login-protected, all API + WebSocket routes secured
|
|
|
|
## Quick start (Docker Compose)
|
|
|
|
```bash
|
|
# 1. Clone & enter
|
|
git clone https://github.com/yourname/mremotify.git
|
|
cd mremotify
|
|
|
|
# 2. Configure environment
|
|
cp .env.example .env
|
|
# Edit .env: set ENCRYPTION_KEY (32 chars), JWT_SECRET, ADMIN_PASSWORD
|
|
|
|
# 3. Start everything
|
|
docker compose up -d
|
|
|
|
# 4. Open in browser
|
|
open http://localhost
|
|
```
|
|
|
|
Default login: `admin` / `admin123` (change via `ADMIN_USER` / `ADMIN_PASSWORD` in `.env` before first start).
|
|
|
|
## Development (without Docker)
|
|
|
|
Prerequisites: Node.js >= 20, pnpm >= 9, PostgreSQL running locally.
|
|
|
|
```bash
|
|
# Install all workspace dependencies
|
|
pnpm install
|
|
|
|
# Copy and fill in env
|
|
cp .env.example .env
|
|
# Set POSTGRES_URL to your local DB, etc.
|
|
|
|
# Run DB migrations + seed
|
|
cd backend && npx prisma migrate dev && npx prisma db seed && cd ..
|
|
|
|
# Start backend + frontend in parallel
|
|
pnpm dev
|
|
```
|
|
|
|
Frontend dev server: http://localhost:5173
|
|
Backend API: http://localhost:3000
|
|
|
|
## Project structure
|
|
|
|
```
|
|
mremotify/
|
|
frontend/ React + Vite app
|
|
backend/ Fastify API + WebSocket proxies
|
|
docker/ Dockerfiles + nginx config
|
|
docker-compose.yml
|
|
.env.example
|
|
pnpm-workspace.yaml
|
|
```
|
|
|
|
## Environment variables
|
|
|
|
| Variable | Description |
|
|
|-------------------|-----------------------------------------------|
|
|
| POSTGRES_URL | PostgreSQL connection string |
|
|
| ENCRYPTION_KEY | 32-character key for AES-256 password crypto |
|
|
| JWT_SECRET | Secret for signing JWT tokens |
|
|
| ADMIN_USER | Initial admin username |
|
|
| ADMIN_PASSWORD | Initial admin password |
|
|
| GUACD_HOST | Hostname of guacd service |
|
|
| GUACD_PORT | Port of guacd service (default: 4822) |
|
|
| PORT | Backend port (default: 3000) |
|