@@ -42,22 +42,17 @@ The Royal Game of Ur is a race game where each player tries to move all 7 pieces
4242 git clone < repository-url>
4343 cd rgou-cloudflare
4444 npm install
45- npm run setup:worker
4645 ```
4746
48- 2 . ** Start development servers :**
47+ 2 . ** Start the development server :**
4948
5049 ``` bash
51- # Terminal 1: Start Next.js app
50+ # The Next.js app and a local AI worker will be available
5251 npm run dev
53-
54- # Terminal 2: Start AI worker
55- npm run dev:worker
5652 ```
5753
58543 . ** Open your browser:**
5955 - Game: http://localhost:3000
60- - AI Worker: http://localhost:8787
6156
6257## 🏗️ Architecture
6358
@@ -93,21 +88,13 @@ rgou-cloudflare/
9388
9489### Available Scripts
9590
96- #### Main App
97-
98- - ` npm run dev ` - Start development server.
99- - ` npm run build ` - Build for production.
100- - ` npm run postbuild ` - Build client-side Wasm and place it in ` src/lib ` and ` public ` .
101- - ` npm run deploy:cf ` - Deploy to Cloudflare Workers.
91+ - ` npm run dev ` - Start the Next.js development server.
92+ - ` npm run build ` - Build the application for production.
93+ - ` npm run start ` - Start a production server.
94+ - ` npm run deploy:cf ` - Deploy the frontend to Cloudflare Workers.
95+ - ` npm run deploy:worker ` - Deploy the AI worker to Cloudflare.
10296- ` npm run lint ` - Run ESLint.
103- - ` npm run lint:fix ` - Fix ESLint errors.
104-
105- #### AI Worker
106-
107- - ` npm run dev:worker ` - Start worker development server.
108- - ` npm run build:worker ` - Build Rust worker.
109- - ` npm run deploy:worker ` - Deploy worker to Cloudflare.
110- - ` npm run setup:worker ` - Install worker dependencies.
97+ - ` npm run check ` - Run prettier, linting, and type checking.
11198
11299## 🤖 Dual AI Engine
113100
@@ -244,14 +231,13 @@ The AI provides detailed game analytics:
244231
245232### Next.js Configuration
246233
247- The project uses ` open-next ` for Cloudflare Workers compatibility:
234+ The project is configured for a static export to be compatible with a standard Cloudflare Worker deployment.
248235
249236``` typescript
250237// next.config.mjs
251238const nextConfig = {
252239 output: " export" ,
253- trailingSlash: true ,
254- images: { unoptimized: true },
240+ // ... other settings
255241};
256242```
257243
0 commit comments