Skip to content

Commit 32ff95b

Browse files
committed
refactor: split to arbitrium-core (public) removing GUI/benchmarks
Remove private components for public MIT-licensed package: - GUI frontend (React/TypeScript) and backend (WebSocket server) - Benchmarking framework (BBH, GPQA, ablation studies) - Docker microservices (Dockerfile.backend/frontend, docker-compose) - Authentication system (JWT, PostgreSQL, bcrypt) - API schemas for WebSocket protocol Retain core tournament engine, workflow system, and CLI.
1 parent 9099e82 commit 32ff95b

File tree

103 files changed

+113
-18605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+113
-18605
lines changed

.dockerignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ mutants/
122122
.claude/
123123
*.claude
124124

125-
# Node modules (will be built in Docker)
126-
gui/node_modules/
127-
gui/dist/
128125

129126
# SSH keys (prevent accidental exposure)
130127
*id_rsa*

.env.example

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,6 @@
11
# Environment
22
ARBITRIUM_ENV=development
33

4-
# PostgreSQL Configuration (for Docker Compose)
5-
POSTGRES_DB=arbitrium
6-
POSTGRES_USER=arbitrium
7-
POSTGRES_PASSWORD=change_this_password
8-
9-
# Database Configuration (for application)
10-
ARBITRIUM_DB_HOST=localhost
11-
ARBITRIUM_DB_PORT=5432
12-
ARBITRIUM_DB_NAME=arbitrium
13-
ARBITRIUM_DB_USER=arbitrium
14-
ARBITRIUM_DB_PASSWORD=your_password_here
15-
16-
# Database Connection Pool
17-
ARBITRIUM_DB_POOL_MIN_SIZE=2
18-
ARBITRIUM_DB_POOL_MAX_SIZE=10
19-
20-
# JWT Configuration (Generate with: openssl rand -base64 32)
21-
ARBITRIUM_JWT_SECRET=your_jwt_secret_here_change_in_production
22-
ARBITRIUM_JWT_ACCESS_TOKEN_EXPIRES_MINUTES=15
23-
ARBITRIUM_JWT_REFRESH_TOKEN_EXPIRES_DAYS=30
24-
25-
# WebSocket Security
26-
ARBITRIUM_MAX_WEBSOCKET_CONNECTIONS=1000
27-
ARBITRIUM_MAX_CONNECTIONS_PER_IP=10
28-
ARBITRIUM_WEBSOCKET_MESSAGE_RATE_LIMIT_PER_SECOND=10
29-
ARBITRIUM_WEBSOCKET_MESSAGE_RATE_LIMIT_PER_MINUTE=100
30-
ARBITRIUM_ALLOWED_ORIGINS=http://localhost,http://localhost:8765,http://127.0.0.1,http://127.0.0.1:8765
31-
32-
# Development/Testing Options
33-
SKIP_DB_INIT=false
34-
ARBITRIUM_SKIP_AUTH=false
35-
36-
# Server Configuration (for Docker Compose)
37-
FRONTEND_PORT=80 # Nginx frontend (public access)
38-
GUI_PORT=8765 # Backend API (internal, not exposed in microservices mode)
39-
404
# LLM API Keys (for tournaments)
415
# LiteLLM reads these environment variables automatically.
426
# Only set the keys for providers you plan to use.
@@ -83,17 +47,4 @@ LITELLM_LOG=INFO
8347

8448
# Ollama Configuration
8549
# REQUIRED when using Ollama models (llama3, phi3, gemma3, qwen3)
86-
# Application will raise RuntimeError if OLLAMA_BASE_URL is not set when accessing Ollama models
87-
OLLAMA_BASE_URL=http://host.docker.internal:11434
88-
89-
# Alternative configurations:
90-
# - Docker Compose Ollama service: http://ollama:11434
91-
# (requires: docker-compose --profile ollama up -d)
92-
# - Native/local development: http://localhost:11434
93-
# - Host machine from Docker container: http://host.docker.internal:11434 (default above)
94-
95-
# Optional: Comma-separated list of models to preload on Ollama startup
96-
# (Only used when running Ollama via Docker Compose)
97-
# Examples: llama2, llama3, mistral, codellama, phi
98-
# Uncomment to enable automatic model preloading:
99-
# OLLAMA_MODELS=llama2,mistral
50+
OLLAMA_BASE_URL=http://localhost:11434

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,11 @@ jobs:
2727
path: ~/.cache/pre-commit
2828
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
2929

