Skip to main content

Overview

Neuron Meet uses environment variables to configure database connections, authentication, server settings, and external services. Copy .env.example to .env and update the values for your environment.
cp .env.example .env

Database Configuration

PostgreSQL connection settings for Prisma.
DATABASE_URL
string
required
PostgreSQL connection string for the application.For Supabase (Transaction pooler):
postgresql://postgres.[project-ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres
For local Docker:
postgresql://neuronmeet:neuronmeet@localhost:5432/neuronmeet
Use the Transaction pooler (port 6543) for serverless/edge environments, or Session pooler (port 5432) for long-running connections.
DIRECT_URL
string
required
Direct PostgreSQL connection string for migrations.For Supabase (Session pooler or direct):
postgresql://postgres.[project-ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres
For local Docker:
postgresql://neuronmeet:neuronmeet@localhost:5432/neuronmeet
This is used by Prisma for running migrations and schema changes. It should use a direct connection or Session pooler, not Transaction pooler.

Getting Supabase Connection Strings

1

Open Supabase Dashboard

Navigate to your project at supabase.com
2

Go to Database Settings

Click Project SettingsDatabase
3

Copy Connection Strings

  • DATABASE_URL: Use “Transaction pooler” connection string
  • DIRECT_URL: Use “Session pooler” or “Direct connection” string

JWT Authentication

JSON Web Token configuration for user authentication.
JWT_SECRET
string
required
Secret key for signing JWT tokens.Default (development):
your-super-secret-jwt-key-change-in-production
CRITICAL: Change this to a strong, random value in production! Use at least 32 characters. You can generate one with:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
JWT_EXPIRES_IN
string
default:"7d"
Token expiration time. Supports formats like:
  • 7d - 7 days
  • 24h - 24 hours
  • 60m - 60 minutes
  • 3600s - 3600 seconds
Default: 7d

Server Configuration

Backend server settings.
PORT
number
default:"3001"
Port number for the NestJS backend server.Default: 3001
NODE_ENV
string
default:"development"
Node.js environment mode.Options:
  • development - Development mode with debug logging
  • production - Production mode with optimizations
  • test - Test environment
Default: development

Frontend Configuration

Client application settings (Vite environment variables).
VITE_API_URL
string
required
Backend API base URL for HTTP requests.Development:
http://localhost:3001
Production:
https://api.yourdomain.com
Vite environment variables must be prefixed with VITE_ to be accessible in the client.
VITE_WS_URL
string
required
Backend WebSocket URL for real-time communication.Development:
http://localhost:3001
Production:
https://api.yourdomain.com
In production, this should use https:// (or wss:// for explicit WebSocket). Socket.IO will automatically upgrade the connection.

TURN Server (Optional)

TURN server configuration for NAT traversal in restrictive network environments.
TURN_SERVER_URL
string
TURN server URL for WebRTC connections.Format:
turn:turn.example.com:3478
Leave empty if not using a TURN server (WebRTC will fall back to STUN only).
TURN_USERNAME
string
Username for TURN server authentication.Leave empty if not using a TURN server.
TURN_PASSWORD
string
Password for TURN server authentication.Leave empty if not using a TURN server.
TURN servers are optional but recommended for production to ensure connectivity in restrictive network environments (corporate firewalls, symmetric NATs, etc.).You can use services like:

Environment-Specific Examples

DATABASE_URL="postgresql://neuronmeet:neuronmeet@localhost:5432/neuronmeet"
DIRECT_URL="postgresql://neuronmeet:neuronmeet@localhost:5432/neuronmeet"

JWT_SECRET="your-super-secret-jwt-key-change-in-production"
JWT_EXPIRES_IN="7d"

PORT=3001
NODE_ENV=development

VITE_API_URL=http://localhost:3001
VITE_WS_URL=http://localhost:3001

TURN_SERVER_URL=
TURN_USERNAME=
TURN_PASSWORD=

Validation

After configuring your environment variables:
1

Test database connection

cd server
npm run db:generate
This should connect to your database and generate the Prisma client.
2

Verify server starts

cd server
npm run dev
Check that the server starts without errors and connects to the database.
3

Check frontend build

cd client
npm run build
Ensure the client builds successfully with the Vite environment variables.
Never commit your .env file to version control! It’s already in .gitignore to prevent accidental commits.

Build docs developers (and LLMs) love