Express + Socket.IO backend for ArguMate. Handles matchmaking, debate lifecycle, AI judgment, and persistence to MongoDB.
- Node.js
- Express
- Socket.IO
- MongoDB (Mongoose)
- bcrypt, jsonwebtoken
- dotenv
- Node.js 18+ and npm
- MongoDB Atlas or self-hosted MongoDB
- Git
Create a .env file in the backend folder with these variables:
PORT=5001
NODE_ENV=production
MONGO_URI="your_mongo_connection_string"
JWT_SECRET="a_long_random_secret"
FRONTEND_ORIGIN="https://your-frontend-domain.com"
GROQ_API_KEY="your_groq_api_key"
- Clone repo: git clone
- Change to backend folder: cd debate/debate-backend
- Install dependencies: npm ci
- Create
.env(see variables above) - Run in development: node main.js