Skip to content

Repository files navigation

Arena Triple Chat

Arena Triple Chat is a proprietary developer tool that lets you send a single prompt to OpenAI, Anthropic (Claude), and Google Gemini simultaneously and view their responses side by side. It’s designed as a clean, extensible comparison framework for evaluating LLM behavior under identical conditions using a shared backend and static frontend.


Table of Contents

  1. Overview
  2. Architecture
  3. Folder Structure
  4. Setup and Installation
  5. Environment Configuration
  6. Running the Application
  7. Testing
  8. Development Utilities
  9. Security Model
  10. License

Overview

Arena Triple Chat provides an isolated backend service built with Express and LangChain, exposing a single /api/arena route that:

  • Accepts a user prompt (and optional system instruction)
  • Fans out to three LLM providers (OpenAI, Anthropic, Gemini)
  • Returns a JSON response with the three outputs normalized for easy comparison

The frontend is a minimalist HTML interface that sends requests to this route and renders results in three columns.


Architecture

  • Backend: Node.js + Express + LangChain integrations for OpenAI, Anthropic, and Gemini.
  • Frontend: Lightweight static HTML + vanilla JS for submitting prompts and rendering results.
  • Security: Credentials remain server-side; clients never see keys or tokens.
  • Extensibility: Additional providers or visual comparison features can be added easily through modular services.

Folder Structure

arena-triple-chat/
|-- config/
|   `-- default.env.example         # Sample environment configuration
|-- documents/
|   |-- architecture.md             # Architecture and security overview
|   `-- versions.md                 # Release notes and change history
|-- scripts/
|   `-- dev.sh                      # Dev launcher and nodemon helper
|-- src/
|   |-- app.js                      # Express app bootstrap
|   |-- server.js                   # HTTP server entry point
|   |-- public/
|   |   `-- index.html              # Static UI shell
|   |-- routes/
|   |   `-- arena.js                # /api/arena router
|   `-- services/
|       |-- claudeService.js        # Anthropic connector
|       |-- geminiService.js        # Google Gemini connector
|       `-- openaiService.js        # OpenAI connector
|-- tests/
|   `-- arena.test.js               # Supertest-based integration tests
|-- AGENTS.md                       # Contributor guide for agents
|-- package.json                    # Node project manifest
|-- requirements.txt                # Python tooling references (optional)
|-- SECURITY.md                     # Security policy
`-- README.md                       # Primary documentation

Setup and Installation

Prerequisites

  • Node.js v18+
  • npm v9+
  • Network access to the chosen LLM APIs (OpenAI, Anthropic, Google)

Clone the Repository

git clone <your-private-repo-url> arena-triple-chat
cd arena-triple-chat

Install Dependences

npm install

Setup Environment

Copy the example environment file and configure it:

cp config/default.env.example .env

Then edit the .env file with your API keys or managed identity configuration.

Variable Description Example
PORT Server port 8787
NODE_ENV Environment mode development
OPENAI_API_KEY API key for OpenAI sk-xxxxxx
ANTHROPIC_API_KEY API key for Anthropic sk-ant-xxxxxx
GOOGLE_API_KEY API key for Google Gemini AIza...
OPENAI_MODEL OpenAI model to use gpt-4o-mini
ANTHROPIC_MODEL Claude model claude-3-5-sonnet-latest
GEMINI_MODEL Gemini model gemini-1.5-pro-latest
WELCOME_MESSAGE UI placeholder text "What fuckery are we brewing today?"

Running the Application

Development Mode

./scripts/dev.sh

The script will:

Load your [.env] file

Install missing dependencies

Start the server (using [nodemon] if available)

Open your browser to http://localhost:8787

Production Mode

npm run start

Testing

Arena Triple Chat includes a small Jest test suite.

Run tests locally with:

npm run lint

Logs

Console logs use [Arena] prefix for easy filtering. To increase verbosity, set:

LOG_LEVEL=debug

Security Model

  • Zero Key Exposure: API credentials are stored server-side only.

  • Network Isolation: All outbound calls occur through the backend.

  • TLS Everywhere: All provider traffic is encrypted.

  • Rate Limiting: Requests are throttled by IP.

  • Input Sanitization: All incoming text is cleaned of HTML or binary sequences.

  • Short-lived Tokens: Managed identity or IAM roles are preferred over static keys.

  • Auditing: Every [/api/arena] call includes a unique [request_id] for traceability.

  • Refer to documents/architecture.md for a complete threat model.

License

Proprietary — All Rights Reserved

This software is the property of Modular Misfits LLC and may not be copied, distributed, modified, or used without explicit written authorization. Unauthorized use, redistribution, or modification is strictly prohibited.

Acknowledgments

  • LangChain for unified model interfaces

  • Express for backend simplicity

  • Anthropic, OpenAI, and Google AI for the LLM APIs used in testing

  • The ever-patient developer who kept this repo honest with his colorful language

About

Triple Chat Arena for ChatGPT, Claude, and Gemini

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages