Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Getting Started

dev-mondoshawan edited this page Apr 15, 2026 · 1 revision

Getting Started with Dissensus

This guide will walk you through setting up the Dissensus AI Debate Engine locally or on a VPS.


Prerequisites

Before you begin, ensure you have the following:

Requirement Version Notes
Node.js 20+ (18+ minimum) Download from nodejs.org
npm 9+ Included with Node.js
API Key From DeepSeek, Google, or OpenAI

Quick Start

1. Clone the Repository

cd dissensus-engine

2. Install Dependencies

npm install

3. Configure Environment Variables

Copy the example environment file and add your API keys:

cp .env.example .env

Edit .env with your preferred editor:

# Server
PORT=3000
NODE_ENV=development
# API Keys — Add at least one provider
DEEPSEEK_API_KEY=sk-your-deepseek-key
GOOGLE_API_KEY=AIza-your-gemini-key
OPENAI_API_KEY=sk-your-openai-key

4. Start the Server

npm start

The server will start on http://localhost:3000


API Key Guide

Where to Get Keys

Provider URL Free Tier Cost per Debate
DeepSeek platform.deepseek.com Limited ~0ドル.008 ⭐ Recommended
Google Gemini aistudio.google.com Yes — generous free tier ~0ドル.006
OpenAI platform.openai.com Limited (5ドル credit) ~0ドル.15 (GPT-4o) / ~0ドル.01 (GPT-4o Mini)

Cost Comparison

Provider Model Cost/Debate Quality Speed
🔥 DeepSeek V3.2 ~0ドル.008 Very Good Fast
⚡ Google Gemini 2.0 Flash ~0ドル.006 Good Very Fast
⚡ Google Gemini 2.5 Flash ~0ドル.03 Very Good Fast
⚡ Google Gemini 2.5 Flash-Lite ~0ドル.006 Good Very Fast
🧠 OpenAI GPT-4o ~0ドル.15 Excellent Medium
🧠 OpenAI GPT-4o Mini ~0ドル.01 Good Fast

Recommendation: Start with DeepSeek V3.2 for the best value, or Gemini 2.0 Flash for the free tier.


First Debate Walkthrough

Once the server is running:

  1. Open the app — Navigate to http://localhost:3000 in your browser

  2. Select your AI Provider — Choose from the dropdown (DeepSeek, Gemini, or OpenAI)

  3. Enter your API Key — Paste your key (or skip if using server-side keys)

  4. Select a model — Pick based on your quality/speed/cost preferences

  5. Type a debate topic — Examples:

    • "Is Bitcoin a good store of value for the next 10 years?"
    • "Should companies adopt a 4-day work week?"
    • "What are the top 5 AI cryptocurrencies for 2025?"
  6. Click "⚡ Start Debate" — Watch CIPHER, NOVA, and PRISM battle it out in real-time!


Development vs Production Mode

Development Mode

NODE_ENV=development npm start
  • Rate limiting: 100 debates/minute (relaxed)
  • Verbose error messages
  • No server-side API keys required

Production Mode

NODE_ENV=production npm start
  • Rate limiting: 10 debates/minute (strict)
  • Minimal error details
  • Server-side API keys recommended for visitor access

VPS Deployment (Production)

For production deployments, set API keys in .env so visitors can debate without entering their own keys:

# .env
NODE_ENV=production
PORT=3000
# Server-side keys (visitors can use these without entering their own)
DEEPSEEK_API_KEY=sk-your-key
GOOGLE_API_KEY=AIza...
OPENAI_API_KEY=sk-your-key

Users can still override with their own key if they prefer to use their quota.


Environment Variables Reference

Variable Default Description
PORT 3000 Server port
NODE_ENV development Environment mode
TRUST_PROXY (enabled) Set 0 only if no reverse proxy
TRUST_PROXY_HOPS 1 Number of trusted proxy hops
DEEPSEEK_API_KEY DeepSeek API key
GOOGLE_API_KEY Google/Gemini API key
GEMINI_API_KEY Alternative Gemini key name
OPENAI_API_KEY OpenAI API key
DEBATE_OF_THE_DAY_TZ UTC Timezone for daily topic rotation

Troubleshooting

"API key required" error

  • Ensure you've set at least one API key in .env
  • Or enter a key directly in the web interface

"ERR_ERL_UNEXPECTED_X_FORWARDED_FOR" error

  • This happens when behind a proxy without proper trust settings
  • Leave TRUST_PROXY unset (default) when using nginx/Hostinger
  • Update to the latest code — trust proxy is now enabled by default

Port already in use

# Kill process on port 3000 (Linux/Mac)
lsof -ti:3000 | xargs kill -9
# Or use a different port
PORT=3001 npm start

Next Steps


Ready to forge truth from disagreement? Start your first debate!

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /