尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A lightweight real-time text bridge between two paired devices. No account and no database.
client/ is a Next.js + TypeScript frontend. server/ is a small Node.js + ws relay. Rooms and their latest text live only in server memory and disappear after the room expires or the server restarts.
Requires Node.js 20+.
npm run install:all
npm run dev
Open http://localhost:3000. The WebSocket server runs on port 8080.
These run in CI (.github/workflows/ci.yml) on every push to main and every pull request:
npm run format:check # Prettier, whole repo (npm run format to fix)
npm --prefix server run typecheck # server source and tests
npm --prefix server test # server integration tests
npm --prefix client run lint # ESLint (Next.js rules)
npm --prefix client run typecheck
npm run build
server/src/realtime.ts: room, relay, rate-limit and heartbeat logic (createRealtimeServer)server/src/index.ts: reads environment variables and starts the serverclient/hooks/useRoomSocket.ts: WebSocket connection, reconnects and room stateclient/hooks/usePeerTransfer.ts: WebRTC negotiation and file transferclient/components/: UI pieces composed by client/app/page.tsxclient/lib/: message types and file helpersCopy .env.example to client/.env.local:
NEXT_PUBLIC_WS_URL=ws://localhost:8080
Production must use a secure wss:// endpoint.
Server environment variables (all optional):
| Variable | Purpose |
|---|---|
ALLOWED_ORIGINS | Comma-separated frontend origins allowed to connect, e.g. https://derashare.vercel.app. Unset allows any origin, which is only appropriate for local development. |
TRUST_PROXY | Set to 1 behind a reverse proxy (Render, Railway) so rate limits use the client IP from x-forwarded-for. |
MAX_ROOMS | Maximum concurrent rooms. Defaults to 10000. |
TURN_URLS | Comma-separated TURN URLs, e.g. turn:turn.example.com:3478,turns:turn.example.com:5349. |
TURN_SECRET | Shared secret for coturn's use-auth-secret mode. Each device gets credentials that expire after 12 hours. |
TURN_USERNAME / TURN_CREDENTIAL | Fixed credentials instead of TURN_SECRET, e.g. from a hosted TURN provider. |
Without TURN, files only transfer when the two devices can reach each other directly. That usually works on the same Wi-Fi and often fails between mobile networks. After 20 seconds without a connection the app says file sharing is unavailable; text keeps working through the server either way.
Deploy client/ to Vercel. Deploy server/ to a persistent Node.js host that supports WebSockets, such as Render or Railway. Set NEXT_PUBLIC_WS_URL on the frontend to the public WebSocket server URL, and set ALLOWED_ORIGINS on the server to the frontend URL.
The server exposes GET /health for host health checks.