Prerequisites

  • Node.js — version 18 or later (nodejs.org)
  • npm — comes with Node.js

Clone & Install

Clone the repository and install dependencies for both the server and client:

git clone https://github.com/sellserv/voice-server.git
cd voice-server

# Install server dependencies
cd server
npm install

# Install client dependencies
cd ../client
npm install

Environment Configuration

Create a .env file in the server/ directory:

# server/.env
PORT=3000
JWT_SECRET=your-secret-key-here
ANNOUNCED_IP=your-server-ip

Replace your-secret-key-here with a strong random string and your-server-ip with your machine's LAN or public IP address.

Running the Server

Development

Start both the server and client in development mode:

# Terminal 1 — Server
cd server
npm run dev

# Terminal 2 — Client
cd client
npm run dev

Production

Build and run for production:

# Build the client
cd client
npm run build

# Start the server (serves built client)
cd ../server
npm start

Accessing the App

Once running, open your browser and navigate to:

http://localhost:3000

The first user to register will automatically be assigned the admin role.