No description
  • TypeScript 86.6%
  • Rust 7.8%
  • JavaScript 1.7%
  • GLSL 1.1%
  • HTML 1%
  • Other 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
AxoIsAxo 25ccfcf4b8
Some checks failed
🚀 Deploy / Deploy to openfront.dev (push) Has been skipped
🧪 CI / 🏗️ Build (push) Has been cancelled
🧪 CI / 🔬 Test (push) Has been cancelled
🧪 CI / 🔍 Lint (push) Has been cancelled
🧪 CI / 🎨 Prettier (push) Has been cancelled
🧪 CI / 🗺️ Generated maps up to date (push) Has been cancelled
fix(cw-server): fix lobby countdown rollover, worker game id routing, and lifecycle reset
2026-10-25 02:45:24 +02:00
.baselines feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
.claude/skills feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
.github Bundle the account API, add Extrovert sign-in, and make the game free 2026-10-16 10:19:51 +02:00
.husky feat(devops): add Oxlint alongside ESLint for incremental migration (#3866) 2026-08-03 10:03:31 -07:00
.vscode VSCode: have it recommend trusted Prettier and Socket Security extensions (#3658) 2026-04-13 20:21:08 -07:00
__mocks__ Add trains (#1159) 2025-06-22 08:14:08 -07:00
crates fix(cw-server): fix lobby countdown rollover, worker game id routing, and lifecycle reset 2026-10-25 02:45:24 +02:00
deploy/staging feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
docs feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
map-generator feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
packages feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
proprietary Remove the Halloween theme, redesign the UI as a war-room console, and replace the logo 2026-10-17 00:15:46 +02:00
proxmox Fix the installer hanging at the configuration prompts 2026-10-17 01:40:21 +02:00
resources fix(server): unify game server port on 3001 and translate play-page 2026-10-24 18:03:07 +02:00
scripts fix(client,server): prevent infinite reload loop by robustly matching git commits and ignoring non-commit versions 2026-10-25 01:19:16 +02:00
src fix(client,server): prevent infinite reload loop by robustly matching git commits and ignoring non-commit versions 2026-10-25 01:19:16 +02:00
tests feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
tools feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
.dockerignore fix(docker): ignore scripts/rust-port in docker build and copy boot script 2026-10-24 14:24:16 +02:00
.editorconfig Add prettier-plugin-sh (#762) 2025-05-15 23:09:39 -04:00
.gitattributes Split src/core into engine, engine-api and shared packages (#1701) (#5805) 2026-10-05 20:04:53 -06:00
.gitignore feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
.gitmodules uncomment husky 2025-03-06 15:50:29 -08:00
.npmrc Split src/core into engine, engine-api and shared packages (#1701) (#5805) 2026-10-05 20:04:53 -06:00
.oxlintrc.json feat(devops): add Oxlint alongside ESLint for incremental migration (#3866) 2026-08-03 10:03:31 -07:00
.prettierrc Add prettier-plugin-sh (#762) 2025-05-15 23:09:39 -04:00
.swcrc Switch to @swc/jest to speed up tests Fixes #1679 (#1680) 2025-09-03 16:07:43 -07:00
build-deploy.sh feat(deploy): machine-scoped game hosts so one colour can span machines (#5478) 2026-09-16 14:32:02 -07:00
build.sh refactor(store): deliver the Stripe publishable key at runtime, not build time (#5447) 2026-09-15 12:50:57 -07:00
Cargo.lock fix(cw-server): fix lobby countdown rollover, worker game id routing, and lifecycle reset 2026-10-25 02:45:24 +02:00
Cargo.toml feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
CLAUDE.md feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
client-api.json feat(desktop): publish the client capability level in the release descriptor (#5198) 2026-08-31 15:16:30 -07:00
clippy.toml feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
CODEOWNERS feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
CONTRIBUTING.md feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
CREDITS.md feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
deploy.sh Bundle the account API, add Extrovert sign-in, and make the game free 2026-10-16 10:19:51 +02:00
Dockerfile fix(client,server): prevent infinite reload loop by robustly matching git commits and ignoring non-commit versions 2026-10-25 01:19:16 +02:00
eslint.config.js Split src/core into engine, engine-api and shared packages (#1701) (#5805) 2026-10-05 20:04:53 -06:00
example.env Bundle the account API, add Extrovert sign-in, and make the game free 2026-10-16 10:19:51 +02:00
generate-nginx-upstream.sh feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
generate-supervisor-workers.sh fix(cw-server): fix lobby countdown rollover, worker game id routing, and lifecycle reset 2026-10-25 02:45:24 +02:00
harness.html feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
index.html Give the bottom HUD room to seat every unit button 2026-10-17 12:14:14 +02:00
LICENSE Refine AGPL Section 7 attribution terms 2025-12-16 16:33:51 -08:00
LICENSE-ASSETS feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
LICENSING.md feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
Makefile feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
nginx.conf fix(server): unify game server port on 3001 and translate play-page 2026-10-24 18:03:07 +02:00
package-lock.json feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
package.json Bundle the account API, add Extrovert sign-in, and make the game free 2026-10-16 10:19:51 +02:00
README.md Add a Proxmox VE helper script that installs ClassWar in one command 2026-10-17 01:00:25 +02:00
render-baseline.html feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
rust-toolchain.toml feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
setup.sh feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
supervisord.conf fix(api): reflect CORS origin with credentials, serve catalog/cluster configs, and dynamically spawn supervisor workers 2026-10-25 00:35:49 +02:00
tsconfig.base.json Split src/core into engine, engine-api and shared packages (#1701) (#5805) 2026-10-05 20:04:53 -06:00
tsconfig.json feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
update.sh feat: rebrand to ClassWar, Extrovert auth, free cosmetics, and curated map list 2026-10-13 22:57:47 +02:00
vite.config.ts feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
vite.render-baseline.config.ts feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00
vite.wasm-spike.config.ts feat(rust): complete 100% pure Rust rewrite (M0-M9) with native shell, cutover, and LXC update support 2026-10-24 01:12:37 +02:00

ClassWar Logo

ClassWar.io is an online real-time strategy game focused on territorial control and alliance building. Players compete to expand their territory, build structures, and form strategic alliances in various maps based on real-world geography.

This is a fork/rewrite of WarFront.io. Credit to https://github.com/WarFrontIO.

CI Crowdin CLA assistant License: AGPL v3 Assets: CC BY-SA 4.0

License

ClassWar source code is licensed under the GNU Affero General Public License v3.0

Current copyright notices appear in:

  • Footer: "© ClassWar and Contributors"
  • Loading screen: "© ClassWar and Contributors"

Modified versions must preserve these notices in reasonably visible locations.

See the LICENSE for complete requirements.

For asset licensing, see LICENSE-ASSETS.
For license history, see LICENSING.md.

🌟 Features

  • Real-time Strategy Gameplay: Expand your territory and engage in strategic battles
  • Alliance System: Form alliances with other players for mutual defense
  • Multiple Maps: Play across various geographical regions including Europe, Asia, Africa, and more
  • Resource Management: Balance your expansion with defensive capabilities
  • Cross-platform: Play in any modern web browser

📋 Prerequisites

  • Node.js v24.15.0 or newer in the Node 24 release line
  • npm v12.1.0 or newer in the npm 12 release line
  • A modern web browser (Chrome, Firefox, Edge, etc.)

Node.js may bundle an older npm version. Upgrade it before installing project dependencies:

npm install --global --ignore-scripts npm@12.1.0

🚀 Installation

  1. Clone the repository

    git clone https://github.com/classwario/ClassWar.git
    cd ClassWar
    
  2. Install dependencies

    npm run inst
    

    Do NOT use npm install nor npm i for project dependencies. Use npm run inst; it runs the safer npm ci --ignore-scripts to install exactly the versions in package-lock.json without running lifecycle scripts.

    The repository also rejects dependency releases less than seven days old and dependencies sourced from Git, remote URLs, local tarballs, or directories. Wait until a new release passes the seven-day window before updating it; security exceptions require explicit maintainer review.

One-click install on Proxmox VE

On a Proxmox host, this creates a Debian LXC, builds the server image and starts it behind your reverse proxy:

bash -c "$(curl -fsSL https://git.new-eve.org/axoisaxo/classwar/raw/branch/main/proxmox/ct/classwar.sh)"

See proxmox/README.md for the prompts, the ports, and the reverse proxy setup.

🎮 Running the Game

Development Mode

Run both the client and server in development mode with live reloading:

npm run dev

This will:

  • Start the webpack dev server for the client
  • Launch the game server with development settings
  • Open the game in your default browser (to disable this behavior, set SKIP_BROWSER_OPEN=true in your environment)

Client Only

To run just the client with hot reloading:

npm run start:client

Server Only

To run just the server with development settings:

npm run start:server-dev

Connecting to staging or production backends

Sometimes it's useful to connect to production servers when replaying a game, testing user profiles, purchases, or login flow.

To replay a production game, make sure you're on the same commit that the game you want to replay was executed on, you can find the gitCommit value via https://api.classwar.io/game/[gameId]. Unfinished games cannot be replayed on localhost.

To connect to staging api servers:

npm run dev:staging

To connect to production api servers:

npm run dev:prod

🛠️ Development Tools

  • Format code:

    npm run format
    
  • Lint code with Oxlint and ESLint:

    npm run lint
    
  • Lint and fix code with Oxlint and ESLint:

    npm run lint:fix
    
  • Testing

    npm test
    

🏗️ Project Structure

  • /src/client - Frontend game client
  • /src/server - Backend game server
  • /packages/engine - Deterministic game simulation (@classwar/engine)
  • /packages/engine-api - The engine's contract: types, schemas, game updates and the worker protocol (@classwar/engine-api)
  • /packages/engine-lib - Engine code also used outside the engine: map grid, rules, helpers (@classwar/engine-lib)
  • /packages/shared - Code shared by client and server: wire schemas, env, asset URLs (@classwar/shared)
  • /packages/zbin - Compact binary wire format for zod schemas (self-contained, zod-only)
  • /resources - Static assets (images, maps, etc.)

🤝 Contributing

Contributions and translations are welcome! See CONTRIBUTING.md for the workflow, the approved-issue process, project governance, and translation info.