Skip to content

Repository files navigation

DrLume

Next.js project (App Router, TypeScript) with voice and 1:1 video call (WebRTC + Socket.IO).

Setup

npm install

Emotion from camera (optional): Set GEMINI_API_KEY in .env.local; emotion uses the Gemini vision API (see .env.example).

Run

npm run dev

This starts the custom server (Next.js + Socket.IO signaling) on http://localhost:3000. The app and the signaling server run on the same port.

Scripts

  • npm run dev – dev server (Next.js + Socket.IO)
  • npm run build – production build
  • npm run start – run production server (run npm run build first)
  • npm run lint – run ESLint

Video call (WebRTC)

Two users can join the same room code and see each other’s live camera and hear audio. No external video SDKs; uses raw WebRTC and Socket.IO for signaling.

How to test with two devices

  1. Same network (e.g. laptop + phone on same Wi‑Fi)

    • On both devices, open http://<your-pc-ip>:3000/video (replace with your computer’s local IP).
    • Enter the same room code (e.g. room1) and click Join room on both.
    • On the device that sees “You are caller”, click Start call.
    • You should see and hear each other.
  2. Different networks (e.g. phone on cellular, laptop at home)

    • You need a TURN server so peers can connect through NAT/firewalls.

    • Set these env vars (create a .env.local next to package.json):

      NEXT_PUBLIC_TURN_URL=turn:your-turn-server:3478
      NEXT_PUBLIC_TURN_USERNAME=your-username
      NEXT_PUBLIC_TURN_CREDENTIAL=your-password
    • Restart npm run dev, then open the app from both devices (e.g. deploy to a public URL or use a tunnel like ngrok for the laptop, and open that URL on the phone).

    • Same steps: same room code → Join → Start call (on caller device).

TURN / STUN

  • STUN (default): Google’s public STUN server is used so peers on the same or friendly networks can discover their public IP and connect.
  • TURN: If you set NEXT_PUBLIC_TURN_URL, NEXT_PUBLIC_TURN_USERNAME, and NEXT_PUBLIC_TURN_CREDENTIAL, the app will add that TURN server to the ICE config. Use TURN when devices are on different networks (e.g. different Wi‑Fi or mobile data) and direct connection fails.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages