Online browser-based RTS game
  • TypeScript 92.2%
  • GLSL 2.4%
  • JavaScript 2%
  • HTML 1.2%
  • Go 0.9%
  • Other 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-02 23:33:04 +00:00
.claude/skills/run-openfront perf(client): main-thread memory harness + drop three map-sized render buffers (-23%) (#4511) 2026-07-04 20:18:52 -07:00
.github Replace GitHub Actions CI with Jenkins quality gates for Coolify 2026-07-25 04:41:02 -04:00
.husky build: migrate build system to Vite and test runner to Vitest & Remove depracated husky usage (#2703) 2025-12-28 22:10:26 -08: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
docs Better info.json documentation 🗺️ (#4814) 2026-07-31 14:12:23 -07:00
map-generator Better info.json documentation 🗺️ (#4814) 2026-07-31 14:12:23 -07:00
proprietary Tos update (#3917) 2026-05-31 15:09:08 +01:00
resources Fix game history action button overlap in translated layouts (#4824) 2026-08-02 16:05:16 -07:00
scripts fix(ci): drop login shell so go stays on PATH in the go container 2026-07-25 05:46:08 -04:00
src Merge remote-tracking branch 'upstream/main' 2026-08-02 23:33:04 +00:00
tests feat(store): tribe stats page in the Tribes tab (#4823) 2026-08-02 16:03:47 -07:00
.dockerignore Update docker build to be smaller & faster (#2693) 2025-12-25 12:49:00 -08:00
.editorconfig Add prettier-plugin-sh (#762) 2025-05-15 23:09:39 -04:00
.gitignore feat(server): private match telemetry stream (#4687) 2026-07-24 18:49:54 -07:00
.gitmodules uncomment husky 2025-03-06 15:50:29 -08:00
.prettierignore style(ci): apply project prettier to shell scripts 2026-07-25 05:06:39 -04: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 remove falk1 from deployment 2026-03-23 13:40:21 -07:00
build.sh bugfix: include --metadata-file in the build.sh that was accidently removed 2025-12-25 20:27:50 -08:00
CLAUDE.md Add CLAUDE.md 2026-04-29 12:49:19 -06:00
CODEOWNERS fix: Update CODEOWNERS (#2981) 2026-01-21 10:00:55 -08:00
CONTRIBUTING.md Move contributing docs to CONTRIBUTING.md and require approved issues 2026-06-01 21:44:16 -07:00
CREDITS.md split clantag out, and some ui improvements (#4744) 2026-07-28 17:53:50 +00:00
deploy.sh Add admin bot HTTP API for managing private games (#4388) 2026-06-23 19:09:14 -07:00
docker-compose.yml feat(coolify): allow 2-minute public lobbies while staying on GAME_ENV=dev 2026-07-26 02:11:07 -04:00
Dockerfile Mint game ids on the server, randomly route create-game across workers (#4393) 2026-06-23 17:15:09 -07:00
eslint.config.js Handle matchmaking socket close codes per API contract (#4595) 2026-07-13 10:55:15 -07:00
example.env feat(server): private match telemetry stream (#4687) 2026-07-24 18:49:54 -07:00
generate-nginx-upstream.sh Mint game ids on the server, randomly route create-game across workers (#4393) 2026-06-23 17:15:09 -07:00
index.html Route game WebSockets via a configurable server host (Electron desktop) (#4701) 2026-07-24 12:27:52 +01:00
Jenkinsfile Replace GitHub Actions CI with Jenkins quality gates for Coolify 2026-07-25 04:41:02 -04:00
LICENSE Refine AGPL Section 7 attribution terms 2025-12-16 16:33:51 -08:00
LICENSE-ASSETS Tos update (#3917) 2026-05-31 15:09:08 +01:00
LICENSING.md Tos update (#3917) 2026-05-31 15:09:08 +01:00
nginx.conf Add admin bot HTTP API for managing private games (#4388) 2026-06-23 19:09:14 -07:00
package-lock.json chore(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#4741) 2026-07-27 16:51:49 -07:00
package.json fix(server): preserve teamIndex, friends, isLobbyCreator in archived game records (#4819) 2026-08-01 11:04:11 -07:00
README.md Move contributing docs to CONTRIBUTING.md and require approved issues 2026-06-01 21:44:16 -07:00
setup.sh upload manifest to r2 before starting container (#3767) 2026-04-25 21:15:49 -06:00
supervisord.conf remove cloudflare tunnels (#3556) 2026-04-01 19:33:55 -07:00
tsconfig.json TypeScript update to 6.0.3 (#3806) 2026-04-30 15:49:24 -06:00
update.sh fix: NUL-delimit asset keys so apostrophe filenames upload to R2 (#4724) 2026-07-25 12:38:29 -07:00
vite.config.ts Chore(deps): (re)move dependencies (#4737) 2026-07-27 10:26:25 -07:00

OpenFrontIO Logo

OpenFront.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

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

Current copyright notices appear in:

  • Footer: "© OpenFront and Contributors"
  • Loading screen: "© OpenFront 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

  • npm (v10.9.2 or higher)
  • A modern web browser (Chrome, Firefox, Edge, etc.)

🚀 Installation

  1. Clone the repository

    git clone https://github.com/openfrontio/OpenFrontIO.git
    cd OpenFrontIO
    
  2. Install dependencies

    npm run inst
    

    Do NOT use npm install nor npm i but instead use our npm run inst. It runs the safer npm ci --ignore-scripts to install dependencies exactly according to the versions in package-lock.json and doesn't run scripts. This can prevent being hit by a supply chain attack.

🎮 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.openfront.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:

    npm run lint
    
  • Lint and fix code:

    npm run lint:fix
    
  • Testing

    npm test
    

🏗️ Project Structure

  • /src/client - Frontend game client
  • /src/core - Deterministic game simulation
  • /src/server - Backend game server
  • /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.