30-
- name: Set up Node.js
31-
uses: actions/setup-node@v6
32-
with:
33-
node-version: "22"
34-
3530
- name: Install Python dependencies
3631
run: |
3732
python -m pip install --upgrade pip
3833
pip install pre-commit
3934
pip install -e .[dev]
4035
41-
- name: Install frontend dependencies
42-
run: cd gui && npm ci
43-
4436
- name: Run pre-commit
4537
run: pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ repos:
2121
- id: check-merge-conflict
2222
- id: check-toml
2323
- id: check-json
24-
exclude: ^gui/tsconfig.*\.json$
2524
- id: mixed-line-ending
2625
args: ["--fix=lf"]
2726
- id: check-case-conflict
@@ -66,19 +65,6 @@ repos:
6665
args: ['--py313-plus']
6766
files: ^src/.*\.py$
6867

69-
# ============================================================================
70-
# FRONTEND FORMATTING & LINTING (TypeScript, React, CSS)
71-
# ============================================================================
72-
- repo: https://github.com/pre-commit/mirrors-prettier
73-
rev: v4.0.0-alpha.8
74-
hooks:
75-
- id: prettier
76-
name: prettier (frontend formatting)
77-
types_or: [javascript, jsx, ts, tsx, css, json, yaml, markdown]
78-
args: [--write, --ignore-unknown]
79-
exclude: ^(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|gui/tsconfig.*\.json)$
80-
files: ^gui/
81-
8268
# ============================================================================
8369
# TESTING - MOVED TO CI
8470
# pytest runs in CI for faster commits (was slowing down pre-commit)
@@ -244,77 +230,3 @@ repos:
244230
hooks:
245231
- id: commitizen
246232
stages: [commit-msg]
247-
248-
# ============================================================================
249-
# LOCAL HOOKS (Project-Specific - Frontend & Security)
250-
# ============================================================================
251-
- repo: local
252-
hooks:
253-
- id: sort-package-json
254-
name: 'Sort package.json files'
255-
entry: bash -c 'cd gui && npx sort-package-json package.json'
256-
language: system
257-
files: ^gui/package\.json$
258-
pass_filenames: false
259-
260-
- id: tsc-gui
261-
name: 'TypeScript type check (gui)'
262-
entry: bash -c 'cd gui && npm run type-check'
263-
language: system
264-
pass_filenames: false
265-
files: ^gui/.*\.(ts|tsx)$
266-
267-
- id: eslint-gui
268-
name: 'ESLint (gui quality & security)'
269-
entry: bash -c 'cd gui && npx eslint --max-warnings 0'
270-
language: system
271-
files: ^gui/.*\.(ts|tsx)$
272-
pass_filenames: false
273-
274-
- id: jscpd-gui
275-
name: 'Copy-paste detection (jscpd)'
276-
entry: >
277-
bash -c 'cd gui && npx jscpd --min-lines 6 --min-tokens 50
278-
--threshold 3 --ignore "**/node_modules/**,**/dist/**" src/'
279-
language: system
280-
files: ^gui/.*\.(ts|tsx)$
281-
pass_filenames: false
282-
283-
- id: knip-gui
284-
name: 'Dead code detection (knip)'
285-
entry: bash -c 'cd gui && npx knip --no-progress --no-config-hints'
286-
language: system
287-
files: ^gui/.*\.(ts|tsx)$
288-
pass_filenames: false
289-
290-
- id: type-coverage-gui
291-
name: 'Type coverage check (>=85%)'
292-
entry: bash -c 'cd gui && npx type-coverage --at-least 85 --ignore-catch'
293-
language: system
294-
files: ^gui/.*\.(ts|tsx)$
295-
pass_filenames: false
296-
297-
- id: npm-audit-gui
298-
name: 'npm audit (frontend security)'
299-
entry: bash -c 'cd gui && npm audit --audit-level=high --omit=dev'
300-
language: system
301-
files: ^gui/package(-lock)?\.json$
302-
pass_filenames: false
303-
304-
- id: docker-compose-check
305-
name: 'Docker Compose config validation'
306-
entry: >
307-
bash -c 'for f in docker-compose*.yml docker-compose*.yaml; do
308-
[ -f "$f" ] && docker compose -f "$f" config -q || true; done'
309-
language: system
310-
files: ^docker-compose.*\.(yml|yaml)$
311-
pass_filenames: false
312-
313-
- id: docker-build-check
314-
name: 'Docker build validation'
315-
entry: >
316-
bash -c 'docker compose build --quiet backend frontend
317-
|| { echo "Docker build failed!"; exit 1; }'
318-
language: system
319-
files: ^(Dockerfile.*|docker-compose\.yml|src/.*\.py|gui/.*\.(ts|tsx|json))$
320-
pass_filenames: false

.semgrepignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,3 @@ docs/
3434
# Outputs/Reports
3535
outputs/
3636
reports/
37-
38-
# GUI Frontend (scanned separately)
39-
gui/

0 commit comments

Comments
 (0)