# GSO Project

Multiplayer space-themed game built with React, Socket.io.

## ⚠️ Requirements

- **Node.js**: Version **22.x** or higher is strictly required (recommended for ESM support and optimal performance).
- **npm**: Included with Node.js.

> **Note**: You can check your currently installed version by running `node -v` in your terminal.

## 🚀 Getting Started

### 1. Unified Dependencies Installation

To automatically install all dependencies in the correct sub-projects (`api`, `game-server`, `client`) at once, run:

### 1. API Server (api/.env)

```env
MONGODB_URI=mongodb://localhost:27017
PORT=PORT
GAME_SERVER_SECRET=game_server_pass_123
JWT_SECRET=secret_123
```

### 2. GameServer (game-server/.env)

```env
PORT=5003
HOST=http://localhost:5003
API_SERVER_URL=http://localhost:3000/api
SERVER_NAME=Alpha-Centauri-3
SERVER_SECRET=game_server_pass_123
JWT_SECRET=secret_123
DESCRIPTION="Welcome to Alpha-Centauri-3, a high-tech frontier station drifting on the edge of the known galaxy."
REGION=UK
channel_binding=require
```

### 3. Client (client/.env)

```env
VITE_API_URL=http://localhost:3000/api
```

```bash
npm run install-all
npm run dev
```
