Remove run source tree from browser repo
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
# Game Server Management Platform
|
||||
|
||||
This repository is the new game server management platform workspace. It replaces the old SCUM-specific coupling with four explicit project roots:
|
||||
This repository is the game server management platform workspace. It replaces the old SCUM-specific coupling with three browser-owned project roots:
|
||||
|
||||
- `platform/`: backend control plane for users, game management plugins, server instances, AI providers, jobs, artifacts, logs, and audit.
|
||||
- `run/`: machine-side executor for scoped process, file, artifact, log, and lifecycle work.
|
||||
- `platform_web/`: management console frontend.
|
||||
- `plugins/`: game management plugin workspace. A plugin defines how to create and manage one server type, and one installed plugin can create many server instances.
|
||||
|
||||
The machine-side executor source lives in the separate `git@git.npc0.com:admin343/run.git` repository. Local debug and Docker workflows can still start it through `RUN_REPO_DIR`.
|
||||
|
||||
## Product Scope
|
||||
|
||||
The platform focuses on:
|
||||
@@ -35,13 +36,13 @@ Logs are historical data, not a UI-only stream. Browser realtime tail may use pl
|
||||
|
||||
Read `AGENTS.md` before changing code. Each subproject also has a local `AGENTS.md` with stricter rules for that area.
|
||||
|
||||
The bootstrap skeleton already includes fixed directories for backend DTOs/models/protocols, run channels, frontend API/routes/contracts, and plugin manifests/schemas/SDK files. `scripts/check-structure.sh` checks these required paths so future changes cannot silently drop or bypass them.
|
||||
The bootstrap skeleton already includes fixed directories for backend DTOs/models/protocols, platform-owned run contracts, frontend API/routes/contracts, and plugin manifests/schemas/SDK files. `scripts/check-structure.sh` checks these required paths so future changes cannot silently drop or bypass them.
|
||||
|
||||
## Development Baseline
|
||||
|
||||
Current tool baseline:
|
||||
|
||||
- Go 1.25.1 for `platform/` and `run/`.
|
||||
- Go 1.25.1 for `platform/`. The external run repository uses the same Go baseline.
|
||||
- Node 22.17.0 and npm 11.6.1 for `platform_web/` and `plugins/`.
|
||||
|
||||
Install JavaScript dependencies before the first full check:
|
||||
@@ -61,14 +62,20 @@ Run focused checks when working in one root:
|
||||
|
||||
```bash
|
||||
(cd platform && go test ./...)
|
||||
(cd run && go test ./...)
|
||||
(cd platform_web && npm run typecheck && npm run test && npm run build)
|
||||
(cd plugins && npm run typecheck && npm run test && npm run validate:manifest)
|
||||
```
|
||||
|
||||
Run executor checks are owned by the separate run checkout:
|
||||
|
||||
```bash
|
||||
(cd "${RUN_REPO_DIR:-../run}" && go test ./...)
|
||||
```
|
||||
|
||||
Run the API-backed local debug workspace when you need platform, run, platform_web, and the dev plugin fixture together:
|
||||
|
||||
```bash
|
||||
git clone git@git.npc0.com:admin343/run.git ../run # once, if the sibling checkout is missing
|
||||
scripts/local-debug-start.sh
|
||||
scripts/local-debug-smoke.sh
|
||||
```
|
||||
@@ -80,7 +87,7 @@ Start local processes:
|
||||
|
||||
```bash
|
||||
(cd platform && go run ./cmd/platform)
|
||||
(cd run && go run ./cmd/run)
|
||||
(cd "${RUN_REPO_DIR:-../run}" && go run ./cmd/run)
|
||||
(cd platform_web && npm run dev)
|
||||
```
|
||||
|
||||
@@ -89,6 +96,7 @@ Start local processes:
|
||||
Use the root compose file for a local all-in-one deployment:
|
||||
|
||||
```bash
|
||||
git clone git@git.npc0.com:admin343/run.git ../run # once, if the sibling checkout is missing
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
@@ -100,7 +108,7 @@ Then open:
|
||||
The compose deployment starts:
|
||||
|
||||
- `platform`: backend on container port `8080`, published as host port `8080`.
|
||||
- `run`: worker mode executor connected to `http://platform:8080`.
|
||||
- `run`: worker mode executor built from `${RUN_REPO_DIR:-../run}` and connected to `http://platform:8080`.
|
||||
- `platform-web`: built static console served by Nginx on container port `80`, published as host port `5173`.
|
||||
|
||||
Persistent Docker data lives in named volumes:
|
||||
@@ -130,7 +138,7 @@ Change the existing `PLATFORM_STORAGE_BACKEND: file` line to `mysql`, uncomment/
|
||||
|
||||
MySQL stores platform metadata only: users, plugins, servers, jobs, audit events, log stream cursors, and indexes. Log bodies stay in `PLATFORM_LOG_DIR` as segmented files unless a future `LogBodyStore` adapter such as ClickHouse/Loki/OpenSearch is configured. Do not store hundreds or thousands of servers' log lines as one MySQL row per line.
|
||||
|
||||
To change Docker ports, storage paths, MySQL DSN, or run identity, edit `docker-compose.yml`. Do not put real secrets in committed compose files; use a local untracked `.env` or shell environment for machine-specific values.
|
||||
To change Docker ports, storage paths, MySQL DSN, run identity, or the external run checkout path, edit `docker-compose.yml` or set `RUN_REPO_DIR`. Do not put real secrets in committed compose files; use a local untracked `.env` or shell environment for machine-specific values.
|
||||
|
||||
## Local Debug Configuration
|
||||
|
||||
@@ -139,7 +147,6 @@ Local direct execution uses environment variables, not a hard-required config fi
|
||||
```text
|
||||
.env.example
|
||||
platform/.env.example
|
||||
run/.env.example
|
||||
platform_web/.env.example
|
||||
```
|
||||
|
||||
@@ -147,11 +154,10 @@ Typical local debugging:
|
||||
|
||||
```bash
|
||||
cp platform/.env.example platform/.env
|
||||
cp run/.env.example run/.env
|
||||
cp platform_web/.env.example platform_web/.env
|
||||
|
||||
(cd platform && set -a && source .env && set +a && go run ./cmd/platform)
|
||||
(cd run && set -a && source .env && set +a && go run ./cmd/run)
|
||||
(cd "${RUN_REPO_DIR:-../run}" && go run ./cmd/run)
|
||||
(cd platform_web && npm run dev)
|
||||
```
|
||||
|
||||
@@ -161,6 +167,7 @@ Most common edits:
|
||||
- Platform file persistence: `PLATFORM_STORAGE_BACKEND=file`, `PLATFORM_METADATA_PATH`, `PLATFORM_LOG_DIR`.
|
||||
- Platform MySQL metadata: `PLATFORM_STORAGE_BACKEND=mysql`, `PLATFORM_MYSQL_DSN=platform:platform@tcp(127.0.0.1:3306)/platform?parseTime=true`.
|
||||
- Log body persistence: `PLATFORM_LOG_BODY_BACKEND=file`, `PLATFORM_LOG_DIR`.
|
||||
- Run source checkout: `RUN_REPO_DIR=../run`.
|
||||
- Run worker mode: `RUN_MODE=worker`.
|
||||
- Run-to-platform URL: `RUN_PLATFORM_URL=http://127.0.0.1:8080` locally, `http://platform:8080` in Docker.
|
||||
- Run local data: `RUN_WORKSPACE_ROOT`, `RUN_SPOOL_ROOT`.
|
||||
|
||||
Reference in New Issue
Block a user